Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time zone issue - Inverter last reported time #94

Open
rct opened this issue May 25, 2022 · 0 comments
Open

Time zone issue - Inverter last reported time #94

rct opened this issue May 25, 2022 · 0 comments

Comments

@rct
Copy link

rct commented May 25, 2022

Description

Time zone isn't being set correctly on the last reported time for microinverters. The last updated time shown in Home Assistant is always 4 hours ago. My current offset from UTC is -4 hours due to daylight savings time.

The datetime/ISO string as seen by Home Assistant stores is incorrect 2022-05-25 10:55:00+00:00 The date/time in the string looks like it has the correct local time, but that's actually wrong because the time zone component is "00:00" so no offset from UTC. So when that datetime gets localized it shows as 4 hours earlier 06:51.

Since these sensors are disabled by default, most people probably don't notice.

I'm not sure whether the problem is in envoy_reader or the Home Assistant integration. http://envoy.local/api/v1/production/inverters shows the last report date in epoch seconds. So the problem is likely the place that is turned into a datetime or ISO 8601 string.

Expected Behavior

The datetime/time stamp seen in Home Assistant should reflect a somewhat recent (within 5-15 minute) time when the inverters are producing power.

Reproduction

  1. Enable one or more of the disabled inverter last update time sensors.
  2. Check the reasonableness of the timestamp when the inverters are producing power.

Environment

Any additional information about your environment

Home Assistant 2022.05.05 with default/released version of envoy reader.

Additional discussion

The inverter last report time is potentially useful for detecting problems with individual inverters and/or the PLC network.

Related to the Home Assistant integration:

Currently this is implemented as a separate entity/sensor. It might be more efficient if this was included as an attribute of each inverter rather than a separate entity. As two separate entities, I think this will generate two separate state update rows in Home Assistant recorder database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant