Community
OpenEnergyMonitor

Community

Node ID not changeable

(Alex Felber) #1

Hello,

I am using an RaspPI with emonSD

I have my Sensor from http://lechacal.com/wiki/index.php/RPICT4V3_v2.0

I have done my setup and getting the Vlaues and everything works fine

But I have of this and send to an remote Server.

So I have change the node ID of one

I have read on this forum that I need to enter a baseid

I have done this, but all the time I get node 11

this is my config:

    [hub]
    ### loglevel must be one of DEBUG, INFO, WARNING, ERROR, and CRITICAL
    ### see here : http://docs.python.org/2/library/logging.html
    loglevel = DEBUG #(default:WARNING)

    [interfacers]

    [[SerialDirect]] 
      Type = EmonHubSerialInterfacer
      [[[init_settings]]]
          com_port = /dev/ttyAMA0
          com_baud = 38400
        [[[runtimesettings]]]
         pubchannels = ToEmonCMS,

    [[emoncmsorg]]
       Type = EmonHubEmoncmsHTTPInterfacer
       [[[init_settings]]]
       [[[runtimesettings]]]
           subchannels = ToEmonCMS,
           url = server/emoncms #uncomment to save on local pi
           apikey = key
           senddata = 1                    # Enable sending data to Emoncms.org
           sendstatus = 1                  # Enable sending WAN IP to Emoncms.org MyIP > https://emoncms.org/myip/list
           sendinterval= 1                # Bulk send interval to Emoncms.org in seconds
          baseid = 5

    [[5]]
       nodename = RPICT4V3
       hardware = RPICT4V3
       [[[rx]]]
           names = Vrms1,Vrms2,Vrms3,Realpower1,Realpower2,Realpower3,Realpower4
           datacode = 0
           scales = 1,1,1,1,1,1,1
           units = V,V,V,W,W,W,W

log

    2018-04-06 16:02:45,575 DEBUG    SerialDirect 84 Sent to channel(start)' : ToEmonCMS
    2018-04-06 16:02:45,575 DEBUG    SerialDirect 84 Sent to channel(end)' : ToEmonCMS
    2018-04-06 16:02:50,797 DEBUG    SerialDirect 85 NEW FRAME : 11 0.2 0.2 0.2 0.2 0.1 0.2 0.2 0.2
    2018-04-06 16:02:50,798 DEBUG    SerialDirect 85 Timestamp : 1523030570.8
    2018-04-06 16:02:50,798 DEBUG    SerialDirect 85 From Node : 11
    2018-04-06 16:02:50,799 DEBUG    SerialDirect 85    Values : [0.2, 0.2, 0.2, 0.2, 0.1, 0.2, 0.2, 0.2]
    2018-04-06 16:02:50,800 DEBUG    SerialDirect 85 Sent to channel(start)' : ToEmonCMS
    2018-04-06 16:02:50,800 DEBUG    SerialDirect 85 Sent to channel(end)' : ToEmonCMS
    2018-04-06 16:02:55,921 DEBUG    SerialDirect 86 NEW FRAME : 11 0.2 0.2 0.2 0.2 0.1 0.2 0.2 0.2
    2018-04-06 16:02:55,922 DEBUG    SerialDirect 86 Timestamp : 1523030575.92
    2018-04-06 16:02:55,923 DEBUG    SerialDirect 86 From Node : 11
    2018-04-06 16:02:55,923 DEBUG    SerialDirect 86    Values : [0.2, 0.2, 0.2, 0.2, 0.1, 0.2, 0.2, 0.2]
    2018-04-06 16:02:55,924 DEBUG    SerialDirect 86 Sent to channel(start)' : ToEmonCMS
    2018-04-06 16:02:55,924 DEBUG    SerialDirect 86 Sent to channel(end)' : ToEmonCMS
    2018-04-06 16:02:56,720 DEBUG    emoncmsorg Buffer size: 6
    2018-04-06 16:02:56,721 INFO     emoncmsorg sending: https://server/emoncms/input/bulk.json?apikey=***&data=[[1523030550.201648,11,0.2,0.2,0.2,0.2,0.1,0.2,0.2,0.2],[1523030555.326267,11,0.2,0.2,0.2,0.2,0.1,0.2,0.2,0.2],[1523030560.44954,11,0.2,0.2,0.2,0.2,0.1,0.2,0.2,0.2],[1523030565.572611,11,0.2,0.2,0.2,0.2,0.1,0.2,0.2,0.2],[1523030570.797156,11,0.2,0.2,0.2,0.2,0.1,0.2,0.2,0.2],[1523030575.921488,11,0.2,0.2,0.2,0.2,0.1,0.2,0.2,0.2]]&sentat=1523030576
    2018-04-06 16:02:56,889 DEBUG    emoncmsorg acknowledged receipt with 'ok' from https://server/emoncms

