ztalbot2000 / homebridge-cmd4

CMD4 Plugin for Homebridge - Supports ~All Accessory Types & now all Characteristics too
Apache License 2.0
145 stars 14 forks source link

[Feature Request] Thermostat without HeatingCoolingState Characteristics #136

Closed mitch7391 closed 1 year ago

mitch7391 commented 1 year ago

Is your feature request related to a problem? Please describe:

Not related problem.

Describe the solution you'd like:

Hey John, thinking of a feature for homebridge-cmd4-AdvantageAir. You may or may not remember that a system with temperature sensors can control each zone to a different temperature (as long as the HeatingCoolingState stays the same across the system), I have it so that if the temperature is set from the main zone, it blanket sets that same temperature across all zones.

I have been informed that the Home Assistant integration have set up their zones to not be temperature sensors, but thermostats with the characteristics currentHeatingCoolingState and targetHeatingCoolingState removed. I did not think this was possible, but it seems they have pulled it off and Apple lets them do it. What I am asking, is there any chance (even if just in a beta) that we can have these characteristics for the thermostat be set to optional instead of required and not have cmd4 automatically add them for you if you do not add them yourself? I would like to test this out for my plugin and see how it goes.

image

Describe alternatives you've considered:

Alternative is to keep things as they are.

Additional context:

As above :)

ztalbot2000 commented 1 year ago

Hi Mitch,

It is possible the Homebridge now defines them differently. If so I can propagate the change to Cmd4. I will have a look tomorrow.

Ttyl, John

On Sat, Dec 10, 2022 at 10:49 PM Mitch Williams @.***> wrote:

Is your feature request related to a problem? Please describe:

Not related problem.

Describe the solution you'd like:

Hey John, thinking of a feature for homebridge-cmd4-AdvantageAir. You may or may not remember that a system with temperature sensors can control each zone to a different temperature (as long as the HeatingCoolingState stays the same across the system), I have it so that if the temperature is set from the main zone, it blanket sets that same temperature across all zones.

I have been informed that the Home Assistant integration have set up their zones to not be temperature sensors, but thermostats with the characteristics currentHeatingCoolingState and targetHeatingCoolingState removed. I did not think this was possible, but it seems they have pulled it off and Apple lets them do it. What I am asking, is there any chance (even if just in a beta) that we can have these characteristics for the thermostat be set to optional instead of required and not have cmd4 automatically add them for you if you do not add them yourself? I would like to test this out for my plugin and see how it goes.

[image: image] https://user-images.githubusercontent.com/40288237/206885407-a52b3bf5-ad6b-4496-93ca-a2e3406fda61.png

Describe alternatives you've considered:

Alternative is to keep things as they are.

Additional context:

As above :)

— Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/136, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX5IJPF6ANU5IDU4EL3WMVFONANCNFSM6AAAAAAS2WCIDM . You are receiving this because you were assigned.Message ID: @.***>

mitch7391 commented 1 year ago

Much appreciated John :) could make a cool little feature for Advantage Air users if it works out!

ztalbot2000 commented 1 year ago

Hi Mitch,

So if you look at https://github.com/homebridge/HAP-NodeJS/blob/master/src/lib/definitions/ServiceDefinitions.ts on line 1484 you will see that service definitions for a Thermostat that homebridge uses. Specifically line 1484. You will see the required and optional characteristics. These are the characteristics CMD4 uses. Theoretically I should not change them. Now a GUI can do anything they want as they do not use homebridge like homebridge plugins do.

Now I believe a required characteristic not in the CMD4 config entry will cause a warning and that it will be added. That is not to say that polling is required for it. If the characteristic is then automatically required but not polled for then it would be just a cached value, changing without affect. What happens to AdvAir the characteristic is not polled for? I'm just trying to figure out an elegant solution.

If you ever wanted to change it yourself, edit the /usr/local/lib/node_modules/homebridge-cmd4/lib/CMD4_DEVICE_TYPE_ENUM.js and alter the Thermostat definition on around 1722. If you just delete the required characteristic definition (4 lines) and if you like add just the type to the optional characteristic definition, that should do it. Of course you would have to restart homebridge for the affect to take place.

ttyl, John

ztalbot2000 commented 1 year ago

Hi Mitch,

Working on a solution that you may try. I need another day though.

Ttyl, John

On Tue, Dec 13, 2022 at 11:21 PM Mitch Williams @.***> wrote:

Much appreciated John :) could make a cool little feature for Advantage Air users if it works out!

— Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/136#issuecomment-1350377698, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCXY77J6ZZOKIVIAKD4TWNFDMNANCNFSM6AAAAAAS2WCIDM . You are receiving this because you were assigned.Message ID: @.***>

mitch7391 commented 1 year ago

Hi John, as discussed in our emails and after the code testing we did, I have opened an issue with Homebridge to see if I can get CurrentHeatingCoolingState and TargetHeatingCoolingState moved from required to optional characteristics for the thermostat service type. Fingers crossed, as I think this will be a cool addition!