hjuhlin / homebridge-aqua-temp

Homebridge plugin for Aqua Temp
Apache License 2.0
6 stars 4 forks source link

Status when error or not working #4

Closed Y8rz8 closed 3 years ago

Y8rz8 commented 3 years ago

Hi again ! Everything is working as expected but I’m wondering if the following is possible:

if the pool heater goes in error due to no incoming water flow or if the pool heater is on but not working (temperature reached and no activity) then the status should not mentioned « heating » (with the up arrow)

Thanks !

hjuhlin commented 3 years ago

I have done some testing and a new version is live :)

The status is now off when there is no waterflow or if the current temp is higer or the same as the target temp.

Main problem I see with this is that my device is currently on, but have no water flow. So in Auqa app I can see that is on and I can turn it off if I want.

But in homekit is looks off and there is no way to turn it off if needed. Your you can turn it on and the off.

So don't know if this is a good solution, maybe add a setting for how it should behave. I always let my water flow turn the device on and off. So for me this would work perfectly. But maybe not for all.

hjuhlin commented 3 years ago

I guess I can find the answer in this that I found.

1- TargetHeatingCoolingState (whether the user wants to heat or not) 2- CurrentHeatingCoolingState (whether the heater is heating or not) 3- CurrentTemperature (what temperature the room actually is) 4- TargetTemperature (what temperature the room should be)

Right now Im treating 1 and 2 as the same.

Y8rz8 commented 3 years ago

You are too fast :-) thx

I understand your concern about the off issue. I was wondering if we could simply let the on status but without the heating status.

I always let my water flow turn the device on and off. So for me this would work perfectly. But maybe not for all.

how do you do this ? Perhaps my pool heater can’t do this way.

1- TargetHeatingCoolingState (whether the user wants to heat or not)

2- CurrentHeatingCoolingState (whether the heater is heating or not)

Ok clear then in my case when on (always) I want to heat but the heater may not heat. Which is not your case because your heater goes on and off with th water flow - I get it :)

hjuhlin commented 3 years ago

You are too fast :-) thx

I wanted this for my self as soon as I did read your request so :P

I understand your concern about the off issue. I was wondering if we could simply let the on status but without the heating status.

I always let my water flow turn the device on and off. So for me this would work perfectly. But maybe not for all.

how do you do this ? Perhaps my pool heater can’t do this way.

I was not clear, with off I did mean that the heating is turned off, but not the heater, its in error state (= heating off).

1- TargetHeatingCoolingState (whether the user wants to heat or not)

2- CurrentHeatingCoolingState (whether the heater is heating or not)

Ok clear then in my case when on (always) I want to heat but the heater may not heat. Which is not your case because your heater goes on and off with th water flow - I get it :)

I have changed target to power on / off now. And current to status if it heats or not. looks like it works perfect! :)

Y8rz8 commented 3 years ago

I wanted this for my self as soon as I did read your request so :P

good catch :)

I see that it works :-) thanks !

Y8rz8 commented 3 years ago

I have done some tests today :)

Change to not heating status when target temp is lower then current temp or if the pump doesnt have water flow.

I think only the second part should be used. Sometimes the current temp is higher than target temp for a few minutes (in my case the pool heater stops one degree up than the target temperature - don’t ask me why :) and it takes time or perhaps the heater does not work but the fan does ?

Setup the target temp is not working anymore. I can setup it in HomeKit but nothing change in the heater and a few seconds later the temperature set on the heater appears in target temperature in HomeKit. This was not the case before. Any idea ?

Thx !

hjuhlin commented 3 years ago

I have done some tests today :)

Change to not heating status when target temp is lower then current temp or if the pump doesnt have water flow.

I think only the second part should be used. Sometimes the current temp is higher than target temp for a few minutes (in my case the pool heater stops one degree up than the target temperature - don’t ask me why :) and it takes time or perhaps the heater does not work but the fan does ?

Lets keep testing that for a few days and lets get a felling on how it works.

Setup the target temp is not working anymore. I can setup it in HomeKit but nothing change in the heater and a few seconds later the temperature set on the heater appears in target temperature in HomeKit. This was not the case before. Any idea ?

