Own action on heatbeat request
-
Hi,
I would like to capture the heartbeat request send by a controller (in my case Domoticz).
However this does not work within the receive funtction.
What did I overlook?void receive(const MyMessage &message) { if (message.type == I_HEARTBEAT_REQUEST) { Serial.println("heartbeat request"); } }``` -
Afaik, heartbeat (and other internal messages) are designed for "internal" use, so the automatics behind that is - without further changes in the internal coding - not meant to be used by "regular" receive function.
Why don't you just use other data types like S_CUSTOM to get the same result?
-
@wimd said in Own action on heatbeat request:
I_HEARTBEAT_REQUEST
It looks is done automatically:
MySensorsCore.cpp
bool _processInternalMessages(void) . . . } else if (type == I_HEARTBEAT_REQUEST) { (void)sendHeartbeat(); } else if (type == I_TIME) { // Deliver time to callback if (receiveTime) { receiveTime(_msg.getULong()); -
All works fine.
I can update Text sensor or send a switch command.
But when it comes to the heartbeat request there is no response form the gateway.
I@wimd In case you are looking for an option to check if the GW is available: There somewhere is an option to check, if uplink is available. Don't have a link by hand, but search for that, there's somewhere at least one sketch in the forum offering that (light-switch afai remember).
-
@wimd In case you are looking for an option to check if the GW is available: There somewhere is an option to check, if uplink is available. Don't have a link by hand, but search for that, there's somewhere at least one sketch in the forum offering that (light-switch afai remember).
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