Monitor your iGrill (mini, v2 or v3) (with a Raspberry Pi 1/2/3) - and an forward it to an mqtt-server
Tested with Docker on a Pi 3 and Pi Zero W with iGrill v3.
- An iGrill Device (and at least one probe)
- A bluetooth enabled computer - preferable a raspberry pi
- A mqtt server as message receiver
- clone this repo
- install required modules (see requirements.txt)
- create a config directory and add at least one device config (see
./exampleconfig/device.yaml). To find your device MAC just run
hcitool lescan
- start application, any of:
- Run in docker (recommended):
docker-compose up -d
- Run manually:
./monitor.py -c <config_location>
- Set up systemd service (see below)
- Run in docker (recommended):
Place this file into the proper folder - for instance: /lib/systemd/system/igrill.service
[Unit]
Description=igrill MQTT service
After=network.target
[Service]
Type=simple
Restart=always
RestartSec=2
ExecStart=/usr/bin/python <path_to_igrill_repo>/monitor.py -c <path_to_config_dir>
[Install]
WantedBy=multi-user.target
Run systemctl daemon-reload && systemctl enable igrill && systemctl start igrill
Next time you reboot, the iGrill service will connect and reconnect if something goes wrong...
View the docker container logs with docker-compose logs
.
If your device is stuck on "Authenticating" the following has been reported to work:
- within the file /etc/bluetooth/main.conf under [Policy] check the existence of AutoEnable=true
- Comment out below line in /lib/udev/rules.d/90-pi-bluetooth.rules by prefixing "#" the line ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", RUN+="/bin/hciconfig %k up"