emonTx Arduino Shield v2.4 usable to send data to a pi or homeassisant?

but use 9600

[edit]
If it is not getting data, switch RX/TX as a first option.

w00t

Ok have data in miniterm… now what lol

looks like it should be right. - delete the other one.

Modify the pub/sub as above

restart emonhub

sudo systemctl restart emonhub.service and post the initial log.

Oh and fix SSH :grinning:

lol, I shall fix the ssh.

When you say post the initial log, I assume you are referring to the emonhub.log? I can get that from the gui?

2021-03-15 10:54:24,757 WARNING  MainThread SerialDirect thread is dead.
2021-03-15 10:54:24,759 WARNING  MainThread Attempting to restart thread SerialDirect (thread has been restarted 8 times...)
2021-03-15 10:54:24,760 INFO     MainThread Creating EmonHubSerialInterfacer 'SerialDirect'
2021-03-15 10:54:24,762 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2021-03-15 10:54:24,764 DEBUG    MainThread Setting SerialDirect pubchannels: ['ToEmonCMS']
2021-03-15 10:54:30,521 WARNING  SerialDirect Exception caught in SerialDirect thread. Traceback (most recent call last):
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 32, in wrapper
    return func(*args)
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 99, in run
    rxc = self.read()
  File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSerialInterfacer.py", line 90, in read
    c.nodeid = int(f[0])
ValueError: invalid literal for int() with base 10: 'P1:4.09,P2:0.00,P3:-0.00,P4:1.36,Vrms:23936.72'

2021-03-15 10:54:30,637 WARNING  MainThread SerialDirect thread is dead.
2021-03-15 10:54:30,639 WARNING  MainThread Attempting to restart thread SerialDirect (thread has been restarted 9 times...)
2021-03-15 10:54:30,640 INFO     MainThread Creating EmonHubSerialInterfacer 'SerialDirect'
2021-03-15 10:54:30,643 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2021-03-15 10:54:30,644 DEBUG    MainThread Setting SerialDirect pubchannels: ['ToEmonCMS']
2021-03-15 10:54:36,406 WARNING  SerialDirect Exception caught in SerialDirect thread. Traceback (most recent call last):
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 32, in wrapper
    return func(*args)
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 99, in run
    rxc = self.read()
  File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSerialInterfacer.py", line 90, in read
    c.nodeid = int(f[0])
ValueError: invalid literal for int() with base 10: 'P1:1.94,P2:0.00,P3:-0.00,P4:4.47,Vrms:23964.12'

2021-03-15 10:54:36,455 WARNING  MainThread SerialDirect thread is dead.
2021-03-15 10:54:36,456 WARNING  MainThread Attempting to restart thread SerialDirect (thread has been restarted 10 times...)
2021-03-15 10:54:36,457 INFO     MainThread Creating EmonHubSerialInterfacer 'SerialDirect'
2021-03-15 10:54:36,461 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2021-03-15 10:54:36,468 DEBUG    MainThread Setting SerialDirect pubchannels: ['ToEmonCMS']
2021-03-15 10:54:42,281 WARNING  SerialDirect Exception caught in SerialDirect thread. Traceback (most recent call last):
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 32, in wrapper
    return func(*args)
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 99, in run
    rxc = self.read()
  File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSerialInterfacer.py", line 90, in read
    c.nodeid = int(f[0])
ValueError: invalid literal for int() with base 10: 'P1:5.18,P2:-0.19,P3:0.00,P4:-3.38,Vrms:23977.97'

2021-03-15 10:54:42,479 WARNING  MainThread SerialDirect thread is dead.
2021-03-15 10:54:42,480 WARNING  MainThread Attempting to restart thread SerialDirect (thread has been restarted 11 times...)
2021-03-15 10:54:42,482 INFO     MainThread Creating EmonHubSerialInterfacer 'SerialDirect'
2021-03-15 10:54:42,485 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2021-03-15 10:54:42,487 DEBUG    MainThread Setting SerialDirect pubchannels: ['ToEmonCMS']
2021-03-15 10:54:48,045 WARNING  SerialDirect Exception caught in SerialDirect thread. Traceback (most recent call last):
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 32, in wrapper
    return func(*args)
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 99, in run
    rxc = self.read()
  File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSerialInterfacer.py", line 90, in read
    c.nodeid = int(f[0])
