cgarwood / homeassistant-zwave_mqtt

Limited Pre-Release of the new OZW1.6 Z-Wave component. Currently has limited platform support. Check the README for more details.
72 stars 8 forks source link

Unable to call Zwave Services #56

Closed daanvb closed 4 years ago

daanvb commented 4 years ago

Don't want to hijack the other thread...

Environment:

Homeassistant: 0.105.1
Ozwdaemon: ozwdaemon (latest via add-on store)
homeassistant-zwave_mqtt via HACS

Zwave modules:

Aeotec Z-stick Gen5
Aeotec Multisensor 6

I'm unable to call the zwave services, i.e unable to include or exclude devices

Also there are multiple message in the logs:


2020-02-06 11:35:17 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/13: {'Name': 'Retransmit', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988546}
2020-02-06 11:35:17 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/13: {'Name': 'Control Key1', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988546}
2020-02-06 11:35:17 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/13: {'Name': 'Control Key2', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988547}
2020-02-06 11:35:17 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/16: {'Name': 'Lifeline', 'Help': '', 'MaxAssociations': 5, 'Members': ['1.0', '2.0'], 'TimeStamp': 1580988525}
2020-02-06 11:35:17 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/16: {'Name': 'Retransmit', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988525}
2020-02-06 11:35:17 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/16: {'Name': 'Control Key1', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988525}
2020-02-06 11:35:17 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/16: {'Name': 'Control Key2', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988525}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/20: {'Name': 'LifeLine', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988525}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/20: {'Name': 'Retransmit Switch CC', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988525}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/21: {'Name': 'LifeLine', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988525}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/21: {'Name': 'Retransmit Switch CC', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988525}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/23: {'Name': 'LifeLine', 'Help': '', 'MaxAssociations': 5, 'Members': ['1.0'], 'TimeStamp': 1580988525}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/24: {'Name': 'LifeLine', 'Help': '', 'MaxAssociations': 5, 'Members': ['1.0'], 'TimeStamp': 1580988526}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/26: {'Name': 'Lifeline', 'Help': '', 'MaxAssociations': 5, 'Members': ['1.0', '1.1'], 'TimeStamp': 1580988526}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/26: {'Name': 'Browse', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988526}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/26: {'Name': 'Tampering', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988526}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/26: {'Name': 'Doorbell 1', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988526}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/26: {'Name': 'Doorbell 2', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988526}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/26: {'Name': 'Doorbell 3', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988526}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/26: {'Name': 'Environment', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988526}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/26: {'Name': 'Security', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988526}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWNode cannot process message OpenZWave/1/node/26: {'Name': 'Emergency', 'Help': '', 'MaxAssociations': 5, 'Members': [], 'TimeStamp': 1580988526}
2020-02-06 11:35:18 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'Node': 20, 'Event': 'Notification_Code_MsgTimeout', 'TimeStamp': 1580988913}```
isabellaalstrom commented 4 years ago

I'm also seeing these.

2020-02-06 11:00:14 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'secure': False}
2020-02-06 11:00:14 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'status': 'ok', 'TimeStamp': 1580983214}
2020-02-06 11:00:14 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'State': 'Ctrl_State_Starting', 'TimeStamp': 1580983214}
2020-02-06 11:00:14 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'State': 'Ctrl_State_Waiting', 'TimeStamp': 1580983214}
2020-02-06 11:05:13 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: 
2020-02-06 11:05:14 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'status': 'ok', 'TimeStamp': 1580983514}
2020-02-06 11:05:14 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'Node': 255, 'State': 'Ctrl_State_Cancel', 'TimeStamp': 1580983514}
2020-02-06 11:05:14 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'Node': 255, 'State': 'Ctrl_State_Completed', 'TimeStamp': 1580983514}
2020-02-06 11:05:23 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'secure': False}
2020-02-06 11:05:23 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'status': 'ok', 'TimeStamp': 1580983523}
2020-02-06 11:05:23 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'State': 'Ctrl_State_Starting', 'TimeStamp': 1580983523}
2020-02-06 11:05:23 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'State': 'Ctrl_State_Waiting', 'TimeStamp': 1580983523}
2020-02-06 11:05:28 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'secure': False}
2020-02-06 11:05:28 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'status': 'ok', 'TimeStamp': 1580983528}
2020-02-06 11:07:06 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: 
2020-02-06 11:07:06 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'status': 'ok', 'TimeStamp': 1580983626}
2020-02-06 11:09:36 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'secure': False}
2020-02-06 11:09:36 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'status': 'ok', 'TimeStamp': 1580983776}
2020-02-06 11:09:39 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'State': 'Ctrl_State_InProgress', 'TimeStamp': 1580983779}
2020-02-06 11:09:39 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'Node': 2, 'State': 'Ctrl_State_InProgress', 'TimeStamp': 1580983779}
2020-02-06 11:09:39 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'Node': 2, 'State': 'Ctrl_State_InProgress', 'TimeStamp': 1580983779}
2020-02-06 11:09:40 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'Node': 2, 'State': 'Ctrl_State_Completed', 'TimeStamp': 1580983779}
2020-02-06 11:09:40 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'State': 'Ctrl_State_Starting', 'TimeStamp': 1580983779}
2020-02-06 11:09:40 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'State': 'Ctrl_State_Waiting', 'TimeStamp': 1580983779}
2020-02-06 11:09:55 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'secure': False}
2020-02-06 11:09:55 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'status': 'ok', 'TimeStamp': 1580983795}
2020-02-06 11:10:01 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'secure': False}
2020-02-06 11:10:01 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'status': 'ok', 'TimeStamp': 1580983801}
2020-02-06 11:12:05 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'secure': False}
2020-02-06 11:12:05 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'status': 'ok', 'TimeStamp': 1580983925}
2020-02-06 11:12:12 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'secure': False}
2020-02-06 11:12:12 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'status': 'ok', 'TimeStamp': 1580983932}
2020-02-06 11:12:14 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'State': 'Ctrl_State_InProgress', 'TimeStamp': 1580983934}
2020-02-06 11:12:14 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'Node': 2, 'State': 'Ctrl_State_InProgress', 'TimeStamp': 1580983934}
2020-02-06 11:12:15 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'Node': 2, 'State': 'Ctrl_State_InProgress', 'TimeStamp': 1580983935}
2020-02-06 11:12:15 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 415, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: binary_sensor.sensor. Platform zwave_mqtt does not generate unique IDs
2020-02-06 11:12:15 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'Node': 2, 'State': 'Ctrl_State_Completed', 'TimeStamp': 1580983935}
2020-02-06 11:12:15 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'State': 'Ctrl_State_Starting', 'TimeStamp': 1580983935}
2020-02-06 11:12:15 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'State': 'Ctrl_State_Waiting', 'TimeStamp': 1580983935}
2020-02-06 11:12:15 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 415, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.battery_level. Platform zwave_mqtt does not generate unique IDs
2020-02-06 11:12:17 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'State': 'Ctrl_State_InProgress', 'TimeStamp': 1580983937}
2020-02-06 11:12:17 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'State': 'Ctrl_State_Failed', 'TimeStamp': 1580983937}
2020-02-06 11:12:17 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'State': 'Ctrl_State_Starting', 'TimeStamp': 1580983937}
2020-02-06 11:12:17 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'State': 'Ctrl_State_Waiting', 'TimeStamp': 1580983937}
2020-02-06 11:18:25 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'secure': True}
2020-02-06 11:18:25 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1: {'status': 'failed', 'TimeStamp': 1580984305}
daanvb commented 4 years ago

Having a bit of trouble with this at the moment.

Can’t call services.

My switches seem to stop working almost instantly after a restart. All Aeotec, x1 nano, x1 dual nano and 2 smart switches. Entity is there but toggling them on or off quickly stops working.

I have two Aeotec Multisensor 6, only one had the motion sensor picked up on configuration. The motion sensor that is configured just stays on once motion is detected.

Also seems like the sensors stop reporting after a while.

balloob commented 4 years ago

I realized that our logging is bad. We are logging the node that couldn't process the image and not the destination topic. I opened a PR to fix it https://github.com/cgarwood/python-openzwave-mqtt/pull/45

balloob commented 4 years ago

If you're on 0.105, could you use the new mqtt.dump service to provide us a dump of your Z-Wave instance? You can attach them to comments on GitHub by pressing the "attach files" text at the bottom of the comment box or send them to me on Discord.

marcelveldt commented 4 years ago

The implementation is still a bit premature and note very robust (reminder that we should post a few known issues on the readme). If you restart the MQTT daemon, you must restart HomeAssistant too. It's not yet capable of surviving daemon reconnects....

daanvb commented 4 years ago

If you're on 0.105, could you use the new mqtt.dump service to provide us a dump of your Z-Wave instance? You can attach them to comments on GitHub by pressing the "attach files" text at the bottom of the comment box or send them to me on Discord.

@balloob Hey Paulus,

I tried to do the mqtt.dump but it just creates an empty txt file in my config

The implementation is still a bit premature and note very robust (reminder that we should post a few known issues on the readme). If you restart the MQTT daemon, you must restart HomeAssistant too. It's not yet capable of surviving daemon reconnects....

@marcelveldt I've been doing full reboots of the whole Pi. Its the only way i can it all working again albeit for a short while

balloob commented 4 years ago

@daanvb did you enter OpenZWave/# as topic?

daanvb commented 4 years ago

@daanvb did you enter OpenZWave/# as topic?

Yeah i used the following in the call:

topic: 'openzwave/#' duration: 60

balloob commented 4 years ago

MQTT is case sensitive

daanvb commented 4 years ago

Right i've tried a few things to get this working but still no luck. (Restarts, deleting/reinstalling integration etc)

This is what I am trying to call

topic: 'Openzwave/#' duration: 60

balloob commented 4 years ago

Capitalization still matters! 😉 Try capitalizing the Z and W

daanvb commented 4 years ago

Doh! Sorry was tired last night! I've got it now

mqtt_dump.txt

isabellaalstrom commented 4 years ago

Wow, that's a lot of text :D Mine doesn't contain as much, but I don't have anything in the network yet. Tried including and some other. mqtt_dump (1).txt

balloob commented 4 years ago

Thanks both. I have added fixes to the Python lib to address all warnings and missing properties found in your dumps 👍

isabellaalstrom commented 4 years ago

Maybe I misunderstood and this hasn't been fixed yet, but I'm still getting these errors, and I have a bit more in my mqtt dump now, so I thought it can't be wrong with more info:


2020-02-10 09:16:29 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1/event/notification: {'Node': 2, 'Event': 'Notification_Code_NoOperation', 'TimeStamp': 1581322589}
2020-02-10 09:16:29 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1/event/notification: {'Node': 2, 'Event': 'Notification_Code_NodeAsleep', 'TimeStamp': 1581322589}
2020-02-10 09:17:22 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1/command/addnode: {'secure': True}
2020-02-10 09:17:23 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1/event/addnode: {'status': 'ok', 'TimeStamp': 1581322642}
2020-02-10 09:17:23 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1/event/addnode: {'State': 'Ctrl_State_Starting', 'TimeStamp': 1581322642}
2020-02-10 09:17:23 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1/event/addnode: {'State': 'Ctrl_State_Failed', 'TimeStamp': 1581322642}
2020-02-10 09:17:23 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1/event/addnode: {'State': 'Ctrl_State_Completed', 'TimeStamp': 1581322643}
2020-02-10 09:17:33 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1/command/addnode: {'secure': False}
2020-02-10 09:17:33 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1/event/addnode: {'status': 'ok', 'TimeStamp': 1581322653}
2020-02-10 09:17:33 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1/event/addnode: {'State': 'Ctrl_State_Starting', 'TimeStamp': 1581322653}
2020-02-10 09:17:33 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1/event/addnode: {'State': 'Ctrl_State_Waiting', 'TimeStamp': 1581322653}
2020-02-10 09:18:13 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1/command/removenode: 
2020-02-10 09:18:13 WARNING (MainThread) [openzwavemqtt] OZWInstance cannot process message OpenZWave/1/event/removenode: {'status': 'ok', 'TimeStamp': 1581322693}

mqtt_dump.txt

balloob commented 4 years ago

Thanks for the dump, got some of the missing statistic properties 👍

Looks like we forgot to bump the version in the integration, opened #57.

marcelveldt commented 4 years ago

Will close the issue as it seems resolved. Please reopen if it's still valid. If you have another question/issue, please submit a new issue. Thanks!