@OldSurferDude jus request counter states from controller on each reset, worked fine with Domoticz...
or save in eeprom but increase location every write, on power up/reset search eeprom for largest value stored and carry on from that location, one long integer will fit 256 times in atmega328(p) eeprom, is that long enough for you ?
@dpcons MQTT sounds intimidating and looks imitimidating when you see all of the options available.
Here's the scenario:
You want to send a message. That's the -m option followed by a space and the message between " "
the location, topic, is a tree, -t option, separated by forward slash / eg. MyRootTopic/MyTopicsSub/MyTopicSubSub
It's as easy as that if your broker, the MQTT service (program) is on the same computer as the sending program. Usually it's not.
Specifiy the location, the host, of the broker with the -h option followed by the host name or IP address
The retain option, -r is important but explaining it is beyone the scope of this message
Receiving, subscribing, to a topic is just the same, but you wouldn't have the -m message
If you subscribe from the command line, the subscribe function waits indefinitely for messages published to the subscribed topic (unless you use the -C option) ^C to terminate the command.
A tamotized device with the MQTT configured will create a number of topics on the broker. Home Assistant will see this automatically, if you have the Tasmota and MQTT Integrations installed.
The MySensors MQTT gateway takes care of MQTT communication for a MySensors device. Again the MySensors and MQTT integrations.
I use both.
-OSD
Over 4 years on, and my node ran continuously sending 4 messages every 5 minutes.
It's 700mAh LiFePo4 battery voltage dropped from initial 3.45V to 3.24V, according to LiFePo4 voltge/SoC tables It's just under 40% left.
700*60% = 420mAh. 100 mAH per year. using library 2.40 and blob message I could cut usage to ~25mAh/year, not bad