ValueError: invalid literal for int() with base 10: 'P1:4.14,P2:-0.00,P3:0.00,P4:4.73,Vrms:23971.27'

2021-03-15 10:54:48,096 WARNING  MainThread SerialDirect thread is dead.
2021-03-15 10:54:48,097 WARNING  MainThread Attempting to restart thread SerialDirect (thread has been restarted 12 times...)
2021-03-15 10:54:48,099 INFO     MainThread Creating EmonHubSerialInterfacer 'SerialDirect'
2021-03-15 10:54:48,101 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2021-03-15 10:54:48,103 DEBUG    MainThread Setting SerialDirect pubchannels: ['ToEmonCMS']
2021-03-15 10:54:53,964 WARNING  SerialDirect Exception caught in SerialDirect thread. Traceback (most recent call last):
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 32, in wrapper
    return func(*args)
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 99, in run
    rxc = self.read()
  File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSerialInterfacer.py", line 90, in read
    c.nodeid = int(f[0])
ValueError: invalid literal for int() with base 10: 'P1:3.43,P2:-0.00,P3:0.00,P4:2.52,Vrms:23938.50'

2021-03-15 10:54:53,980 WARNING  MainThread SerialDirect thread is dead.
2021-03-15 10:54:53,981 WARNING  MainThread Attempting to restart thread SerialDirect (thread has been restarted 13 times...)
2021-03-15 10:54:53,983 INFO     MainThread Creating EmonHubSerialInterfacer 'SerialDirect'
2021-03-15 10:54:53,985 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2021-03-15 10:54:53,986 DEBUG    MainThread Setting SerialDirect pubchannels: ['ToEmonCMS']
2021-03-15 10:54:54,161 DEBUG    MainThread Signal 15 received.
2021-03-15 10:54:54,190 INFO     MainThread Exiting hub...
2021-03-15 10:54:54,393 INFO     MainThread Exit completed
2021-03-15 10:54:57,567 INFO     MainThread EmonHub emonHub (emon-pi variant) v2.1.5
2021-03-15 10:54:57,569 INFO     MainThread Opening hub...
2021-03-15 10:54:57,570 INFO     MainThread Logging level set to DEBUG
2021-03-15 10:54:57,572 INFO     MainThread Creating EmonHubSerialInterfacer 'SerialDirect'
2021-03-15 10:54:57,576 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2021-03-15 10:54:57,577 DEBUG    MainThread Setting SerialDirect pubchannels: ['ToEmonCMS']
2021-03-15 10:54:57,580 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT'
2021-03-15 10:54:57,585 DEBUG    MainThread Setting MQTT pubchannels: ['ToRFM12']
2021-03-15 10:54:57,586 DEBUG    MainThread Setting MQTT subchannels: ['ToEmonCMS']
2021-03-15 10:54:57,587 INFO     MainThread Setting MQTT node_format_enable: 1
2021-03-15 10:54:57,588 INFO     MainThread Setting MQTT nodevar_format_enable: 1
2021-03-15 10:54:57,589 INFO     MainThread Setting MQTT nodevar_format_basetopic: emon/
2021-03-15 10:54:57,590 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg'
2021-03-15 10:54:57,592 DEBUG    MainThread Setting emoncmsorg pubchannels: ['ToRFM12']
2021-03-15 10:54:57,593 DEBUG    MainThread Setting emoncmsorg subchannels: ['ToEmonCMS']
2021-03-15 10:54:57,594 WARNING  MainThread Setting emoncmsorg apikey: obscured
2021-03-15 10:54:57,595 INFO     MainThread Setting emoncmsorg url: https://emoncms.org
2021-03-15 10:54:57,596 INFO     MainThread Setting emoncmsorg senddata: 1
2021-03-15 10:54:57,596 INFO     MainThread Setting emoncmsorg sendstatus: 1
2021-03-15 10:54:59,730 WARNING  SerialDirect Exception caught in SerialDirect thread. Traceback (most recent call last):
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 32, in wrapper
    return func(*args)
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 99, in run
    rxc = self.read()
  File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSerialInterfacer.py", line 90, in read
    c.nodeid = int(f[0])
ValueError: invalid literal for int() with base 10: 'P1:0.18,P2:-0.00,P3:0.00,P4:1.13,Vrms:23967.49'

