I dont understand this behavior at all. I am not giving back any power, nor is it configured to do so.
But, maybe thats just HA compensating for the weird numbers the srp integration is giving
-11.4 kWh - +6.6 kWh = -4.8 kWh
I dont understand this behavior at all. I am not giving back any power, nor is it configured to do so.
But, maybe thats just HA compensating for the weird numbers the srp integration is giving
-11.4 kWh - +6.6 kWh = -4.8 kWh
template:
- sensor:
- name: SRP Main Energy
device_class: energy
state_class: total_increasing
unit_of_measurement: kWh
state: "{{ states('sensor.srp_energy') }}"
Thats it.
One thing I noticed though.
Meter gets read a day late. So yeahβ¦
anyone having anymore luck with this SRP Integration? Its almost completely useless in its current state. I wanted to install CT clamps and just ignore this SRP Integration but due to the way the breaker panel is i cannot do that either.
I parked the issue last year when I ran into trouble with crashes due to swap memory size. Will have a look at this again. Did anyone ever reachout to the code owner?
i cant even figure out how to find the energy section to edit anything now., WTF/
Lol. they put it in dashboards⦠what in the�
I swear I am baffled constantly by the main people in charge. 3 years ive been at this. and im pretty active here on the forums, as far as reading goes:
still cant even keep up with all the little changes they make. I read every release notes, and usually even instal the beta on my main instance.
little changes like this drives me insane. ugh.
like the fan speed names fiasco I pretty much gave up on the energy stuff too. 2 steps forward, 10 back,.
started looking into operation, was suprised to see that it runs every 1440 seconds, or 24 minutes, since the data only changes 1 per day. I modified sensor.py module to print out the intermediate values, on first run it captured. next step is to see what shows up when the update does not work.
2022-03-06 08:41:03 DEBUG (MainThread) [homeassistant.components.srp_energy.sensor]
start:2022-03-05 08:41:02.093142
end:2022-03-06 08:41:02.093173
tou: False hour:[
(β03/05/2022β, β00:00 AMβ, β2022-03-05T00:00:00β, 0.2, 0.05),
(β03/05/2022β, β01:00 AMβ, β2022-03-05T01:00:00β, 0.3, 0.05),
(β03/05/2022β, β02:00 AMβ, β2022-03-05T02:00:00β, 0.2, 0.04),
(β03/05/2022β, β03:00 AMβ, β2022-03-05T03:00:00β, 0.3, 0.05),
(β03/05/2022β, β04:00 AMβ, β2022-03-05T04:00:00β, 0.2, 0.05),
(β03/05/2022β, β05:00 AMβ, β2022-03-05T05:00:00β, 0.3, 0.05),
(β03/05/2022β, β06:00 AMβ, β2022-03-05T06:00:00β, 0.3, 0.05),
(β03/05/2022β, β07:00 AMβ, β2022-03-05T07:00:00β, 1.7, 0.19),
(β03/05/2022β, β08:00 AMβ, β2022-03-05T08:00:00β, 4.3, 0.41),
(β03/05/2022β, β09:00 AMβ, β2022-03-05T09:00:00β, 1.4, 0.16),
(β03/05/2022β, β10:00 AMβ, β2022-03-05T10:00:00β, 3.3, 0.33),
(β03/05/2022β, β11:00 AMβ, β2022-03-05T11:00:00β, 1.5, 0.17),
(β03/05/2022β, β12:00 PMβ, β2022-03-05T12:00:00β, 2.5, 0.25),
(β03/05/2022β, β13:00 PMβ, β2022-03-05T13:00:00β, 0.8, 0.1),
(β03/05/2022β, β14:00 PMβ, β2022-03-05T14:00:00β, 0.8, 0.1),
(β03/05/2022β, β15:00 PMβ, β2022-03-05T15:00:00β, 1.6, 0.17),
(β03/05/2022β, β16:00 PMβ, β2022-03-05T16:00:00β, 2.3, 0.24),
(β03/05/2022β, β17:00 PMβ, β2022-03-05T17:00:00β, 1.3, 0.14),
(β03/05/2022β, β18:00 PMβ, β2022-03-05T18:00:00β, 0.9, 0.11),
(β03/05/2022β, β19:00 PMβ, β2022-03-05T19:00:00β, 1.9, 0.2),
(β03/05/2022β, β20:00 PMβ, β2022-03-05T20:00:00β, 2.3, 0.24),
(β03/05/2022β, β21:00 PMβ, β2022-03-05T21:00:00β, 0.6, 0.08),
(β03/05/2022β, β22:00 PMβ, β2022-03-05T22:00:00β, 0.4, 0.07),
(β03/05/2022β, β23:00 PMβ, β2022-03-05T23:00:00β, 0.4, 0.06)] |29.8
2022-03-06 08:41:03 DEBUG (MainThread) [homeassistant.components.srp_energy.sensor] SRP hourly data (2022-03-05T23:00:00) for 0.4, 0.06 daily_usage 29.8
2022-03-06 08:41:03 DEBUG (MainThread) [homeassistant.components.srp_energy.sensor] Finished fetching sensor data in 1.414 seconds (success: True)
The api is returning the correct data on every call, however it only updates on the first call after a boot. The data is not stable for the first few hours in the morning, I suspect SRP is adjusting the last hour reading to balance the daily meter reading. Thus the reading should be delayed until after 7:00 am
I also think that the sensor setup is problematic as it is not a total increasing value, instead it would be better represented as a measurement of the daily kwh or kwh/day.
I will try changing it to a different sensor type to see if the updates are captured.
I documented the current behaviour and raised an issue SRP energy integration does not update on new data ;
in playing around with the code I got things to work and I changed it to produce the accumulated total up to the current hour.
let me know if you would prefer to see the data presented this way instead of a daily total.
That is super cool.
have these recent changes made it into HACS?
I have been interested in this for a while, but read there were issues so I was waiting to see if they would get resolved.
This was just something I tried while troubleshooting the integration. Currently waiting on the code owner to have a look at the problem. I will put it in as a feature request once we get reliable daily updates working again.
I actually raised this issue something like 2 years ago when it first came out. My issue was closed without being solved. I just saw your issue on github @richardcalgary403. I am going to go ask that someone look at this as well.
Does your solution work reasonably well? Can we consider sharing that as a fork? Might be better to just fix it in house than to wait on them.
Unfortunately I donβt understand what was actually broken in the code, I just poked/stuck in a couple of things that seemed to be missing so I would not be happy making this a fork. If you want to use it as a custom component or have a look at the code I would be willing to share it with you.
@richardcalgary403, I would like to take a look at what you have done and play around with it to add more functions. Thx
Went through and it looks like the change to make it work was to set self._state = self.coordinator.data under the native method. Likely a better way however will post the code under the issue at https://github.com/home-assistant/core/issues/69431
Anybody got this to work? It never show values hourly only the total for the whole day, and only when I restart HA then it get the data. I had the latest HA 2023.3.1 and itβs still has the same issue. Thanks!
the daily reading generally works now, hourly data is still a future feature, however the code is acutally quite simple if you want to customize it for yourself. it is documented above.