Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. phil2020
    3. Topics
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Topics created by phil2020

    • phil2020

      nRF52840 Support on MySensors
      Hardware • • phil2020  

      3
      1
      Votes
      3
      Posts
      87
      Views

      monte

      @phil2020 look here: https://forum.mysensors.org/post/109039 You may find that useful.
    • phil2020

      How to compare single characters of received message?
      Development • • phil2020  

      3
      0
      Votes
      3
      Posts
      482
      Views

      phil2020

      That works, and is a lot shorter! Thanks
    • phil2020

      Ability to change channel & or base radio ID
      Feature Requests • • phil2020  

      10
      1
      Votes
      10
      Posts
      1564
      Views

      Guillermo Schimmel

      @mfalkvidd that's really great. I'll try. Thank you very much.
    • phil2020

      Why does the value of second field of I_ID_REQUEST message change for each request?
      Controllers • • phil2020  

      7
      0
      Votes
      7
      Posts
      1236
      Views

      tekka

      @phil2020 Thanks for reporting back. Do you happen to have a full debug log of both nodes incl. GW debug log while assigning ID 255, rebooting and setting new IDs (without random delay) - I'd like to understand why the random token verification failed.
    • phil2020

      minimal controller code to assign IDs to nodes
      Controllers • • phil2020  

      13
      0
      Votes
      13
      Posts
      2077
      Views

      phil2020

      For those interested in the final steps to assign the node ID... So now I have the node in auto mode pumping out the requests to the gateway. I have also disabled the debug mode for the serial gateway sketch and see the following info at the serial output on Arduino's Serial Monitor output. 0;255;3;0;14;Gateway startup complete. 0;255;0;0;18;2.2.0 255;110;3;0;3; 255;63;3;0;3; 255;16;3;0;3; 255;225;3;0;3; The first two lines are just the gateway telling it's alive and ready to go. The following 4 lines are showing the I_ID_REQUEST messages from the node. you need to respond with the following message 255;255;3;0;4;node_id where node_id can be any value you choose between 0-254 (but obviously should be unique for your population of nodes). Looking at the I_ID_REQUEST messages, the first field with value 255 is the special node ID which indicates it is unassigned, and why it is important (as discussed above) that you erase EEPROM to 0xFF state using the MySensors supplied ClearEepromConfig sketch. But it is not mentioned anywhere I could find on the forum or documentation, about the value of the second field, which seems to be changed continually for each I_ID_REQUEST message. From my testing, it appears that the second field is a way to enable nodes requesting an update to be individually targeted with an ID assignment response. So potentially useful if you have two or more nodes requesting a node assignment at the same time. Note that the node ID you assign (i.e. the payload value for the message) doesn't have to match the random value in the request. e.g. request 255;70;3;0;3; response to send would be 255;70;3;0;4;22 if want to assign node ID of 22. I can confirm that if you respond quickly (i.e. before the next I_ID_REQUEST is sent out), mirroring that second field value, then you can update the node ID for the requesting device. If you wait until the next I_ID_REQUEST message is broadcast, then it expires and won't accept that previous ID. Note that you can alternatively use the special value of 255 for the second field in the response, and it will accept the node update request, but that may have issues if you have more than one device requesting an ID at the same time. Since the I_ID_REQUEST is happening too quick to read the random generated ID and then manually enter that into the Serial Monitor prompt, for testing purposes we can use the approach of using 255 as the second field value and ignore the random ID value. So at the Arduino Serial Monitor window, first select the drop down at the bottom to add a Newline character at the end of the commands being sent, and then enter the following string in the send command input at the top of the Serial Monitor window, which requests that the new node ID should be 10. 255;255;3;0;4;10 Note that you need to click on the send button when actively receiving the I_ID_REQUEST messages, if you try sending during the long pause between the request pulses, the message will be ignored and nothing will happen. So now you should have registered the device and start being able to see the registered node's output to the Serial Monitor. My sketch is just a simple toggling output of a binary value. The message meaning, as per the Serial API definitions is: node ID 10, outputting sensor ID 88, sending a set type message, with no acknowledgement required, message type 16 (V_TRIPPED), payload is binary on/off. 10;88;1;0;16;0 10;88;1;0;16;1 10;88;1;0;16;0 10;88;1;0;16;1 10;88;1;0;16;0 10;88;1;0;16;1 Hope that is useful for other's understanding.
    • phil2020

      Checking for current gateway connection state on Node?
      Development • • phil2020  

      8
      0
      Votes
      8
      Posts
      2108
      Views

      pjr

      @phil2020 try this in your sketch: #define MY_TRANSPORT_WAIT_READY_MS (200ul) Its the "timeout" for waiting connection to gateway. Default 0 -> wait infinitely(?).
    • phil2020

      NRF24L01 and SenseBender Gateway - Trying to get basic comms working
      Troubleshooting • • phil2020  

      3
      0
      Votes
      3
      Posts
      793
      Views

      phil2020

      Hi @Yveaux, Thanks for the pointer. I installed the http://domoticz.com/ controller and see it all working now. I saw some mention elsewhere on this site about the gateway automatically taking care of assigning nodes etc and storing them in a local table, I assumed without any input from a controller, but I suppose it makes sense to have the controller software involved during that step also. Thanks.