What version? I have published a lot of beta versions today, trying to to get the temp sorted in Eve graph (like this: https://tse1.mm.bing.net/th/id/OIP.ta5hCI5wSqn37l00zsFB7wHaQC?pid=ImgDet&rs=1)

So all 1.6.X versions are a bit unstable. But I have not had the problem you are refering to. Do you get some information in the log on the homebridge server?

Y8rz8 commented 3 years ago

Lets keep testing that for a few days and lets get a felling on how it works.

Agree :)

What version? I have published a lot of beta versions today, trying to to get the temp sorted in Eve graph (like this: https://tse1.mm.bing.net/th/id/OIP.ta5hCI5wSqn37l00zsFB7wHaQC?pid=ImgDet&rs=1)

So all 1.6.X versions are a bit unstable. But I have not had the problem you are refering to. Do you get some information in the log on the homebridge server?

I have updated to the last version and it works.

Y8rz8 commented 3 years ago

Hello, I confirm everything is working fine since two weeks. I’m still thinking the heating status should only be changed when the pump water have water flow but it’s up to you :) Many thanks again for this plugin !

hjuhlin commented 3 years ago

I think I have found a way to check if the heater is using any power, so I should check that instead. So if water flow is 0 or the heater have stopped because it’s too hot (same for me, 1 degree over my target temp) then it looks like I have found the power variable that goes down to 0 and then it should change CurrentHeatingCoolingState and it should work better.

I have just published a version (1.7.1) that write out the variable that I think is the current power usage (its slow on updating, like 5 min or so), but if you can help me check debug messages now and then and then and see if you get 0W when its off and some other number when its on it would be very nice. If so, I can then use this number to code on.

Debug message is only visible if you check that option in the plugin settings.

hjuhlin commented 3 years ago

So for me is says like this right now:

[2021-06-28 19:50:26] [Aqua Temp] Update temperature for Juhlin pool: 30.0 [2021-06-28 19:50:26] [Aqua Temp] Update air temperature for Juhlin pool: 22.0 [2021-06-28 19:50:26] [Aqua Temp] Current power usage Juhlin pool: 634W [2021-06-28 19:50:26] [Aqua Temp] Update target temperature for Juhlin pool: 32.0 [2021-06-28 19:50:26] [Aqua Temp] Update power for Juhlin pool: true [2021-06-28 19:50:26] [Aqua Temp] Update heating status for Juhlin pool: true

Y8rz8 commented 3 years ago

Hi, Checking the power is a good idea :) I have just updated the plug-in but the heater is not working right now. I will send you update tomorrow.

[28/06/2021, 20:01:18] [Aqua Temp] Update temperature for PAC: 28.0 [28/06/2021, 20:01:18] [Aqua Temp] Update air temperature for PAC: 23.5 [28/06/2021, 20:01:18] [Aqua Temp] Current power usage PAC: 0W [28/06/2021, 20:01:18] [Aqua Temp] Update target temperature for PAC: 27.0 [28/06/2021, 20:01:18] [Aqua Temp] Update power for PAC: true [28/06/2021, 20:01:18] [Aqua Temp] Update heating status for PAC: false

kungktd commented 3 years ago

My heater is an inverter heater and almost never goes to 0. Right now I’m at 28,5 C (target 28) going down from 29. My pump is consuming 0,2A and to me that is off. Is there any way to set an ”offset” for when the pump is off? Ex. <0,5A = off?

EDIT Or maybe I don’t understand this function. In HomeKit, it always looks like my heater is heating. Looked in the log file and saw Current power usage POOLEN: 0W [28/06/2021, 22:43:42] [Aqua Temp] Update power for POOLEN: true [28/06/2021, 22:43:42] [Aqua Temp] Update heating status for POOLEN: false

Power is 0 and update heating status is false but my HomeKit tile says heating till 28 degrees…

hjuhlin commented 3 years ago

My heater is an inverter heater and almost never goes to 0. Right now I’m at 28,5 C (target 28) going down from 29. My pump is consuming 0,2A and to me that is off. Is there any way to set an ”offset” for when the pump is off? Ex. <0,5A = off?

