Can't get controller to see contact switch status changes "binaryswitchsensor"



  • I'm using the sketch for the binaryswitchsensor and it connects to the ESP8266 gateway and shows up as a switch but shows "Closed" and never seens to change its status. Watching the serial monitor I see the arduino picking up that im moving the magnet next to and away from the sensor, but the controller doesn't seem to "see" those changes!?

    Here is what I see on the serial monitor (0=sensor touching, 1=sensor "open" not touching):

    sensor started, id=3, parent=0, distance=1
    send: 3-3-0-0 s=3,c=0,t=0,pt=0,l=0,sg=0,st=ok:
    send: 3-3-0-0 s=3,c=1,t=16,pt=2,l=2,sg=0,st=ok:0
    send: 3-3-0-0 s=3,c=1,t=16,pt=2,l=2,sg=0,st=fail:1
    send: 3-3-0-0 s=3,c=1,t=16,pt=2,l=2,sg=0,st=ok:0
    send: 3-3-0-0 s=3,c=1,t=16,pt=2,l=2,sg=0,st=ok:1
    send: 3-3-0-0 s=3,c=1,t=16,pt=2,l=2,sg=0,st=ok:0
    send: 3-3-0-0 s=3,c=1,t=16,pt=2,l=2,sg=0,st=ok:1
    send: 3-3-0-0 s=3,c=1,t=16,pt=2,l=2,sg=0,st=ok:0
    send: 3-3-0-0 s=3,c=1,t=16,pt=2,l=2,sg=0,st=ok:1
    send: 3-3-0-0 s=3,c=1,t=16,pt=2,l=2,sg=0,st=ok:0
    send: 3-3-0-0 s=3,c=1,t=16,pt=2,l=2,sg=0,st=ok:1
    send: 3-3-0-0 s=3,c=1,t=16,pt=2,l=2,sg=0,st=ok:0
    send: 3-3-0-0 s=3,c=1,t=16,pt=2,l=2,sg=0,st=ok:1

    It seems to default to Type as "Lighting 2" and Subtype "AC" in the devices section of Domoticz and I thought changing that might help but it doesn't seem to be possible to edit those values (I can't find them anywhere). I'll add 3 photos showing what I'm seeing in the various screens on Domoticz:

    2015-12-10 04_48_48-Domoticz.png

    2015-12-10 04_49_26-Domoticz.png

    2015-12-10 04_50_06-Domoticz.png

    Any suggestions or help would be awesome!!
    Bp


  • Hardware Contributor

    I would update to the latest BETA build. We are at v2.3790 right now. A bit further then the 3530 version (which I think is the "stable" version).

    The beta has been very solid for me, and has al the latest bugfixes.


  • Hardware Contributor

    Hi! As gertsanders said, and if that doesnt work - look at the gateway serial log and or Domoticz log to figure out if there is a fault in the radio traffic. All Switches are Ligtning 2, AC to me in Domoticz and that works fine.



  • @GertSanders said:

    I would update to the latest BETA build. We are at v2.3790 right now. A bit further then the 3530 version (which I think is the "stable" version).

    The beta has been very solid for me, and has al the latest bugfixes.

    Thanks for the info guys, I'll try a reboot of the controller first and if that doesn't help I'll update to the beta. I installed the server by using the SD card image. Are there any instructions for upgrading my current install to the latest beta build or do I need to drop it on a SD card like I did to originally install it? (its on a Raspberry Pi B+).

    First I'm going to get some sleep so my brain will function again!
    Thanks!


  • Hardware Contributor

    All you need to do is turn om "Software Updates" and change "Release channel" to beta (in settings) and then upgrade in Domoticz.



  • @bp_968 I have the same issue with my node with 2 contacts which gives the status of my garage door (fully opened, or closed).
    I'm using a serial gateway and in the console I can see incoming message from my node but no log in domoticz.
    I upgraded domoticz but still the same issue.
    My node is multisensor ( S_TEMP + S_HUM + 2 * S_LIGHT + 2 * S_LOCK + 2 * S_DOOR), I wonder if that matters .....



  • So I upgraded to the beta version and it didn't help. So I deleted the nodes under the "setup" section for the gateway and deleted the devices under the devices tab. Now even after resetting the controller, esp8266 gateway, and each "node" the controller won't find ANYTHING at all! At least before I had a functional temperature sensor attached and it saw the window contact sensor, it just wouldn't sense any changes in its status.

    I was so excited to have actually gotten something half working (OpenHAB was a total failure in my last attempt) and now it's doing nothing and doesn't seem to provide any errors or troubleshooting data!

    The LOG tab doesn't show anything other then the gateway being connected. Serial monitor shows the same stuff it did before, happily updating when I move the contacts on the door sensor or updating the temperature when I blow on the DHT11 node.

    Any ideas where to even begin? I'm half tempted to reinstall the controller and re flash all the microcontrollers.




  • I started watching the serial monitor for the gateway and it seems to crash and reboot about half the time when it receives data from one of the sensor nodes but it ONLY seems to do that when it's connected to the controller. If it's not paired with the controller (so not trying to forward data to it) it doesn't crash. That's a new problem that started with the beta upgrade.

    I'll toss the "stable" version of Domonticz on my other raspberry pi and see if the issue goes away. It probably won't resolve the original problem but will at least be back to actually seeing nodes!



  • Discovered my new problem was partially my fault, i screwed up the IP address on the controller config pointing to the ESP-gateway. Fixed that and now I see the sensors again, but I still don't get any updates from the contact sensor. I guess I'll try a motion sensor script just to see if I can get something other than the temp sensor working. I might also try a LAN-shield style gateway just in case that's a problem (I honestly have no clue).

    Here is the serial monitor dump from when the ESP8266 randomly decides to reset:

    ESP8266 MySensors Gateway
    Connecting to dd-wrt
    ...Connected!
    IP: 192.168.2.131
    0;0;3;0;9;gateway started, id=0, parent=0, distance=0
    0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:23.0
    1;1;1;0;0;23.0
    0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:24.0
    1;1;1;0;0;24.0
    Client 0 connected
    0;0;3;0;14;Gateway startup complete.
    Client 0: 0;0;3;0;2;

    Exception (28):
    epc1=0x4000bf80 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

    ctx: cont
    sp: 3ffeaca0 end: 3ffeaf20 offset: 01a0

    stack>>>
    3ffeae40: 00000080 3fffc6fc 3ffe97c7 40203ac0
    3ffeae50: 3ffeaf80 00000001 3ffe8fc9 4020b73c
    3ffeae60: 3ffeaf80 00000009 3ffe98bd 00000000
    3ffeae70: 00000003 00000000 3ffe98a8 4020ae11
    3ffeae80: 00000001 3ffe98b4 3ffeaf80 4020ae11
    3ffeae90: 3ffe98b4 3ffe98b4 3ffeaf80 3ffeaf80
    3ffeaea0: 3ffe98b4 3ffe97c0 3ffe97c7 402024b4
    3ffeaeb0: 3ffe9ab8 3ffe98b4 00000000 40202784
    3ffeaec0: 3ffe8e48 00000000 000003e8 3ffe9c4c
    3ffeaed0: 00000000 3fff4c88 3fff4c18 3ffeaf4c
    3ffeaee0: 00000000 0000000a 00000000 00000000
    3ffeaef0: 40201c35 8302a8c0 00000000 3ffeaf4c
    3ffeaf00: 3fffdc20 00000000 3ffeaf44 40201c92
    3ffeaf10: 00000000 00000000 3ffe9f00 40100378
    <<<stack<<<

    ets Jan 8 2013,rst cause:4, boot mode:(3,6)

    wdt reset
    load 0x4010f000, len 1264, room 16
    tail 0
    chksum 0x42
    csum 0x42
    ~ld

    ESP8266 MySensors Gateway
    Connecting to dd-wrt
    .......Connected!
    IP: 192.168.2.131
    0;0;3;0;9;gateway started, id=0, parent=0, distance=0


  • Hardware Contributor

    I have read other threads about the radio crashing connected to the controller, but works fine without. I Dont use that radio though, but search the forum and you find.



  • I switched to a wiz5100 based uno gateway and it all works fine. I'd still like to figure out whats going on with the ESP8266 setups. I'll do some searches like you suggested or post in the 8266 thread if I can't find anything.

    Thanks!



  • Today I had the same experiance with the ESP8266 gateway. Relay sensor and temp sensor working ok but the binary switch sensor did not work. It was correctly added in Domoticz but no status changes. When searching I found this post and build a quick and dirty USB gateway using an arduino Nano, plugged it in my Raspberry PI that runs Domoticz and bingo, it works ! So thanks for your post.

    One thing I did see in the telnet session to the ESP gateway, there were long numbers (6 digits I believe) at the end of the message were there should be a 0 or 1, indicating the status of the input. The gateway did not crash.
    Looks like a bug in the ESP gateway.


Log in to reply
 

Suggested Topics

  • 5
  • 3
  • 5
  • 2
  • 2
  • 5

66
Online

11.4k
Users

11.1k
Topics

112.7k
Posts