Hi,
I connected my Sonoff POWs R2 running official firmware with HA with help of https://github.com/peterbuga/HASS-sonoff-ewelink but I see that my sensor readings are updated only once per HA reboot (11:12 and 22:30).
Can I set some script to force refresh them for example every 30 seconds?
Those sensors look like they refresh. Do you see anything in the logs? Might have to go to info level…
if self.get_user_apikey() is None:
_LOGGER.error("Initial login failed, devices cannot be updated!")
return self._devices
# we are in the grace period, no updates to the devices
if self._skipped_login and self.is_grace_period():
_LOGGER.info("Grace period active")
return self._devices
There is a service call you can make to force an update. But it still requires the integration to honor the update time. This sonoff one looks like it has its own internal grace period timer thing so it probably won’t work.
I tried with SonoffLAN and it behaves exactly the same. Also manually triggering sensor update doesn’t help.
Don’t know where exactly is the issue (I suspect ewelink/sonoff servers) but I noticed that when I update devices by swiping down in ewelink it refreshes also sensors in HA.
Yes to both of them.
But I remember clearly when I bought first sonoff pows then powerd readings in app were instant, they were changing basically every second or two. Then after some firmware/app updates it became more and more slow.
Do You get instant readings in Your app? My power consumption changes now like once per 30-60 seconds and even for that I need swipe down few times to force refresh. This is the issue I believe.
In home assistant I see the values also changing but it seems slower as in the app. Stil there are irregular changes.Below a picture of my sonoff measuring the power consumption of the pump of my floor heating (only temporary for testing will use it late for automated wasmachine notification). When it is active I see some changes.Sometimes multiple changes per minute some times no changes for minutes.
The issue is that I don’t. So this is something between POW ↔ eWelink and not related to HA - this is why both plugins have same issues in my case.
May I know Your county? And do You have sonoff added via deviced id over cloud or via device key over LAN?
I just created fresh new account, unlinked one POW from original account and linked it there, currently testing but I don’t think it will help. I noticed tho that after unlinking and linking POW again I got new option in settings - Enable LAN. I checked other 6 POWs which were not touched yet and they did not have that option.
I just did the standard procedure for installing the ewelink app. I did not use the lan feature
Howerver it worked for me I decided yesterday to flash my sonoffs with tasmota to use MQTT. The updates are now with a 5min interval. Thats fine for me at the moment.
Yesterday I pulled device id’s from all my sonoff devices and added them to HA so now I have direct connection between sonoff and HA via LAN. Still lag. My final though is that sonoffs are falling in some kind of sleep mode from which they can be awaken only by refreshing via official app. Topic closed, I don’t think anything more can be done from user side at this point.
Just quick question - that 5 minutes refresh interval is a bit long for me. Did You set it or this is something user can’t adjust?
if you check documentation you have to create an automation to get data populated to the sensor…
I’m using SONOFF LAN 2.3.1, and still learning how to do…
from doc:
Sonoff Pow Power Consumption
For update power consumption of all your Pow devices you can call sonoff.update_consumption service.
The device attributes will display data for the last 100 days. The first element is today’s data. It’s up to you how often to call updates and what to do with this data later.
Remember, without calling the service, there will be no values. Use automation.