💬 Serial Protocol - 2.x
-
@mfalkvidd said:
@musthafa is there a reason S_BINARY can't be used for those cases?
Thanks. Didn't look at it. Solved my problem.
-
Where can I find the structure for the payload of the internal command I_LOG_MESSAGE ? e.g. payload "TSF:MSG:SEND,211-0-220-220,s=211,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=OK:69"
I know I'm sending a value from node 211 to node 220 with the value 69. What does c=1, t=23, pt=2, l=2, sg=0,ft=0 mean? -
Where can I find the structure for the payload of the internal command I_LOG_MESSAGE ? e.g. payload "TSF:MSG:SEND,211-0-220-220,s=211,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=OK:69"
I know I'm sending a value from node 211 to node 220 with the value 69. What does c=1, t=23, pt=2, l=2, sg=0,ft=0 mean? -
-
how can I handle sendheartbeat() messages in my controller? What payload will be sent? 1 or 0, True or False...?
ps I´m using openhab
@siod said in 💬 Serial Protocol - 2.x:
how can I handle sendheartbeat() messages in my controller? What payload will be sent? 1 or 0, True or False...?
ps I´m using openhab
I just tested this using a Serial gateway.
Sending
sendHeartbeat()from node displays this on my Serial gateway:... 214;255;3;0;22;73 214;255;3;0;22;108 214;255;3;0;22;143 ...3=internal message
0=nack
22=I_HEARTBEAT_RESPONSEIn MyTransport.cpp I found
uint32_t transportGetHeartbeat(void) { return transportTimeInState(); } --- uint32_t transportTimeInState(void) { return hwMillis() - _transportSM.stateEnter; }So the payload is some elapsed time in milliseconds.
-
@siod said in 💬 Serial Protocol - 2.x:
how can I handle sendheartbeat() messages in my controller? What payload will be sent? 1 or 0, True or False...?
ps I´m using openhab
I just tested this using a Serial gateway.
Sending
sendHeartbeat()from node displays this on my Serial gateway:... 214;255;3;0;22;73 214;255;3;0;22;108 214;255;3;0;22;143 ...3=internal message
0=nack
22=I_HEARTBEAT_RESPONSEIn MyTransport.cpp I found
uint32_t transportGetHeartbeat(void) { return transportTimeInState(); } --- uint32_t transportTimeInState(void) { return hwMillis() - _transportSM.stateEnter; }So the payload is some elapsed time in milliseconds.
@gvorster Thank you for explanation!
One more thing: I wanted to implement a sendHeartbeat() into a Repeater node (which should never sleep!), where should I put this function and how? When putting it just into the loop it is of course spamming my gateway with heartbeat messages...Is it possible anyway?
-
@gvorster Thank you for explanation!
One more thing: I wanted to implement a sendHeartbeat() into a Repeater node (which should never sleep!), where should I put this function and how? When putting it just into the loop it is of course spamming my gateway with heartbeat messages...Is it possible anyway?
@siod said in 💬 Serial Protocol - 2.x:
@gvorster Thank you for explanation!
One more thing: I wanted to implement a sendHeartbeat() into a Repeater node (which should never sleep!), where should I put this function and how? When putting it just into the loop it is of course spamming my gateway with heartbeat messages...Is it possible anyway?
There are many examples code how to do this. One Timer library I use myself is this https://playground.arduino.cc/Code/Timer
e.g. for a repeater you could use this:
#include "Timer.h" Timer t; void setup() { t.every(60000, sendImAlive); } void loop() { t.update(); } void sendImAlive() { sendHeartbeat(); } -
Hi there,
do you know that, you've built a node like a 100 times and I think it's all routine and then something that completely bluffs you? I happened to me with a simple Temp/Hum node (DHT22) that keeps sending me messages that I can't seem to figure out: 43;255;3;0;33;300000 and 43;255;3;0;32;500 - They seem to show up in the frequency that other nodes send a heartbeat signal, but no heartbeat is sent from this node. The regular DHT22 datapoints are sent as normal. Anyone knows what this means? -
hm, you might be right on the 300000 as that#s indeed the smartsleep wait time I'm setting. Not sure about the 500, but certainly possible (is that documented somewhere?) I'm wondering, though, why this node is sending this info, but not the other ones?! I don't think I have changed anything t the sketch other than the node-id and node name...
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login