Need help with emonhub

I’m starting with emoncms after a couple years absence. I have firmware that was previously uploaded to emonTX.

I get the following output from the serial port. And I do not see a node number. The dipswitch is set to node =9.
And my emonhub.conf is posted below.
But, no inputs are posted to my local emonpi or to my emoncms.org account (using the API key)
What am I missing!!!

EMONHUB LOG OUTPUT
2022-08-17 18:25:22,785 INFO     MainThread EmonHub emonHub (emon-pi variant) v2.2.6
2022-08-17 18:25:22,786 INFO     MainThread Opening hub...
2022-08-17 18:25:22,786 INFO     MainThread Logging level set to DEBUG
2022-08-17 18:25:22,786 INFO     MainThread Creating EmonHubTx3eInterfacer 'SerialTx3e'
2022-08-17 18:25:22,801 DEBUG    MainThread Opening serial port: /dev/ttyACM0 @ 115200 bits/s
2022-08-17 18:25:22,802 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT'
2022-08-17 18:25:22,804 DEBUG    MainThread Setting MQTT pubchannels: ['ToRFM12']
2022-08-17 18:25:22,805 DEBUG    MainThread Setting MQTT subchannels: ['ToEmonCMS']
2022-08-17 18:25:22,805 INFO     MainThread Setting MQTT node_format_enable: 1
2022-08-17 18:25:22,806 INFO     MainThread Setting MQTT nodevar_format_enable: 1
2022-08-17 18:25:22,806 INFO     MainThread Setting MQTT nodevar_format_basetopic: emon/
2022-08-17 18:25:22,806 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg'
2022-08-17 18:25:22,807 DEBUG    MainThread Setting emoncmsorg pubchannels: ['ToRFM12']
2022-08-17 18:25:22,807 DEBUG    MainThread Setting emoncmsorg subchannels: ['ToEmonCMS']
2022-08-17 18:25:22,814 INFO     MainThread Setting emoncmsorg apikey: set
2022-08-17 18:25:22,814 INFO     MainThread Setting emoncmsorg url: https://emoncms.org
2022-08-17 18:25:22,814 INFO     MainThread Setting emoncmsorg senddata: 1
2022-08-17 18:25:22,815 INFO     MainThread Setting emoncmsorg sendstatus: 1
2022-08-17 18:25:23,606 INFO     SerialTx3e START MESSAGE: ct1:-22,ct2:6,ct3:-17,ct4:2,vrms:12199,pulse:0
2022-08-17 18:25:33,543 INFO     SerialTx3e START MESSAGE: ct1:-25,ct2:12,ct3:-13,ct4:2,vrms:12192,pulse:0
2022-08-17 18:25:56,831 INFO     SerialTx3e START MESSAGE: ct1:-25,ct2:12,ct3:-12,ct4:1,vrms:12202,pulse:0
2022-08-17 18:26:06,773 INFO     SerialTx3e START MESSAGE: ct1:-25,ct2:11,ct3:-13,ct4:1,vrms:12197,pulse:0
2022-08-17 18:26:16,720 INFO     SerialTx3e START MESSAGE: ct1:-22,ct2:11,ct3:-14,ct4:1,vrms:12174,pulse:0
2022-08-17 18:26:26,560 INFO     SerialTx3e START MESSAGE: ct1:-25,ct2:11,ct3:-12,ct4:2,vrms:12189,pulse:0
2022-08-17 18:26:36,499 INFO     SerialTx3e START MESSAGE: ct1:-25,ct2:11,ct3:-13,ct4:1,vrms:12191,pulse:0
2022-08-17 18:26:46,341 INFO     SerialTx3e START MESSAGE: ct1:-25,ct2:11,ct3:-13,ct4:1,vrms:12188,pulse:0
2022-08-17 18:26:56,276 INFO     SerialTx3e START MESSAGE: ct1:-26,ct2:10,ct3:-10,ct4:1,vrms:12189,pulse:0
2022-08-17 18:27:06,216 INFO     SerialTx3e START MESSAGE: ct1:-24,ct2:11,ct3:-13,ct4:1,vrms:12186,pulse:0
2022-08-17 18:27:16,067 INFO     SerialTx3e START MESSAGE: ct1:-24,ct2:10,ct3:-14,ct4:1,vrms:12201,pulse:0
2022-08-17 18:27:26,007 INFO     SerialTx3e START MESSAGE: ct1:-23,ct2:10,ct3:-13,ct4:1,vrms:12197,pulse:0
2022-08-17 18:27:35,957 INFO     SerialTx3e START MESSAGE: ct1:-25,ct2:11,ct3:-13,ct4:2,vrms:12183,pulse:0
2022-08-17 18:27:45,799 INFO     SerialTx3e START MESSAGE: ct1:-25,ct2:12,ct3:-13,ct4:1,vrms:12208,pulse:0
2022-08-17 18:27:55,743 INFO     SerialTx3e START MESSAGE: ct1:-25,ct2:12,ct3:-12,ct4:1,vrms:12198,pulse:0
2022-08-17 18:28:05,582 INFO     SerialTx3e START MESSAGE: ct1:-26,ct2:8,ct3:-12,ct4:1,vrms:12208,pulse:0
2022-08-17 18:28:15,527 INFO     SerialTx3e START MESSAGE: ct1:-26,ct2:10,ct3:-13,ct4:1,vrms:12176,pulse:0
2022-08-17 18:28:25,483 INFO     SerialTx3e START MESSAGE: ct1:-26,ct2:10,ct3:-10,ct4:1,vrms:12174,pulse:0
2022-08-17 18:28:35,337 INFO     SerialTx3e START MESSAGE: ct1:-26,ct2:7,ct3:-13,ct4:2,vrms:12199,pulse:0
2022-08-17 18:28:45,282 INFO     SerialTx3e START MESSAGE: ct1:-25,ct2:10,ct3:-15,ct4:1,vrms:12205,pulse:0
2022-08-17 18:28:55,136 INFO     SerialTx3e START MESSAGE: ct1:-25,ct2:10,ct3:-12,ct4:1,vrms:12202,pulse:0
MINICOM OUTPUT
ct1:-1766,ct2:8,ct3:-181,ct4:2,vrms:12120,pulse:0
ct1:-1772,ct2:6,ct3:-178,ct4:2,vrms:12129,pulse:0
ct1:-1779,ct2:7,ct3:-179,ct4:2,vrms:12155,pulse:0
ct1:-1777,ct2:7,ct3:-177,ct4:2,vrms:12161,pulse:0
ct1:-1766,ct2:6,ct3:-178,ct4:1,vrms:12148,pulse:0
ct1:-1762,ct2:8,ct3:-180,ct4:1,vrms:12136,pulse:0
ct1:-1741,ct2:5,ct3:-180,ct4:1,vrms:12122,pulse:0
ct1:-1730,ct2:7,ct3:-181,ct4:2,vrms:12131,pulse:0
ct1:-1752,ct2:7,ct3:-178,ct4:2,vrms:12131,pulse:0
ct1:-1735,ct2:6,ct3:-179,ct4:1,vrms:12111,pulse:0
ct1:-1749,ct2:7,ct3:-177,ct4:1,vrms:12142,pulse:0
ct1:-1747,ct2:7,ct3:-180,ct4:2,vrms:12131,pulse:0
ct1:-1738,ct2:7,ct3:-177,ct4:2,vrms:12122,pulse:0
#######################################################################
#######################      emonhub.conf     #########################
#######################################################################
### emonHub configuration file, for info see documentation:
### https://github.com/openenergymonitor/emonhub/blob/emon-pi/conf/emonhub.conf
#######################################################################
#######################    emonHub  settings    #######################
#######################################################################

