kmaehashi / homebridge-nature-remo-cloud-aircon

Homebridge Plug-in for Air Conditioner Managed by Nature Remo
36 stars 19 forks source link

Can the app do 0.5C steps instead of 1C for the aircon that support it #30

Closed TommyGKiwi closed 1 year ago

TommyGKiwi commented 1 year ago

Hi good work.

Small issue,… I have two aircon and I just replaced one with a new one. This one can do steps +-0.5C. The nature remo app can differentiate between the devices. The old one is in steps of 1C, while the new one does the steps as it should in 0.5C. However your app does both only in steps of 1C. While that would not bother me, there are times when the temperature is just a little too hot for one and a little to cold for the other.

kmaehashi commented 1 year ago

I think that's already implemented. Could you share the debug log? https://github.com/kmaehashi/homebridge-nature-remo-cloud-aircon/blob/master/index.js#L447-L452

TommyGKiwi commented 1 year ago

Yes in the log it says 24.5[26/06/2023, 19:34:00] [Bedroom AirCon] Target aircon ID: e0637e2f-3ced-4fe5-aabc-3540927b6b59 [26/06/2023, 19:34:00] [Bedroom AirCon] refreshing temperature record [26/06/2023, 19:34:00] [Bedroom AirCon] notifying values: {"temp":"24.5","temp_unit":"c","mode":"cool","vol":"auto","dir":"auto","dirh":"auto","button":"","updated_at":"2023-06-26T08:49:08Z"}But on homekit it says cooling to 25 and on homekit it is only in 1C steps. Sent from my iPhoneOn Jun 26, 2023, at 18:09, Kenichi Maehashi @.***> wrote: I think that's already implemented. Could you share the debug log? https://github.com/kmaehashi/homebridge-nature-remo-cloud-aircon/blob/master/index.js#L447-L452

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

kmaehashi commented 1 year ago

Thanks, but it looks like a normal log. Debug logs will have additional information, please try launching homebridge with debug option enabled, like homebridge -D.

TommyGKiwi commented 1 year ago

Oops sorry, It says minstep 1 (see below)[26/06/2023, 22:47:23] [Bedroom AirCon] Target aircon ID: e0637e2f-3ced-4fe5-aabc-3540927b6b59[26/06/2023, 22:47:23] [Bedroom AirCon] refreshing temperature record[26/06/2023, 22:47:23] [Bedroom AirCon] notifying TargetTemperature props: {"maxValue":30,"minValue":16,"minStep":1}[26/06/2023, 22:47:23] [homebridge-nature-remo-cloud-aircon] Characteristic 'Target Temperature': characteristic was supplied illegal value: number 10 exceeded minimum of 16. See https://homebridge.io/w/JtMGR for more info.[26/06/2023, 22:47:23] [homebridge-nature-remo-cloud-aircon] Error:     at TargetTemperature.Characteristic.characteristicWarning (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:3011:105)    at TargetTemperature.Characteristic.validateUserInput (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2923:14)    at TargetTemperature.Characteristic.setProps (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2054:35)    at NatureRemoAircon._notifyConfigurationIfNeeded (/var/lib/homebridge/node_modules/homebridge-nature-remo-cloud-aircon/index.js:270:74)    at Request._callback (/var/lib/homebridge/node_modules/homebridge-nature-remo-cloud-aircon/index.js:210:14)    at Request.self.callback (/var/lib/homebridge/node_modules/homebridge-nature-remo-cloud-aircon/node_modules/request/request.js:185:22)    at Request.emit (node:events:513:28)    at Request. (/var/lib/homebridge/node_modules/homebridge-nature-remo-cloud-aircon/node_modules/request/request.js:1154:10)    at Request.emit (node:events:513:28)    at IncomingMessage. (/var/lib/homebridge/node_modules/homebridge-nature-remo-cloud-aircon/node_modules/request/request.js:1076:12)    at Object.onceWrapper (node:events:627:28)    at IncomingMessage.emit (node:events:525:35)    at endReadableNT (node:internal/streams/readable:1359:12)    at processTicksAndRejections (node:internal/process/task_queues:82:21)[26/06/2023, 22:47:23] [Bedroom AirCon] notifying values: {"temp":"24.5","temp_unit":"c","mode":"cool","vol":"auto","dir":"auto","dirh":"auto","button":"","updated_at":"2023-06-26T13:45:00Z"} Sent from my iPhoneOn Jun 26, 2023, at 21:49, Kenichi Maehashi @.***> wrote: Thanks, but it looks like a normal log. Debug logs will have additional information, please try launching homebridge with debug option enabled, like homebridge -D.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

kmaehashi commented 1 year ago

Hmm I see. Can you share the output of the following command? (replace YOUR_NATURE_REMO_ACCESS_TOKEN with your access_token set in the config)

