gadget-monk / homebridge-poolcontroller

Homebridge plugin for Pentair pools
6 stars 4 forks source link

Pool/Spa circuits unavailable then all homebridge is unavailable #4

Closed gavc1 closed 4 years ago

gavc1 commented 4 years ago

I have this installed in homebridge and the first time its setup, it runs okay, controls the circuits, except the pool and spa circuits show unavailable (for temp control) but on/off switches work okay. After I restart homebridge then it fails to start at all, cant find anything in the logs stopping it from starting up.

But here is the log with debugging turn on

[8/23/2020, 3:49:25 PM] [PoolControllerPlatform] FROM CONTROLLER CLIENT: { "time": "2020-08-23T15:49:23.000+0100", "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": "6.0.0", "clockMode": { "val": 12, "name": "12 Hour" }, "clockSource": { "val": 1, "name": "manual", "desc": "Manual" } } [8/23/2020, 3:49:51 PM] [PoolControllerPlatform] FROM TEMP CLIENT: { "units": { "val": 4, "name": "C", "desc": "Celcius" }, "waterSensor1": 11, "bodies": [ { "id": 1, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "temp": 11, "isOn": true, "circuit": 6, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "name": "Pool", "setPoint": 28 }, { "id": 2, "isOn": false, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "name": "Spa", "circuit": 1, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "setPoint": 36 } ], "air": 15 } [8/23/2020, 3:49:51 PM] [PoolControllerPlatform] Updating temp (and all other) data for body: Pool [8/23/2020, 3:49:51 PM] [PoolControllerPlatform] FROM BODY CLIENT: { "id": 1, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "temp": 11, "isOn": true, "circuit": 6, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "name": "Pool", "setPoint": 28 } [8/23/2020, 3:49:51 PM] [PoolControllerPlatform] Updating data for Pool body: state: true [8/23/2020, 3:49:51 PM] [PoolControllerPlatform] Additional data for Pool body: Curr temp: 11, target temp: 28, heat state: Off, target heat state: Off [8/23/2020, 3:49:51 PM] [PoolControllerPlatform] Updating temp (and all other) data for body: Spa [8/23/2020, 3:49:51 PM] [PoolControllerPlatform] FROM BODY CLIENT: { "id": 2, "isOn": false, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "name": "Spa", "circuit": 1, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "setPoint": 36 } [8/23/2020, 3:49:51 PM] [PoolControllerPlatform] Updating data for Spa body: state: false [8/23/2020, 3:49:51 PM] [PoolControllerPlatform] Additional data for Spa body: Curr temp: undefined, target temp: 36, heat state: Off, target heat state: Off [8/23/2020, 3:49:51 PM] [PoolControllerPlatform] Updating temp to 15 [8/23/2020, 3:49:51 PM] [PoolControllerPlatform] Updating temp to 11 [8/23/2020, 3:49:51 PM] [PoolControllerPlatform] FROM BODY CLIENT: { "id": 1, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "temp": 11, "isOn": true, "circuit": 6, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "name": "Pool", "setPoint": 28 } [8/23/2020, 3:49:51 PM] [PoolControllerPlatform] Updating data for Pool body: state: true [8/23/2020, 3:49:51 PM] [PoolControllerPlatform] Additional data for Pool body: Curr temp: 11, target temp: 28, heat state: Off, target heat state: Off [8/23/2020, 3:49:59 PM] [PoolControllerPlatform] FROM TEMP CLIENT: { "units": { "val": 4, "name": "C", "desc": "Celcius" }, "waterSensor1": 12, "bodies": [ { "id": 1, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "temp": 12, "isOn": true, "circuit": 6, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "name": "Pool", "setPoint": 28 }, { "id": 2, "isOn": false, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "name": "Spa", "circuit": 1, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "setPoint": 36 } ], "air": 15 } [8/23/2020, 3:49:59 PM] [PoolControllerPlatform] Updating temp (and all other) data for body: Pool [8/23/2020, 3:49:59 PM] [PoolControllerPlatform] FROM BODY CLIENT: { "id": 1, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "temp": 12, "isOn": true, "circuit": 6, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "name": "Pool", "setPoint": 28 } [8/23/2020, 3:49:59 PM] [PoolControllerPlatform] Updating data for Pool body: state: true [8/23/2020, 3:49:59 PM] [PoolControllerPlatform] Additional data for Pool body: Curr temp: 12, target temp: 28, heat state: Off, target heat state: Off [8/23/2020, 3:49:59 PM] [PoolControllerPlatform] Updating temp (and all other) data for body: Spa [8/23/2020, 3:49:59 PM] [PoolControllerPlatform] FROM BODY CLIENT: { "id": 2, "isOn": false, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "name": "Spa", "circuit": 1, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "setPoint": 36 } [8/23/2020, 3:49:59 PM] [PoolControllerPlatform] Updating data for Spa body: state: false [8/23/2020, 3:49:59 PM] [PoolControllerPlatform] Additional data for Spa body: Curr temp: undefined, target temp: 36, heat state: Off, target heat state: Off [8/23/2020, 3:49:59 PM] [PoolControllerPlatform] Updating temp to 15 [8/23/2020, 3:49:59 PM] [PoolControllerPlatform] Updating temp to 12 [8/23/2020, 3:49:59 PM] [PoolControllerPlatform] FROM BODY CLIENT: { "id": 1, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "temp": 12, "isOn": true, "circuit": 6, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "name": "Pool", "setPoint": 28 } [8/23/2020, 3:49:59 PM] [PoolControllerPlatform] Updating data for Pool body: state: true [8/23/2020, 3:49:59 PM] [PoolControllerPlatform] Additional data for Pool body: Curr temp: 12, target temp: 28, heat state: Off, target heat state: Off [8/23/2020, 3:50:24 PM] [PoolControllerPlatform] FROM CONTROLLER CLIENT: { "time": "2020-08-23T15:50:22.000+0100", "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": "6.0.0", "clockMode": { "val": 12, "name": "12 Hour" }, "clockSource": { "val": 1, "name": "manual", "desc": "Manual" } } [8/23/2020, 3:51:24 PM] [PoolControllerPlatform] FROM CONTROLLER CLIENT: { "time": "2020-08-23T15:51:22.000+0100", "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": "6.0.0", "clockMode": { "val": 12, "name": "12 Hour" }, "clockSource": { "val": 1, "name": "manual", "desc": "Manual" } } [8/23/2020, 3:52:25 PM] [PoolControllerPlatform] FROM CONTROLLER CLIENT: { "time": "2020-08-23T15:52:23.000+0100", "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": "6.0.0", "clockMode": { "val": 12, "name": "12 Hour" }, "clockSource": { "val": 1, "name": "manual", "desc": "Manual" } } [8/23/2020, 3:52:27 PM] [PoolControllerPlatform] FROM TEMP CLIENT: { "units": { "val": 4, "name": "C", "desc": "Celcius" }, "waterSensor1": 11, "bodies": [ { "id": 1, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "temp": 11, "isOn": true, "circuit": 6, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "name": "Pool", "setPoint": 28 }, { "id": 2, "isOn": false, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "name": "Spa", "circuit": 1, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "setPoint": 36 } ], "air": 15 } [8/23/2020, 3:52:27 PM] [PoolControllerPlatform] Updating temp (and all other) data for body: Pool [8/23/2020, 3:52:27 PM] [PoolControllerPlatform] FROM BODY CLIENT: { "id": 1, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "temp": 11, "isOn": true, "circuit": 6, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "name": "Pool", "setPoint": 28 } [8/23/2020, 3:52:27 PM] [PoolControllerPlatform] Updating data for Pool body: state: true [8/23/2020, 3:52:27 PM] [PoolControllerPlatform] Additional data for Pool body: Curr temp: 11, target temp: 28, heat state: Off, target heat state: Off [8/23/2020, 3:52:27 PM] [PoolControllerPlatform] Updating temp (and all other) data for body: Spa [8/23/2020, 3:52:27 PM] [PoolControllerPlatform] FROM BODY CLIENT: { "id": 2, "isOn": false, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "name": "Spa", "circuit": 1, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "setPoint": 36 } [8/23/2020, 3:52:27 PM] [PoolControllerPlatform] Updating data for Spa body: state: false [8/23/2020, 3:52:27 PM] [PoolControllerPlatform] Additional data for Spa body: Curr temp: undefined, target temp: 36, heat state: Off, target heat state: Off [8/23/2020, 3:52:27 PM] [PoolControllerPlatform] Updating temp to 15 [8/23/2020, 3:52:27 PM] [PoolControllerPlatform] Updating temp to 11 [8/23/2020, 3:52:27 PM] [PoolControllerPlatform] FROM BODY CLIENT: { "id": 1, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "temp": 11, "isOn": true, "circuit": 6, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "name": "Pool", "setPoint": 28 } [8/23/2020, 3:52:27 PM] [PoolControllerPlatform] Updating data for Pool body: state: true [8/23/2020, 3:52:27 PM] [PoolControllerPlatform] Additional data for Pool body: Curr temp: 11, target temp: 28, heat state: Off, target heat state: Off [8/23/2020, 3:52:45 PM] [PoolControllerPlatform] FROM TEMP CLIENT: { "units": { "val": 4, "name": "C", "desc": "Celcius" }, "waterSensor1": 12, "bodies": [ { "id": 1, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "temp": 12, "isOn": true, "circuit": 6, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "name": "Pool", "setPoint": 28 }, { "id": 2, "isOn": false, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "name": "Spa", "circuit": 1, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "setPoint": 36 } ], "air": 15 } [8/23/2020, 3:52:45 PM] [PoolControllerPlatform] Updating temp (and all other) data for body: Pool [8/23/2020, 3:52:45 PM] [PoolControllerPlatform] FROM BODY CLIENT: { "id": 1, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "temp": 12, "isOn": true, "circuit": 6, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "name": "Pool", "setPoint": 28 } [8/23/2020, 3:52:45 PM] [PoolControllerPlatform] Updating data for Pool body: state: true [8/23/2020, 3:52:45 PM] [PoolControllerPlatform] Additional data for Pool body: Curr temp: 12, target temp: 28, heat state: Off, target heat state: Off [8/23/2020, 3:52:45 PM] [PoolControllerPlatform] Updating temp (and all other) data for body: Spa [8/23/2020, 3:52:45 PM] [PoolControllerPlatform] FROM BODY CLIENT: { "id": 2, "isOn": false, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "name": "Spa", "circuit": 1, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "setPoint": 36 } [8/23/2020, 3:52:45 PM] [PoolControllerPlatform] Updating data for Spa body: state: false [8/23/2020, 3:52:45 PM] [PoolControllerPlatform] Additional data for Spa body: Curr temp: undefined, target temp: 36, heat state: Off, target heat state: Off [8/23/2020, 3:52:45 PM] [PoolControllerPlatform] Updating temp to 15 [8/23/2020, 3:52:45 PM] [PoolControllerPlatform] Updating temp to 12 [8/23/2020, 3:52:45 PM] [PoolControllerPlatform] FROM BODY CLIENT: { "id": 1, "heatMode": { "val": 0, "name": "off", "desc": "Off" }, "temp": 12, "isOn": true, "circuit": 6, "heatStatus": { "val": 0, "name": "off", "desc": "Off" }, "heaterOptions": { "total": 1, "gas": 1, "solar": 0, "heatpump": 0, "ultratemp": 0, "hybrid": 0 }, "name": "Pool", "setPoint": 28 } [8/23/2020, 3:52:45 PM] [PoolControllerPlatform] Updating data for Pool body: state: true [8/23/2020, 3:52:45 PM] [PoolControllerPlatform] Additional data for Pool body: Curr temp: 12, target temp: 28, heat state: Off, target heat state: Off

gadget-monk commented 4 years ago

What is the type of equipment? Also, are you using Celsius as the temp unit? The plugin is hardcoded to assume all temps are in F, so that may be tripping things up. Can you try disabling the heater control temporarily by enabling the setupBodyAsCircuit option and see if that works?

gavc1 commented 4 years ago

Hi, It’s a Pentair IntelliTouch i9+3 I am using Celsius and since enabling setupBodyAsCircuit it seems to be working fine. Ill look at adding Celsius support (its returned in the API)

gavc1 commented 4 years ago

For now I just edited the F2C and C2F functions in utils.js to return their inputs as there is a lot of hard coding on temperature. It will need a bit of a refactor to handle both input types neatly

gadget-monk commented 4 years ago

Did that work? I was planning to make some updates to the circuits to enable history logging and can update the F2C and C2F functions too.

gavc1 commented 4 years ago

Yep works perfect now

gadget-monk commented 4 years ago

I posted an updated version that reads and processes the temp unit from the njspc API