Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zwave garagedoor #2361

Merged
merged 20 commits into from
Jun 24, 2016
Merged

Zwave garagedoor #2361

merged 20 commits into from
Jun 24, 2016

Conversation

turbokongen
Copy link
Contributor

@turbokongen turbokongen commented Jun 23, 2016

Description:
Support for Zwave garage door component.
Bugfixes for rollershutter component.
Change the way components are discovered to provide better filtering options for future components.
Pepper1 database has been used for reference.
Thanks to @emilhetty for providing info and testing garage door component and discovery.
Thanks to @wokar for testing and providing bugfix for the rollershutter component.
Thanks do @devdelay for reporting issues with lights.

Related issue (if applicable): fixes #

Checklist:

If code communicates with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass

@turbokongen
Copy link
Contributor Author

@devdelay Didn't you have Zwave locks? If so can you test this code that they are still discovered correctly?

@balloob
Copy link
Member

balloob commented Jun 23, 2016

The code looks fine to me. I can't test it however. So if you have tested this with two people I'm fine to merge it when you think it's ready.

@turbokongen
Copy link
Contributor Author

I have had @emilhetty and @wokar test for me. I just want someone with locks to confirm that all is well.

@turbokongen
Copy link
Contributor Author

@emilhetty and @wokar has confirmed working setups. My setup works as expected too, so it is good to go. 🐬

@dcrypt3d
Copy link
Contributor

Everything looks good to me with the locks and were discovered correctly 🐬. I wish I had a zwave garage door opener to test with. I returned one that used COMMAND_CLASS_BARRIER_OPERATOR which is now in dev branch of OpenZwave as of May 13.

@dcrypt3d
Copy link
Contributor

dcrypt3d commented Jun 24, 2016

Spoke too soon... getting errors when zwave detects my zwave lights (WD500Z-1 Wall Dimmer Switch). Previously detected as a light with dimming ability.

16-06-24 00:04:33 openzwave: Error in manager callback
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/openzwave-0.3.1-py3.5.egg/openzwave/network.py", line 948, in zwcallback
    self._handle_value_added(args)
  File "/usr/local/lib/python3.5/dist-packages/openzwave-0.3.1-py3.5.egg/openzwave/network.py", line 1477, in _handle_value_added
    'value' : self.nodes[args['nodeId']].values[args['valueId']['id']]})
  File "/home/base/.local/lib/python3.5/site-packages/pydispatch/dispatcher.py", line 338, in send
    **named
  File "/home/base/.local/lib/python3.5/site-packages/pydispatch/robustapply.py", line 55, in robustApply
    return receiver(*arguments, **named)
  File "/home/base/home-assistant/homeassistant/components/zwave.py", line 299, in value_added
    if value.command_class not in command_class and \
TypeError: argument of type 'int' is not utterable

@dcrypt3d
Copy link
Contributor

Reverted to #2271 and my lights came back

@turbokongen
Copy link
Contributor Author

@devdelay Fixed the issue you reported. Please test latest :)

@dcrypt3d
Copy link
Contributor

ok now 🐬

@turbokongen
Copy link
Contributor Author

Then we are good to go. All components tested of zwave😆 @balloob 🐬
24. jun. 2016 07:00 skrev "devdelay" [email protected]:

ok now 🐬


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2361 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AP2koGW00tDZkf17O2MIQ9b60Yws9jpYks5qO2RZgaJpZM4I82qD
.

@turbokongen
Copy link
Contributor Author

Switch position ;)

@turbokongen
Copy link
Contributor Author

When you press open, the garage door opens? But it eventually reports it as closed?

@emilhetty
Copy link
Contributor

The switch position follows the open and closed.
Action for open is on and off for closed.
All the actions and status match each other, just my port that don't match before I inverted it.

@turbokongen
Copy link
Contributor Author

Ok so without the not statement it show correct? :S

@emilhetty
Copy link
Contributor

No, with it shows correct according to my port

@turbokongen
Copy link
Contributor Author

Sorry, starting to get tired.
So what you submitted everything is as expected? :)

@turbokongen
Copy link
Contributor Author

Please try my latest at the same branch. I have made some changes regarding another issue, it may be the same problem.

@emilhetty
Copy link
Contributor

Yes, with the code I commited to you everything is as expected :)

@emilhetty
Copy link
Contributor

Does the zwave switch component have impact on the garage door? Or could I use the garage door only?

@emilhetty
Copy link
Contributor

Is this correct?:
image

It seems strange since it is garage door and not switch, or is it for the switch in UI?

@turbokongen
Copy link
Contributor Author

You can use just the garage door.
But I committed new code just now, it should be self._value.value.data

@emilhetty
Copy link
Contributor

Lost feedback on the latest and got this error:
image

@turbokongen
Copy link
Contributor Author

Should actually be self._value.data
Now I'm overdue. Zzzz
24. jun. 2016 23:37 skrev "Emil Horpen Hetty" [email protected]:

Lost feedback on the latest and got this error:
[image: image]
https://cloud.githubusercontent.com/assets/7728206/16351243/db6470ac-3a6c-11e6-8301-b204e9eadcf7.png


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#2361 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AP2koMgD8GDoEVANWNdZzsLGnxRdY976ks5qPE3xgaJpZM4I82qD
.

@emilhetty
Copy link
Contributor

emilhetty commented Jun 24, 2016

Removed one value so it is value.data and not value.value.data and it did work as before, but still my port is inverted in HA.

@turbokongen
Copy link
Contributor Author

Ok. Then the not is needed. Sorry for the hassle.
24. jun. 2016 23:48 skrev "Emil Horpen Hetty" [email protected]:

Removed one value so it is value.data and not value.value.data and it did
work as before, but still my port is inverted HA.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#2361 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AP2koKS1iFkiVm0TjP2PHX5-0K0Cmiboks5qPFC8gaJpZM4I82qD
.

@emilhetty
Copy link
Contributor

emilhetty commented Jun 24, 2016

But when I look at this when I tested some days ago:
#2288 (comment)
The status was correct when I was running as a switch component, and it worked as it should also.
Is it much difference between switch and garage_door init.py?

@turbokongen
Copy link
Contributor Author

You are totally correct. The switch state is reported as is_on but the garage door component is reported as is_closed. So the not is absolutely right.

@emilhetty
Copy link
Contributor

emilhetty commented Jun 24, 2016

Great, then we leave the "not" in there?
Added it and tested now and it seems to work as previous code.
Will do some more testing tomorrow to make sure it works as it should on everything this time. My neighbors might be wondering why I'm running my door up and down in the middle of the night now :)

turbokongen added a commit to turbokongen/home-assistant that referenced this pull request Jun 25, 2016
* First go at zwave Garage door

* Refactor of zwave discovery

* Allaround fixes for rollershutter and garage door
@emilhetty
Copy link
Contributor

Did some testing today on my garage door and the latest code with "not" are working as expected for my door.

Got some Aeotec multisensor 6 today and found that the PIR is reported as Command class sensor binary with generic command class multilevel sensor and it did not appear since binary sensor only has binary sensor as generic class:
('binary_sensor', [GENERIC_COMMAND_CLASS_BINARY_SENSOR], [SPECIFIC_DEVICE_CLASS_WHATEVER], [COMMAND_CLASS_SENSOR_BINARY], TYPE_BOOL, GENRE_USER),
GENERIC_COMMAND_CLASS_MULTILEVEL_SENSOR should be added for binary sensor.

Here is the xml if you would like to look at it.
Aeotec multisensor 6.docx

@turbokongen
Copy link
Contributor Author

Submitted a fix 👍 Thank you for noticing this.

@dtraub
Copy link

dtraub commented Jun 28, 2016

Was gd00z-4 support added in this CL?

@dcrypt3d
Copy link
Contributor

@dtraub no, command class barrier operator is not supported yet in current version of openzwave

@dtraub
Copy link

dtraub commented Jun 28, 2016

Bummer, I was really hoping to get this working with HA.

Thanks for the response!

@freerobby
Copy link
Contributor

@devdelay @dtraub They have rudimentary support for Barrier Operator in the dev branch now. See: OpenZWave/open-zwave#490 (comment)

I'm able to patch OZW master with that change and control the Linear GDZ00-4 directly with it. Would it make sense to add support to HA for an unreleased/possibly-not-final OZW implementation? Or should we wait for a proper release? I am new to python/HA but happy to take this on if some folks can point me in the right direction. I just need a couple days to order a second Gen5 stick I can use for development.

@turbokongen
Copy link
Contributor Author

@freerobby Doesn't it appear in the HASS gui? I know it won't work but it should appear as a garage door opener, or at least show that it didn't in the HASS log. What commands are sent while controlling it? I guess commands in the Barrier operator class are used. Have you got a zwcfg_xxxxx.xml with the command class present?

@freerobby
Copy link
Contributor

@turbokongen Let me look into this tonight against the latest dev branch. I had been working on this in parallel with your change to allow secure devices and add garage door support, and I was working off of the 0.23 release, so it showed up in HASS GUI as a bunch of sensors, but not as a garage door opener for me. I will try removing and re-adding it to my zwave network on 0.24.1, hopefully tonight, and report back with findings and logs.

@turbokongen
Copy link
Contributor Author

@freerobby
Copy link
Contributor

@turbokongen I'm now having trouble, on 0.24.1, getting it to show up in the HASS GUI. I was able to see the sensors when I added it on 0.23 with a manual patch to add things in secure mode. Now when I add them to the network, they are added in non-secure mode and do not show up in HASS. Logs below if you have any thoughts.

https://gist.github.com/freerobby/a4d769b15f795db5878c2e52ef813a77

@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants