Thank you @Boots33 for the links seems that "isTransportReady()" will do my job... i have a lot of work...
zzz-teo
@zzz-teo
Best posts made by zzz-teo
-
RE: "connected()" function
-
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.
Latest 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! ) -
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? -
RE: How can i define message Payload Type
hmm! OK! sounds reasonable!
Thanx you... -
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?
-
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!
-
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. -
RE: ... using two Gateways
@gohan ...to have a wired backbone in a bigger vertical installation, each level has a repeater for level wireless connectivity.
-
RE: ... using two Gateways
@mfalkvidd
... sure! and since i'm not qualified for such task, hope this topic to alert someone and build it! -
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 ...