Switch on sensor locking/freezing Gateway!!



  • I have a Veralite with a Gateway connected via serial with 1 sensor that has 1 relay, 1 switch and 2 temperature (ds18b20), this has been working very well for the last few weeks. I have just added another sensor with 2 relays 1 switch and 1 temperature, it uses almost identical code to the first and it works perfectly both in sending in the temperature and responding to relay changes from Vera until I use the switch this appears to freeze/lock the Gateway. Neither sensor can now communicate with the gateway. Rebooting the sensor does no good the Gateway has to be reset to get it all working. I am using v1.4, below is the sensor log with my comments in bold italic.
    sensor started, id 3 Node startup
    send: 3-3-0-0 s=255,c=0,t=17,pt=0,l=3,st=ok:1.4
    send: 3-3-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
    read: 0-0-3 s=255,c=3,t=6,pt=0,l=1:M
    send: 3-3-0-0 s=255,c=3,t=11,pt=0,l=20,st=ok:Immersion Controller
    send: 3-3-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.1
    send: 3-3-0-0 s=0,c=0,t=6,pt=0,l=3,st=ok:1.4
    send: 3-3-0-0 s=2,c=0,t=14,pt=0,l=3,st=ok:1.4
    send: 3-3-0-0 s=4,c=0,t=14,pt=0,l=3,st=ok:1.4
    send: 3-3-0-0 s=2,c=1,t=22,pt=0,l=3,st=ok:Off Programmed message to set relay off in Vera on node startup
    send: 3-3-0-0 s=4,c=1,t=22,pt=0,l=3,st=ok:Off
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9 Temperature sent to Vera
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9
    read: 0-0-3 s=2,c=1,t=22,pt=0,l=6:HeatOn Relay switched on from VERA
    send: 3-3-0-0 s=2,c=1,t=22,pt=0,l=6,st=ok:HeatOn
    Switching Main Immersion ON
    Incoming change for sensor:2
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9
    read: 0-0-3 s=4,c=1,t=22,pt=0,l=6:HeatOn Relay switched on from VERA
    send: 3-3-0-0 s=4,c=1,t=22,pt=0,l=6,st=ok:HeatOn
    Switching Ensuite Immersion ON
    Incoming change for sensor:4
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=fail:16.9
    read: 0-0-3 s=2,c=1,t=22,pt=0,l=3:Off Relay switched off from VERA
    send: 3-3-0-0 s=2,c=1,t=22,pt=0,l=3,st=ok:Off
    Switching Main Immersion OFF
    Incoming change for sensor:2
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9
    read: 0-0-3 s=4,c=1,t=22,pt=0,l=3:Off Relay switched off from VERA
    send: 3-3-0-0 s=4,c=1,t=22,pt=0,l=3,st=ok:Off
    Switching Ensuite Immersion OFF
    Incoming change for sensor:4
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=fail:16.9 Temperature fail sending to Vera
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9 but next send is good
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:16.9
    send: 3-3-0-0 s=2,c=1,t=22,pt=0,l=6,st=fail:HeatOn Request relay on from switch on node, all messages fail from here
    Switch:
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=fail:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=fail:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=fail:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=fail:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=fail:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=fail:16.9
    send: 3-3-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=fail:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=fail:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=fail:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=fail:16.9
    sensor started, id 3 Node restarted but unable to communicate with Gateway
    send: 3-3-0-0 s=255,c=0,t=17,pt=0,l=3,st=fail:1.4
    send: 3-3-0-0 s=255,c=3,t=6,pt=1,l=1,st=fail:0
    send: 3-3-0-0 s=255,c=3,t=11,pt=0,l=20,st=fail:Immersion Controller
    send: 3-3-0-0 s=255,c=3,t=12,pt=0,l=3,st=fail:1.1
    send: 3-3-0-0 s=0,c=0,t=6,pt=0,l=3,st=fail:1.4
    send: 3-3-0-0 s=2,c=0,t=14,pt=0,l=3,st=fail:1.4
    send: 3-3-0-0 s=4,c=0,t=14,pt=0,l=3,st=fail:1.4
    send: 3-3-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
    send: 3-3-0-0 s=2,c=1,t=22,pt=0,l=3,st=fail:Off
    send: 3-3-0-0 s=4,c=1,t=22,pt=0,l=3,st=fail:Off
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=fail:16.9
    send: 3-3-0-0 s=0,c=1,t=0,pt=7,l=5,st=fail:16.9

    The code that handles the switch is from the examples.

        gw.process();
        debouncer.update();
        // Get the update value
        int value = debouncer.read();
        if (value != oldValue && value==0) 
        {
            //gw.send(msg_MAIN_Relay.set(state?false:true), true); // Send new state and request ack back
            if (HeaterOn)        //the heater is on so switch it off.
            {
                gw.send(msg_MAIN_Relay.set("Off"),true);
                Serial.print("Switch: ");
                Serial.println(msgSwitch.getString());
            } 
            else                //the heater is off so switch it off
            {
                gw.send(msg_MAIN_Relay.set("HeatOn"),true);
                Serial.print("Switch: ");
                Serial.println(msgSwitch.getString());
            }
        }
        oldValue = value; ````
    Is there any way to read the debug info from the Gateway when it is connected to the Vera via a serial link

Log in to reply
 

Suggested Topics

  • 3
  • 1
  • 2
  • 6
  • 6
  • 8

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts