Otodata TM6030 Propane Sensor to Genmon and Hubitat
This assumes you're running genmon. If you're not, you may need to adjust the final location of where your script will be stored in the .service file. This also assumes bluetooth is working and can see your Otodata sensor.
-
Copy otodata_receiver.pl to ~pi/genmon/OtherApps
-
apt-get install libwww-perl
-
Make sure bluetooth is actually enabled, working, and you can see your TM6030 device:
sudo hcitool lescan --duplicates
-
If you can, then you're good to proceed.
-
Go back in otodata_receiver.pl and edit variables. If you're using hubitat, then you'll need the app & driver from here: https://github.com/bdwilson/hubitat/tree/master/Otodata-Propane. Add both app (enable oauth!) and driver, then create a virtual driver and name it whatever you wish. Add the user app and select this newly-created driver. Get the URL and Key from this and add it back into otodata_receiver.pl.
-
Make sure the pi user can run things as sudo without a password. Edit /etc/sudoers to add the following:
pi ALL = NOPASSWD: /usr/bin/hcitool
-
sudo cp otodata.service /etc/systemd/system
-
Enable systemd service:
sudo systemctl enable otodata
-
Start systemd service:
sudo systemctl start otodata
-
Check logs to make sure things are working
sudo journalctl -u otodata.service -f (to follow the output)
Bug me on Twitter at @brianwilson or email me here.