how can I change it ?

0 Likes

RPICT4V3 for Current and Voltage Measurements
(Paul) #2

Are you saying you have 2 of these devices connected?

Can you explain how?

They use the GPIO serial port which is specifically for 2 devices to communicate, it is not a bus.

Also can you confirm you have posted the correct configuration? The “[[5]]” section should be in the “[nodes]” section not the “[interfacers]” section.

What is node 5 ?

When you say “So I have change the node ID of one” have you done that in the device? Are the devices presenting them selves as different node ids?

[edit - ok I can see in the wiki that you can stack up to 5 boards so I assume there is something in the boards FW to handle this and the “stacking” isn’t just linking all the serial tx and rx pins together, perhaps they are daisy chained serially or the boards interconnect by another comms method (spi, I²C or a second serial port) but I have no idea what that is offhand,

Either way, the Pi and emonhub, are only listening on one serial port for 2 devices, the devices must be configured to present the data with different node ids or merge the data into one. I suspect the former, but I’m guessing.

0 Likes

(Alex Felber) #3

Hello,

I habe tow seperate Raspberry on different locations with the same Sensorboards

Pasppi 1 note 11-> wan -> server
Pasppi 2 note 11( want to change to 5) -> wan server

Thank you

0 Likes

(Paul) #4

in that case you need to change the node Id in the device so it tells emonhub it’s a different node id, eg 5, then emonhub will be able to “pair it up” with the “[[5]]” configuration.

There is another method you might try, I do not know for sure if it will work, but there is a “nodeoffest” function in emonhub. You might be able to use that to add +1 to the existing node id (11) of the second device so that it becomes node 12 eg

[hub]
### loglevel must be one of DEBUG, INFO, WARNING, ERROR, and CRITICAL
### see here : http://docs.python.org/2/library/logging.html
loglevel = DEBUG #(default:WARNING)

[interfacers]

[[SerialDirect]] 
  Type = EmonHubSerialInterfacer
  [[[init_settings]]]
      com_port = /dev/ttyAMA0
      com_baud = 38400
  [[[runtimesettings]]]
      pubchannels = ToEmonCMS,
      nodeoffset = 1

[[emoncmsorg]]
   Type = EmonHubEmoncmsHTTPInterfacer
   [[[init_settings]]]
   [[[runtimesettings]]]
       subchannels = ToEmonCMS,
       #url = http://localhost/emoncms #uncomment to save on local pi
       apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
       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]

[[12]]
  nodename = my_RPICT7V1
  [[[rx]]]
     names = RP1, RP2, RP3, RP4, RP5, RP6, RP7, Irms1, Irms2, Irms3, Irms4,Irms5,Irms6,Irms7,Vrms
     scales = 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
     units =W,W,W,W,W,W,W,mA,mA,mA,mA,mA,mA,mA,V
     datacode = 0

see the extra setting in the [[[runtimesettings]]] and the [[11]] changed to [[12]].

This might work, but if it doesn’t, you must change the node id in the second devices FW.

0 Likes