2021-03-15 10:54:59,922 WARNING  MainThread SerialDirect thread is dead.
2021-03-15 10:54:59,924 WARNING  MainThread Attempting to restart thread SerialDirect (thread has been restarted 0 times...)
2021-03-15 10:54:59,925 INFO     MainThread Creating EmonHubSerialInterfacer 'SerialDirect'
2021-03-15 10:54:59,928 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2021-03-15 10:54:59,929 DEBUG    MainThread Setting SerialDirect pubchannels: ['ToEmonCMS']
2021-03-15 10:55:05,587 WARNING  SerialDirect Exception caught in SerialDirect thread. Traceback (most recent call last):
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 32, in wrapper
    return func(*args)
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 99, in run
    rxc = self.read()
  File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSerialInterfacer.py", line 90, in read
    c.nodeid = int(f[0])
ValueError: invalid literal for int() with base 10: 'P1:-0.03,P2:-0.00,P3:0.00,P4:3.20,Vrms:24038.24'

2021-03-15 10:55:05,769 WARNING  MainThread SerialDirect thread is dead.
2021-03-15 10:55:05,770 WARNING  MainThread Attempting to restart thread SerialDirect (thread has been restarted 1 times...)
2021-03-15 10:55:05,772 INFO     MainThread Creating EmonHubSerialInterfacer 'SerialDirect'
2021-03-15 10:55:05,775 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2021-03-15 10:55:05,776 DEBUG    MainThread Setting SerialDirect pubchannels: ['ToEmonCMS']
2021-03-15 10:55:11,439 WARNING  SerialDirect Exception caught in SerialDirect thread. Traceback (most recent call last):
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 32, in wrapper
    return func(*args)
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 99, in run
    rxc = self.read()
  File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSerialInterfacer.py", line 90, in read
    c.nodeid = int(f[0])
ValueError: invalid literal for int() with base 10: 'P1:4.23,P2:-0.00,P3:0.00,P4:1.43,Vrms:24010.20'

2021-03-15 10:55:11,642 WARNING  MainThread SerialDirect thread is dead.
2021-03-15 10:55:11,643 WARNING  MainThread Attempting to restart thread SerialDirect (thread has been restarted 2 times...)
2021-03-15 10:55:11,645 INFO     MainThread Creating EmonHubSerialInterfacer 'SerialDirect'
2021-03-15 10:55:11,648 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2021-03-15 10:55:11,649 DEBUG    MainThread Setting SerialDirect pubchannels: ['ToEmonCMS']
2021-03-15 10:55:17,305 WARNING  SerialDirect Exception caught in SerialDirect thread. Traceback (most recent call last):
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 32, in wrapper
    return func(*args)
  File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 99, in run
    rxc = self.read()
  File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSerialInterfacer.py", line 90, in read
    c.nodeid = int(f[0])
ValueError: invalid literal for int() with base 10: 'P1:4.95,P2:0.00,P3:-0.00,P4:1.48,Vrms:24007.38'

2021-03-15 10:55:17,515 WARNING  MainThread SerialDirect thread is dead.
2021-03-15 10:55:17,516 WARNING  MainThread Attempting to restart thread SerialDirect (thread has been restarted 3 times...)
2021-03-15 10:55:17,517 INFO     MainThread Creating EmonHubSerialInterfacer 'SerialDirect'
2021-03-15 10:55:17,519 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2021-03-15 10:55:17,520 DEBUG    MainThread Setting SerialDirect pubchannels: ['ToEmonCMS']

added nodeID 6 to the payload.

now getting this error:

