š¬ Serial Protocol - 2.x
-
Regarding V_POSITION and using semi-colons inside the payload, that will in my view break the API message structure. At least home assistant/pymysensors will not work with this. I'll build for and recommend users of that controller to use comma instead of semi-colon to split info inside the payload for V_POSITION.
-
This is just what I've been looking for. I do however have a suggestion. I'm building a solar heater (water) for my shop and need to keep track of at least 3 temps (solar panel, storage tank, and inside shop), 1 water pressure and 1 water flow meter (for solar panel Pump) . There doesn't seem to be V_ or S_ variables for direct water pressure or flow. Would you please add something for them.
-
@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?