Firstoff, Thanks MichMich and all the contributors for the incredible platform - have had a lot of fun with it since set up of my first mirror on last summer.
I’ve written two modules just for own fun - the FunnyHolidays one is trivial, but for the MMM-SensorGateway
I’d love to hear feedback if somebody happens to reproduce the installation and setup. (since I did some
hacking throughout especially the BLE and startup service setup - and haven’t done “clean install”
so there might be something missing / other glitches in the instructions) . Posted this on the Utilities - category since this kind of gateway is quite generic and also would like to hear if somebody implements other use-cases / wants to build one together. (These modules are also added to 3rd party modules list - I didn’t find a similar implementation there yet)
Movesense firmware source code is not available. Binaries can be found under firmwares/
If someone would be interested in that the Movesense is rather open environment - and has several example sources available
is for the beaconing software.
@mattileh maybe you could give a few more words about SensorGateway… What do you need to make the module work? what sensors?
Thanks! This was something what I was wishing for to happen. Previously I used influx+grafana setup to get info to MM and it was quite keen setup to corrupt memory cards. I dont need data to be stored anywhere so this was more than good solution to get info from ruuvitags to MM.
@thap Hi!, great to hear that you found the module usefull as well.
Please let me know if there was any problems in replicating the gateway setup or any other changes required to the instructions.
Tried this with 3b/3b+ (python 2.7/3.6), when installing module I get the following error:
pi@raspberrypi:~/MagicMirror/modules/MMM-SensorGateway $ npm install npm WARN deprecated email@example.com: deprecated in favor of builtin child_process.exe cFile > firstname.lastname@example.org install /home/pi/MagicMirror/modules/MMM-SensorGateway/node_m odules/websocket > (node-gyp rebuild 2> builderror.log) || (exit 0) make: Entering directory '/home/pi/MagicMirror/modules/MMM-SensorGateway/node_mo dules/websocket/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o SOLINK_MODULE(target) Release/obj.target/bufferutil.node COPY Release/bufferutil.node CXX(target) Release/obj.target/validation/src/validation.o SOLINK_MODULE(target) Release/obj.target/validation.node COPY Release/validation.node make: Leaving directory '/home/pi/MagicMirror/modules/MMM-SensorGateway/node_mod ules/websocket/build' MMM-SensorGateway@1.0.0 /home/pi/MagicMirror/modules/MMM-SensorGateway ├── email@example.com └─┬ firstname.lastname@example.org ├─┬ email@example.com │ └── firstname.lastname@example.org ├─┬ email@example.com │ ├─┬ firstname.lastname@example.org │ │ └─┬ email@example.com │ │ └── firstname.lastname@example.org │ ├─┬ email@example.com │ │ └─┬ firstname.lastname@example.org │ │ └── email@example.com │ └── firstname.lastname@example.org ├── email@example.com ├─┬ firstname.lastname@example.org │ └── email@example.com └── firstname.lastname@example.org npm WARN MMM-SensorGateway@1.0.0 No repository field.
I can see the temperature with “ruuvitag -f” in console. If I try to see the status with “sudo service local_blegateway status” I get:
pi@raspberrypi:~ $ sudo service local_blegateway status ● local_blegateway.service - local_blegateway, Movesense and RuuviTag BLE advertisement message gateway to websocket interface Loaded: loaded (/lib/systemd/system/local_blegateway.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Fri 2019-12-20 17:04:04 EET; 1s ago Process: 1972 ExecStart=/usr/share/local_blegateway/local_blegatewaykickstart.sh (code=exited, status=1/FAILURE) Main PID: 1972 (code=exited, status=1/FAILURE) joulu 20 17:04:04 raspberrypi systemd: local_blegateway.service: Unit entered failed state. joulu 20 17:04:04 raspberrypi systemd: local_blegateway.service: Failed with result 'exit-code'.
@dmd Hi!, Python 2.7.16 is the exact python version I’ve used.
the exec module warning is expected, is there something in the snippet you sent that indicates that something went wrong in the module installation?
btw, how did the service installation itself go? (there is an expected output in the instructions) and can you try running the gateway python script directly? e.g. :
sudo python bleAdvWebSocket.py
and post the results here.
pi@mirror-pi:~/MagicMirror/modules/MMM-SensorGateway/gateway $ python bleAdvWebSocket.py Traceback (most recent call last): File "bleAdvWebSocket.py", line 13, in module import websocket ImportError: No module named websocket
There is a lot of install work for this module. Did u guys run the install script per the readme?
* run `npm install` in module's directory to install websocket and exec modules.
also the local run of advSocket needs root access so please run it with the snippet above (e.g. with
sudoin front, or from root user)
Is there a fix to the before mentioned errors?