Hello,
I have following issu.
I have a device, which is normaly in deep sleep and wakes up every 30 minutes to send some sensor readings and also to check for a retained mqtt message. this mqtt message is send by another device using the retained flag. so, as soon as you connect to the mqtt broker with any client and have subscribed that topic, you get imediately the latest mqtt message from that device.
the problem is, I just have a mqtt sketch, where I am using the standard mqtt callback function. this only works when a mqtt message is send just in the moment the device is turned on. The callback function does not get the retained messages from the broker.
so, is there an example, how you can get retained messages from the broker?
thanks a lot