Robert/Paul …
Using datacode = 0 did not solve the thread is dead problem.
Then for the umpteenth time I read this post …
… and found the solution … Interfacer Type needs to be EmonHubSerialInterfacer.
I now have Inputs to emoncms!
So to recap my set up …
Substitute SERIALOUT in line 165 of the .ino file and flash to the emonTx unit.
In my case, I connected just one CT plus AC adapter plus temp sensor.
My direct serial connection is like so …
Delete the RFM2Pi interfacer from the emonhub config and add …
[[SerialTx]]
Type = EmonHubSerialInterfacer
[[[init_settings]]]
com_port= /dev/ttyAMA0
com_baud = 115200
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
Modify Node 11 in the emonhub config like so …
[[11]]
nodename = 3phase
[[[rx]]]
names = powerL1, powerL2, powerL3, power4, Vrms, temp1, temp2, temp3, temp4, temp5, temp6
datacode = 0
scales = 1,1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1
units =W,W,W,W,V,C,C,C,C,C,C
Note – pulse to be added later – once the .ino file has been amended to add the pulse count to the print outputs.
Here’s a log file extract …
2017-04-17 12:29:22,315 INFO MainThread EmonHub emonHub ‘emon-pi’ variant v1.2
2017-04-17 12:29:22,316 INFO MainThread Opening hub…
2017-04-17 12:29:22,316 INFO MainThread Logging level set to DEBUG
2017-04-17 12:29:22,317 INFO MainThread Creating EmonHubSerialInterfacer ‘SerialTx’
2017-04-17 12:29:22,320 DEBUG MainThread Opening serial port: /dev/ttyAMA0 @ 115200 bits/s
2017-04-17 12:29:22,321 DEBUG MainThread Setting SerialTx pubchannels: [‘ToEmonCMS’]
2017-04-17 12:29:22,322 DEBUG MainThread Interfacer: Subscribed to channel’ : ch2
2017-04-17 12:29:22,323 INFO MainThread Creating EmonHubMqttInterfacer ‘MQTT’
2017-04-17 12:29:22,325 INFO MainThread MQTT Init mqtt_host=127.0.0.1 mqtt_port=1883 mqtt_user=emonpi
2017-04-17 12:29:22,328 DEBUG MainThread MQTT Subscribed to channel’ : ToEmonCMS
2017-04-17 12:29:22,329 INFO MainThread Creating EmonHubEmoncmsHTTPInterfacer ‘emoncmsorg’
2017-04-17 12:29:22,331 DEBUG MainThread emoncmsorg Subscribed to channel’ : ToEmonCMS
2017-04-17 12:29:22,429 INFO MQTT Connecting to MQTT Server
2017-04-17 12:29:22,432 INFO MQTT connection status: Connection successful
2017-04-17 12:29:22,434 DEBUG MQTT CONACK => Return code: 0
2017-04-17 12:29:22,535 INFO MQTT on_subscribe
2017-04-17 12:29:22,828 DEBUG SerialTx 1 NEW FRAME : 11 994 0 0 0 25366 223
2017-04-17 12:29:22,830 DEBUG SerialTx 1 Timestamp : 1492432162.83
2017-04-17 12:29:22,830 DEBUG SerialTx 1 From Node : 11
2017-04-17 12:29:22,831 DEBUG SerialTx 1 Values : [994, 0, 0, 0, 253.66, 22.3]
2017-04-17 12:29:22,831 DEBUG SerialTx 1 Sent to channel(start)’ : ToEmonCMS
2017-04-17 12:29:22,833 INFO SerialTx Publishing: emon/3phase/powerL1 994
2017-04-17 12:29:22,834 INFO SerialTx Publishing: emon/3phase/powerL2 0
2017-04-17 12:29:22,836 INFO SerialTx Publishing: emon/3phase/powerL3 0
2017-04-17 12:29:22,849 INFO SerialTx Publishing: emon/3phase/power4 0
2017-04-17 12:29:22,851 INFO SerialTx Publishing: emon/3phase/Vrms 253.66
2017-04-17 12:29:22,854 INFO SerialTx Publishing: emon/3phase/temp1 22.3
2017-04-17 12:29:22,856 INFO SerialTx Publishing: emon/3phase/rssi 0
2017-04-17 12:29:22,858 INFO SerialTx Publishing: emonhub/rx/11/values 994,0,0,0,253.66,22.3
2017-04-17 12:29:22,860 INFO SerialTx Publishing: emonhub/rx/11/rssi 0
2017-04-17 12:29:22,862 DEBUG SerialTx 1 adding frame to buffer => [1492432162.828043, 11, 994, 0, 0, 0, 253.66, 22.3]
2017-04-17 12:29:22,862 DEBUG SerialTx 1 Sent to channel(end)’ : ToEmonCMS
Can I assume that you guys will fix the .ino file for pulse print output? Also, line 121 needs to reflect datacode = 0
Thx again for yr support