Mqtt retained posts


I use emoncms and mqtt to log and display data from sensors to hmi’s. I have a battery powered sensor which wakes every 5 minutes and sends it’s data to emoncms via the Web app and emoncms repeats it over mqtt.

This works brilliantly but when I change screens on the hmi the data can be days old until the sensor wakes and sends a new reading.

Would it be easy to get emoncms to publish as retained posts so the hmi will get the last known value upon subscription rather than displaying nothing for up to 5 minutes or showing the last reading it had whilst subscribed?