21-03-15 11:17:00,336 WARNING  MainThread SerialDirect thread is dead.
2021-03-15 11:17:00,337 WARNING  MainThread Attempting to restart thread SerialDirect (thread has been restarted 88 times...)
2021-03-15 11:17:00,338 INFO     MainThread Creating EmonHubSerialInterfacer 'SerialDirect'
2021-03-15 11:17:00,341 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2021-03-15 11:17:00,342 DEBUG    MainThread Setting SerialDirect pubchannels: ['ToEmonCMS']
2021-03-15 11:22:43,364 INFO     MainThread EmonHub emonHub (emon-pi variant) v2.1.5
2021-03-15 11:22:43,366 INFO     MainThread Opening hub...
2021-03-15 11:22:43,376 INFO     MainThread Logging level set to DEBUG
2021-03-15 11:22:43,377 INFO     MainThread Creating EmonHubSerialInterfacer 'SerialDirect'
2021-03-15 11:22:43,382 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2021-03-15 11:22:43,383 DEBUG    MainThread Setting SerialDirect pubchannels: ['ToEmonCMS']
2021-03-15 11:22:43,387 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT'
2021-03-15 11:22:43,406 DEBUG    MainThread Setting MQTT pubchannels: ['ToRFM12']
2021-03-15 11:22:43,409 DEBUG    MainThread Setting MQTT subchannels: ['ToEmonCMS']
2021-03-15 11:22:43,411 INFO     MainThread Setting MQTT node_format_enable: 1
2021-03-15 11:22:43,413 INFO     MainThread Setting MQTT nodevar_format_enable: 1
2021-03-15 11:22:43,414 INFO     MainThread Setting MQTT nodevar_format_basetopic: emon/
2021-03-15 11:22:43,434 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg'
2021-03-15 11:22:43,436 DEBUG    MainThread Setting emoncmsorg pubchannels: ['ToRFM12']
2021-03-15 11:22:43,437 DEBUG    MainThread Setting emoncmsorg subchannels: ['ToEmonCMS']
2021-03-15 11:22:43,438 WARNING  MainThread Setting emoncmsorg apikey: obscured
2021-03-15 11:22:43,439 INFO     MainThread Setting emoncmsorg url: https://emoncms.org
2021-03-15 11:22:43,441 INFO     MainThread Setting emoncmsorg senddata: 1
2021-03-15 11:22:43,442 INFO     MainThread Setting emoncmsorg sendstatus: 1
2021-03-15 11:30:22,920 DEBUG    SerialDirect 1 NEW FRAME : 6 P1:0.50,P2:-6.32,P3:13.52,P4:0.43,Vrms:23977.61
2021-03-15 11:30:22,921 WARNING  SerialDirect 1 Discarded RX frame 'non-numerical content' : ['P1:0.50,P2:-6.32,P3:13.52,P4:0.43,Vrms:23977.61']
2021-03-15 11:30:28,777 DEBUG    SerialDirect 2 NEW FRAME : 6 P1:1.62,P2:-1.44,P3:4.21,P4:0.16,Vrms:23952.69
2021-03-15 11:30:28,778 WARNING  SerialDirect 2 Discarded RX frame 'non-numerical content' : ['P1:1.62,P2:-1.44,P3:4.21,P4:0.16,Vrms:23952.69']
2021-03-15 11:30:34,624 DEBUG    SerialDirect 3 NEW FRAME : 6 P1:7.01,P2:-0.49,P3:1.46,P4:2.62,Vrms:23857.85
2021-03-15 11:30:34,625 WARNING  SerialDirect 3 Discarded RX frame 'non-numerical content' : ['P1:7.01,P2:-0.49,P3:1.46,P4:2.62,Vrms:23857.85']
2021-03-15 11:30:40,486 DEBUG    SerialDirect 4 NEW FRAME : 6 P1:16.03,P2:-0.40,P3:0.48,P4:5.82,Vrms:23988.38
2021-03-15 11:30:40,487 WARNING  SerialDirect 4 Discarded RX frame 'non-numerical content' : ['P1:16.03,P2:-0.40,P3:0.48,P4:5.82,Vrms:23988.38']
2021-03-15 11:30:46,336 DEBUG    SerialDirect 5 NEW FRAME : 6 P1:5.84,P2:-0.15,P3:0.14,P4:-0.46,Vrms:23966.14
2021-03-15 11:30:46,337 WARNING  SerialDirect 5 Discarded RX frame 'non-numerical content' : ['P1:5.84,P2:-0.15,P3:0.14,P4:-0.46,Vrms:23966.14']
2021-03-15 11:30:52,088 DEBUG    SerialDirect 6 NEW FRAME : 6 P1:5.13,P2:-0.18,P3:0.13,P4:-1.86,Vrms:23872.28
2021-03-15 11:30:52,090 WARNING  SerialDirect 6 Discarded RX frame 'non-numerical content' : ['P1:5.13,P2:-0.18,P3:0.13,P4:-1.86,Vrms:23872.28']
2021-03-15 11:30:57,943 DEBUG    SerialDirect 7 NEW FRAME : 6 P1:8.01,P2:-0.03,P3:0.02,P4:0.95,Vrms:23838.20
2021-03-15 11:30:57,944 WARNING  SerialDirect 7 Discarded RX frame 'non-numerical content' : ['P1:8.01,P2:-0.03,P3:0.02,P4:0.95,Vrms:23838.20']

restart with first lines like you asked:

pi@emonpi:~ $ sudo service emonhub restart && tail -f /var/log/emonhub/emonhub.l                                                          og
2021-03-15 11:43:30,485 WARNING  SerialDirect 73 Discarded RX frame 'non-numeric                                                          al content' : ['P1:4.82', ',P2:0.00', ',P3:-0.00', ',P4:-0.59', ',Vrms:23974.43'                                                          ]
2021-03-15 11:43:36,270 DEBUG    SerialDirect 74 NEW FRAME : 6 P1:3.26 ,P2:0.00                                                           ,P3:-0.00 ,P4:-2.37 ,Vrms:23818.84
2021-03-15 11:43:36,271 WARNING  SerialDirect 74 Discarded RX frame 'non-numeric                                                          al content' : ['P1:3.26', ',P2:0.00', ',P3:-0.00', ',P4:-2.37', ',Vrms:23818.84'                                                          ]
2021-03-15 11:43:42,132 DEBUG    SerialDirect 75 NEW FRAME : 6 P1:6.30 ,P2:0.00                                                           ,P3:-0.00 ,P4:7.19 ,Vrms:23959.72
2021-03-15 11:43:42,133 WARNING  SerialDirect 75 Discarded RX frame 'non-numeric                                                          al content' : ['P1:6.30', ',P2:0.00', ',P3:-0.00', ',P4:7.19', ',Vrms:23959.72']
2021-03-15 11:43:47,980 DEBUG    SerialDirect 76 NEW FRAME : 6 P1:5.32 ,P2:0.00                                                           ,P3:-0.00 ,P4:7.09 ,Vrms:23961.17
2021-03-15 11:43:47,981 WARNING  SerialDirect 76 Discarded RX frame 'non-numeric                                                          al content' : ['P1:5.32', ',P2:0.00', ',P3:-0.00', ',P4:7.09', ',Vrms:23961.17']
2021-03-15 11:43:49,565 DEBUG    MainThread Signal 15 received.
2021-03-15 11:43:49,598 INFO     MainThread Exiting hub...
2021-03-15 11:43:49,710 INFO     MainThread Exit completed
2021-03-15 11:43:52,679 INFO     MainThread EmonHub emonHub (emon-pi variant) v2                                                          .1.5
2021-03-15 11:43:52,681 INFO     MainThread Opening hub...
2021-03-15 11:43:52,682 INFO     MainThread Logging level set to DEBUG
2021-03-15 11:43:52,683 INFO     MainThread Creating EmonHubSerialInterfacer 'Se                                                          rialDirect'
2021-03-15 11:43:52,687 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @                                                           9600 bits/s
2021-03-15 11:43:52,689 DEBUG    MainThread Setting SerialDirect pubchannels: ['                                                          ToEmonCMS']
2021-03-15 11:43:52,691 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT                                                          '
2021-03-15 11:43:52,695 DEBUG    MainThread Setting MQTT pubchannels: ['ToRFM12'                                                          ]
2021-03-15 11:43:52,696 DEBUG    MainThread Setting MQTT subchannels: ['ToEmonCM                                                          S']
2021-03-15 11:43:52,697 INFO     MainThread Setting MQTT node_format_enable: 1
2021-03-15 11:43:52,698 INFO     MainThread Setting MQTT nodevar_format_enable:                                                           1
2021-03-15 11:43:52,699 INFO     MainThread Setting MQTT nodevar_format_basetopi                                                          c: emon/
2021-03-15 11:43:52,702 INFO     MainThread Creating EmonHubEmoncmsHTTPInterface                                                          r 'emoncmsorg'
2021-03-15 11:43:52,704 DEBUG    MainThread Setting emoncmsorg pubchannels: ['To                                                          RFM12']
2021-03-15 11:43:52,705 DEBUG    MainThread Setting emoncmsorg subchannels: ['To                                                          EmonCMS']
2021-03-15 11:43:52,706 WARNING  MainThread Setting emoncmsorg apikey: obscured
2021-03-15 11:43:52,707 INFO     MainThread Setting emoncmsorg url: https://emon                                                          cms.org
2021-03-15 11:43:52,708 INFO     MainThread Setting emoncmsorg senddata: 1
2021-03-15 11:43:52,709 INFO     MainThread Setting emoncmsorg sendstatus: 1
2021-03-15 11:43:53,802 DEBUG    SerialDirect 1 NEW FRAME : 6 P1:7.21 ,P2:0.00 ,P3:0.00 ,P4:-5.13 ,Vrms:23970.64
2021-03-15 11:43:53,803 WARNING  SerialDirect 1 Discarded RX frame 'non-numerical content' : ['P1:7.21', ',P2:0.00', ',P3:0.00', ',P4:-5.13', ',Vrms:23970.64']
2021-03-15 11:43:59,659 DEBUG    SerialDirect 2 NEW FRAME : 6 P1:1.42 ,P2:-0.00 ,P3:-0.00 ,P4:1.51 ,Vrms:23870.94
2021-03-15 11:43:59,660 WARNING  SerialDirect 2 Discarded RX frame 'non-numerical content' : ['P1:1.42', ',P2:-0.00', ',P3:-0.00', ',P4:1.51', ',Vrms:23870.94']

