Alright, it took me some time, but I’ve made a little progress. I’m using the direct serial sketch instead, since it seems to do everything I need it to. I’ve got AC/AC and a CT hooked up, so the numbers actually make sense now, but I’m still getting the invalid datacode warnings.
Here’s the top part of my emonhub config, pretty much the same as paul recommended:
[[SerialArduino]]
Type = EmonHubSerialInterfacer
[[[init_settings]]]
com_port = /dev/ttyAMA0
com_baud = 115200 # 9600 for old RFM12Pi
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
subchannels = ToRFM12,
And here is the node description:
[[10]]
nodename = emontx1
[[[rx]]]
names = power1, power2, power3, power4, vrms
datacode = f
scale = 1
units =W,W,W,W,V
And finally, here’s what shows up in the emonhub log:
2016-12-17 17:33:37,646 DEBUG SerialArduino 71 NEW FRAME : 10 79.27 -0.33 -0.55 -0.05 125.01
2016-12-17 17:33:37,646 WARNING SerialArduino 71 RX data length: 5 is not valid for datacode f
2016-12-17 17:33:47,686 DEBUG SerialArduino 72 NEW FRAME : 10 78.95 -0.07 -0.12 -0.08 124.83
2016-12-17 17:33:47,687 WARNING SerialArduino 72 RX data length: 5 is not valid for datacode f
2016-12-17 17:33:57,641 DEBUG SerialArduino 73 NEW FRAME : 10 79.42 -0.29 0.02 -0.04 124.97
2016-12-17 17:33:57,642 WARNING SerialArduino 73 RX data length: 5 is not valid for datacode f
Any ideas? I assume it’s still having problems with the floats, but beyond using the EmonHubSerialInterfacer and specifying datacode = f (I’ve tried d as well), I’m not sure what else to do. I guess I can try reformatting it to an integer in the sketch, but I’d rather not if I can get it working the way it is. Thanks for all the help.