Hi Gary. Ok, as one of the goofiest hobbies ever I guess… I am running weewx (amazing open source) software on my Raspberry PI which listens to, collects, analyzes and sends out weather data from my PWS (Personal Weather station) - it is an AmbientWeather WS-2902C - which has limited communication capabilities - but weewix is intercepting network traffic from it - and I send it all over the world…
The below 3 lines are from one of the logs in the weewx system (I put blank lines between them for readability) regarding my weather station. They are notification of successful rest API calls made by weewx to three additional weather web sites with the latest weather data from my location:
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 in addition to the three above (windy.com, windguru.com, and CWOP (Citizens Weather Observation Program - which feeds intro NOAA) but that is a simple example of three weather sites where I am pushing weather data. However once you set that up though - there is nothing else to do with it! So - weird hobby, right? Therefore that morphed into me using the same hardware to get into home automation (telling me to close specific open windows when it starts to rain, etc. etc. we know how that turns into an unending rabbit hole of a hobby - turning on cameras and lights in the middle of the night if there is motion in the front yard, creating a home grown alarm system, reminders to close the garage door, yadiyadiayada!) So here’s the rub -
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 (a lovelace card or whatever) of the most recent time I have sent data to each of these websites, being updated each time another API call is successfully made by weewx. (Some sites are fed every second, some every 5 minutes, a few only every 10 minutes - I go by their API rules…)
So, 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 coming into Home Assistant on the same Raspberry PI.
Weewx software experts on their forums suggest I override the parent function in the source code which makes the rest API call to also call HA with MQTT - but that is not good to change because when I update my weewx software to the latest version my changes would be blown away. They also suggested I could have a cron job on the RPI which would scrape the most recent additions to that log and publish an MQTT message to HA but that isn’t very elegant either.
Hence this is why I am looking for something that can run from within HA that will monitor network traffic and be able to act upon specific rest api calls it sees coming from the RPI and going to specific destinations only. Do you know of anything that can do that without having to have a cell phone in the middle of the setup - or at least some kind of log scraping utility/add on within HA?
Thanks for your time and I look forward to hearing back
Here are some of the web sites that are showing my weather station data
AWEKAS (Germany web site showing data from all over the world although my weather station is in new Jersey lol): AWEKAS Automatisches Wetterkarten System
CWOP: GW1060 Location
PWSWEATHER: https://www.pwsweather.com/station/pws/kruse1
METWOW: Met Office WOW -
WUNDERGROUND: Personal Weather Station Dashboard | Weather Underground
METEOSERVICES: Kruse1-Wetterbericht
OPENWEATHERMAP: Weather forecast - OpenWeatherMap
WINDGURU: Windguru station - Ridgewood, NJ, Kruse1
WINDY: Windy: Wind map & weather forecast
AMBIENTWEATHER: https://ambientweather.net/dashboard/3e5ec6331a8884e1ac1d5fbd2812ba11/tiles
NATIONAL WEATHER SERVICE: Time Series Viewer
WEATHER.US: Temperature, observations Bergen from 01/24/2022, 11:00am | Amateur weather stations
APRS.FI: Google Maps APRS
AMBIENTCWOP: AmbientCWOP