-
Notifications
You must be signed in to change notification settings - Fork 20
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
Enable Control Application support? #110
Comments
AFAIK, the C-Bus messages for enable & trigger control are in a lighting format. I did notice in your homebridge log that there was a errored "ramp" command. Is this defined in your config.json? If it is, "rampDuration" isn't defined in the trigger control accessory. This "may" be the cause of the problem. Trigger accessories need this format: { "type": "trigger", "application": 202, "id": 0, "action": 1, "name": "recall preset 2" }, so to define as an "enable" with the type still set to "trigger" but using the enable Application Number. When defined as trigger, they should appear as a switch and not a light/dimmer in homebridge. If you have this type lighting "dimmer" format: { "type": "dimmer", "id": 22, "name": "Wake Up Lights", "rampDuration": "10 min"} in your config.json file, or you are trying to "slide" the dimmer in the home app, one of these may be the cause of your problem. If you put up the snippet from your config.json file that defines the accessory in question, then it will be easier to troubleshoot. Cheers Jason |
Hi Jason. Starting with the simplest config: This generates the error above for 'Method ramp not found': Changing to a dimmer config: Gives the same error: Adding ramp rate to dimmer config: Gives the same error: And changing to trigger config: Gives the different error: |
OK, Try it as a switch: { "type": "switch", "application": 203, "id": 0, "name": "AC Power", "enabled": true } It is implicit in the design of the switch accessory that the ON level is 255 and the OFF level is 0 If you want, you can also have an active duration defined... Cheers Jason |
Config: Error: |
Hmmm. That's puzzling. I will look up the options for enable and see if perhaps we can write an enable accessory. I'm not sure if there is a specific "enable" command in C-Gate Until then, perhaps stick with lighting and I will read up. Cheers Jason |
No worries, it is a simple change for me. |
OK. So looking at the c-gate manual I had a false memory that "enable" and "trigger" had a similar command. A trigger event command looks like this: where an enable command looks like this: The good news is that an enable accessory can be effectively "cloned" from the trigger accessory with the same functionality. It would also appear as a switch accessory in homekit. So in your case you would have the following as your accessory definition: { "type": "enablecontrol", "application": 203, "id": 0, "action": 0, "name": "AC Power Off", "enabled": true }, I think something like "enablecontrol" may be better than "enable" for the accessory type as it may be too easily confused with the "enabled" option for each accessory. I will try to get this up and running and submit it for approval by Anthony as soon as I have time. Cheers Jason |
If nobody has noticed until now I would not rush to implement something just for this case. |
I think it is worth the effort. Anything that brings C-Bus and Homekit closer to a 1:1 relationship is worth the effort. In this case, its not a big effort and it gives an option to incorporate the feature of enable control as it has been designed for in c-bus. That way you can keep your enable variables in the enable application where they are supposed to be. I can tell you that my own lighting application 56 is already full and I created a lighting application 57 for the overflow... |
I have written a enable control accessory and submitted it today as a pull request for Anthony. As soon as he approves it , you are good to go. It is set up the same way as a trigger accessory. Just use application 203 instead of 202 and "enablecontrol" instead of "trigger" in config.json like this: { "type": "enablecontrol", "application": 203, "id": 0, "action": 0, "name": "AC Power Off", "enabled": true }, It will be rendered as a switch service in the home app and perform in exactly the same way as a "trigger" switch does. Cheers Jason |
Thanks Jason |
Excellent work with this plugin @anthonywebb , thanks.
Is the Enable Control application supported?
I was tinkering with my cbus setup and changed some virtual GA from Lighting to Enable Control, however it appears to be partially working.
Defining them as a Light sees the cbus on/off state reflected in the iPhone Home app, but any changes initiated in the app are not accepted:
2020-09-01T23:54:31.039Z cbus:client sent command '[206] ramp //DENDY4/254/203/0 0% # setOn (off)' 2020-09-01T23:54:31.039Z cbus:client rx response { commandId: 206, code: 402, matched: false, processed: false, type: 'response', raw: '[206] 402 Operation not supported by: //DENDY4/254/203/0 (Method ramp not found)' } 2020-09-01T23:54:31.039Z cbus:client matched request '[206] ramp //DENDY4/254/203/0 0% # setOn (off)' with response '[206] 402 Operation not supported by: //DENDY4/254/203/0 (Method ramp not found)' (0 pending requests)
Similarly, defining them as triggers are also not accepted:
'[135] 402 Operation not supported by: //DENDY4/254/203/0 (Method triggerevent not found)'
This is a small issue, I can change back to the Lighting application if required.
The text was updated successfully, but these errors were encountered: