GithubHelp home page GithubHelp logo

Comments (43)

frankhommers avatar frankhommers commented on May 30, 2024 9

I would love this too!

from zwave2mqtt.

MarsWarrior avatar MarsWarrior commented on May 30, 2024 1

@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.

robertsLando avatar robertsLando commented on May 30, 2024 1

@jshridha @awulf Available in 2.0.1

from zwave2mqtt.

robertsLando avatar robertsLando commented on May 30, 2024

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.

robertsLando avatar robertsLando commented on May 30, 2024

I'm releasing a first beta version of hass integration today, any beta tester available here?

from zwave2mqtt.

jshridha avatar jshridha commented on May 30, 2024

I'd be happy to try out the Hass integration

from zwave2mqtt.

robertsLando avatar robertsLando commented on May 30, 2024

@jshridha Check last commit

from zwave2mqtt.

Fishwaldo avatar Fishwaldo commented on May 30, 2024

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.

MarsWarrior avatar MarsWarrior commented on May 30, 2024

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!

image

from zwave2mqtt.

Fishwaldo avatar Fishwaldo commented on May 30, 2024

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.

robertsLando avatar robertsLando commented on May 30, 2024

from zwave2mqtt.

robertsLando avatar robertsLando commented on May 30, 2024

@MarsWarrior Could you do some tests with the latest version from master ?

from zwave2mqtt.

jshridha avatar jshridha commented on May 30, 2024

@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?

image

image

image

from zwave2mqtt.

robertsLando avatar robertsLando commented on May 30, 2024

from zwave2mqtt.

jshridha avatar jshridha commented on May 30, 2024

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.

robertsLando avatar robertsLando commented on May 30, 2024

from zwave2mqtt.

robertsLando avatar robertsLando commented on May 30, 2024

@jshridha I have found a wrong loop that caused disovery to break. Could you check it now with latest commit please?

from zwave2mqtt.

jshridha avatar jshridha commented on May 30, 2024

@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.

awulf avatar awulf commented on May 30, 2024

I've tried running it (commit 042cace) but when I enable Hass Discovery it crashes for me

Error.txt

from zwave2mqtt.

robertsLando avatar robertsLando commented on May 30, 2024

@awulf Try now, it was a typo :)

from zwave2mqtt.

robertsLando avatar robertsLando commented on May 30, 2024

@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.

jshridha avatar jshridha commented on May 30, 2024

@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.

robertsLando avatar robertsLando commented on May 30, 2024

@jshridha Check with latest commit e0662f7

from zwave2mqtt.

robertsLando avatar robertsLando commented on May 30, 2024

@jshridha could you also join the slack chat? There we can chat faster https://join.slack.com/t/zwave2mqtt/shared_invite/enQtNjc4NjgyNjc3NDI2LTc3OGQzYmJlZDIzZTJhMzUzZWQ3M2Q3NThmMjY5MGY1MTc4NjFiOWZhZWE5YjNmNGE0OWRjZjJiMjliZGQyYmU

from zwave2mqtt.

robertsLando avatar robertsLando commented on May 30, 2024

@MarsWarrior No worries thanks anyway :) If you want to join the slack channel you are welcome

from zwave2mqtt.

awulf avatar awulf commented on May 30, 2024

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.

Screen Shot 2019-07-16 at 9 34 42 pm

from zwave2mqtt.

robertsLando avatar robertsLando commented on May 30, 2024

@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.

jshridha avatar jshridha commented on May 30, 2024

@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.

awulf avatar awulf commented on May 30, 2024

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.

awulf avatar awulf commented on May 30, 2024

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.

Screen Shot 2019-07-16 at 11 52 59 pm

from zwave2mqtt.

robertsLando avatar robertsLando commented on May 30, 2024

I'm releasing a patch version 2.0.1 with a little fix

from zwave2mqtt.

robertsLando avatar robertsLando commented on May 30, 2024

So will add a feature for discovery prefix too

from zwave2mqtt.

danjenkins avatar danjenkins commented on May 30, 2024

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.

awulf avatar awulf commented on May 30, 2024

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.

jshridha avatar jshridha commented on May 30, 2024

@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.

awulf avatar awulf commented on May 30, 2024

Have tried that, and it does temporarily work. But when I reboot zwave2mqtt it goes back to the default.

from zwave2mqtt.

jshridha avatar jshridha commented on May 30, 2024

Yes that's right. I think ti's meant to be a troubleshooting/discovery tool. It's not persistent.

from zwave2mqtt.

robertsLando avatar robertsLando commented on May 30, 2024

@awulf to make it persistent you need to press "STORE" button at the top of hass devices table

from zwave2mqtt.

joselito11 avatar joselito11 commented on May 30, 2024

I have made a simple tutorial to try out ZWAVE2MQTT add-on in Home Assistant:

  1. Add MQTT to Home Assistant
    I installed add-on Mosquito broker and added mqtt: https://www.home-assistant.io/components/mqtt/ with discovery: true https://www.home-assistant.io/docs/mqtt/discovery/ to configuration.yaml
mqtt:
  broker: core-mosquitto
  username: !secret mqtt_username
  password: !secret mqtt_password
  discovery: true
  1. Install ZWAVE2MQTT add-on, (Optional: open port to 8091 or change to your needs)

  2. Delete Zwave integration and remove zwave:config from configuration.yaml
    (for quick test, you can just stop zwave network in zwave panel, but this is not recommended, because cause problems after HA restart)

  3. Start ZWAVE2MQTT, open web ui, and setup the add-on

  4. In Zwave settings setup Serial Port (Mine is /dev/ttyACM0, same as for Zwave integration. Setup Poll Interval (Mine is 60000 millis, dont know if is correct for 15 nodes).

  5. In MQTT settings setup Name (zwave), Host url- mqtt broker address (my_domain.duckdns.org), Port (mqtt port, mine is 1883), Reconnect peroid (mine is 60000, think it will do), Prefix (default is homeassistant to be discovered), enable Retain and Auth, and add there your mqtt username and password.

  6. In Gateway settings setup Type (ValueID topic) and Payload (Entire Z-wave value Object) and enable Hass Discovery.

  7. Go to Control Panel and the controller with powered nodes should appear, for battery nodes must wait to be wake up or wake them.

  8. 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 in customize.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.

johntdyer avatar johntdyer commented on May 30, 2024

@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.

ahknight avatar ahknight commented on May 30, 2024

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.

ahknight avatar ahknight commented on May 30, 2024

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.

robertsLando avatar robertsLando commented on May 30, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.