Honestly, scraping the logs isn't so bad.

An alternative would be to monkey-patch the member function
weewx.restx.RESTThread.process_record(). The replacement version would
first call the original version, then, once it returns, post success by
whatever means you choose to Home Assistant.

On Tue, Jul 5, 2022 at 8:44 PM Kruse Ludington <rkluding...@gmail.com>
wrote:

> The below 3 lines (I put blank lines between them for readability) from my
> weewx.log, regarding my AmbientWeather WS-2902C weather station:
>
> Jul 5 23:00:30 kruse-pi weewx[701] INFO weewx.restx:
> Windy: Published record 2022-07-05 23:00:00 EDT (1657076400)
>
> Jul 5 23:00:30 kruse-pi weewx[701] INFO weewx.restx:
> WindGuru: Published record 2022-07-05 23:00:00 EDT (1657076400)
>
> Jul 5 23:00:30 kruse-pi weewx[701] INFO weewx.restx: CWOP: Published
> record 2022-07-05 23:00:00 EDT (1657076400)
>
>
> There are many others but that is a simple example of three weather sites
> where I am pushing weather data.
>
> This instance of Weewx is running on a Raspberry PI 4B 8GB running a 1TB
> SSD (rather than a micro SD card) for performance reasons.
>
> Also on that same RPI, I have Home Assistant Supervised running in a
> docker.
>
> I don't care what the mechanism is other than something elegant (ideally
> by listening to network traffic, not by log scraping), reliable and
> lightweight, but I am trying to determine the best way to be notified
> within Home Assistant the most recent time I have sent data to each of
> these websites, being updated each time another API call is successfully
> made.
>
> Home Assistant supports MQTT, but out of the box functionality for weewx
> as I understand it MQTT is only available for sending the weather data to
> destination/s via MQTT, not reporting when RESTful API calls are
> successfully published, which is the notification I need. Is there an
> extension for this or would it be something I need to create myself
> (notifications about successful API calls)?
>
> Best Regards,
>
> -R. Kruse Ludington
>
> 📱(M): +1.201.925.4410
> 📞(O): +1.862.308.7040
> 📞(H): +1.201.857.8307
> 📠(F): +1.201.857.7188
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/181d19b93b8.29af.c5c13ad976ec84a62e2892bf98a0657b%40gmail.com
> <https://groups.google.com/d/msgid/weewx-user/181d19b93b8.29af.c5c13ad976ec84a62e2892bf98a0657b%40gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zECJzT3OzmW7bNxOhaJOX8022N_0vxTvJH%3Dc3re6Sa95yg%40mail.gmail.com.

Reply via email to