@Devanl I am trying to figure out if you ever got that Cooper Aspire 5-button scene controller to work…I’m not clear from your above comments. I have been searching for a LONG TIME for some in-wall multi-button switch I can use to trigger automations in HA, and if you’re telling me this one works I would be incredibly happy
I do not have it working, at a minimum I think we would need to add support for the indicator get/set command class in HA.
I made this feature request that could enable this as well but, also it works for other devices.
Couldn’t hurt to upvote either
I’m also really interested in getting this to work. I have the device and would love to help test if any wants. Thanks! Has any progress been made?
I wrote something up to create a sensor platform that reports indicator as the entity state and has a service for calling the set command.
Traveling right now so I haven’t had time to even validate the syntax on this but, here you go if you want to take a peek. As a disclaimer, I have no idea what I am doing when it comes to the home-assistant architecture (still reading the checklist/guidelines).
Has anyone got the Cooper 5 scene controller working with hassio ? Still no? If so, would appreciate an outline of the steps taken.
I got indicator working but I’m having second thoughts about this approach. May go in and just have it setup groups on scene controller to fire scene event on HA when button is activated (pressed with indicator light off).
Good luck! I hope someone can figure this out it works in homesheer and has me wondering if I should change
Still no progress?
I will be working on this soon. I really want to move away from ZWay, and this is the only thing holding me back at this point. I implemented it as an “App” in ZWay here, so I understand the details for how this controller works.
The execution environment for ZWay is a severely handicapped V8 implementation. For the life of me, I can’t understand why they didn’t just follow standard Node.js practices and implement all of this as a npm package.
Looks cool. I just read over it quick, looks like this code doesn’t handle any of the association work to notify the controller on button press, correct?
I’m thinking if I start this over again I would have the device creation do that and then just get the indicator status on a button press. Ran in to some confusion around how to direct the scene configuration/association with openzwave.
Also couldnt decide whether this made more sense as a scene controller, remote or group of switch device(s).
Not that I see time for this coming soon but, any thoughts?
That is correct, associating the controller with button needs to be setup beforehand. I do use those association groups to link up to my zwave switches so I get the hold to dim up and down. I didn’t want to mess with that here. The code isn’t anything I’m proud of, but I knew I would be moving away from Zway eventually anyways. The biggest thing I needed to accomplish was syncing the buttons across multiple controllers. This code will ensure that if any of the lights that are in the association groups are on, the indicator is on. Also, if all of the lights are off, the indicator is set off. This allows multiple scene controllers to stay in sync if you associate the same lights with buttons on multiple controllers. It also keeps them in sync if the light is turned on automatically via HASS.
I was thinking about implementing it as a group of switch devices when I port it over to HASS. You just have to fetch the indicator status on the generic scene off event since it doesn’t tell you what button actually turned off. There are some other quirks with the SceneConfiguration command class for these controllers. They aren’t the easiest to work with, but I wasn’t able to find anything comparable.
Hope someone can get this to work… willing to test.
Started working on this today. It is my next project. I was able to get the scene events to show up similar to all the other central scene devices by adding this to my zwcfg_*.xml file.
<CommandClass id="91" name="COMMAND_CLASS_CENTRAL_SCENE" version="1" request_flags="5" innif="true" scenecount="0">
<Instance index="1" />
<Value type="int" genre="system" instance="1" index="0" label="Scene Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="system" instance="1" index="1" label="Button One" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="system" instance="1" index="2" label="Button Two" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="system" instance="1" index="3" label="Button Three" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="system" instance="1" index="4" label="Button Four" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
<Value type="int" genre="system" instance="1" index="5" label="Button Five" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
</CommandClass>
I can also see the basic_set=0
event when I turn off a button. My current plan is to create a custom component that creates 5 switch components and checks the indicator value to determine the on/off status.
Sounds great, you should be able to do this by editing the discovery schema in the existing Zwave component?
So the Component would listen for the BasicSet events and then refresh the indicator, then this would result in an event for the switch entity to trigger automation? I like it.
That’s what I am thinking. I know there are already some workarounds needed for the Schlage deadbolts, so I am planning to try and use that as an example.
@Devanl in a different thread, you mentioned that you were able to get the indicator commands to work. Can you share the details of what you got to work?
Unfortunately I seem to have never committed the working code, so its like it never happened
What I remember doing was to add the COMMAND_CLASS_INDICATOR
to the const.DISC_PRIMARY
entry for the sensor
entity. From there I was able to make a copy of the ZwaveDimmer
and change it to make a ZwaveIndicatorSensor
entry that supported async refresh of the indicator state.
What you might be better off doing though would be to add the COMMAND_CLASS_INDICATOR
to the const.DISC_VALUES
as an indicator attribute and adding support to ZwaveSwitch
for handling a new indicator value/attribute. This way the indicator is tied to entity that creates the scene event?
I was never able to determine if the value_changed
method in ZwaveLight
was a good example of how things are supposed to be updated but, maybe you can listen for the bus event and then call self.values.indicator.refresh()
which would later trigger the value_changed
?
Good luck, feel free to bounce more ideas.
Devan
Were you ever able to actually set the indicator value?
I seem to recall that setting self.values.indicator.data
caused the LED state on the controller to update. Don’t remember if there was some plumbing required there though. I basically followed what was done for color in ZwaveColorLight
.
Had some time to tinker with this today. I was able to get a sensor setup for the indicator. Working on refreshing and setting its value next.