MizterB / homeassistant-infinitude-beyond

Home Assistant custom component for controlling Carrier Infinity Touch thermostats through an Infinitude proxy server.
17 stars 3 forks source link

Getting lots of "'None' is an unknown Activity" messages in logs #6

Closed brettonw closed 4 weeks ago

brettonw commented 3 months ago

Continuing after 2024.6.0 install:

2024-06-15 19:49:11.899 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown Activity

greggitter commented 2 months ago

Thousands in one day here..

2024-07-20 22:13:34.889 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction

MizterB commented 2 months ago

Working on it...your system is generating an activity name that I am not aware of, but the log is incorrectly showing 'None' instead of the unknown activity. I have an upcoming fix that will log the unknown activity name, so I can add it into the known values.

greggitter commented 1 month ago

Checking the log timestamps, the first log entry appeared last evening at 9:45 PM, mode should have been HOME at that time (per schedule and I have no active HVAC automations). Our SLEEP schedule begins at 11:15 PM. At 8:00 AM our WAKE schedule begins and that is when the log messages stop. I don't see anything triggering anything to change at 9:45 PM. The "became unavailable" was an HA update.

image

Not much to go on but if I can provide more let me know. Thanks @MizterB .

greggitter commented 1 month ago

@MizterB, happened again last night. Could it be the mode is "dehumidify"?

IMG_0049 (Medium)

MizterB commented 1 month ago

I don't believe so - the 'mode' corresponds to the zoneconditioning value.

The upcoming log changes will provide more insight. I hope to get those released later in the week, along with multiple other changes that need to be tested first.

greggitter commented 1 month ago

@MizterB Is there any code I can insert myself to speed things along and reduce your time needed trying to find the issue?

