grzegorz914 / homebridge-melcloud-control

Homebridge plugin for Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation, publish as dynamic external platform accessory.
MIT License
49 stars 2 forks source link

'Target Heater-Cooler State': characteristic was supplied illegal value: number 3 exceeded maximum of 2. #91

Closed alesf closed 4 months ago

alesf commented 4 months ago

Hi!

I get this warning: 'Target Heater-Cooler State': characteristic was supplied illegal value: number 3 exceeded maximum of 2.

I didn't look through the repo thoroughly yet, but I suspect this line https://github.com/grzegorz914/homebridge-melcloud-control/blob/feda156d75e9cfd85777c102f90d99d6fc524362/src/melclouddevice.js#L258

grzegorz914 commented 4 months ago

I need the debug log

alesf commented 4 months ago

I'll send it to you as soon as I can connect again. 120s pooling time is apparently too frequent as I started getting 429 too many requests error.

grzegorz914 commented 4 months ago

120 second is ok but only if you use my plugin only, if you use other plugin i home assistant or openHAB or other integrations then need to be changed . The server accept 30 requests per hour from all integrations.

alesf commented 4 months ago

Here are the logs with the error. https://pastebin.com/tvR6NWUm

grzegorz914 commented 4 months ago

please try 0.17.1-beta and let me know

alesf commented 4 months ago

This warning is still present.

[3/2/2024, 9:09:27 AM] [homebridge-melcloud-control] This plugin generated a warning from the characteristic 'Target Heater-Cooler State': characteristic was supplied illegal value: number 3 exceeded maximum of 2. See https://homebridge.io/w/JtMGR for more info.

As I see Characteristic.TargetHeaterCoolerState only has 0 AUTO, 1 HEAT, 2 COOL states, but in code I see value 3 set for AUTO and 0 for OFF?

alesf commented 4 months ago

I think I see now.

These two lines: https://github.com/grzegorz914/homebridge-melcloud-control/blob/5033be49a66c89419aadab7cde2de61c675de48a/src/melclouddevice.js#L768 https://github.com/grzegorz914/homebridge-melcloud-control/blob/5033be49a66c89419aadab7cde2de61c675de48a/src/melclouddevice.js#L769 should have Characteristic.CurrentHeatingCoolingState and Characteristic.TargetHeatingCoolingState instead of Characteristic.CurrentHeaterCoolerState and Characteristic.TargetHeaterCoolerState

grzegorz914 commented 4 months ago

yes, thanks for the tip, copy paste mistake

grzegorz914 commented 4 months ago

try 0.18.0-beta.1 and let me know