Got it working!!!

Had to change the loop in the sketch, wants only numerical values, so no key value pairs:

/*
  EmonTx CT123 Voltage Serial Only example
  
  Part of the openenergymonitor.org project
  Licence: GNU GPL V3
  
  Author: Trystan Lea
*/

#include "EmonLib.h"

// Create  instances for each CT channel
EnergyMonitor ct1,ct2,ct3, ct4;

unsigned long lastpost = 0;
const int nodeID = 6; 

// On-board emonTx LED
const int LEDpin = 9;    

void setup() 
{
  // Setup indicator LED
  pinMode(LEDpin, OUTPUT);                                              
  digitalWrite(LEDpin, HIGH);  
  
  Serial.begin(9600);
  // while (!Serial) {}
  // wait for serial port to connect. Needed for Leonardo only
  
  Serial.println("emonTX Shield CT123 Voltage Serial Only example"); 
  Serial.println("OpenEnergyMonitor.org");
  Serial.print("Node: "); 
  Serial.print(nodeID);
  
  // Calibration factor = CT ratio / burden resistance = (100A / 0.05A) / 33 Ohms = 60.606
  ct1.current(1, 60.606);
  ct2.current(2, 60.606);                                     
  ct3.current(3, 60.606);
  ct4.current(4, 60.606); 
  
  // (ADC input, calibration, phase_shift)
  ct1.voltage(0, 300.6, 1.7);                                
  ct2.voltage(0, 300.6, 1.7);                                
  ct3.voltage(0, 300.6, 1.7);
  ct4.voltage(0, 300.6, 1.7);
  
 lastpost = 0;
  
  delay(2000);
  digitalWrite(LEDpin,LOW);                                                                                 
}

void loop() 
{ 
  // Calculate all. No.of crossings, time-out 
  ct1.calcVI(20,2000);                                                  
  ct2.calcVI(20,2000);
  ct3.calcVI(20,2000);
  ct4.calcVI(20,2000);
    

Serial.print(nodeID);     Serial.print(' ');
Serial.print(ct1.realPower); Serial.print(' ');
Serial.print(ct2.realPower); Serial.print(' ');
Serial.print(ct3.realPower); Serial.print(' ');
Serial.print(ct4.realPower); Serial.print(' ');
Serial.print(ct1.Vrms*100.0); Serial.println();

  delay(5000);
}

Got the info from this link:

That’s because you have the wrong interfacer for that format. You are now using the Serial interfacer that requires space-separated values; the EmonHubTx3e Interfacer requires key:value pairs.

The latter carries the name of the variable with it, the former means the data arrives and you need to interpret what it is.

Ah, my bad, I said to remove the wrong one :frowning:

Thanks for all the help guys.

Really appreciate it, got it all up and running.
Hopefully, this thread will help someone else at some point.

1 Like

Sorry, lol. Installed it all, was running nicely, but then after a power cut, my inputs have gone to minuses. Any idea at all why that would suddenly happen?
I thought it could only do that by putting the CT’s on the wrong way around. But I definitely had positive numbers when I switched it on to test it, and haven’t taken the CT’s off since then.

My initial thought is the calibration somewhere has got corrupted. I would start at the emonTx Shield and check that the outputs from that are sensible. If that looks OK, check the numbers in emonHub.conf