[hub]
### loglevel must be one of INFO, INFO, WARNING, ERROR, and CRITICAL
loglevel = INFO
### Uncomment this to also send to syslog
# use_syslog = yes
#######################################################################
#######################       Interfacers       #######################
#######################################################################

[interfacers]

### This interfacer manages the EmonTx3 ESP format serial
[[SerialTx3e]]
     Type = EmonHubTx3eInterfacer
      [[[init_settings]]]
           # Un-comment line below if using RS485 adapter
           #com_port = /dev/ttyRS485-0
           # default com port if using USB to UART adapter
           com_port= /dev/ttyACM0
           com_baud = 115200
      [[[runtimesettings]]]
           pubchannels = ToEmonCMS,



### This interfacer manages the RFM12Pi/RFM69Pi/emonPi module
#[[RFM2Pi]]
#    Type = EmonHubJeeInterfacer
#    [[[init_settings]]]
#        com_port = /dev/ttyAMA0
#        com_baud = 38400                        # 9600 for old RFM12Pi
#    [[[runtimesettings]]]
#        pubchannels = ToEmonCMS,
#        subchannels = ToRFM12,
#
#        group = 210
#        frequency = 433
#        baseid = 5                              # emonPi / emonBase nodeID
#        calibration = 230V                      # (UK/EU: 230V, US: 110V)
#        quiet = true                            # Disable quite mode (default enabled) to #enable RF packet debugging, show packets which fail crc
        # interval =  300                         # Interval to transmit time to emonGLCD (seconds)
        

[[MQTT]]

    Type = EmonHubMqttInterfacer
    [[[init_settings]]]
        mqtt_host = 127.0.0.1
        mqtt_port = 1883
        mqtt_user = emonpi
        mqtt_passwd = emonpimqtt2016

    [[[runtimesettings]]]
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS,

        # emonhub/rx/10/values format
        # Use with emoncms Nodes module
        node_format_enable = 1
        node_format_basetopic = emonhub/

        # emon/emontx/power1 format - use with Emoncms MQTT input
        # http://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/MQTT.md
        nodevar_format_enable = 1
        nodevar_format_basetopic = emon/

[[emoncmsorg]]
    Type = EmonHubEmoncmsHTTPInterfacer
    [[[init_settings]]]
    [[[runtimesettings]]]
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS,
        url = https://emoncms.org
#. updated for new raymop1 
apikey = XXXXXX
        senddata = 1                    # Enable sending data to Emoncms.org
        sendstatus = 1                  # Enable sending WAN IP to Emoncms.org MyIP > https://emoncms.org/myip/list
        sendinterval= 30                # Bulk send interval to Emoncms.org in seconds

#######################################################################
#######################          Nodes          #######################
#######################################################################

[nodes]

## See config user guide: https://github.com/openenergymonitor/emonhub/blob/emon-pi/conf/emonhub.conf

[[5]]
    nodename = emonpi
    [[[rx]]]
        names = power1,power2,power1pluspower2,vrms,t1,t2,t3,t4,t5,t6,pulsecount
        datacodes = h, h, h, h, h, h, h, h, h, h, L
        scales = 1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1
        units = W,W,W,V,C,C,C,C,C,C,p

[[6]]
    nodename = emontxshield
    [[[rx]]]
       names = power1, power2, power3, power4, vrms
       datacode = h
       scales = 1,1,1,1,0.01
       units = W,W,W,W,V

[[7]]
   nodename = emontx4
   [[[rx]]]
      names = power1, power2, power3, power4, vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
      datacodes = h,h,h,h,h,h,h,h,h,h,h,L
      scales = 1,1,1,1,0.01,0.1,0.1, 0.1,0.1,0.1,0.1,1
      units = W,W,W,W,V,C,C,C,C,C,C,p

[[8]]
    nodename = emontx3
    [[[rx]]]
       names = power1, power2, power3, power4, vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
       datacodes = h,h,h,h,h,h,h,h,h,h,h,L
       scales = 1,1,1,1,0.01,0.1,0.1, 0.1,0.1,0.1,0.1,1
       units = W,W,W,W,V,C,C,C,C,C,C,p

[[9]]
   nodename = emontx2
   [[[rx]]]
      names = power1, power2, power3, power4, vrms,  pulse
      datacodes = h,h,h,h,h,h,L
      scales = 1,1,1,1,1 ,1
      units = W,W,W,W,V,p

[[10]]
    nodename = emontx1
    [[[rx]]]
       names = power1, power2, power3, power4, vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
       datacodes = h,h,h,h,h,h,h,h,h,h,h,L
       scales = 1,1,1,1,0.01,0.01,0.01,0.01,0.01,0.01,0.01,1
       units = W,W,W,W,V,C,C,C,C,C,C,p

I’ve formatted the listing for legibility - Moderator (RW)

For future reference, when posting code or output, please put 3 ‘backticks’ (normally found at the top left of the keyboard) on a line of their own before the code, and 3 more backticks also on a line of their own after the code:

```
code
```

If it is something like php you can add a language identifier after the first 3 backticks: ```php or even ```text if you don’t want any language markup applied.

This only works for the radio output.

The EmonSerialTx3eInterfacer handles name value key pairs e.g. name:value,name:value. This is the default serial output for latest emonTx V3 and emonTH FW; and it is what you are sending.

When using the EmonSerialTx3eInterfacer in emonHub to connect to the emonTx using the output designed solely for the emonESP, you will need to tell it what node ID you would like it to use by using the “nodeoffset” setting in emonhub.conf E.G., if you want to use node id of 9:

[[SerialTx3e]]
     Type = EmonHubTx3eInterfacer
      [[[init_settings]]]
           com_port= /dev/ttyAMA0
           com_baud = 115200
      [[[runtimesettings]]]
           pubchannels = ToEmonCMS,
 
           nodeoffset = 9

Not sure why this says INFO INFO - it is missing the DEBUG option.

Change the log level to DEBUG

### loglevel must be one of DEBUG, INFO, WARNING, ERROR, and CRITICAL
loglevel = DEBUG

How have you connected serially?

Personally I use a Node Name

[[SerialTx]]
     Type = EmonHubTx3eInterfacer
      [[[init_settings]]]
           com_port= /dev/ttyAMA0
           com_baud = 115200
      [[[runtimesettings]]]
           pubchannels = ToEmonCMS,

           nodeoffset = 0
           nodename = Serial_PiZ

Just disable this (set to zero)

Personally I disable both these modes and use the JSON Format locally (not sure if it works for emoncms.org).

        node_JSON_enable = 1
        node_JSON_basetopic = emon/

Thank you both for input.
I cleaned my emonhub.conf and made the recommended changes.

Here is emonhub.conf.
But, I am not getting any inputs to appear.
Here is a screenshot.
I looked through the file to see if I had any typos and can’t find any.

Other thoughts would be appreciated!!

#######################################################################
#######################      emonhub.conf     #########################
#######################################################################
### emonHub configuration file, for info see documentation:
### https://github.com/openenergymonitor/emonhub/blob/emon-pi/conf/emonhub.conf
#######################################################################
#######################    emonHub  settings    #######################
#######################################################################

[hub]
### loglevel must be one of CRITICAL, CRITICAL, WARNING, ERROR, and CRITICAL
loglevel = DEBUG

#######################################################################
#######################       Interfacers       #######################
#######################################################################

[interfacers]

### This interfacer manages the EmonTx3 ESP format serial
[[SerialTx3e]]
     Type = EmonHubTx3eInterfacer
      [[[init_settings]]]
           # Un-comment line below if using RS485 adapter
           #com_port = /dev/ttyRS485-0
           # default com port if using USB to UART adapter
           com_port= /dev/ttyACM0
           com_baud = 115200

      [[[runtimesettings]]]
           pubchannels = ToEmonCMS

nodeoffset = 9
#nodename = Serial_EmonTx

[[MQTT]]

    Type = EmonHubMqttInterfacer
    [[[init_settings]]]
        mqtt_host = 127.0.0.1
        mqtt_port = 1883
        mqtt_user = emonpi
        mqtt_passwd = emonpimqtt2016

    [[[runtimesettings]]]
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS

        # emonhub/rx/10/values format
        # Use with emoncms Nodes module
        node_format_enable = 0
node_JSON_enable = 1
        node_format_basetopic = emonhub/

[[emoncmsorg]]
    Type = EmonHubEmoncmsHTTPInterfacer
    [[[init_settings]]]
    [[[runtimesettings]]]
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS,
        url = https://emoncms.org
# updated for new raymop1 
apikey = xxxxxxx
        senddata = 1                    # Enable sending data to Emoncms.org
        sendstatus = 1                  # Enable sending WAN IP to Emoncms.org MyIP > https://emoncms.org/myip/list
        sendinterval= 30                # Bulk send interval to Emoncms.org in seconds

#######################################################################
#######################          Nodes          #######################
#######################################################################

[nodes]

## See config user guide: https://github.com/openenergymonitor/emonhub/blob/emon-pi/conf/emonhub.conf

[[9]]
   nodename = emontx2
   [[[rx]]]
      names = power1, power2, power3, power4, vrms,  pulse
      datacodes = h,h,h,h,h,h,L
      scales = 1,1,1,1,1 ,1
      units = W,W,W,W,V,p

Here is the log output:

2022-08-18 18:04:32,408 INFO MainThread EmonHub emonHub (emon-pi variant) v2.2.6
2022-08-18 18:04:32,409 INFO MainThread Opening hub…
2022-08-18 18:04:32,409 INFO MainThread Logging level set to DEBUG
2022-08-18 18:04:32,410 INFO MainThread Creating EmonHubTx3eInterfacer ‘SerialTx3e’
2022-08-18 18:04:32,415 DEBUG MainThread Opening serial port: /dev/ttyACM0 @ 115200 bits/s
2022-08-18 18:04:32,416 INFO MainThread Creating EmonHubMqttInterfacer ‘MQTT’
2022-08-18 18:04:32,417 DEBUG MainThread Setting MQTT pubchannels: [‘ToRFM12’]
2022-08-18 18:04:32,417 DEBUG MainThread Setting MQTT subchannels: ToEmonCMS
2022-08-18 18:04:32,417 INFO MainThread Setting MQTT node_format_enable: 0
2022-08-18 18:04:32,418 INFO MainThread Setting MQTT node_JSON_enable: 1
2022-08-18 18:04:32,418 INFO MainThread Creating EmonHubEmoncmsHTTPInterfacer ‘emoncmsorg’
2022-08-18 18:04:32,419 DEBUG MainThread Setting emoncmsorg pubchannels: [‘ToRFM12’]
2022-08-18 18:04:32,419 DEBUG MainThread Setting emoncmsorg subchannels: [‘ToEmonCMS’]
2022-08-18 18:04:32,419 INFO MainThread Setting emoncmsorg apikey: set
2022-08-18 18:04:32,419 INFO MainThread Setting emoncmsorg url: https://emoncms.org
2022-08-18 18:04:32,419 INFO MainThread Setting emoncmsorg senddata: 1
2022-08-18 18:04:32,420 INFO MainThread Setting emoncmsorg sendstatus: 1
2022-08-18 18:04:33,522 INFO SerialTx3e START MESSAGE: ct1:-25,ct2:11,ct3:-12,ct4:1,vrms:12249,pulse:0
2022-08-18 18:04:43,451 INFO SerialTx3e START MESSAGE: ct1:-26,ct2:10,ct3:-12,ct4:1,vrms:12228,pulse:0
2022-08-18 18:05:06,757 INFO SerialTx3e START MESSAGE: ct1:-26,ct2:11,ct3:-13,ct4:1,vrms:12230,pulse:0
2022-08-18 18:05:16,687 INFO SerialTx3e START MESSAGE: ct1:-25,ct2:10,ct3:-16,ct4:2,vrms:12194,pulse:0
2022-08-18 18:05:26,643 INFO SerialTx3e START MESSAGE: ct1:-26,ct2:12,ct3:-11,ct4:2,vrms:12213,pulse:0
2022-08-18 18:05:36,509 INFO SerialTx3e START MESSAGE: ct1:-25,ct2:11,ct3:-11,ct4:2,vrms:12218,pulse:0
2022-08-18 18:05:46,474 INFO SerialTx3e START MESSAGE: ct1:-26,ct2:12,ct3:-13,ct4:1,vrms:12210,pulse:0

Partly my fault in the examples I gave.

This is what I use, you have mixed up different configs.

[interfacers]
[[SerialTx]]
     Type = EmonHubTx3eInterfacer
      [[[init_settings]]]
           com_port= /dev/ttyAMA0
           com_baud = 115200
      [[[runtimesettings]]]
           pubchannels = ToEmonCMS,
           nodeoffset = 0
           nodename = Serial_PiZ

[[MQTT]]
    Type = EmonHubMqttInterfacer
    [[[init_settings]]]
        mqtt_host = 127.0.0.1
        mqtt_port = 1883
        mqtt_user = emonpi
        mqtt_passwd = emonpimqtt2016

    [[[runtimesettings]]]
        subchannels = ToEmonCMS,

        timestamped = True
        # emonhub/rx/10/values format
        # Use with emoncms Nodes module
        node_format_enable = 0
        node_format_basetopic = emonhub/

        # emon/emontx/power1 format - use with Emoncms MQTT input
        # http://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/MQTT.md
        nodevar_format_enable = 0
        nodevar_format_basetopic = emon/

        node_JSON_enable = 1
        node_JSON_basetopic = emon/

