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
Homeworks support #52
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # pylutron/__init__.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the long lack of response, finally went through it all.
In the future I recommend you clean up your patchstack so that the changes collect related code. Seems like you just kept typing "git commit -m 'foo'" periodically, without organizing your improvements into logical changes :)
Guys with more advanced Homeworks systems desperately need this branch merged. The default one can't handle phantoms, any VCRX stuff, international keypads, etc... the CSD001 detection was a great idea. Please, we need this... or can anyone tell me how to force Hassio to use this instead of the default???? |
I would be happy to test both the lutron component in Hassio and this branch of pylutron on my Homeworks QS system if you would like to share the lutron component. |
Oh yes, I would love to test as well.... |
@txwindsurfer would love to see it... scratching my head why these major upgrades for homeworks take so long to be approved??? |
The main problem is that it's quite a major change to the code, so I really
have the time to review and then test the changes against my radio ra 2
system.
…On Thu, Jun 11, 2020, 8:28 AM Jamie Hopper ***@***.***> wrote:
@txwindsurfer <https://github.com/txwindsurfer> would love to see it...
scratching my head why these major upgrades for homeworks take so long to
be approved???
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#52 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALQIMMR4P5EOMBUGZSWQ23RWDZ2XANCNFSM4MN27M4Q>
.
|
@rzulian fwiw would be nice to have access to homework variables as well... They use command SYSVAR and have integration IDs just like everything else. they aren't reported by default, you have to do a "#MONITORING,10,1" to see them... just an idea, you guys are doing great. |
pylutron/__init__.py
Outdated
led_logic = button_xml.get('LedLogic') | ||
name = button_xml.get('Name') | ||
led_logic = 0 if button_xml.get('LedLogic') is None else int(button_xml.get('LedLogic')) | ||
name = f"keypad {keypad.id}: Btn {component_number}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still strongly dislike sticking all the other cruft into the name. It should be up to the client to decide how to combine the various names. cdheiser's recent change should allow everything to have a true unique identifier so none of this should be necessary for uniqueness.
Please remove this here and everywhere else, keeping the name as is (and removing engraving).
pylutron/__init__.py
Outdated
@@ -446,7 +446,8 @@ def __init__(self, host, user, password): | |||
@property | |||
def areas(self): | |||
"""Return the areas that were discovered for this Lutron controller.""" | |||
return self._areas | |||
# return self._areas | |||
return tuple(area for area in self._areas) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh. Only reason I can see is if someone was taking the returned list and modifying it and you wanted to isolate us from that? Is that a problem somehow in HASS?
Since we don't do this everywhere else, I suggest you removed this and keep as is. If that's a worry somehow, it should be a separate PR to generate a copy for all these APIs to keep us safe, and we can discuss the merits then.
_ACTION_START_RAISING = 2 | ||
_ACTION_START_LOWERING = 3 | ||
_ACTION_STOP = 4 | ||
_ACTION_JOG_RAISE = 18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are internal constants inside this component. You shouldn't be using them from an external library. We should figure out the right API for that and not create an inadvertent dependency on these names from our clients.
|
||
def is_light(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my point is that you still don't know what's on the other end of the load, so we shouldn't pretend. Get rid of is_light() and just improve 'is_dimmable' logic by itself.
pylutron/__init__.py
Outdated
HOLD_RELEASED = 5 | ||
|
||
|
||
def __init__(self, lutron, keypad, name, num, button_type, direction): | ||
def __init__(self, lutron, keypad, name, engraving, num, button_type, direction, led_logic): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, LED state, ok. Yeah I only have radio ra2 and their feature-set is quite minimal (I get on/off 😞 ), sadly. I'm jelly of Homeworks. I'd do anything for that double-tap :)
I really don't want to expose things like led_logic as bare ints without proper enum constants is that it ends up spreading weird droppings like this with no concept of what they mean, and suddenly HASS has a random 5 somewhere. You need to add a better API for the client to figure these things out. At least provide a named enum for 0-3 that we can keep stable, and also add a CUSTOM or INTEGRATION for your 5.
Thought, actually this is all a property of an LED, and not of the button, isn't it? Why can't you instead delegate the LED control to the Led class?
Also, Does LED state change gets its own event? I don't remember.
pylutron/__init__.py
Outdated
button_type=button_type, | ||
direction=direction) | ||
direction=direction, | ||
led_logic=led_logic) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem is that you have like 20+ changes with stuff scatted all over them with no logical breakdown between the individual changes. So I'm sure this gets used, but in some other git commit. Github almost incentivizes bad habits :( I'm used to, and prefer, seeing one git commit per logical change, and a stack of commits that logicall follow each other adding incremental functionality.
Hi, I wanted to note that as of Homeworks v16, and with the new Homeworks QSX processor (released earlier this year) it appears that telnet support is being discontinued in favor of Lutron's LEAP API. I can't find published specs to that yet. Basically, it looks like Lutron just removed telnet support entirely in Homeworks v16. No depreciation warning/time period. |
Ok yes and FYI there are no published specs as of now from what I
understand. Lutron worked with all the majors (Crestron, Control4, Savant,
etc) and they all have drivers developed already... they do plan to release
the API in the future but not sure when. Anyway this is a major change,
but you gotta admit that an API using telnet is a bit outdated....
…On Mon, Aug 24, 2020 at 7:59 AM Robby Dermody ***@***.***> wrote:
Hi, I wanted to note that as of Homeworks v16, and with the new Homeworks
QSX processor (released earlier this year) it appears that telnet support
is being discontinued in favor of Lutron's LEAP API. I can't find published
specs to that yet.
More info:
https://forums.lutron.com/showthread.php/15404-Is-QSX-replacing-QS-processors-or-will-they-serve-different-purposes
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#52 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAWCG2TYP6VDTLTGRQLBIJLSCJP3VANCNFSM4MN27M4Q>
.
--
Jamie Hopper
Megahertz Technology, Inc.
214-365-0933
www.mhztech.com
|
That would be amazing. The telnet API is terrible :)
…On Mon, Aug 24, 2020, 7:09 AM Jamie Hopper ***@***.***> wrote:
Ok yes and FYI there are no published specs as of now from what I
understand. Lutron worked with all the majors (Crestron, Control4, Savant,
etc) and they all have drivers developed already... they do plan to release
the API in the future but not sure when. Anyway this is a major change,
but you gotta admit that an API using telnet is a bit outdated....
On Mon, Aug 24, 2020 at 7:59 AM Robby Dermody ***@***.***>
wrote:
> Hi, I wanted to note that as of Homeworks v16, and with the new Homeworks
> QSX processor (released earlier this year) it appears that telnet support
> is being discontinued in favor of Lutron's LEAP API. I can't find
published
> specs to that yet.
>
> More info:
>
https://forums.lutron.com/showthread.php/15404-Is-QSX-replacing-QS-processors-or-will-they-serve-different-purposes
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#52 (comment)>,
or
> unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AAWCG2TYP6VDTLTGRQLBIJLSCJP3VANCNFSM4MN27M4Q
>
> .
>
--
Jamie Hopper
Megahertz Technology, Inc.
214-365-0933
www.mhztech.com
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#52 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALQIMNMTWSWAVLFIHUYZKLSCJYDHANCNFSM4MN27M4Q>
.
|
@thecynic : could you please have a final review and approve this PR? @txwindsurfer @jthop : If you want to try the current branch I've a repo with the Lutron custom component here https://github.com/rzulian/lutron_custom_component |
Great work @rzulian! I added your files into custom_components/lutron and upgraded to the latest version of HA (0.116.0.dev20200923) on my test system and now I have the buttons on my keypads mapped as scenes (albeit no unique id so can't manage in UI). I also now have occupancy binary_sensors mapped for each room but since I don't have occupancy sensors I am guessing they are default entries in the Lutron schema. From a naming convention, I wasn't using the 1st floor or 2nd floor designation in the names of my objects so if I adopt your integration I will need to change lots of names. Adding unique ids to the objects would greatly help in managing the names from the UI. Thanks for sharing and your continued work!! |
|
I appreciate again your work and realize that designing for may different systems is difficult if not impossible. So with that premise, I kindly offer the following comments: 1a) First ignore my previous comment on unique ids for the scenes as it really doesn't make sense to edit scenes in the UI as an edited scene cannot be passed back to Lutron. Editing scenes for Lutron keypads is best done in Lutron Designer. 1b) Second, the addition of the keypad_name didn't add information for my installation since the DeviceGroup Name already identified the keypad.
Just FYI, the XML file also has an OccupancyGroups section even though I don't have any sensors so that should be ignored. Thanks again for your great work. It is really appreciated |
@txwindsurfer |
@rzulian |
@txwindsurfer |
Merged changes from rzulian pr thecynic#52 with pylutron 0.2.12 https://github.com/thecynic/pylutron/releases/tag/0.2.12
Initial merge for Homeworks QS support from thecynic#52
* added UUID and legacy UUID * OccupancyGroups from xml * added flash for Output * Button events renamed and aligned to the Lutron documentation * Led state as value * XLM loadfrom cache or store to cache
@rzulian @thecynic Thank you so much for all the attention to the Lutron Integration. Could you please add 'HWI_SLIM' to the list of keypads around lines 302. With this addition, my keypad buttons show up as intended on the event bus and as event entities. From my DbXmlInfo for one of the keypads: |
@txwindsurfer
|
This PR is adding: