Orange Pi Zero - IOT MQTT monitor - with onboard influxdb, chronograf and kapacitor

okay in an effort to conserve size I rebuilt from scratch and left out the influx software … the entire OS if compressed with rar is only 10 megs… the os can be found here

and install influxdb ( using 1.6.2 as they change something in the new version that made it incompatible for some reason) just ssh into root and run these :

wget https://dl.influxdata.com/influxdb/releases/influxdb-1.6.2_linux_armhf.tar.gz

tar xvfz influxdb-1.6.2_linux_armhf.tar.gz

wget https://dl.influxdata.com/chronograf/releases/chronograf-1.7.5_linux_armhf.tar.gz

tar xvfz chronograf-1.7.5_linux_armhf.tar.gz

wget https://dl.influxdata.com/kapacitor/releases/kapacitor-1.5.2_linux_armhf.tar.gz

tar xvfz kapacitor-1.5.2_linux_armhf.tar.gz

enable it in system> startup> local startup

break down of the topic:

mosquitto_pub -t ‘incoming/OpenWrt/mqtt-Pressure/pressure-heatpump’ -m ‘N:21.5’`

you can change the “hostname” OpenWrt to what ever you like, you can use it to develop sub groups - but if you do not use at least one that matches the hostname of the device it will not display in luci statistics ( if you only wish to save data to influxdb and do not wish it to be displayed locally in luci statistic then you can ignore the localhost) -

mqtt-Energy, mqtt-Temp, mqtt-Flow and mqtt-Pressure are the the current fixed catagories for displaying in openwrt. you can use one of these or add your own catagory- the only prequisite is that it starts with mqtt-XXXXX - but these will not be displayed in luci statistics

power, temperature, humidity, flow, and pressure is the typedb used by collectd you can use any of the assigned typedb listed in collectd ( but only the 5 listed above will be displayed in luci statistics)

. grid, greenhouse and heatpump are descriptions you can use whatever you like here…

it creates a data base based on the MAC of the orange pi in the influxdb - then the value is stored as -“hostname”- type -description

you can use one orange pi zero as the influxdb server and other as one as remote nodes just edit Sendinflux.pl to have the ip or domain of the remote location these remotes will be based on thier MAC so there will not be any data overlapping - every thing is automactic and any new MQTT or nodes will automatically add it data to the influxdb server …

1 Like