Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 101899

Single mqtt message translated to multiple sensor events with custom creation time

$
0
0

@matheusbrat wrote:

Hi,

I’m building a esp8266 with temp/hum which has deep sleep functionality as a lot of people. But I want to wakeup it, save it to rtc memory, go to sleep and avoid connecting to internet multiple times. So once every 3 hours, it would publish all messages to mqtt (or maybe a single message to avoid the connection overhead).

My question would be: is it possible to translate a single mqtt message into multiple sensor reads? Also, how could I set a custom date?

For example:
10:10 esp8266 message publish 6 entries (2 for each hour) this is transformed in 6 sensor entries with first being:
Last message + 30 min (10:40)
Last message + 30 min (11:10)
Last message + 30 min (11:40)
Last message + 30 min (12:10)

So I guess I would need some type of processing of the mqtt message and being able to set a custom datetime for when the event happened. So when I plot this, even if everything was received at once, I would still see a nice graph.

I thought on using appdaemon + connecting to the dabatase and inserting the data manually but this seems so hacky. I hope it is possible in a different way.

Any suggestions? Thanks.

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 101899

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>