Why are my nodes either all Online or all Offline?



  • As far as I can remember, my OpenHAB used to show the online status of each individual MySensor node when I first set it up about a year ago. Several upgrades (and a lot of tinkering) has passed and now I find that all nodes are set to Online status as soon as the gateway is connected to OpenHAB.

    Shouldn't the nodes go online/offline one by one depending on their individual status in the MySensors network?
    What am I missing here?

    I use OpenHAB is v 2.4.0 (release)
    The Gateway is a ESP8266 on ethernet on MySensors v 2.3.1 (all nodes are 2.3.1 as well).

    I've tried changing the network sanity check and heartbeat settings for the gateway with no success. This is what I have now:

    //mysensors.things
    
    Bridge mysensors:bridge-eth:MYS_gw1 "MySensors Ethernet Gateway" [ 
        ipAddress="192.168.1.6", 
        tcpPort=5003,
        sendDelay=200,
        // periodically ensure that gateway is up and running
        networkSanCheckEnabled=true,                
        // check the gateway every x minutes
        networkSanCheckInterval=1, 
        // send heartbeat request to nodes
        networkSanCheckSendHeartbeat=true,
        // disconnect nodes after x failed heartbeat requests
        networkSanCheckSendHeartbeatFailAttempts=2 
    ]
    {
    // Node 10 --- EasyPCB Testrigg --- DHT-22 med batteri*/
    Thing temperature MYS_Node10_Temp 	"MYS 10-1 Temp" @ "Lab" [ nodeId=10, childId=1 ]
    Thing humidity    MYS_Node10_Humid 	"MYS 10-2 Fukt" @ "Lab" [ nodeId=10, childId=2 ]
    Thing multimeter  MYS_Node10_Maint 	"MYS 10-201 Underhåll" @ "Lab" [ nodeId=10, childId=201 ]
    }
    // More sensors defined
    

    Below is the log from when I have switched off the gateway and waited until it's offline in OpenHAB.
    Why is the status set to "Online" for node 21 (t=22:43:38.494) and node 22 (t=22:43:38.495)

    // OpenHAB log - mysensors binding set to DEBUG level
    
    2019-04-24 22:43:37.301 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Connecting to IP bridge [192.168.1.6:5003]
    2019-04-24 22:43:38.400 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
    2019-04-24 22:43:38.420 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;14;Gateway startup complete.
    2019-04-24 22:43:38.424 [INFO ] [rs.internal.gateway.MySensorsGateway] - Node 0 available again!
    2019-04-24 22:43:38.428 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;0;0;18;2.3.1
    2019-04-24 22:43:38.431 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Presentation Message received
    2019-04-24 22:43:38.434 [WARN ] [rs.internal.gateway.MySensorsGateway] - Presented child is alredy present in gateway
    2019-04-24 22:43:38.437 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;2;2.3.1
    2019-04-24 22:43:38.440 [DEBUG] [rsAbstractConnection$MySensorsReader] - Good,Gateway is up and running! (Ver:2.3.1)
    2019-04-24 22:43:38.454 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:multimeter:MY
    S_gw1:MYS_Node10_Maint
    2019-04-24 22:43:38.460 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:temperature:M
    YS_gw1:MYS_Node12_Temp
    2019-04-24 22:43:38.465 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [0,21,22,10,11,12]
    2019-04-24 22:43:38.465 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:humidity:MYS_
    gw1:MYS_Node10_Humid
    2019-04-24 22:43:38.462 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:temperature:M
    YS_gw1:MYS_Node10_Temp
    2019-04-24 22:43:38.471 [INFO ] [al.protocol.ip.MySensorsIpConnection] - Successfully connected to MySensors Bridge.
    2019-04-24 22:43:38.473 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 10-2 not registered yet, registering...
    2019-04-24 22:43:38.471 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 12-1 not registered yet, registering...
    2019-04-24 22:43:38.473 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 10-201 not registered yet, registering...
    2019-04-24 22:43:38.475 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:baro:MYS_gw1:
    MYS_Node12_Press
    2019-04-24 22:43:38.482 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 12-2 not registered yet, registering...
    2019-04-24 22:43:38.491 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 10-1 not registered yet, registering...
    2019-04-24 22:43:38.492 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:multimeter:MY
    S_gw1:MYS_Node12_Maint
    2019-04-24 22:43:38.494 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:waterMeter:MY
    S_gw1:MYS_Node21_Water1
    2019-04-24 22:43:38.484 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:baro:MYS_gw1:
    MYS_Node12_Baro
    2019-04-24 22:43:38.496 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 12-201 not registered yet, registering...
    2019-04-24 22:43:38.501 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 21-1 not registered yet, registering...
    2019-04-24 22:43:38.495 [DEBUG] [ensors.handler.MySensorsThingHandler] - MySensors Bridge Status updated to ONLINE for device: mysensors:power:MYS_gw1
    :MYS_Node22_Energy1
    2019-04-24 22:43:38.506 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 12-3 not registered yet, registering...
    2019-04-24 22:43:38.517 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 22-1 not registered yet, registering...
    2019-04-24 22:44:07.274 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 10;255;3;0;32;500
    2019-04-24 22:44:38.444 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
    2019-04-24 22:44:38.548 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;2;2.3.1
    2019-04-24 22:44:41.444 [DEBUG] [ateway.MySensorsNetworkSanityChecker] - Network sanity check: PASSED
    2019-04-24 22:44:41.446 [DEBUG] [ateway.MySensorsNetworkSanityChecker] - Sending I_HEARTBEAT_REQUESTs
    2019-04-24 22:44:41.449 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;255;3;0;18;
    2019-04-24 22:44:41.517 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;22;68713
    2019-04-24 22:44:41.651 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 21;255;3;0;18;
    2019-04-24 22:44:41.855 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 22;255;3;0;18;
    2019-04-24 22:44:42.059 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 10;255;3;0;18;
    2019-04-24 22:44:42.263 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 11;255;3;0;18;
    2019-04-24 22:44:42.467 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 12;255;3;0;18;
    2019-04-24 22:45:31.012 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 12;255;3;0;33;110000
    2019-04-24 22:45:31.046 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 12;1;1;0;0;24.98
    2019-04-24 22:45:31.052 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 12 found in gateway
    2019-04-24 22:45:31.055 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 1 found in node 12
    2019-04-24 22:45:31.058 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: temp(V_TEMP) value to: 24.98
    2019-04-24 22:45:31.077 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 12/1 to 2019-04-24T22:45:31.000+0200
    2019-04-24 22:45:31.081 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 12;2;1;0;4;1017.18
    2019-04-24 22:45:31.093 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 12 found in gateway
    2019-04-24 22:45:31.099 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 2 found in node 12
    2019-04-24 22:45:31.105 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: pressure(V_PRESSURE) value to: 1017.18
    2019-04-24 22:45:31.114 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 12/2 to 2019-04-24T22:45:31.000+0200
    2019-04-24 22:45:31.118 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 12;3;1;0;5;stable
    2019-04-24 22:45:31.124 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 12 found in gateway
    2019-04-24 22:45:31.126 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 3 found in node 12
    2019-04-24 22:45:31.130 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: baro(V_FORECAST) value to: stable
    2019-04-24 22:45:31.138 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 12/3 to 2019-04-24T22:45:31.000+0200
    2019-04-24 22:45:31.151 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 12;255;3;0;32;500
    2019-04-24 22:45:44.451 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
    2019-04-24 22:45:44.482 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;2;2.3.1
    2019-04-24 22:45:47.451 [DEBUG] [ateway.MySensorsNetworkSanityChecker] - Network sanity check: PASSED
    2019-04-24 22:45:47.453 [DEBUG] [ateway.MySensorsNetworkSanityChecker] - Sending I_HEARTBEAT_REQUESTs
    2019-04-24 22:45:47.457 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;255;3;0;18;
    2019-04-24 22:45:47.487 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;22;134686
    2019-04-24 22:45:47.660 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 21;255;3;0;18;
    2019-04-24 22:45:47.865 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 22;255;3;0;18;
    2019-04-24 22:45:48.069 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 10;255;3;0;18;
    2019-04-24 22:45:48.272 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 11;255;3;0;18;
    2019-04-24 22:45:48.476 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 12;255;3;0;18;
    2019-04-24 22:45:54.001 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 10;255;3;0;33;110074
    2019-04-24 22:45:57.956 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 10;2;1;0;1;29.90
    2019-04-24 22:45:57.964 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 10 found in gateway
    2019-04-24 22:45:57.968 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 2 found in node 10
    2019-04-24 22:45:57.972 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: hum(V_HUM) value to: 29.90
    2019-04-24 22:45:57.985 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 10/2 to 2019-04-24T22:45:57.000+0200
    2019-04-24 22:45:57.989 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 10;255;3;0;32;500
    
    


  • @fredswed Hi, did you ever get this sorted out? I am facing the same issue and cant find out whats going on.



  • Hi
    I think I am seeing something quite similar. I am not sure what I have done. I have been running 3 temp / humidity boards for months without issue. Recently I decided to play about with the set up and now I am getting this odd behaviour:

    • delete all the old sensors and ethernet things.
    • re-add the ethernet bridge thing, set it up keep all settings off
    • manually re-add the sensor things, come online, relink items. everything apparently fine....updating in log and reporting values in sitemap
    • then, at some point, for no reason i can yet find, both sensors stop updating after a few hours as the same time: no new openhab log items, items stop updating.
    • all things still showing online in paper ui
    • check the debug log on the bridge in arduino ide and can see the messages from sensors coming down correctly
    • now if go into the ethernet bridge thing in paper ui, if i edit any of the settings, e.g. "send heartbeat..." then all the sensor things will switch to "OFFLINE - BRIDGE_OFFLINE"
    • to get the sensor things to come back to online i have to perform a similar edit in the sensor thing and save down. doesn't seem to matter what i change. just changing a setting seems to force it back online in paper ui and then the sensor starts feeding through openhab log messages and updates the items correctly again.

    Has anyone got any ideas? I feel as though I am not setting these settings correctly but I can find no documentation on how they are supposed to work.

    By the way I was running the openhab binding 2.2 and upgraded to 2.4 but get the same behaviour.

    Thanks



  • I have now found I can replicate this behaviour by simply restarting the serial monitor in arduino ide (i.e. forcing the bridge to restart). Once done the bridge thing and node things all show as online but no updates are made until the things are edited in some way.


Log in to reply
 

Suggested Topics

  • 22
  • 1
  • 19
  • 5
  • 132
  • 2

2
Online

11.4k
Users

11.1k
Topics

112.7k
Posts