In the SerialTx interfacer, you need to give it a nodeoffset or a nodename (I have both but it takes the nodename in preference).

In the MQTT settings, you have 3 options for the data out - 0 = disabled - 1 = enabled

  • node_format_enable this is an old format for sending messages to emonhub
  • nodevar_format_enable the usual format - sends each value as a separate MQTT topic
  • node_JSON_enable sends the data in a single message to emoncms - much less processing overhead and can use the timestamped option to timestamp the data so all the values sent get the same timestamp in the database.

Actually, that is just about all you need as a minimal emonhub config (bar the bits at the beginning.

I resurrecting an older post.
Made changes as per above.
But I am still not getting any inputs locally or on emoncms.org.
I thought maybe my SD card was too old, so I downloaded a fresh 2021 stable version, but same problem.

Any thoughts?

#######################################################################
#######################      emonhub.conf     #########################
#######################################################################
### emonHub configuration file, for info see documentation:
### https://github.com/openenergymonitor/emonhub/blob/emon-pi/conf/emonhub.conf
#######################################################################
#######################    emonHub  settings    #######################
#######################################################################

[hub]
### loglevel must be one of CRITICAL, CRITICAL, WARNING, ERROR, and CRITICAL
loglevel = DEBUG

#######################################################################
#######################       Interfacers       #######################
#######################################################################

[interfacers]

### This interfacer manages the EmonTx3 ESP format serial
[[SerialTx3e]]
     Type = EmonHubTx3eInterfacer
      [[[init_settings]]]
           com_port= /dev/ttyACM0
           com_baud = 115200

      [[[runtimesettings]]]
           pubchannels = ToEmonCMS,
           nodeoffset = 9
           nodename = Serial_EmonTx

[[MQTT]]

    Type = EmonHubMqttInterfacer
    [[[init_settings]]]
        mqtt_host = 127.0.0.1
        mqtt_port = 1883
        mqtt_user = emonpi
        mqtt_passwd = emonpimqtt2016

    [[[runtimesettings]]]
        subchannels = ToEmonCMS,

        timestamped = True
        node_format_enable = 0
        node_format_basetopic = emonhub/

nodevar_format_enable = 0
nodevar_format_basetopic = emon/

node_JSON_enable = 1
node_JSON_basetopic = emon/

[[emoncmsorg]]
    Type = EmonHubEmoncmsHTTPInterfacer
    [[[init_settings]]]
    [[[runtimesettings]]]
        subchannels = ToEmonCMS
        url = https://emoncms.org
# updated for new raymop1 
apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        senddata = 1                    # Enable sending data to Emoncms.org
        sendstatus = 1                  # Enable sending WAN IP to Emoncms.org MyIP > https://emoncms.org/myip/list
        sendinterval= 30                # Bulk send interval to Emoncms.org in seconds

#######################################################################
#######################          Nodes          #######################
#######################################################################

[nodes]

## See config user guide: https://github.com/openenergymonitor/emonhub/blob/emon-pi/conf/emonhub.conf

[[9]]
   nodename = emontx2
   [[[rx]]]
      names = power1, power2, power3, power4, vrms,  pulse
      datacodes = h,h,h,h,h,h,L
      scales = 1,1,1,1,1 ,1
      units = W,W,W,W,V,p

LOG file

2022-09-25 23:13:54,428 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT'
2022-09-25 23:13:54,429 INFO     MainThread Setting MQTT node_format_enable: 0
2022-09-25 23:13:54,430 INFO     MainThread Setting MQTT nodevar_format_enable: 0
2022-09-25 23:13:54,430 INFO     MainThread Setting MQTT nodevar_format_basetopic: emon/
2022-09-25 23:13:54,430 INFO     MainThread Setting MQTT node_JSON_enable: 1
2022-09-25 23:13:54,430 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg'
2022-09-25 23:13:54,431 INFO     MainThread Setting emoncmsorg apikey: set
2022-09-25 23:13:54,431 INFO     MainThread Setting emoncmsorg url: https://emoncms.org
2022-09-25 23:13:54,431 INFO     MainThread Setting emoncmsorg senddata: 1
2022-09-25 23:13:54,431 INFO     MainThread Setting emoncmsorg sendstatus: 1
2022-09-25 23:13:55,534 INFO     SerialTx3e START MESSAGE: ct1:23,ct2:0,ct3:0,ct4:0,vrms:551,pulse:0
2022-09-25 23:14:04,961 INFO     SerialTx3e START MESSAGE: ct1:21,ct2:0,ct3:0,ct4:0,vrms:547,pulse:0
2022-09-25 23:14:14,389 INFO     SerialTx3e START MESSAGE: ct1:22,ct2:0,ct3:0,ct4:0,vrms:549,pulse:0
2022-09-25 23:14:23,829 INFO     SerialTx3e START MESSAGE: ct1:20,ct2:0,ct3:0,ct4:0,vrms:547,pulse:0
2022-09-25 23:14:33,290 INFO     SerialTx3e START MESSAGE: ct1:20,ct2:0,ct3:0,ct4:0,vrms:550,pulse:0
2022-09-25 23:14:42,754 INFO     SerialTx3e START MESSAGE: ct1:20,ct2:0,ct3:0,ct4:0,vrms:549,pulse:0
2022-09-25 23:14:52,283 INFO     SerialTx3e START MESSAGE: ct1:21,ct2:0,ct3:0,ct4:0,vrms:549,pulse:0
2022-09-25 23:15:01,715 INFO     SerialTx3e START MESSAGE: ct1:18,ct2:0,ct3:0,ct4:0,vrms:548,pulse:0
2022-09-25 23:15:11,148 INFO     SerialTx3e START MESSAGE: ct1:21,ct2:0,ct3:0,ct4:0,vrms:550,pulse:0
2022-09-25 23:15:20,608 INFO     SerialTx3e START MESSAGE: ct1:21,ct2:0,ct3:0,ct4:0,vrms:543,pulse:0
2022-09-25 23:15:30,058 INFO     SerialTx3e START MESSAGE: ct1:21,ct2:0,ct3:0,ct4:0,vrms:549,pulse:0
2022-09-25 23:15:39,586 INFO     SerialTx3e START MESSAGE: ct1:20,ct2:0,ct3:0,ct4:0,vrms:551,pulse:0
2022-09-25 23:15:49,014 INFO     SerialTx3e START MESSAGE: ct1:21,ct2:0,ct3:0,ct4:0,vrms:549,pulse:0
2022-09-25 23:15:58,460 INFO     SerialTx3e START MESSAGE: ct1:25,ct2:0,ct3:0,ct4:0,vrms:539,pulse:0
2022-09-25 23:16:07,989 INFO     SerialTx3e START MESSAGE: ct1:21,ct2:0,ct3:0,ct4:0,vrms:550,pulse:0
2022-09-25 23:16:17,418 INFO     SerialTx3e START MESSAGE: ct1:21,ct2:0,ct3:0,ct4:0,vrms:543,pulse:0
2022-09-25 23:16:26,847 INFO     SerialTx3e START MESSAGE: ct1:20,ct2:0,ct3:0,ct4:0,vrms:549,pulse:0
2022-09-25 23:16:36,383 INFO     SerialTx3e START MESSAGE: ct1:21,ct2:0,ct3:0,ct4:0,vrms:549,pulse:0
2022-09-25 23:16:45,774 INFO     SerialTx3e START MESSAGE: ct1:20,ct2:0,ct3:0,ct4:0,vrms:550,pulse:0
2022-09-25 23:16:55,236 INFO     SerialTx3e START MESSAGE: ct1:23,ct2:0,ct3:0,ct4:0,vrms:545,pulse:0

[edit] Munged API key for you - Mod

I note the Log is just showing INFO messages - did you definitely restart emonhub?

Where did you edit the config file from, emoncms or from the command line?

Not sure if indenting is required, but it is nicer if everything lines up :slight_smile:

Hi.
Thanks for the feedback.
I did another edit to conf and used the nano editor, I had been using the web interface.
I cleaned up and extra lines.
I indented using the tab key.
And restarted emonhub.

2022-09-27 17:52:19,027 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT'
2022-09-27 17:52:19,028 DEBUG    MainThread Setting MQTT timestamped: True
2022-09-27 17:52:19,028 DEBUG    MainThread Setting MQTT subchannels: ['ToEmonCMS']
2022-09-27 17:52:19,028 INFO     MainThread Setting MQTT node_JSON_enable: 1
2022-09-27 17:52:19,629 INFO     SerialTx3e START MESSAGE: ct1:21,ct2:0,ct3:0,ct4:0,vrms:549,pulse:0
2022-09-27 17:52:29,056 INFO     SerialTx3e START MESSAGE: ct1:22,ct2:0,ct3:0,ct4:0,vrms:549,pulse:0
2022-09-27 17:52:38,585 INFO     SerialTx3e START MESSAGE: ct1:23,ct2:0,ct3:0,ct4:0,vrms:540,pulse:0
2022-09-27 17:52:48,014 INFO     SerialTx3e START MESSAGE: ct1:22,ct2:0,ct3:0,ct4:0,vrms:547,pulse:0
2022-09-27 17:52:57,442 INFO     SerialTx3e START MESSAGE: ct1:19,ct2:0,ct3:0,ct4:0,vrms:547,pulse:0
2022-09-27 17:53:06,977 INFO     SerialTx3e START MESSAGE: ct1:23,ct2:0,ct3:0,ct4:0,vrms:548,pulse:0
2022-09-27 17:53:16,420 INFO     SerialTx3e START MESSAGE: ct1:22,ct2:0,ct3:0,ct4:0,vrms:549,pulse:0
2022-09-27 17:53:25,848 INFO     SerialTx3e START MESSAGE: ct1:22,ct2:0,ct3:0,ct4:0,vrms:545,pulse:0
2022-09-27 17:53:35,275 INFO     SerialTx3e START MESSAGE: ct1:24,ct2:0,ct3:0,ct4:0,vrms:540,pulse:0
2022-09-27 17:53:41,233 DEBUG    MainThread Signal 15 received.
2022-09-27 17:53:41,249 INFO     MainThread Exiting hub...
2022-09-27 17:53:41,383 INFO     MainThread Exit completed
2022-09-27 17:53:42,277 INFO     MainThread EmonHub emonHub (emon-pi variant) v2.2.6
2022-09-27 17:53:42,278 INFO     MainThread Opening hub...
2022-09-27 17:53:42,278 INFO     MainThread Logging level set to DEBUG
2022-09-27 17:53:42,278 INFO     MainThread Creating EmonHubTx3eInterfacer 'SerialTx3e'
2022-09-27 17:53:42,280 DEBUG    MainThread Opening serial port: /dev/ttyACM0 @ 115200 bits/s
2022-09-27 17:53:42,281 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT'
2022-09-27 17:53:42,282 DEBUG    MainThread Setting MQTT timestamped: True
2022-09-27 17:53:42,283 DEBUG    MainThread Setting MQTT subchannels: ['ToEmonCMS']
2022-09-27 17:53:42,283 INFO     MainThread Setting MQTT node_JSON_enable: 1
2022-09-27 17:53:44,791 INFO     SerialTx3e START MESSAGE: ct1:24,ct2:0,ct3:0,ct4:0,vrms:551,pulse:0
2022-09-27 17:53:54,220 INFO     SerialTx3e START MESSAGE: ct1:22,ct2:0,ct3:0,ct4:0,vrms:542,pulse:0
2022-09-27 17:54:03,750 INFO     SerialTx3e START MESSAGE: ct1:24,ct2:0,ct3:0,ct4:0,vrms:549,pulse:0
2022-09-27 17:54:13,177 INFO     SerialTx3e START MESSAGE: ct1:22,ct2:0,ct3:0,ct4:0,vrms:546,pulse:0
2022-09-27 17:54:22,608 INFO     SerialTx3e START MESSAGE: ct1:21,ct2:0,ct3:0,ct4:0,vrms:549,pulse:0

Here is my config file

#######################################################################
#######################      emonhub.conf     #########################
#######################################################################
### emonHub configuration file, for info see documentation:
### https://github.com/openenergymonitor/emonhub/blob/emon-pi/conf/emonhub.conf
#######################################################################
#######################    emonHub  settings    #######################
#######################################################################

[hub]
### loglevel must be one of CRITICAL, CRITICAL, WARNING, ERROR, and CRITICAL
loglevel = DEBUG

#######################################################################
#######################       Interfacers       #######################
#######################################################################

[interfacers]

### This interfacer manages the EmonTx3 ESP format serial
[[SerialTx3e]]
     Type = EmonHubTx3eInterfacer
      [[[init_settings]]]
           com_port= /dev/ttyACM0
           com_baud = 115200

      [[[runtimesettings]]]
           pubchannels = ToEmonCMS,
           nodeoffset = 9
#           nodename = Serial_EmonTx
#           nodename = 9


[[MQTT]]

    Type = EmonHubMqttInterfacer
    [[[init_settings]]]
	mqtt_host = 127.0.0.1
	mqtt_port = 1883
	mqtt_user = emonpi
	mqtt_passwd = emonpimqtt2016

    [[[runtimesettings]]]
	subchannels = ToEmonCMS,

	timestamped = True
	node_JSON_enable = 1
	node_JSON_basetopic = emon/

#######################################################################
#######################          Nodes          #######################
#######################################################################

[nodes]

## See config user guide: https://github.com/openenergymonitor/emonhub/blob/emon-pi/conf/emonhub.conf

[[9]]
#   nodename = emontx2
   [[[rx]]]
	names = power1, power2, power3, power4, vrms,  pulse
	datacodes = h,h,h,h,h,L
	scales = 1,1,1,1,1,1
	units = W,W,W,W,V,p

And still no inputs!
I can’t see anything that’s wrong…

Ok, odd.

Can you check the syslog. Sometimes python errors only appear there.

journalctl -f -u emonhub

[edit]
Do you know what version of the Firmware you are running on the emonTX? Your message construct looks differet to mine - @Robert.Wall @TrystanLea can you help here?

My log looks like this (although my Firmware might not be ‘standard’ :frowning:

2022-09-28 07:10:59,117 DEBUG    SerialTx   240851 NEW FRAME : MSG:240861,Vrms:247.81,pulse:1
2022-09-28 07:10:59,119 DEBUG    SerialTx   240851 Timestamp : 1664345459.117071
2022-09-28 07:10:59,121 DEBUG    SerialTx   240851 From Node : Serial_PiZ
2022-09-28 07:10:59,123 DEBUG    SerialTx   240851    Values : [240861, 247.81, 1]
2022-09-28 07:10:59,139 DEBUG    SerialTx   240851 Sent to channel(start)' : ToEmonCMS
2022-09-28 07:10:59,141 DEBUG    SerialTx   240851 Sent to channel(end)' : ToEmonCMS
2022-09-28 07:10:59,180 DEBUG    MQTT       Publishing: emon/Serial_PiZ {"MSG": 240861, "Vrms": 247.81, "pulse": 1, "time": 1664345459.1170712}

Ah,

I think emonhub is looking for the first part of the data to be MSG.

I think you need to update the firmware on the EmonTX to get this to work.

I was under the impression that the serial interfacer needed NO interpretation in emonHub because the values come as human-readable decimal numbers, which are already identified - i.e. “Name:value,”. The interpretation part when using the radio to transfer the data - “names = … datacodes = … scales = … units = …” only applies to values encoded as a stream of bytes, with no names attached.
So the presence or absence of a message count should make no difference.

I’ve never had the time to try to understand the signal/data flow inside emonHub-emonCMS, I know nothing of MQTT so I can’t help with that side.

I’ve only got a reference list of the various radio message formats that have been used over the years, not the serial ones. But as I stated - it should not matter.

It looks for MSG in the serial text string.

It’s no good sending me to Github.

Hello @raymop could you try a different interfacer for this, I think it will work better for what you want to do, here’s the emonhub.conf configuration, please try replacing the Tx3 config with this one:

[[EMON]]
    Type = EmonHubOEMInterfacer
    [[[init_settings]]]
        com_port = /dev/ttyAMA0
        com_baud = 115200
    [[[runtimesettings]]]
        pubchannels = ToEmonCMS,

The port may need to be

com_port= /dev/ttyACM0

as you have it above

1 Like

That was it. I needed this other type of interfacer.
Thank you!!!

2022-09-29 00:02:59,635 DEBUG    EMON       13 NEW FRAME : ct1:26,ct2:-2,ct3:7,ct4:0,vrms:12147,pulse:0
2022-09-29 00:02:59,636 DEBUG    EMON       13 Timestamp : 1664406179.635458
2022-09-29 00:02:59,636 DEBUG    EMON       13 From Node : test
2022-09-29 00:02:59,637 DEBUG    EMON       13    Values : [26, -2, 7, 0, 12147, 0]
2022-09-29 00:02:59,637 DEBUG    EMON       13 Sent to channel(start)' : ToEmonCMS
2022-09-29 00:02:59,637 DEBUG    EMON       13 Sent to channel(end)' : ToEmonCMS
2022-09-29 00:02:59,833 INFO     MQTT       Publishing 'node' formatted msg
2022-09-29 00:02:59,833 DEBUG    MQTT       Publishing: emonhub/rx/test/values 26,-2,7,0,12147,0
2022-09-29 00:02:59,834 DEBUG    MQTT       Publishing: emon/test {"ct1": 26, "ct2": -2, "ct3": 7, "ct4": 0, "vrms": 12147, "pulse": 0, "time": 1664406179.6354575}
2022-09-29 00:03:09,594 DEBUG    EMON       14 NEW FRAME : ct1:26,ct2:-1,ct3:7,ct4:0,vrms:12144,pulse:0
2022-09-29 00:03:09,595 DEBUG    EMON       14 Timestamp : 1664406189.594688
2022-09-29 00:03:09,596 DEBUG    EMON       14 From Node : test
2022-09-29 00:03:09,596 DEBUG    EMON       14    Values : [26, -1, 7, 0, 12144, 0]
2022-09-29 00:03:09,596 DEBUG    EMON       14 Sent to channel(start)' : ToEmonCMS
2022-09-29 00:03:09,597 DEBUG    EMON       14 Sent to channel(end)' : ToEmonCMS
2022-09-29 00:03:09,691 INFO     MQTT       Publishing 'node' formatted msg
2022-09-29 00:03:09,692 DEBUG    MQTT       Publishing: emonhub/rx/test/values 26,-1,7,0,12144,0
2022-09-29 00:03:09,693 DEBUG    MQTT       Publishing: emon/test {"ct1": 26, "ct2": -1, "ct3": 7, "ct4": 0, "vrms": 12144, "pulse": 0, "time": 1664406189.5946884}
2022-09-29 00:03:13,408 DEBUG    emoncmsorg Buffer size: 3
2022-09-29 00:03:13,409 INFO     emoncmsorg sending: https://emoncms.org/input/bulk.json? data=[[1664406169.7864535,"test",26,-2,6,0,12156,0],[1664406179.6354575,"test",26,-2,7,0,12147,0],[1664406189.5946884,"test",26,-1,7,0,12144,0]]&sentat=1664406193&apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y
2022-09-29 00:03:13,961 DEBUG    emoncmsorg acknowledged receipt with 'ok' from https://emoncms.org
2022-09-29 00:03:19,452 DEBUG    EMON       15 NEW FRAME : ct1:26,ct2:-2,ct3:7,ct4:0,vrms:12150,pulse:0
2022-09-29 00:03:19,453 DEBUG    EMON       15 Timestamp : 1664406199.452653
2022-09-29 00:03:19,454 DEBUG    EMON       15 From Node : test
2022-09-29 00:03:19,454 DEBUG    EMON       15    Values : [26, -2, 7, 0, 12150, 0]
2022-09-29 00:03:19,454 DEBUG    EMON       15 Sent to channel(start)' : ToEmonCMS
2022-09-29 00:03:19,455 DEBUG    EMON       15 Sent to channel(end)' : ToEmonCMS
2022-09-29 00:03:19,552 INFO     MQTT       Publishing 'node' formatted msg
2022-09-29 00:03:19,553 DEBUG    MQTT       Publishing: emonhub/rx/test/values 26,-2,7,0,12150,0
2022-09-29 00:03:19,554 DEBUG    MQTT       Publishing: emon/test {"ct1": 26, "ct2": -2, "ct3": 7, "ct4": 0, "vrms": 12150, "pulse": 0, "time": 1664406199.4526527}
2 Likes