Comments (10)
Actually following a HA reboot the light one is not working... It does change the lights but always reverts to off not the state it actually is :(
from zwave2mqtt.
Hi @pbathuk . Thanks for this, the HAss MQTT auto-discovery is the hottest feature on the todo list. I have made some checks and I think we should take inspiration from zegbee2mqtt home assistant integration. Zegbee is really similar to zwave and I think it can be made work
from zwave2mqtt.
Out of curiosity, is it best, or should I say more advisable to us value only or JSON (full or timestamp) for Mqtt? I see that for zigbee2mqtt they mention Json payload quite alot. Which I assume means the full JSON standard in z-wave?
I only ask so that I can try to mirror and find what works / does not.
Currently I use value only
from zwave2mqtt.
I don't understand what you mean with your question. When a value change is detected in zwave network there should be a function like the discover
that compose the MQTT message with a JSON payload and the correct topic to send the update to HAss, the payload HAss expect must respect the HAss specification for MQTT auto-discovery, it changes based on the device type. Try to check the previous link and the MQTT-Auto discovery specs.
from zwave2mqtt.
Sorry, I mean from a config on the openzwave panel, there is the option for the gateway to store in Mqtt as:
Just value
JSON timevalue
Entire z-wave JSON payload
I'm just wondering, from a dev point of view which you believe may work.. I'm assuming on the JSON types to match the expected JSON input to HA.
Will have a full read of the specs again and try some things
from zwave2mqtt.
Sorry accidentally clicked close on my phone
from zwave2mqtt.
To make it working you can't use that, we must create a new one
from zwave2mqtt.
Ah ok, so in theory you are thinking:
{Prefix}/{node_id}/status
Or something like that
And that would hold the HA required JSON values to use in the auto discovery?
Only asking out of curiosity rather than how it will actually be done.
from zwave2mqtt.
Yep something like that, need to study how to map devices and devices values into Hass devices configurations.
from zwave2mqtt.
So 1 final update on this:
I have code that now works for reporting the state of the light, its a little hacky as I am using the Attributes only option & it appears HA reads the value true in as 'true' therefore causing no end of issues. After setting up a second dev instance of HA so I can reboot the docker etc I finally have :
{ "name": "In_wall_study_switch", "command_topic": "zwave/_CLIENTS/ZWAVE_GATEWAY-Mos_mqtt/api/setValue/set", "availability_topic": "zwave/Study/21/status", "brightness_command_topic": "zwave/Study/21/38/1/0/set", "brightness_state_topic": "zwave/Study/21/38/1/0", "payload_on": "{ \"args\":[21,37,1,0,true]}", "payload_off": "{ \"args\":[21,37,1,0,false]}", "state_topic": "zwave/Study/21/37/1/0", "state_value_template": "{% if value.replace(\"'\",'') == true %}{ \"args\":[21,37,1,0,true]}{% else %}{ \"args\":[21,37,1,0,false]}{% endif %}", "brightness_scale": 99, "qos": 2, "retain": false, "payload_available": "true", "payload_not_available": "false", "unique_id": "study_switch_111", "on_command_type": "first", "device": { "identifiers": "inwallstudyswitch111", "name": "in_wall_study_switch1", "sw_version": "1", "model": "Zwave", "manufacturer": "" } }
This is working robustly for me and I can see if the light is on as well as the brightness.
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.