Wrong sensors ID in Domoticz



  • Hi,

    I'm trying to make Domoticz control my blinds. So far, I get it working, but the messages I get from Domoticz have a wrong ID. In my Arduino code, I set my S_COVER sensor ID to 30 :

    #define RELAIS_VOLET_BAS_ID 30
    gw.present(RELAIS_VOLET_BAS_ID, S_COVER);
    

    The presentation message is ok :

    send: 103-103-0-0 s=30,c=0,t=5,pt=0,l=0,sg=0,st=ok:
    

    But on Domoticz, the Unit is 14 (and the ID is strangely 000067 like every relay I added from other Arduinos).
    When I play with the Domoticz widget, I do get messages to my Arduino, but the ID is the one from Domoticz

      Serial.print("new message incoming : ");
      Serial.println(message.type);
      Serial.print("Incoming change for sensor:");
      Serial.print(message.sensor);
      Serial.print(", New status: ");
      Serial.println(message.getBool());
    
    read: 0-0-103 s=14,c=1,t=30,pt=0,l=0,sg=0:
    new message incoming : 30
    Incoming change for sensor:14, New status: 0
    

    I could go around this, but it implies a two-step deployment : First deployment for presenting the sensor and second step for injecting Domoticz's own ID. On my other sensors (only DHT11/21 for now), the Domoticz ID is composed of the node's ID and the sensors's ID (the Unit field doesn't seem relevant on these sensors).

    I'm using the master branch of Domoticz, last updated one or two month ago. Is there something wrong with my code or is it a Domoticz bug ?

    Thx


  • Hardware Contributor

    Hi!
    The Domoticz ID or IDX doesnt correpond to the ID you set in MySensors.
    Sometimes you get a hint which one it is but not always.

    My relays are 101-110 but in Domoticz the ID is 0000065 - 0000068 and IDX is a counter starting from 0 and just adds a new ID when you add a new device.

    It should work anyway, if I try to switch my relay with ID 22 and IDX 0000068 it translates somewhere and it reaches back to my relay node 104 for example.

    Do you use the stable or beta? I know there was trouble in the stable version and alot has happened with the beta with MySensors code in Domoticz.



  • Hi, thx for the answer,

    The messages that Domoticz sends are routed to the good Arduino (message.destination is correct), what bugs me is that the message.sensor isn't correct (14 instead of 30).
    In your example, you use 101-110, but is that the Node ID (each relay is on a separate Arduino) or the sensor ID (every relay is on the same Arduino) ?
    I want to control 4 blinds and will be using two arduinos to control two blinds each. So I can't just use the message type (V_UP, V_DOWN...), I also need a correct sensor ID to be able to tell which blind to operate.

    Concerning the version, I'm using
    Version: 2.3057
    Build Hash: 8a2f223
    Compile Date: 2015-09-17 16:36:12
    I can't tell if I'm using stable or beta, although on the setup page, I check for stable releases. How do I know what version I'm using ?


  • Hardware Contributor

    Hi @Ashygan

    100-104 is node ID, i havent tested multiple childs on the same node.
    2.3 i stable version, latest beta is 3.53x something.


  • Hero Member

    Most new features for MySensors are on the Domoticz beta release. One of these new ones is on the "hardware" page where there is a "setup" feature that shows the registered MySensors nodes and Sensors along with names and "last seen' values.
    Domoticz uses its own internal numbering scheme which translates to the a 'node''sensor' combination.



  • I'll give the beta channel a try. Is it possible to switch to beta using the github repository ? From what I saw on the wiki, beta binaries can be downloaded from sourceforge, but sourceforge is partially down right now (the project is up, but file browsing isn't).
    I've tried watching the github's tags, but I didn't see something relevant, and the auto-update feature on beta tells me there aren't any updates (I suppose it's because Sourceforge is down)

    BTW, I'm using Linux (Mint for testing and Debian for production)


  • Hero Member

    @Ashygan Honestly I don't know... I subscribe to beta from the domoticz setttings web page...


Log in to reply
 

Suggested Topics

  • 5
  • 1
  • 2
  • 1
  • 5
  • 2

74
Online

11.4k
Users

11.1k
Topics

112.7k
Posts