Is it possible to publish MQTT commands to control Z-Wave devices exposed by HA?
Config snippet (which I know is overkill, but trying everything ATM):
mqtt:
broker: util
port: 1883
client_id: ha-util
username: !secret mqtt_username
password: !secret mqtt_password
mqtt_eventstream:
publish_topic: util-hass-pub
subscribe_topic: util-hass-sub
mqtt_statestream:
base_topic: homeassistant
publish_attributes: true
publish_timestamps: true
exclude:
domains:
- sun
- weather
- automation
Running “mosquitto_sub -v -h util -t ‘#’”, I can see a bunch of homeassistant/zwave/{device} information.
The following commands have no effect on the target, but are definitely received by the MQTT broker.
mosquitto_pub -h util -t “util-hass-sub/zwave/coach_lights/state/set” -m 1
mosquitto_pub -h util -t “util-hass-sub/zwave/coach_lights/state/set” -m on
mosquitto_pub -h util -t “util-hass-sub/zwave/coach_lights/state” -m 1
mosquitto_pub -h util -t “util-hass-sub/zwave/coach_lights/state” -m on
Any thoughts?
Looking at the documentation, Home Assistant requires an MQTT Broker to talk to MQTT devices. Since MQTT is bidirectional it should be possible with an MQTT sensor.
I am using a broker (snippet from config posted above):
mqtt:
broker: util
port: 1883
client_id: ha-util
username: !secret mqtt_username
password: !secret mqtt_password
The devices I’m attempting to control via MQTT are not native MQTT devices. They are Z-Wave devices that I would like to control using MQTT with HA acting as the translator between MQTT and Z-Wave.
I’ve not been able to find anything in the HA docs or forums showing how to do such a thing. It seems it should be possible, but not sure what I’m missing if it is.
I thought you might be able to use an HA MQTT sensor to “listen” for the MQTT command and then use the sensor in an automation to control the z-wave device.
Interesting idea. I may consider that as plan B in case I can’t get it to work “out of the box”.
Thanks!
Sort of. I don’t run hassio, but I was able to install and compile the gateway that this addon uses. It’s a “better than nothing” solution. I’ve decided to scrap the idea for now to get more pressing things around the house done.
Thanks though!