Bash tools: Export temperatures from WeeWX to HA or a digital clock

Here is a little tool that needs no changes in WeeWX or HA to export data from WeeWX via MQtt. The tool generates the necessary yaml to configure sensors for HA and can help creating the configuration and a service file (or attach to the WeeWX service).

It is external to HA, not an integration. The data export via MQtt can be configured. It’s a simple (albeit lengthy) bash script. There is even a simplified version that may help understanding the logic behind.

https://github.com/j-pfennig/weewx2hass

The ‘mini-bash-lib’ app framework is used (embedded version), see:

https://github.com/j-pfennig/mini-bash-lib

You would need to download a single file only, copy or symlink it to /usr/bin:

wget raw.githubusercontent.com/j-pfennig/weewx2hass/refs/heads/main/weewx2hass
chmod 775 ; sudo apt install mosquitto-clients
./weewx2hass --help

There is also a client that can either monitor MQtt or mockup a digital clock that displays time and temperatures. The clock does console output using ASCII-art (see: apt install toilet). I plan to integrate this into the ‘centauriclock’ (Xorg or wayland mode) applet of ‘centauri-soho’.

wget raw.githubusercontent.com/j-pfennig/weewx2hass/refs/heads/main/weewx2watch
chmod 775 ; sudo apt install toilet
./weewx2watch --help

The README at github provides more details. Have fun and send bug-reports, patches or suggestions!