Replies: 1 comment
-
Unfortunately what you are asking to do is not possible. But, there might be other ways to accomplish it. When you say 'add a 1 to lightning_noise_count', what exactly do you mean by that? In general I would think you just want the lightning_noise_count to be the count for your archive period and then use WeeWX aggregation functions to display a count for day, week, etc. There is some logic in MQTTSubscribe to rename fields based on other fields. See, /~https://github.com/bellrichm/WeeWX-MQTTSubscribe/wiki/Configuring-additional-options#msg_id_field Did you bind to the loop or archive? What is your archive interval? I don't have any lightning detection hardware, so this is new to me. If you want to post more detailed MQTT data we might be able to come up with a solution. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have an AS3935 lightning detector sending this information:
"epochtime": 1680431033, "timestamp": "2023-04-02 20:23:53", "event_type": "sim_strike", "distance": 19, "energy": 1002729}
I need to seperate the event_type to be updating different fields in whew depending on the event_type value.
ie, if event_type = "noise" then add a 1 to lightning_noise_count
if event_type = "disturber" then add a 1 to lightning_disturber_count
if event_type = "strike" update the corresponding values for distance/energy and add 1 to strike count.
Here is my weewx.conf:
[MQTTSubscribeService]
Beta Was this translation helpful? Give feedback.
All reactions