Some issues about uplink available or no
-
Hi to all!
Sometimes I have issues in home with gateway, that hangs until next restart.The nodes (several only transmitting temp/hum) seems hangs, they don't interest if I did restart or no the gateway//controller.
I would implement some check of uplink available on the sketchs, on the loop. If uplink is available, transmit, if not, recheck.
But... I don't know how to implement this check.
Can you help me with this?
My pseudocode could be:
void loop() { bool is_available_uplink; is_available_uplink = getUplinkState(); if (is_available_uplink) { // do stuff } } bool getUplinkState() { bool is_uplink_available = false; // check here the uplink return is_uplink_available; }Thank you to all!
-
Hi to all!
Sometimes I have issues in home with gateway, that hangs until next restart.The nodes (several only transmitting temp/hum) seems hangs, they don't interest if I did restart or no the gateway//controller.
I would implement some check of uplink available on the sketchs, on the loop. If uplink is available, transmit, if not, recheck.
But... I don't know how to implement this check.
Can you help me with this?
My pseudocode could be:
void loop() { bool is_available_uplink; is_available_uplink = getUplinkState(); if (is_available_uplink) { // do stuff } } bool getUplinkState() { bool is_uplink_available = false; // check here the uplink return is_uplink_available; }Thank you to all!
@sineverba you're probably looking for
isTransportReady()See these threads for more details:
https://forum.mysensors.org/topic/5745/my_transport_dont_care_mode/10
https://forum.mysensors.org/topic/7298/get-status-of-connection/7
https://forum.mysensors.org/topic/4899/how-add-watchdog-to-my-sensors/4
https://forum.mysensors.org/topic/4593/battery-sensor-and-re-connecting-to-gateway/2
https://forum.mysensors.org/topic/7298/get-status-of-connection/6
https://forum.mysensors.org/topic/7723/car-aux-battery-monitor -
Thank you... But isTransportReady seems true also if I leave the Arduino Gateway with reset pushed forever. ONly get false when I disconnect the power from Arduino.
I'm thinking to use the receiveTime method. But, if controller (and gateway) are down, what the value returned from receivedTime?
On another words, how can I check if time is returning? Because with gateway shutdown on Serial I did not read nothing from that function (instead of time).
Thank you!
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