Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
zzz-teoZ

zzz-teo

@zzz-teo
Unfollow Follow
About
Posts
21
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • about ACK ...
    zzz-teoZ zzz-teo
    My Project

    ... 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! :confused: )


  • about ACK ...
    zzz-teoZ zzz-teo
    My Project

    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?


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

    hmm! OK! sounds reasonable!
    Thanx you... :)


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

    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?


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

    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!


  • ... using two Gateways
    zzz-teoZ zzz-teo
    General Discussion

    :laughing:


  • ... using two Gateways
    zzz-teoZ zzz-teo
    General Discussion

    @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.


  • ... using two Gateways
    zzz-teoZ zzz-teo
    General Discussion

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


  • ... using two Gateways
    zzz-teoZ zzz-teo
    General Discussion

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


  • ... using two Gateways
    zzz-teoZ zzz-teo
    General Discussion

    @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 ...:confused: :dizzy_face:


  • ... using two Gateways
    zzz-teoZ zzz-teo
    General Discussion

    ... 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.


  • ... using two Gateways
    zzz-teoZ zzz-teo
    General Discussion

    @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 ...


  • "connected()" function
    zzz-teoZ zzz-teo
    General Discussion

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


  • ... using two Gateways
    zzz-teoZ zzz-teo
    General Discussion

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


  • ... using two Gateways
    zzz-teoZ zzz-teo
    General Discussion

    @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).


  • "connected()" function
    zzz-teoZ zzz-teo
    General Discussion

    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.


  • ... using two Gateways
    zzz-teoZ zzz-teo
    General Discussion

    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?


  • Mysensors "Global" message
    zzz-teoZ zzz-teo
    My Project

    @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?


  • Mysensors "Global" message
    zzz-teoZ zzz-teo
    My Project

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


  • Mysensors "Global" message
    zzz-teoZ zzz-teo
    My Project

    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?

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular