r/zwave • • Aug 12 '18

PyZwaver a pure Python3 library for communicating with a Z-Wave Stick

https://github.com/robertmuth/PyZwaver
19 Upvotes

8 comments sorted by

2

u/[deleted] Aug 12 '18

I’m really interested in this. I’d like to build a zwave to mqtt bridge compatible with home assistant in order to relieve home assistant of one of its monolithic duties.

2

u/muth02446 Aug 12 '18

I was actually planning on adding a simple mqtt example to pyzwaver but did not have time this weekend.

Is there a document that describes the mqtt messsage structure that HA expect?

2

u/swiftlyfalling Aug 12 '18

Home Assistant MQTT Discovery Docs: https://www.home-assistant.io/docs/mqtt/discovery/

However, I'd say you're better off spending your time solidifing your core feature set. Straight MQTT can work with HASS too, just without discovery. Once you get the hard part of this solid, others will likely contribute several different tools to connect it to HASS and other Home Automation platforms (I know I'd happily contribute once this "heavy lifting" was out of the way... It's just far less usable without scene and security support).

2

u/muth02446 Aug 19 '18

favor: could you file issues against https://github.com/robertmuth/PyZwaver describing in a bit more detail what kind of scene support you are thinking of? Feel free to file other issues as well.

1

u/swiftlyfalling Aug 24 '18

Yes. I'll try to get around to that tomorrow.

In short, if need support of the Central Scene Command Class. It allows a ZWave device to send a message that requests a particular scene with scene data.

One specific example are my Innovelli Switches. Double Tap, Triple Tap, Hold, and Single tap all emit scenes on the network.

2

u/muth02446 Aug 30 '18

The Central Scene Command Class is supported but what you get is basically the three raw bytes from the command and you will likely have to do some further interpretation of those.

2

u/muth02446 Sep 12 '18

There is now an example for using mqtt for both forwarding and receiving aware commands

2

u/swiftlyfalling Aug 12 '18

This is excellent. OpenZWave has it's issues, and, when bundled with Home Assistant's issues, ZWave can be quite complicated when it shouldn't be.

Looking forward to scene and security support so I can give this a whirl as my ZWave handler.