gadget-monk / homebridge-poolcontroller

Homebridge plugin for Pentair pools
6 stars 4 forks source link

Warning - This plugin generated a warning from the characteristic #8

Open gavc1 opened 2 years ago

gavc1 commented 2 years ago

I am unable to get my devices to show in the home app, and with debug mode I see these errors in Homebridge

Starting to advertise 'Homebridge 32E3 BD27' using ciao backend!
[9/13/2021, 3:19:36 PM] Homebridge v1.3.4 (Homebridge 32E3) is running on port 52482.
[9/13/2021, 3:19:40 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number -3.3333333333333335 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.
[9/13/2021, 3:19:40 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.
[9/13/2021, 3:19:40 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number 2.2222222222222223 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.
[9/13/2021, 3:19:54 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number -3.3333333333333335 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.
[9/13/2021, 3:19:54 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.
[9/13/2021, 3:19:54 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number 2.2222222222222223 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.
[9/13/2021, 3:20:11 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number -3.3333333333333335 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.
[9/13/2021, 3:20:11 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.
[9/13/2021, 3:20:11 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number 2.2222222222222223 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.
[9/13/2021, 3:20:11 PM] [PoolControllerPlatform] FROM CONTROLLER CLIENT: {
        "time": "2021-09-13T15:19:09.000+1000",
        "valve": 64,
        "delay": {
                "val": 0,
                "name": "nodelay",
                "desc": "No Delay"
        },
        "batteryVoltage": 0,
        "status": {
                "val": 1,
                "name": "ready",
                "desc": "Ready",
                "percent": 100
        },
        "mode": {
                "val": 0,
                "name": "auto",
                "desc": "Auto"
        },
        "appVersion": "7.4.0",
        "appVersionState": {
                "installed": "7.4.0",
                "status": {
                        "val": 0,
                        "name": "current",
                        "desc": "On current version"
                },
                "nextCheckTime": "2021-09-15T15:05:36.160+1000",
                "githubRelease": "7.4.0",
                "equipmentType": "appVersion"
        },
        "clockMode": {
                "val": 12,
                "name": "12 Hour"
        },
        "clockSource": {
                "val": 1,
                "name": "manual",
                "desc": "Manual"
        },
        "controllerType": "intellitouch",
        "model": "IntelliTouch i9+3",
        "sunrise": "2021-09-13T05:58:36.000+1000",
        "sunset": "2021-09-13T17:45:10.000+1000",
        "alias": "",
        "freeze": false
}
[9/13/2021, 3:21:10 PM] [PoolControllerPlatform] FROM CONTROLLER CLIENT: {
        "time": "2021-09-13T15:20:08.000+1000",
        "valve": 64,
        "delay": {
                "val": 0,
                "name": "nodelay",
                "desc": "No Delay"
        },
        "batteryVoltage": 0,
        "status": {
                "val": 1,
                "name": "ready",
                "desc": "Ready",
                "percent": 100
        },
        "mode": {
                "val": 0,
                "name": "auto",
                "desc": "Auto"
        },
        "appVersion": "7.4.0",
        "appVersionState": {
                "installed": "7.4.0",
                "status": {
                        "val": 0,
                        "name": "current",
                        "desc": "On current version"
                },
                "nextCheckTime": "2021-09-15T15:05:36.160+1000",
                "githubRelease": "7.4.0",
                "equipmentType": "appVersion"
        },
        "clockMode": {
                "val": 12,
                "name": "12 Hour"
        },
        "clockSource": {
                "val": 1,
                "name": "manual",
                "desc": "Manual"
        },
        "controllerType": "intellitouch",
        "model": "IntelliTouch i9+3",
        "sunrise": "2021-09-13T05:58:36.000+1000",
        "sunset": "2021-09-13T17:45:10.000+1000",
        "alias": "",
        "freeze": false
}
[9/13/2021, 3:21:36 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number -3.3333333333333335 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.
[9/13/2021, 3:21:36 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.
[9/13/2021, 3:21:36 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number 2.2222222222222223 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.
gadget-monk commented 2 years ago

It seems like the temp sensor values are incorrect. Do you still have this issue?

gavc1 commented 2 years ago

Hey, that’s correct, I still have this issue. It reports in Celsius, it’s is displayed right with all other pool controller plugins.

dkroesche commented 2 years ago

Hi - I am having a similar problem when I try to adjust my heater temperature. I can turn pumps/lights off and on. The air and water temperature show correctly. But when I try to change the heater setting, I get an error like this:

[10/16/2021, 9:24:45 PM] [PoolControllerPlatform] Setting Body Setpoint Spa Heater to 96 [10/16/2021, 9:24:45 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number -16.666666666666668 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info. [10/16/2021, 9:24:45 PM] [PoolControllerPlatform] Error fetching data: Request failed with status code 400 (node:25076) UnhandledPromiseRejectionWarning: Error: Request failed with status code 400 at createError (/usr/lib/node_modules/homebridge-poolcontroller/node_modules/axios/lib/core/createError.js:16:15) at settle (/usr/lib/node_modules/homebridge-poolcontroller/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/homebridge-poolcontroller/node_modules/axios/lib/adapters/http.js:236:11) at IncomingMessage.emit (events.js:388:22) at endReadableNT (internal/streams/readable.js:1336:12) at processTicksAndRejections (internal/process/task_queues.js:82:21) (node:25076) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 16)

This had worked in the past.

Thanks for your help! David

gadget-monk commented 2 years ago

I am able to reproduce this as well, working on a fix

dkroesche commented 2 years ago

Hi - just checking if you were able to fix this. Thanks!

gadget-monk commented 2 years ago

The API had changed, I am testing out edits to the code and will publish and update before end of week

dkroesche commented 2 years ago

Hi - thanks for the fix. I still see the warnings in the home bridge log, but the temperature changes seem to be working now.

[12/30/2021, 4:05:25 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number -16.666666666666668 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.

Thanks, David

gadget-monk commented 2 years ago

thanks odd, what temp unit are you using (C or F)?

dkroesche commented 2 years ago

I'm using F.

gadget-monk commented 2 years ago

Can you try enabling debug logging (in plugin settings) and paste the log here?

dkroesche commented 2 years ago

[12/30/2021, 4:31:31 PM] [PoolControllerPlatform] Setting Body Setpoint Spa Heater to 99 [12/30/2021, 4:31:31 PM] [PoolControllerPlatform] Sending command to pool controller server: { method: 'put', data: { id: 2, heatSetpoint: 99 }, url: 'http://192.168.1.107:4200/state/body/setPoint' } [12/30/2021, 4:31:31 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number -16.11111111111111 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info. [12/30/2021, 4:31:32 PM] [PoolControllerPlatform] FROM BODY CLIENT: { "id": 2, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0, "maxetherm": 0, "mastertemp": 0 }, "type": { "val": 0, "name": "pool", "desc": "Pool" }, "isOn": false, "heatMode": { "val": 1, "name": "heater", "desc": "Heater" }, "setPoint": 99, "name": "Spa", "circuit": 1, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "temp": 98 } [12/30/2021, 4:31:32 PM] [PoolControllerPlatform] Updating data for Spa body: state: false [12/30/2021, 4:31:32 PM] [PoolControllerPlatform] Additional data for Spa body: Curr temp: 98, target temp: 99, heat state: Off, target heat state: Heater

gadget-monk commented 2 years ago

Just pushed another update, does that fix this error?

dkroesche commented 2 years ago

I downloaded the latest and re-started home bridge, but it doesn't seem to fix it.

[12/30/2021, 4:44:11 PM] [PoolControllerPlatform] Setting Body Setpoint Spa Heater to 97 [12/30/2021, 4:44:11 PM] [PoolControllerPlatform] Sending command to pool controller server: { method: 'put', data: { id: 2, heatSetpoint: 97 }, url: 'http://192.168.1.107:4200/state/body/setPoint' } [12/30/2021, 4:44:11 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number 2 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info. [12/30/2021, 4:44:13 PM] [PoolControllerPlatform] FROM BODY CLIENT: { "id": 2, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0, "maxetherm": 0, "mastertemp": 0 }, "type": { "val": 0, "name": "pool", "desc": "Pool" }, "isOn": false, "heatMode": { "val": 1, "name": "heater", "desc": "Heater" }, "setPoint": 97, "name": "Spa", "circuit": 1, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "temp": 98 } [12/30/2021, 4:44:13 PM] [PoolControllerPlatform] Updating data for Spa body: state: false [12/30/2021, 4:44:13 PM] [PoolControllerPlatform] Additional data for Spa body: Curr temp: 98, target temp: 97, heat state: Off, target heat state: Heater

dkroesche commented 2 years ago

Note sure if it helps, but the "illegal value" increases with higher set temperatures. If I set the temp to 104, the "illegal value" reported is 4. As I lower the temperature, the "illegal value" decreases. With the temp set to 50, the "illegal value" is -12.

gadget-monk commented 2 years ago

tried another fix, can you update (new version is 3.2.5) and try to see if this fixes the warning?

dkroesche commented 2 years ago

That fixed it. Thanks!

gavc1 commented 2 years ago

Weirdly I am still seeing this issue with 3.2.5 And my circuits never find their way in to the Home App

1/13/2022, 9:03:04 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.

[1/13/2022, 9:03:04 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number -3.3333333333333335 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.

[1/13/2022, 9:03:04 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.

[1/13/2022, 9:03:04 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number 0.5555555555555556 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.

[1/13/2022, 9:03:06 PM] [Hue] heartbeat 9, drift 423

[1/13/2022, 9:03:17 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.

[1/13/2022, 9:03:17 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number -3.3333333333333335 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.

[1/13/2022, 9:03:17 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.

[1/13/2022, 9:03:17 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number 0.5555555555555556 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.

[1/13/2022, 9:03:29 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.

[1/13/2022, 9:03:29 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number -3.3333333333333335 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.

[1/13/2022, 9:03:29 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.

[1/13/2022, 9:03:29 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number 0.5555555555555556 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.

[1/13/2022, 9:04:08 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.

[1/13/2022, 9:04:08 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number -3.3333333333333335 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.

[1/13/2022, 9:04:08 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.

[1/13/2022, 9:04:08 PM] [homebridge-poolcontroller] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number 0.5555555555555556 exceeded minimum of 4.444444444444445. See https://git.io/JtMGR for more info.

gadget-monk commented 2 years ago

Can you paste the entire log, especially any messages when homebridge is starting and loading plugins? Also, are current and target temp showing up accurately in dash panel?

michaelmedellin commented 1 year ago

@gadget-monk I believe #15 should help fix this issue. I’m no longer seeing the issue in code with these fixes.