Navigation

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

    Posts made by zzz-teo

    • RE: about ACK ...

      ... this approach seems that work !

      #define ACKDELAY 40 //seems 40 millis is a good value
      bool nodeACK = false;  
      void SendData(byte sensor, byte destination, bool value, bool ack) {
               msg.setSensor(sensor);
               msg.setDestination(destination);
               
        for(byte i=0; i<=ATTEMPTS; i++){
            if(send(msg.set(value),ack)){
               Serial.println("Gateway ACK");
      //         wait(ACKDELAY);
               if(nodeACK == true){
               Serial.println("Node ACK");
               nodeACK = false;
               break;}else{
               Serial.println("Node NACK");
               }
              }else{
              Serial.println("Gateway NACK");
              }
              wait(ACKDELAY);
              }
      }
      
      

      ... in combination with this

      void receive(const MyMessage &message) {
      if (message.isAck()){
              nodeACK=true;
              digitalWrite(LED_PINS[message.sensor], message.getBool()? LED_ON:LED_OFF);
              Serial.println(F("ACK recieved LED Status Changed")); 
      }
      

      ... but probably is not the most elegand way!
      ... because if during the send/ack back message duty cycle, an ack from an other sensor received, a conflict may occure! i do not feel safe!
      (i also have a feeling that i did that post in the wrong topic! 😕 )

      posted in My Project
      zzz-teo
      zzz-teo
    • about ACK ...

      Hi, all
      I am trying to build a simple project of two nodes.One node with a push button(TOGGLE) and one switch, both with feedback LEDs.The other node with two relays and local control buttons.
      Its mandatory to have a reliable feedback to first node LEDs so, trying to figure out how ACK work in mysensors and how to resend the message if not ACK, I used
      this...

       //function to handle the ACK .
      #define ATTEMPTS 5
      
      void SendData(byte sensor, byte destination, bool value, bool ack) {
               msg.setSensor(sensor);
               msg.setDestination(destination);
               
        for(byte i=0; i<=ATTEMPTS; i++){
            if(send(msg.set((bool)value),ack)){
               Serial.println("ACK");
               break;
              }else{
              Serial.println("NACK");
              }
          
              }
      }
      

      ... which works great but only until the message reaches the gateway, not the target node! although I can see the ACK back from the target node it remains unparsed!
      Can anyone give me an example of how to do it?

      posted in My Project
      zzz-teo
      zzz-teo
    • RE: How can i define message Payload Type

      hmm! OK! sounds reasonable!
      Thanx you... 🙂

      posted in Troubleshooting
      zzz-teo
      zzz-teo
    • RE: How can i define message Payload Type

      no! i didn't ... i am working on it now... and seems that works by just changing the sender node variable declaration from "unsigned int" to "int" ! is that normal?

      posted in Troubleshooting
      zzz-teo
      zzz-teo
    • How can i define message Payload Type

      Hi,
      i am trying to change the Payload Type in this message,

      3304546 TSF:MSG:SEND,12-12-0-15,s=0,c=1,t=3,pt=3,l=2,sg=0,ft=0,st=OK:34
      

      from pt=3 to pt=0 in order to be recognized by the Dimmer Actuator
      ... with "P_STRING"(sent from MYSController) works but not with "P_UINT16" !

      the following is the output from DimmableLED Actuator example

      2301587 TSF:MSG:READ,12-0-15,s=0,c=1,t=3,pt=3,l=2,sg=0:34
      Changing level to 0, from 0
      2301594 TSF:MSG:SEND,15-15-0-0,s=14,c=1,t=2,pt=1,l=1,sg=0,ft=0,st=OK:0
      2301604 TSF:MSG:SEND,15-15-0-0,s=14,c=1,t=3,pt=2,l=2,sg=0,ft=0,st=OK:0
      

      ... could someone help me!

      posted in Troubleshooting
      zzz-teo
      zzz-teo
    • RE: ... using two Gateways

      😆

      posted in General Discussion
      zzz-teo
      zzz-teo
    • RE: ... using two Gateways

      @gohan
      ... yes this is the only solution ... but using long range modules the network is exposed to neighborhoods and may someone be motivated to play with it!
      By using RS485 backbone the exposed level is reduced. (as well as EMI exposure).
      ... and by using repeaters may not be stable due to area division by Slabs.

      posted in General Discussion
      zzz-teo
      zzz-teo
    • RE: ... using two Gateways

      @gohan ...to have a wired backbone in a bigger vertical installation, each level has a repeater for level wireless connectivity.

      posted in General Discussion
      zzz-teo
      zzz-teo
    • RE: ... using two Gateways

      @mfalkvidd
      ... sure! and since i'm not qualified for such task, hope this topic to alert someone and build it!

      posted in General Discussion
      zzz-teo
      zzz-teo
    • RE: ... using two Gateways

      @mfalkvidd
      hmm... that is more complicated than i thought!
      seems that need a repeater NRF to RS485 to handle the "INTERNAL" trafic also and not two Gateways ...😕 😵

      posted in General Discussion
      zzz-teo
      zzz-teo
    • RE: ... using two Gateways

      ... may be using a MEGA to connect to serial1,2,3 ports
      an NRF Gateway
      an RS485 Gateway
      and build a new serial output to Controller that will merge and manage messages via serial API.

      posted in General Discussion
      zzz-teo
      zzz-teo
    • RE: ... using two Gateways

      @gohan
      ... i was dreamed of activating both
      // # Define MY_RADIO_NRF24
      // # Define MY RS485
      but i got this!
      " #error Only one forward link driver can be activated "
      ... now i keep dreaming ...

      posted in General Discussion
      zzz-teo
      zzz-teo
    • RE: "connected()" function

      Thank you @Boots33 for the links seems that "isTransportReady()" will do my job... i have a lot of work... 🙂

      posted in General Discussion
      zzz-teo
      zzz-teo
    • RE: ... using two Gateways

      Thank you @sundberg84for the link but this thread seems to be a dead end.

      posted in General Discussion
      zzz-teo
      zzz-teo
    • RE: ... using two Gateways

      @gohan , yes i have imagine a gateway(Serial or Ethernet or...) that both NRF & RS485 is hooked on and route messages transparently from one to other.
      If not hooked on gateway just act as repeater in between of, and then use a NRFGateway or RS485Gateway to connect the Controller (or manage the trafic).

      posted in General Discussion
      zzz-teo
      zzz-teo
    • "connected()" function

      Hi all,
      i am trying to figure out how to get if node is connected to network or not! Is there any function to return true or false?
      ... want to "request sync" as soon as node reconnected to network.

      posted in General Discussion
      zzz-teo
      zzz-teo
    • ... using two Gateways

      Hi all,
      how can i pass a message from one gateway network to another gateway network without using a controller (NRF24 & RS485)Is there any bridge for such purpose?

      posted in General Discussion
      zzz-teo
      zzz-teo
    • RE: Mysensors "Global" message

      @napo7 said in Mysensors "Global" message:

      Is there a way to broadcast messages ?

      Hi, @napo7, still have the same question! The only thing that i have done till now is... to send a message to set.Destination(255) that is being handled from gateway as a normal message, but althought is visible to serial output all other nodes, wasn't able to handle it! (do not forget that i am new to this). is there any idea how to retrieve the payload from this kind of "INTERNAL" message?

      posted in My Project
      zzz-teo
      zzz-teo
    • RE: Mysensors "Global" message

      @hek thanks for the response i will try to figure out @tekka 's broadcast implementation... i would appreciate a guideline from @tekka!

      posted in My Project
      zzz-teo
      zzz-teo
    • RE: Mysensors "Global" message

      Thanks for the response @boozz , but... i have i my mind something such as ... all nodes react to a message with its ID(default) and to this "global type" message... something like a "system channel" with special comands like "who is listening"? or "everyone switch to mode "x" . Any idea?

      posted in My Project
      zzz-teo
      zzz-teo
    • Mysensors "Global" message

      Hi all, how can i send (is possible?)transparently a global message (like "set on board led ON" )from a node to all other nodes without to add seperate "set" commands for all nodes? (another newbie 🙂 ) .

      posted in My Project
      zzz-teo
      zzz-teo