-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Tibber data unstable and possibly wrong #67
Comments
I've got the same issue too with a very similar setup: -HomeAssistant in a VM -AMSHAN v2023.6.0 Has been working for over a year with no issue before and I've only noticed the issue this last couple of weeks. The only difference I can think of would be a HA or Mosquitto update. Can confirm that the "fix" works for me too after physically disconnecting then reconnecting Tibber Pulse. However, it doesn't take a HA restart before it breaks again for me. It will work fine for the first 30 minutes or so (readings once per second as expected) but it will eventually break randomly and go into the "Unavailable" state, with the message: "This entity is no longer being provided by the amshan integration. If the entity is no longer in use, delete it in settings." Unfortunately this makes the integration unusable for me as I have to keep unplugging then replugging Tibber every half our or so. Edit: Also just to add, I can monitor the MQTT messages and they are definitely still being sent to my broker every second. |
I have just studied the MQTT message stream. Kaifa should send list 1 (short) every two second, and list 2 (long) every tenth second, and list 3 (long + aggregated) 10 second past each hour. Most common pattern repeated every 10 second is then list 2 followed by four list 1 messages. Every list message would normally result in a separate MQTT message, but the Pulse starts to bundle them up as a single crippled message every tenth second (list 2). The start of each message is the last part of a previous message. Similar every hour. Do other observe the same? I used this command to debug the MQTT message stream: Another way of watching the stream of messages can be found here: This change must be from a subtle change in messages from Kaifa that throws the Pulse into an invalid state. Maybe the Pulse needs a firmware upgrade to overcome this? This can probably be done be connecting the pulse with Tibber. I could look at making changes to have the integration skip the crippled start of the message, but some messages would then be lost and the integration would only update every tenth second (when Pulse sends bundled messages). |
Are you sure messages are published every 2nd sec and not every 10th sec? |
@grahamsanders, can you double check the frequency on your broker add-on? |
When I set the pulse up, I retained the firmware OTA url that came with it as stock, hoping that would help keep firmware updated, but maybe that doesn't work. I can try to set it up again with the Tibber app (tomorrow, travelling today).
every 10 seconds would still be acceptable to me, if that can work reliably. I'll let you know if connecting through Tibber changes anything, should probably do that first so you don't need to do anything unnecessary. |
Sorry, you're absolutely correct, the MQTT messages are every 10s when it's in it's failure state. When it's in it's working state though, it's every 2 seconds. I've attached a debug log of the last day of messages if it helps. I unplugged Tibber at the 2023-09-19 20:42:13.735 which is why it starts to work again. As for the Tibber firmware, I let the app configure it and update it last week after I saw this issue (so this issues exists for both old and new firmware). My original firmware was v1.1.10, and it's now v1.2.3. |
I use my meter readings mostly for hourly-resolution trends and automations so updates every 10 seconds would be perfectly acceptable for me too, especially considering I can't use the integration at all at the moment. It can always be reverted back again once Tibber or Kaifa fix the issue. And to update my previous comment, I've attached a new log which shows the meter going from working to broken just now at the 2023-09-19 20:56:28.405 timestamp (meaning it worked for only 15 minutes before breaking). |
Same thing happened to me as Tibber Pulse overnight (~30th of August) updated it's firmware to version 1.2.3. "Så her ser det ut som noe er endret, men de mener det kan være noe annet som er årsaken. Muligens AMSHAN ikke støtter denne "batchingen"?" AIDON |
Yeah, updating the firmware doesn't resolve anything for me either. I wonder what they mean when they say "batching". Do they mean that is sends snapshot values after 15 minutes? Sort of defeating the purpose of the device. Does anyone know if the firmware can be downgraded? |
Are you on 1.2.3 now, or is there a newer version? Mine was also stable for about year. |
1.2.3, yes. I've given up for now and went back to the Tibber integration in Home Assistant. It used to be a bit unstable but looks like it is working well again. |
I am experiencing the same, I was pointed to this thread from the norwegian discussion here. Would it be possible to decode the new batched messages from the Tibber Pulse? I have two AMS devices, and two Tibber Pulse's and the first one has worked without problems for a few years now, but the second one is probably of newer firmware or got updated, and started to behave strangely in August this year. I have already bought a new Tibber Pulse, but realize that it probably won't solve my problem if it is already on version 1.2.3. So, I'd be happy to provide any information needed in order to decode the new messages. Please let me know. |
I just bought a Tibber Pulse and have a Kaifa meter. Quickly got the same issue as described here. I found an ugly workaround by assuming meter messages have fixed offsets in this new bundled message. I pushed my workaround here: https://github.com/ronped/amshan-homeassistant/tree/tibber-pulse-workaround. What would be better would be to get Tibber to disclose the specifics on how they do the bundling, but I assume that would be something for @toreamun to try to find out in order to implement a proper fix. |
I just noticed something interesting. When opening the Tibber app, their backend will send a message to the Tibber Pulse, deactivating the batching for 15 minutes. I have now a workaround running which sends this message to the Tibber Pulse receive topic every 15 minutes. Seems to be working flawlessly. Better than sending a reboot command every 15 minutes. |
Why on earth did Tibber make this change? Is it simply to give users real time view of consumption when actually opening the app, and lowering the overall amount of data traffic when no one is looking? |
Probably to reduce cost. They pay AWS based on traffic on their MQTT broker. |
Sending {
"batching": "disabled",
"timeout": 3600
} Added the following automation to send the message every 30min. alias: Tibber-fix
description: Disable Batching
trigger:
- platform: time_pattern
minutes: /30
condition: []
action:
- service: mqtt.publish
data:
topic: pulse/subscribe
payload: batching_disable true
mode: single |
@Danielhiversen @maggud @finnmich @flygare @yasasKahawala found you on Tibber's org page |
I seems it might be possible to send
Too soon to tell if it lasts, but it's been working longer than the |
It's been 7d. Did it work as a long term solution? And does it survive reboots? |
Yeah, I also tried that. It eventually reverted back to the batching, but it took a while. |
I believe it reverted back after a few days after which I had to send the command again. I got so annoyed with this so I replaced my Tibber Pulse for an AMSreader Pow-P1. It doesn't require the AMSHan-HA integration (so it becomes a little OT), but I am worried about the Tibber Pulse being degraded over time with destructive software/firware patches and API restrictions, and don't want to "play that game" any longer. Also note that I am not a paying Tibber customer, I just liked their hardware. Initially. |
I've been using the amshan integration for well over a year, and its been mostly a great experience. But something changed within the last month or so (due to lower electricity prices overall this summer, I didn't pay much attention to it initially).
My setup
-HomeAssistant in a VM on Proxmox, with amshan 2023.6.0
-Mosquitto MQTT server running as a docker container on a separate system
-Tibber Pulse publishing locally to mqtt
-Kaifa MA304H3E meter
As mentioned, this has been working well until sometime within the last month or so.
Sensor unavailable after restarting HA
Restarting HA i.e. after an update will reliably cause the sensor to become unavailable ("This entity is no longer being provided by the amshan integration. If the entity is no longer in use, delete it in settings.")
Restarting the mosquitto container makes no difference. Neither does it help to remove the amshan integration and re-add it; when selecting MQTT during setup and adding "pulse/publish" as topic it results in a timeout.
I can verify that Tibber Pulse is still publishing to the MQTT server when this is happening by connecting with MQTT Explorer, or by listening to "pulse/publish" from the MQTT integration in /config/integrations/integration/mqtt
The only way to "fix" the problem is by physically disconnecting the ethernet cable from Tibber Pulse, wait for a little while until it shuts off and then reconnecting. AmsHan integration will then pick up the MQTT-messages again, and the integration works until the next time HA is restarted.
This leads me to believe there must be some sort of message/data being transmitted when tibber pulse starts up and connects to the MQTT-server that allows AmsHan to find it (?). Makes little sense to me. I've been wondering if issue 66 was related, but the issue was closed again without further details.
Tibber Pulse data update frequency is too low
While AmsHan now "works", there is something wrong with the data being recieved
Look at the curve:
![image](https://private-user-images.githubusercontent.com/35780347/266994361-182f41db-0137-4ed6-bec5-c17f18234f08.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MzY0MjksIm5iZiI6MTczOTQzNjEyOSwicGF0aCI6Ii8zNTc4MDM0Ny8yNjY5OTQzNjEtMTgyZjQxZGItMDEzNy00ZWQ2LWJlYzUtYzE3ZjE4MjM0ZjA4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDA4NDIwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRiNDJjMTM4ZWNjYmNkMTA3ZWEwMWFjYTY5NDg2OTliZmY5MTBkMzQ4NDgyYjA2N2U1Njg2MzY5YmEwZGE4ZTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.YxJd_xdWYipJKLBC5bIdKMLgV92MmXH6bDXOFAOdjrY)
There are several minutes, up to an hour, between updated readings. The sensors doesn't seem to pick up on continuous readings, but almost appears to display "snapshot" values over time. Again, I can see in MQTT Explorer that Tibber Pulse reliably publishes messages every few seconds, but they are not displayed by AmsHan.
Consequently, the Riemann sum integral sensor I have set up to convert watts to kilowatts and feed into the Energy dashboard is incorrect too, the kwh values per hour are all over the place.
The text was updated successfully, but these errors were encountered: