Is there a way to augment loop packet with a data coming from database ?

66 views
Skip to first unread message

eric9...@gmail.com

unread,
Feb 12, 2023, 2:27:58 AM2/12/23
to weewx-user
Hi everybody:

I have created a new data ("hauteur") in the database to graph the sea tide. It works like a charm. See at http://chevrerie-du-cap.com/meteo/ at the bottom.

Now I would like to send the tide level observation with MQTT, then I need it in the loop packet.

So, is there a way to augment loop packet with a data coming from database ?

It tried to extend the field map of the GW1000 driver, but it doesn't work

    [[field_map_extensions]]
    hauteur = hauteur(data_binding=wx_binding)
    
Thanks

Message has been deleted

Peter Fletcher

unread,
Feb 12, 2023, 7:13:09 PM2/12/23
to weewx-user
I'm not 100% clear what you are trying to do here. I don't think that you can actually add data to the loop packet 'on the fly'. I am also not sure why you would want to do anything with tide height every loop. It is self-evidently a rather slow-changing datum, and could easily be dealt with at archive frequency. What you can certainly do is write a service that is triggered every time an archive packet is generated and processed which either gets data from somewhere (?MQTT) and saves it in the weewx database or gets data from the database and does something with it (or both).
Reply all
Reply to author
Forward
0 new messages