curl -H "authorization: Bearer YOUR_NATURE_REMO_ACCESS_TOKEN" https://api.nature.global/1/appliances | jq '.[].aircon'
TommyGKiwi commented 1 year ago

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3315 100 3315 0 0 5399 0 --:--:-- --:--:-- --:--:-- 5399 { "range": { "modes": { "auto": { "temp": [ "-2", "-1.5", "-1", "-0.5", "0", "0.5", "1", "1.5", "2" ], "dir": [ "auto", "swing" ], "dirh": [ "auto", "swing" ], "vol": [ "1", "2", "3", "4", "auto" ] }, "blow": { "temp": [ "" ], "dir": [ "auto", "swing" ], "dirh": [ "auto", "swing" ], "vol": [ "1", "2", "3", "4", "auto" ] }, "cool": { "temp": [ "18", "18.5", "19", "19.5", "20", "20.5", "21", "21.5", "22", "22.5", "23", "23.5", "24", "24.5", "25", "25.5", "26", "26.5", "27", "27.5", "28", "28.5", "29", "29.5", "30" ], "dir": [ "auto", "swing" ], "dirh": [ "auto", "swing" ], "vol": [ "1", "2", "3", "4", "auto" ] }, "dry": { "temp": [ "18", "18.5", "19", "19.5", "20", "20.5", "21", "21.5", "22", "22.5", "23", "23.5", "24", "24.5", "25", "25.5", "26", "26.5", "27", "27.5", "28", "28.5", "29", "29.5", "30" ], "dir": [ "auto", "swing" ], "dirh": [ "auto", "swing" ], "vol": [ "" ] }, "warm": { "temp": [ "16", "16.5", "17", "17.5", "18", "18.5", "19", "19.5", "20", "20.5", "21", "21.5", "22", "22.5", "23", "23.5", "24", "24.5", "25", "25.5", "26", "26.5", "27", "27.5", "28", "28.5", "29", "29.5", "30" ], "dir": [ "auto", "swing" ], "dirh": [ "auto", "swing" ], "vol": [ "1", "2", "3", "4", "auto" ] } }, "fixedButtons": [ "power-off" ] }, "tempUnit": "c" } { "range": { "modes": { "auto": { "temp": [ "-2", "-1", "0", "1", "2" ], "dir": [ "still", "swing" ], "dirh": [ "" ], "vol": [ "1", "2", "3", "4", "auto" ] }, "blow": { "temp": [ "" ], "dir": [ "still", "swing" ], "dirh": [ "" ], "vol": [ "1", "2", "3", "4", "auto" ] }, "cool": { "temp": [ "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30" ], "dir": [ "still", "swing" ], "dirh": [ "" ], "vol": [ "1", "2", "3", "4", "auto" ] }, "dry": { "temp": [ "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30" ], "dir": [ "still", "swing" ], "dirh": [ "" ], "vol": [ "" ] }, "warm": { "temp": [ "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30" ], "dir": [ "still", "swing" ], "dirh": [ "" ], "vol": [ "1", "2", "3", "4", "auto" ] } }, "fixedButtons": [ "power-off" ] }, "tempUnit": "c" }

On 28 Jun 2023, at 23:15, Kenichi Maehashi @.***> wrote:

curl -H "authorization: Bearer YOUR_NATURE_REMO_ACCESS_TOKEN" https://api.nature.global/1/appliances | jq '.[].aircon'

kmaehashi commented 1 year ago

Thanks! I think I found the cause. Is it possible for you to try #31 in your local environment?

TommyGKiwi commented 1 year ago

Great job :) thank you.It worked, however you need to delete the aircon from the config restart Homebridge and add it back in  and restart it again to get it to function with 0.5 in HomeKit. Sent from my iPhoneOn Jun 30, 2023, at 0:44, Kenichi Maehashi @.***> wrote: Thanks! I think I found the cause. Is it possible for you to try #31 in your local environment?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

TommyGKiwi commented 1 year ago

Great job :) thank you.It worked, however you need to delete the aircon from the config restart Homebridge and add it back in  and restart it again to get it to function with 0.5 in HomeKit. Sent from my iPhoneOn Jun 30, 2023, at 0:44, Kenichi Maehashi @.> wrote: Thanks! I think I found the cause. Is it possible for you to try #31 in your local environment? —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>

Small comment, the fix works in Homebridge so the accessories icons can change in steps of 0.5C, just to get 0.5C working in homekit you need to delete it and then add it again in the config to recreate the aircon in homekit

kmaehashi commented 1 year ago

Thanks for confirmation @TommyGKiwi. Yes HomeKit caches properties of devices and sometimes they need to be recreated... 😞

kmaehashi commented 1 year ago

Released v1.1.1. https://www.npmjs.com/package/homebridge-nature-remo-cloud-aircon