Logger: custom_components.infinitude_beyond.infinitude.api
Source: custom_components/infinitude_beyond/infinitude/api.py:704
integration: Infinitude Beyond ([documentation](https://github.com/MizterB/homeassistant-infinitude-beyond))
First occurred: July 22, 2024 at 11:59:57 PM (57590 occurrences)
Last logged: 7:59:19 AM
'None' is an unknown Activity
greggitter commented 1 month ago

Also getting hundreds of errors as follows for HVAC Action (I went ahead and commented out the lines creating these log records):

2024-07-29 21:44:01.575 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:44:01.575 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:44:01.575 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:44:16.574 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:44:16.574 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:44:16.575 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:44:31.574 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:44:31.574 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:44:31.574 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:44:46.573 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:44:46.574 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:44:46.574 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:45:01.594 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:45:01.594 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:45:01.594 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:45:16.574 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:45:16.574 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:45:16.575 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:45:31.557 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:45:31.558 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:45:31.558 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:45:46.575 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:45:46.576 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:45:46.576 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:46:01.593 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:46:01.593 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction
2024-07-29 21:46:01.594 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown HVACAction

Thx!

lleo19 commented 1 month ago

I have the same issue in my logs. And would like to confirm that my system is also reporting as "dehumidifying" as HVAC activity on the Carrier thermostats and in infinitude. By contrast, the infinitude_beyond climate card in HA states that the system is cooling, but it does not, it is dehumidifying...

the infinitude status reports:

mode:
  0: "dehumidify"
odu:
  0:
    opmode:
      0: "cooling"
    opstat:
      0: "dehumidify"
zones:
  0:
    zone:
      0:
        zoneconditioning:
          0: "idle"
  1:
    zone:
      0:
        zoneconditioning:
          0: "active_cool"

I note that based on the infinitude screenshot by greggitter, he seems to have a multi-zone system just as I.

lleo19 commented 1 month ago

so, a bit later it is now hot outside and I cranked the tstat down to trigger cooling on both zones. this is what is seen at infinitude_ip/api/status

mode:
  0: "cool"
odu:
  0:
    opmode:
      0: "cooling"
    opstat:
      0: "100"
[...snip...]
zones:
  0:
    zone:
      0:
        zoneconditioning:
          0: "active_cool"
  1:
    zone:
      0:
        zoneconditioning:
          0: "active_cool"

of interest is odu/opstat above which seems to correspond to the heatpump modulation, ranging from 40 - 100

MizterB commented 1 month ago

@MizterB Is there any code I can insert myself to speed things along and reduce your time needed trying to find the issue?

Logger: custom_components.infinitude_beyond.infinitude.api
Source: custom_components/infinitude_beyond/infinitude/api.py:704
integration: Infinitude Beyond ([documentation](https://github.com/MizterB/homeassistant-infinitude-beyond))
First occurred: July 22, 2024 at 11:59:57 PM (57590 occurrences)
Last logged: 7:59:19 AM
'None' is an unknown Activity

@greggitter you can take a look at the next branch, which should fix the log messages. But I have not been in a position to test the updates to that branch yet, so I would not recommend using it as your Production code.

greggitter commented 1 month ago

@MizterB thanks. I c/p'd the logger lines for Activity and Action into my production (no test available) to see what's going on. I noticed you changed _LOGGER.warn to _LOGGER.warning. I changed the c/p text to the former since I know that works. Wasn't sure if that's a typo or not. Will report back.

greggitter commented 1 month ago

@MizterB got the answer for the unknown HVACAction = prep_cool. This occurs when the thermostat is preparing for an upcoming temp change and begins transitioning ahead of time. I assume in the winter when the opposite occurs there might be something like prep_heat.

This error originated from a custom integration.

Logger: custom_components.infinitude_beyond.infinitude.api
Source: custom_components/infinitude_beyond/infinitude/api.py:622
integration: Infinitude Beyond (documentation)
First occurred: August 5, 2024 at 9:44:51 PM (780 occurrences)
Last logged: August 5, 2024 at 10:49:36 PM

'prep_cool' is an unknown HVACAction
MizterB commented 1 month ago

@greggitter That should be fixed here: https://github.com/MizterB/homeassistant-infinitude-beyond/commit/747f24587f9e2f9d493fbc57462cca655751163e

greggitter commented 1 month ago

@MizterB I incorporated those changes and will report back...thanks for the quick patch! We still don't know what the unknown activity is yet though.

@lleo19 Just saw your comment about multi-zone...I have a single zone. My system is gas-modulating furnace, single stage A/C, no heat pump.

lleo19 commented 1 month ago

@greggitter thanks, my system has two zones, and both a modulating gas furnace as well as a modulating heat pump, so counts as multi fuel.

lleo19 commented 1 month ago

@MizterB perhaps this is clear to you, but the prep-cool and prep-heat are related to the ramp up/down feature of Carrier thermostats, which is to be at setpoint at the start of activity, instead of initiating the relevant HVAC activity at the set time. On the other hand, the "preheat" activity in HA entity definition is a state where a furnace has started a burning cycle, but the fan is not yet engaged or running very low speed in case of ECM motors, to avoid blowing cold air into rooms. There is no equivalent of "precool" as in cooling cycles air movement caused by blower is perceived positively, contrary in heating cycles.

Edit: I seem to recall that in the touch tstats the ramp up/down is called "Smart Recovery" and can be max 90 minutes long I do not remember if Carrier separately reports preheat, but I know that my furnace does it and is maybe a minute or two long before the fan comes on.

greggitter commented 1 month ago

@MizterB no problems with these changes that I can see. I only applied the changes to climate.py, const.py and added the couple logger updates in api.py...so if there are others that were made I didn't test them. Checking the commit dates, it looks like that is all of them. Hopefully this saved you some time and if you want any further testing before release, let me know.

sixdollarman2nd commented 1 month ago

Wanted to chime in that since switching to Infinitude Beyond (from the original Infinitude) that I started getting hundreds of warnings regarding the "None" entity associated with this integration. I'll note that my system also has a "dehumidifying" mode (as seen on the control panel) but it doesn't report that way in HA - I think it just says cooling whether it is dehumidfying or cooling. If there's some logging data you'd like me to capture to contribute to resolving this issue, let me know.

This error originated from a custom integration.

Logger: custom_components.infinitude_beyond.infinitude.api
Source: custom_components/infinitude_beyond/infinitude/api.py:620
integration: Infinitude Beyond (documentation)
First occurred: August 14, 2024 at 10:26:06 PM (960 occurrences)
Last logged: August 14, 2024 at 11:45:51 PM

'None' is an unknown HVACAction
greggitter commented 1 month ago

Wanted to chime in that since switching to Infinitude Beyond (from the original Infinitude) that I started getting hundreds of warnings regarding the "None" entity associated with this integration. I'll note that my system also has a "dehumidifying" mode (as seen on the control panel) but it doesn't report that way in HA - I think it just says cooling whether it is dehumidfying or cooling. If there's some logging data you'd like me to capture to contribute to resolving this issue, let me know.

This error originated from a custom integration.

Logger: custom_components.infinitude_beyond.infinitude.api
Source: custom_components/infinitude_beyond/infinitude/api.py:620
integration: Infinitude Beyond (documentation)
First occurred: August 14, 2024 at 10:26:06 PM (960 occurrences)
Last logged: August 14, 2024 at 11:45:51 PM

'None' is an unknown HVACAction

If you read the posts above I think you'll see that was discussed and there is a fix pending for the log errors but you can manually apply if you feel adventuresome. ;) I was able to in a couple minutes (using SSH)...fixes this issue you posted.

MizterB commented 1 month ago

Please re-test against 2024.8.0

sixdollarman2nd commented 1 month ago

Just updated to 2024.8.0 - nothing appears broken, will wait and see if actual issue is resolved.

sixdollarman2nd commented 4 weeks ago

OK, getting a new kind of error here after updating to 2024.8.0. Wondering if this needs to be a new issue or is related to this one? PS. "Scheduled" is spelled wrong. Not sure whose code is spelling that wrong...

This error originated from a custom integration.

Logger: custom_components.infinitude_beyond.infinitude.api
Source: custom_components/infinitude_beyond/infinitude/api.py:709
integration: Infinitude Beyond (documentation)
First occurred: 12:01:11 AM (8685 occurrences)
Last logged: 7:15:56 AM

'None' is an unknown Sechduled Activity
greggitter commented 4 weeks ago

OK, getting a new kind of error here after updating to 2024.8.0. Wondering if this needs to be a new issue or is related to this one? PS. "Scheduled" is spelled wrong. Not sure whose code is spelling that wrong...

This error originated from a custom integration.

Logger: custom_components.infinitude_beyond.infinitude.api
Source: custom_components/infinitude_beyond/infinitude/api.py:709
integration: Infinitude Beyond (documentation)
First occurred: 12:01:11 AM (8685 occurrences)
Last logged: 7:15:56 AM

'None' is an unknown Sechduled Activity

MizterB is probably going to ask more about this, since valid values are Home, Sleep, Wake, Away and Manual. What mode does your thermostat say it's using? Or your infinitude proxy screen? Do you have scheduled activities set up? Maybe no schedule?

sixdollarman2nd commented 4 weeks ago

@greggitter - I do not have any scheduled activities, I just have the thermostat set at "Home". Regarding the errors I referenced to earlier, the Thermostat was supposed to be in "Home" - I didn't change any thermostat settings. I don't have a schedule set either - it just maintains the same temperature 24/7. The only time it really changes is when we go on vacation, then I'll program a vacation in it.

sixdollarman2nd commented 4 weeks ago

@MizterB Let me know if there's something more specific you need to help debug this.

greggitter commented 4 weeks ago

@MizterB I too am getting the message (as reported above):

Logger: custom_components.infinitude_beyond.infinitude.api
Source: custom_components/infinitude_beyond/infinitude/api.py:727
integration: Infinitude Beyond ([documentation](https://github.com/MizterB/homeassistant-infinitude-beyond))
First occurred: August 20, 2024 at 11:59:43 PM (9595 occurrences)
Last logged: 7:59:19 AM
'None' is an unknown Sechduled Activity

I have a typical schedule and the first error was reported as below:

2024-08-20 23:59:43.838 WARNING (MainThread) [custom_components.infinitude_beyond.infinitude.api] 'None' is an unknown Sechduled Activity

At that time the system was already into the Sleep schedule which begins at 23:15. The last message was logged at 8:00 this morning when Wake is set to begin. So the full schedule is Wake: 8:00, Home: 9:30, Sleep: 23:15.

sixdollarman2nd commented 4 weeks ago

Revisiting this to expand on my earlier comments - I was mistaken about having only just "Home" for my schedule. I actually have two - "Home" and "Sleep". It looks like the warning messages about "None" being an unknown schedule activity are coinciding when my Thermostat switches from "Sleep" to "Home" based on the timestamps - my "Home" schedule starts at 7:15am.

I am wondering if it is a capitalization issue. My Infinitude proxy reports this as "home" (lowercase h) - sorry I haven't actually inspected any integration code to see if it is pre-processing the data from Infinitude before it is evaluated by the integration.

greggitter commented 4 weeks ago

@sixdollarman2nd I was wondering the same about a typo or case but in his definitions he does have all lower case. Really strange one...wish I knew python.

class Activity(Enum):
    """Activity names supported in the API."""

    HOME = "home"
    AWAY = "away"
    SLEEP = "sleep"
    WAKE = "wake"
    MANUAL = "manual"
sixdollarman2nd commented 4 weeks ago

Could there be an indeterminate "in-between" state when the thermostat switches from one schedule activity to the next, and Infinitude is temporarily reporting corrupted/garbled data until it's settled on the next activity/state? If so, that's a long time because I'm getting like several thousand warnings repeated until it quiets down. If the data is garbled, the Integration won't know what to do with it since it doesn't fit in any of the 5 states you've described in the previous post.

greggitter commented 4 weeks ago

Yeah not sure. I have nearly 10000 log messages and they start right at midnight, 45 minutes AFTER it switches to Sleep. But continues all night until the Wake schedule starts.

sixdollarman2nd commented 4 weeks ago

I took a quick peek at the Infinitude proxy code. There doesn't seem to be any other states that it can report so not sure why the Integration is encountering an unknown state/activity condition.

my $activities = { home=>'home', away=>'away', sleep=>'sleep', wake=>'wake', manual=>'manual' };
$setting->{activity} = $activities->{lc($c->req->param('activity'))} || 'home';
$zone->holdActivity([$setting->{activity}]);
greggitter commented 4 weeks ago

It looks like he has the default set to "None" and so...yeah no idea what it could be.

    @property
    def activity_scheduled(self) -> Activity | None:
        """Currently scheduled activity."""
        activity = next(
            (a for a in Activity if a.value == self._activity_scheduled), None
        )
        if activity is None:
            _LOGGER.warning(
                "'%s' is an unknown Sechduled Activity", self._activity_scheduled
            )
        return activity

It might be useful to screenshot the proxy while this error is occurring.

MizterB commented 4 weeks ago

Fixed. The code assumed that scheduled activities were always enabled, which is not necessarily true. In this case, None is an acceptable value, and should not require a warning. The log message is now only recorded at the debug level.

sixdollarman2nd commented 4 weeks ago

@MizterB Did you also fix the misspelling while you were at it? ;)

"'%s' is an unknown Sechduled Activity", self._activity_scheduled

PS. I wanted to express my appreciation for creating and curating this Integration. This integration, along with many others are what makes Home Assistant so powerful and useful for me.

sixdollarman2nd commented 4 weeks ago

Just updated to 2024.8.3 which contains the fix for this issue. Will let you know if this is fully resolved. So far, nothing broken after restarting HA.

greggitter commented 4 weeks ago

Looks good here, thanks @MizterB!

brettonw commented 3 weeks ago

looks good!

sixdollarman2nd commented 3 weeks ago

All good here too, no log errors or warnings pertaining to this integration for me (specifically for this issue) after updating to 2024.8.3.