-
If you havn't, get pipx and poetry.
sudo apt install pipx pipx install poetry -
Clone git repo.
cd <some path where you want to keep the code> git clone https://github.com/richard-hartmann/sysstat4ha.git cd sysstat4ha poetry install -
Customize the config
cp s4h.toml my_s4h.tomland edit
my_s4h.toml. (First three lines are necessary to edit. See also Home Assistant Preparation) -
Expose this computer to your Home Assistant using MQTT Discovery. To do so, enter poetry shell which provides the
s4hcommand.poetry shell s4h exposer -c ./my_s4h.tomlYou should now see the new sensors in HA.
-
Install systemd service to continuously publish sensor data. Generate install script and service file.
s4h prepare_install -c ./my_s4h.tomlInstall service with
sudo installer/install.shand you should see live data in HA.
-
Optionally, use the YAML
installer/card.yamlas template to configure a nice card. Note that is using bar-card from HACS.
If the sensor data is not finding its way to HA, you can run the publishing with debug messages.
-
First stop the systemd service.
sudo systemctl stop s4h.service -
Assuming you are still in the poetry shell, the command will publish and print debug messages.
s4h publish -c my_s4h.toml -l debug
- install MQTT add on (Mosquitto broker)
- set custom user and pass word
- go to Settings -> Add-ons -> 'Mosquitto broker' and hit the tab configuration
- add login in YAML style, e.g.,
- username: <some_username> password: <some_pw>