borpin
(Brian Orpin)
55
Good start.
On the basis you did this on the Pi, connected to the emonTX, this data stream is what you will collect and send to the emonPi. The way to do that is by configuring emonhub which is easily done via the emoncms UI on the Pi connected to the emonTX.
So what you need to tell emohub to do, is read the data off the serial interface and send it to the EmonPi.
Under the [interfacers] section;
[[SerialTx]]
Type = EmonHubTx3eInterfacer
[[[init_settings]]]
com_port= /dev/ttyAMA0
com_baud = 115200
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
nodeoffset = 0
nodename = Serial_PiZ
You now need to configure sending it to the emonPi via MQTT (you could do it via HTTP if you wish)
[[MQTT-emonPi]]
Type = EmonHubMqttInterfacer
[[[init_settings]]]
mqtt_host = 192.168.7.243
mqtt_port = 1883
mqtt_user = emonpi
mqtt_passwd = emonpimqtt2016
[[[runtimesettings]]]
subchannels = ToEmonCMS,
timestamped = True
node_JSON_enable = 1
node_JSON_basetopic = emon/
I’ve set this to use the new JSON format so it goes as a single MQTT publish.