If all heater uses the same variable for energy used (and if that is what I have found). Not sure about that until more have tested it. Then it should not be a problem to set an offset value, have done about the same for Nexa plugin for a Z-wave energy meter that I have connected to my dishwasher. So I have done that code before in Homebridge.

But again, more need to test what the Current power usage says.

hjuhlin commented 3 years ago

Or maybe I don’t understand this function. In HomeKit, it always looks like my heater is heating. Looked in the log file and saw Current power usage POOLEN: 0W [28/06/2021, 22:43:42] [Aqua Temp] Update power for POOLEN: true [28/06/2021, 22:43:42] [Aqua Temp] Update heating status for POOLEN: false

Power is 0 and update heating status is false but my HomeKit tile says heating till 28 degrees…

That is what I try to fix by changing this code. Right now, it says heating = false if the temperature is greater then target. Even if it keeps warming a bit over target temperature (if you read all posts in this thread, I think you understand the current version.

But if your heater says 0 and you know that is heating, then that will not work. But keep checking it over 1-2 days and see if you get some other values on it. I guess not… and this will not work then.. but lets pray for it to work :)

Y8rz8 commented 3 years ago

Here the log file for this morning:

29/06/2021, 11:05:03] [Aqua Temp] Update temperature for PAC: 27.0 [29/06/2021, 11:05:03] [Aqua Temp] Update air temperature for PAC: 22.0 [29/06/2021, 11:05:03] [Aqua Temp] Current power usage PAC: 673W [29/06/2021, 11:05:03] [Aqua Temp] Update target temperature for PAC: 28.0 [29/06/2021, 11:05:03] [Aqua Temp] Update power for PAC: true [29/06/2021, 11:05:03] [Aqua Temp] Update heating status for PAC: true

Y8rz8 commented 3 years ago

Here is a new log which is not clear to me:

[29/06/2021, 14:13:03] [Aqua Temp] Update temperature for PAC: 26.0 [29/06/2021, 14:13:03] [Aqua Temp] Update air temperature for PAC: 17.0 [29/06/2021, 14:13:03] [Aqua Temp] Current power usage PAC: 650W [29/06/2021, 14:13:03] [Aqua Temp] Update target temperature for PAC: 27.0 [29/06/2021, 14:13:03] [Aqua Temp] Update power for PAC: true [29/06/2021, 14:13:03] [Aqua Temp] Update heating status for PAC: true [29/06/2021, 14:14:03] [Aqua Temp] Update temperature for PAC: 27.0 [29/06/2021, 14:14:03] [Aqua Temp] Update air temperature for PAC: 16.5 [29/06/2021, 14:14:03] [Aqua Temp] Current power usage PAC: 656W [29/06/2021, 14:14:03] [Aqua Temp] Update target temperature for PAC: 27.0 [29/06/2021, 14:14:03] [Aqua Temp] Update power for PAC: true [29/06/2021, 14:14:03] [Aqua Temp] Update heating status for PAC: false

I don’t understand why the status has been change to false ?

hjuhlin commented 3 years ago

Here is a new log which is not clear to me: I don’t understand why the status has been change to false ?

Because my code change heating status to false as soon as temperature is the same or higher then target temperature. That is what I want to fix if this this power usage testing is successful. And it looks very promising right now.

Y8rz8 commented 3 years ago

Ok perfect - I was thinking it was already the case :)

Y8rz8 commented 3 years ago

Hello there, I noticed there is no more the power usage in log file, is that possible to have it again ? Thx :)

hjuhlin commented 3 years ago

Hello there, I noticed there is no more the power usage in log file, is that possible to have it again ? Thx :)

If you active the "View electric power usage (only works in Eve app)" option its back in debug message (even if you dont have the Eve app)

Y8rz8 commented 3 years ago

Ok clear. I have also tried the eve app and it works :)

hjuhlin commented 3 years ago

In version 1.9.2 it uses the water flow + new power option to show if the heater is heating or not.. instead of waterflow and temperature.

If you don’t have the new power option, it only uses water flow.

Remember that the heater can be slow to report the power usage, so it takes some time for the icon to get updated.

So test it out plz :)