OpenZWave / qt-openzwave

QT5 Wrapper for OpenZWave
GNU Lesser General Public License v3.0
105 stars 30 forks source link

Fan Entity Control through OpenZWave - "Low" setting sends nothing through MQTT / "High" level sends nothing through MQTT and level of Fan Controller is not updating back to HomeAssistant #195

Closed sstratoti closed 3 years ago

sstratoti commented 3 years ago

I'm migrating over to the OpenZWave Beta, and have moved all of my devices over manually.

I'm running the latest docker and set it up per your instructions. I'm running the OZW admin on a windows machine and am connecting to the daemon.

I'm also running the latest Home Assistant.

System Health

Home Assistant Core Integration

version: 0.118.5 installation_type: Home Assistant Container dev: false hassio: false docker: true virtualenv: false python_version: 3.8.6 os_name: Linux os_version: 5.4.0-56-generic arch: x86_64 timezone: America/New_York

Home Assistant Cloud

logged_in: true subscription_expiration: January 8, 2021, 7:00 PM relayer_connected: true remote_enabled: false remote_connected: false alexa_enabled: true google_enabled: true can_reach_cert_server: ok can_reach_cloud_auth: ok can_reach_cloud: ok

Lovelace

dashboards: 1 mode: storage views: 14 resources: 29

I was trying to reconnect my automations and lovelace to the old buttons I had with using integrated Z-Wave 1.4.

I noticed that for my Fan Control device (14287 Fan Control Switch, Protocol version 4.54, Application version 5.24, Library version 3) in home assistant, I can set the following speeds from a drop down:

These settings post to MQTT with the following "value" for the device:

Here are the messages sent over MQTT (output by a debug node in NodeRed):

"off"

12/9/2020, 1:48:35 PMnode: 26850071.473bc OpenZWave/1/command/setvalue/ : msg.payload : string[37] "{"ValueIDKey": 206143505, "Value": 0}"

"low"

nothing registered

"medium"

12/9/2020, 1:48:54 PMnode: 26850071.473bc OpenZWave/1/command/setvalue/ : msg.payload : string[38] "{"ValueIDKey": 206143505, "Value": 50}"

"high"

12/9/2020, 1:48:59 PMnode: 26850071.473bc OpenZWave/1/command/setvalue/ : msg.payload : string[38] "{"ValueIDKey": 206143505, "Value": 99}"

I tried enabling logging on HomeAssistant, and I also did a MQTT dump.

When setting off, medium or high, I get a value like this in my log:

2020-12-09 15:51:07 DEBUG (MainThread) [homeassistant.components.ozw] [INSTANCE EVENT]: setvalue - data: {'status': 'ok', 'TimeStamp': 1607547067}

When setting low, I get this in my log:

2020-12-09 15:04:41 DEBUG (MainThread) [homeassistant.components.ozw] [INSTANCE EVENT]: notification - data: {'Node': 12, 'Event': 'Notification_Code_MsgTimeout', 'TimeStamp': 1607544281}

I have two other fan controllers on my network. All three are the same model (14287 Fan Control Switch). One other wall switch is the same Protocol, App and Library version - same issue. (Protocol version 4.54, Application version 5.24, Library version 3).

However the 3rd of them is Protocol version 4.05, Application version 5.20 - and this one will allow a value of "1" to be sent as the "low" value when selecting it in home assistant. It allows a "medium" Level value of "50". But when I select "high" it will not change to "99" in my OZW admin. BUT It does change the speed of the fan controller for all of them. Changing it to "high" works, it spins faster but the "99" value isn't displayed in admin. Also none of the values are updating in HomeAssistant for this particular node. For instance, it's currently registering as "high" in my devices in HomeAssistant. If I open it up and change it to "low" or "medium" or "off" I see the value changing in OpenZWave Admin as the "Level" user value, but for some reason this isn't being updated on the home assistant side. It stays at "high".

Let me know if I can provide any other logs for you.

The nodes I'm dealing with are 12, 23 and 25. Two MQTT dumps attached.

mqtt_dump2.txt mqtt_dump.txt

sstratoti commented 3 years ago

This looks to be working now.

I attempted to go back to using 1.4 and Z-wave baked in. I'm not sure if the fix was me resetting the stick multiple times or if the node information finally loaded, but the fan works normal now.

After I connected everything to the stick using the old ozwcp, I then tried to hook the stick up with HASS. Unfortunately, Hass couldn't figure out what some of the nodes were, even after re-awakening them. So then I decided to try ozwd again, figured it couldn't hurt. Everything started to load up. I had to refresh some nodes and re-awaken them, but it seems to be working now. There were two other changes.

First, I forgot that I shouldn't be adding in everything as a secure node. Adding all of the nodes as "secure" can really bog down the network, according to the HASS Z-wave pages. I should've only been adding secured devices, like my lock or certain door sensors.

The other change I made was that I increased (delayed) the reporting time of all of my Zooz power switches. I have 4 power strips and one 2-plug+usb. They were all spamming the log with power fluctuations. I increased all of the intervals to 360, and things seem to be much more stable now. There was also a weird issue with the usb in the 2-plug where it kept spamming on/off over and over. I switched that USB connection to use the regular plug, and now that has settled.

I'm excited that its up and working! I'd recommend anyone reading this issue to exclude and then add back in the node, and wait for everything to be loaded in before you move onto the next device. I have a feeling that it had loaded incomplete information.