Comments (43)
I would love this too!
from zwave2mqtt.
@MarsWarrior Could you do some tests with the latest version from master ?
As soon as my z-wave stick functions again I will join testing. Currently no z-wave network anymore 😢
My z-wave network consists of only 230V power switching and power measuring nodes btw.
All other stuff is WiFi and Zigbee (lights, switches, temp/humi sensors).
from zwave2mqtt.
@jshridha @awulf Available in 2.0.1
from zwave2mqtt.
I have no time to implement it right now, If you want to submit a PR I can review it.
My idea is to start from zigbee2mqtt homeassistant gateway and customize it for zwave, the homeassistan gateway will work like the normal one and will subscribe to mqtt and zwave events like:
mqtt.on('writeRequest', onWriteRequest.bind(this))
mqtt.on('broadcastRequest', onBroadRequest.bind(this))
mqtt.on('apiCall', onApiRequest.bind(this))
zwave.on('valueChanged', onValueChanged.bind(this))
zwave.on('nodeStatus', onNodeStatus.bind(this))
zwave.on('scanComplete', onScanComplete.bind(this))
from zwave2mqtt.
I'm releasing a first beta version of hass integration today, any beta tester available here?
from zwave2mqtt.
I'd be happy to try out the Hass integration
from zwave2mqtt.
@jshridha Check last commit
from zwave2mqtt.
Just a random question (maybe more appropriate for the HASS guys, idk much about mqtt and this auto discovery). Say I have a multifunction device, like a combined temp/light/movement/humidity sensor - Does that mean that hass must also have exactly the same device type to support all those features on my device? When I look at the "sensors" entry on the hass website, seems it only supports a "single" sensor type?
from zwave2mqtt.
Just a random question (maybe more appropriate for the HASS guys, idk much about mqtt and this auto discovery). Say I have a multifunction device, like a combined temp/light/movement/humidity sensor - Does that mean that hass must also have exactly the same device type to support all those features on my device? When I look at the "sensors" entry on the hass website, seems it only supports a "single" sensor type?
In your case you get - depending on how the discovery by zwave2mqtt is done - a temp, light, movement and humidity sensor, all from the same device!
from zwave2mqtt.
Ok. Good to know. Then how about a bit more of a convoluted example.
A Wall Switch with a Power Meter? (Eg, W, amps, voltage, Kw/h etc)
So it’s a “switch and a sensor”?
from zwave2mqtt.
from zwave2mqtt.
@MarsWarrior Could you do some tests with the latest version from master ?
from zwave2mqtt.
@robertsLando
I'm not seeing any of the devices show up in home assistant yet. I'm monitoring the mqtt traffic and it looks like it is only publishing the changes under the specified prefix topic and it appears it's not publishing under the prefix topic with the correct format for hass discovery. Below is my configuration and mqtt traffic seen.
Can you let me know if my configuration is correct?
from zwave2mqtt.
from zwave2mqtt.
I did not see any errors in the console. I am using the latest commit. I built the docker image from scratch changing the hash to match the latest commit. I am using GE switches, GE/Jasco light dimmers, and first alert CO/smoke detectors.
I changed to json time value and entire zwave object, but I I'm still not seeing the hass-formatted messages.
from zwave2mqtt.
from zwave2mqtt.
@jshridha I have found a wrong loop that caused disovery to break. Could you check it now with latest commit please?
from zwave2mqtt.
@robertsLando It's looking better. It looks like the sensors are being sent to the right topic. However, the light dimmers and fans are being shown up under the "cover" category instead of "light" and "fan" (see image below).
I have not yet tested if sending commands works correctly or if they show up in the hass interface correctly. I've only been monitoring the traffic so far.
As an additional feature, would be be possible to specify an alternative topic that homeassistant commands be sent to? Currently all updates (Zwave2Mqtt formatted and hass formatted) are going to the same topic. This will put additional load on the hass server since it's parsing messages it does not need to parse.
from zwave2mqtt.
I've tried running it (commit 042cace) but when I enable Hass Discovery
it crashes for me
from zwave2mqtt.
@awulf Try now, it was a typo :)
from zwave2mqtt.
@jshridha Unfortunally I haven't any light dimmer or fans to test but I will try to make some changes in code. Could you send me there an example discovery payload for a dimmer and a fan to take inspiration?
Really thanks
from zwave2mqtt.
@robertsLando I don't have a payload for fans, but this is an example from a zigbee light switch that was sent by zigbee2mqtt:
topic: homeassistant/light/0x90fd9ffffe0d2bfe/light/config
{
"brightness": true,
"color_temp": true,
"schema": "json",
"command_topic": "zigbee2mqtt/Master Bedroom Lamp - Jay/set",
"state_topic": "zigbee2mqtt/Master Bedroom Lamp - Jay",
"name": "Master Bedroom Lamp - Jay_light",
"unique_id": "0x90fd9ffffe0d2bfe_light_zigbee2mqtt",
"device": {
"identifiers": "zigbee2mqtt_0x90fd9ffffe0d2bfe",
"name": "Master Bedroom Lamp - Jay",
"sw_version": "Zigbee2mqtt 1.4.0",
"model": "TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white (LED1545G12)",
"manufacturer": "IKEA"
},
"availability_topic": "zigbee2mqtt/bridge/state"
}
from zwave2mqtt.
@jshridha Check with latest commit e0662f7
from zwave2mqtt.
@jshridha could you also join the slack chat? There we can chat faster https://join.slack.com/t/zwave2mqtt/shared_invite/enQtNjc4NjgyNjc3NDI2LTc3OGQzYmJlZDIzZTJhMzUzZWQ3M2Q3NThmMjY5MGY1MTc4NjFiOWZhZWE5YjNmNGE0OWRjZjJiMjliZGQyYmU
from zwave2mqtt.
@MarsWarrior No worries thanks anyway :) If you want to join the slack channel you are welcome
from zwave2mqtt.
Thanks @robertsLando I got it running now, but looks like the discovery topics are being sent to the prefix set for zwave2mqtt, rather than the homeassistant
prefix.
from zwave2mqtt.
@awulf The prefix used is the one specified in mqtt settings :) Change that one or the one in hass configutration to be the same
from zwave2mqtt.
@robertsLando It would be great if that was a user-customizable topic. That way hass isn't parsing unnecessary topics (e.g. "Study", "Theatre", "Living Room", etc from @awulf 's example above)
from zwave2mqtt.
Yeah would be good if the prefix for discovery is user customisable (and defaulting to 'homeassistant'). As you can see on the screenshot the other subscribers (such as zigbee2mqtt) do it this way.
from zwave2mqtt.
I found a bug where often the "Device HASS JSON" would be a mixture of the device you select and the last device in my list of devices. E.g. selecting the Garage Door switch shows the Bedroom 2 light switch (image attached). The discovery JSON in MQTT explorer is showing up correctly. I have been trying to change the JSON for the Garage Door from "switch" to "cover" but haven't been able to save it. No errors in the logs.
from zwave2mqtt.
I'm releasing a patch version 2.0.1 with a little fix
from zwave2mqtt.
So will add a feature for discovery prefix too
from zwave2mqtt.
Excited to try this out in the coming weeks! I can't wait until Home Assistant isn't dealing with Z-Wave anymore and a) I can move it onto another server and b) move z-wave to something that'll never get restarted and it'll hopefully keep the z-wave network rock solid! Thanks @robertsLando !
from zwave2mqtt.
Just had another go at using it, when trying to modify the Hass Device JSON
, no matter what I put in (not even changing it) it will go red, shake and say JSON test failed
Happens on both one 2.0.1 and the latest master.
I'm trying to get the garage door to become a cover
rather than a switch
. Home Assistant's built in Z-wave sees it as that, but Zwave2mqtt doesn't.
from zwave2mqtt.
@awulf You can ignore the red JSON test failed. What is happening is after you hit the "update" button, the text box is cleared out. Since it's clear now, the input is no longer valid. After you click on the hass device again, you'll see the updated JSON and then you can click on "rediscover" to send the MQTT discovery message.
from zwave2mqtt.
Have tried that, and it does temporarily work. But when I reboot zwave2mqtt it goes back to the default.
from zwave2mqtt.
Yes that's right. I think ti's meant to be a troubleshooting/discovery tool. It's not persistent.
from zwave2mqtt.
@awulf to make it persistent you need to press "STORE" button at the top of hass devices table
from zwave2mqtt.
I have made a simple tutorial to try out ZWAVE2MQTT add-on in Home Assistant:
- Add MQTT to Home Assistant
I installed add-on Mosquito broker and addedmqtt:
https://www.home-assistant.io/components/mqtt/ withdiscovery: true
https://www.home-assistant.io/docs/mqtt/discovery/ toconfiguration.yaml
mqtt:
broker: core-mosquitto
username: !secret mqtt_username
password: !secret mqtt_password
discovery: true
-
Install ZWAVE2MQTT add-on, (Optional: open port to
8091
or change to your needs) -
Delete Zwave integration and remove
zwave:
config fromconfiguration.yaml
(for quick test, you can just stop zwave network in zwave panel, but this is not recommended, because cause problems after HA restart) -
Start ZWAVE2MQTT, open web ui, and setup the add-on
-
In Zwave settings setup
Serial Port
(Mine is/dev/ttyACM0
, same as for Zwave integration. SetupPoll Interval
(Mine is60000
millis, dont know if is correct for 15 nodes). -
In MQTT settings setup
Name
(zwave
),Host url
- mqtt broker address (my_domain.duckdns.org
),Port
(mqtt port, mine is1883
),Reconnect peroid
(mine is60000
, think it will do),Prefix
(default ishomeassistant
to be discovered), enableRetain
andAuth
, and add there your mqttusername
andpassword
. -
In Gateway settings setup
Type
(ValueID topic
) andPayload
(Entire Z-wave value Object
) and enableHass Discovery
. -
Go to Control Panel and the controller with powered nodes should appear, for battery nodes must wait to be wake up or wake them.
-
The zwave nodes are now in mqtt integration and have new entity names in Home Assistant.
Motion sensors are created as_contact
sensor with open/closed. In Home Assistant they are as door sensor. So you must customize device incustomize.yaml
:
binary_sensor.*_contact:
icon: mdi:walk
device_class: motion
(10.) If you want go back to Zwave integration, stop ZWAVE2MQTT add-on, start zwave network or enable back zwave integration and restart Home Assistant. Everything should be back again.
(11.) If you decide to stay, replace old entities with new entities in your setup(sensors, automations,…). You can also rename new entities with names from old zwave integration.
Please add your opinions, correcture,…
from zwave2mqtt.
@joselito11 - Tried this but the UI doesn’t seem to accept the toggles when I change them.
Here is an example showing it changing back every time I change the state
https://www.dropbox.com/s/lo2h6fo80fjloib/RPReplay_Final1564143522.MP4?dl=0
from zwave2mqtt.
I had the same issue (the delayed toggle). What happened to me was that OZW was still starting up (it can take 10 minutes for me) and it was queueing up messages, but the state on MQTT was synced back to the last-known state for the device even while the change appeared to be queued to send. If I waited a little while, it would get sent. If I got impatient then I got some rubber-banding on the toggle (off-on-off-on-off-on etc.).
from zwave2mqtt.
A different issue than the above: my motion sensors (binary) get imported as contact/door sensors instead of motion/motion. Easy to fix in HASS, but also a PITA when you have a lot of them.
Similarly, a voltage sensor came in as air volume or something similarly odd.
from zwave2mqtt.
@ahknight YOu can fix this easily by set the correct device class in gateway values table.
@joselito11 Thanks for the tutorial. I'm closing this issue as now it is supported. Open new issue for device specific problems
from zwave2mqtt.
Related Issues (20)
- I have integrated a Schlage FE599 and having MQTT issues HOT 3
- [question] Scenes from z-wave.me zme_wcd2 HOT 8
- [question] Webinterface missing after update HOT 8
- [bug] FGWPE FGWPF wrong instant consumption HOT 5
- [feat] Add support for '/' in MQTT prefix HOT 4
- [question] cannot get zwave2mqtt to save changes HOT 6
- no zwave updates is sent to mqtt HOT 8
- [question] Append-mode for zwave logging HOT 5
- [question] Does zwave2mqtt support symlinks? HOT 13
- MQTT retain setting per item in Gateway config [feat] HOT 3
- FGBS001 status changed not relayed to MQTT HOT 3
- Device discovery and enumeration differs from Zwave SDK PC Controller HOT 7
- devices doesn't appear on home assistant?[question] HOT 13
- [question] Lights status not updated when changed physically HOT 7
- [bug] Adding assocations does not seem to work HOT 1
- [question] Availability state not set in HA HOT 3
- Mesh not drawn correctly when removed node is part of mesh [bug] HOT 4
- OpenZwave newer Versions in Docker Image [question] [featurerequest] HOT 2
- [question] Danfoss LC13 not discovering all values HOT 1
- [question] Run privileged necessary? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zwave2mqtt.