Hey guys. I have HASS OS running on a Raspberry Pi with a Sonoff Zigbee 3.0 dongle managing most of my devices
I also have another server on the local network that I want to track the outputs of various commands with, such as folder sizes/uptime/backup status etc.
This server is able to publish the required information via MQTT with mosquitto, and other devices on the network are able to subscribe to this information with mosquitto too. The output is:
{"backup_dir_size": "330M", "image_dir_size": "489G"}
However, I can’t find any information about how to connect HA to this other local machine to subscribe to its MQTT outputs
I’ve tried adding it to configuration.yaml, but I understand this is now depreciated and it should be done via UI, but the MQTT UI says I can’t configure more than one broker
I tried
mqtt:
broker: 192.168.0.203
sensor:
- platform: mqtt
name: "Test sensor"
state_topic: "shell_command_output"
which doesn’t work… so I tried
mqtt:
broker: 192.168.0.203
sensor:
- name: "MQTT_SHELL_SENSOR"
state_topic: "shell_command_output"
value_template: "{{ value_json.backup_dir_size }}"
which adds the sensor to HA, but it continually displays “Unknown” state, even after my broker on 192.168.0.203 publishes to the shell_command_output topic
Can anyone shed some light on my problem?
Thanks