Toon van Eneco custom component


Sorry there is bit miscommunication right now :slight_smile:

It was working until somewhere last week, don’t know why it’s stopped working but somehow it has to with the update from Eneco, beceause I even can’t change the temperature with the Toon app.
I will check that later on today when I’m back home.


Thanks all for the quick answers!

I managed it to install the latest Toon updates on Home Assistant but as already explained below there are some issues with my Toon, I even can’t change the temperature while using the Toon app.

(Sorry there is bit miscommunication right now :slight_smile:

It was working until somewhere last week, don’t know why it’s stopped working but somehow it has to with the update from Eneco, beceause I even can’t change the temperature with the Toon app.
I will check that later on today when I’m back home.)


Could you try rebooting your Toon if you’re able to? (It’s under the litle “update” button at the top) I just rebooted mine and that solved the issue.


It’s working now, I had some issues with the app. I solved it with log-out from the app and login again.
Thanks for your feedback!


Hi everybody! I little food for thought on this. Eneco pushes updates on the toon. Those could come in silently if your settings allow it. In that case you could experience unresponsiveness from the app and freezing on the api and hence the library until the toon is restarted and the app is logged out and logged in again. Also keep in mind that the api is very very flacky so if you are experiencing timeouts please restart your HA instance.


Hi Costas,

That does not appear to work well. I restarted my Toon this morning and got some working output from it for “exactly” 2 hours (I ditch the information to influxdb and graph them via grafana).
After that it stopped working again. Restarting HA does not change anything.

Could it be that the interval from which we fetch data is too frequent?

Eneco seemed to made it entirely unusable. I am a paying customer, should I start poking them?



I’m having the same issues as well. We’re currently running tests trying to figure out what works best, but so far they don’t look great. I wouldn’t contact eneco about this because it’s an use of their API they do not support. We might be able to do something with them if we can replicate the behaviour in their own app, but let’s try to fix it ourselfs first.


I noticed on github indeed :slight_smile: let me know if I Can help test something etc…

Cheers & keep up the good work, it’s much appreciated on my end at least :slight_smile:


Hi @remkolodder , as @boltgolt said our use of the api is not sanctioned and that is why we are trying to not load their systems as much as possible. What I see from the provided data is that there is no consistency on the failing of the api so it is definitely not a system enforced issue like rate limiting or something like that. Although I see oauth mentioned in their app I do not think that it is currently used at least for the api part. I think that doing a re authentication once every 2 to 10 hours is more than acceptable. My worry was that we would end up in re authentication loops burdening their systems but that does not seem to be the case. What does seems to be the case is that their backend stalls on the api, unknown as to why (could be a bug in their handling sessions, load or any other reason), but a re authentication creating a new session seems to refresh things. So i will implement the proposed re authentication on timeout and set the timeout to 9 secs so HA does not nag us. Everybody on board with this?


Actually i jumped the gun and pushed the workaround, created a new toonlib version and updated ToonHA component to use that. So if you could just update your components and restart and provide feedback on how it performs here, it would be great. Please everyone, if you see any weird behavior like authentication loops report it here immediately mentioning me. Thanks everyone!


Testing it now! Keep you posted.

Thank you for the work !


Yeah, looking at the latest data it’s very clear there is no real pattern here so this is probably the right way to do it. I’ll experiment with a cache of 1 minute now to look if there are any gains to make there.


@boltgolt I do not expect you to see anything different by extending your caching but I am interested in the outcome so please share. If I had to guess I would say that all this is probably due to a badly designed scalable system where the load balancer misses sessions when the system gets expanded elastically. Keep in mind that this whole thing runs on AWS and we already have had some issues with certificates and ssl sessions mismatch.


Testing so far reveals several timeouts (which was expected and resolved with the new code) and fluctuating power usage and as it seems updated gas usage (the gas stuff is not running, but it is different then yesterday and more as I would expect from the morning usage). So that is at least an improvement :slight_smile:


Sorry, I don’t clearly understand.
a) do you have timeout messages on HA console? If you do, then we should probably lower the timeout to something smaller than 9 seconds.
b) what does fluctuating power usage mean according to you?
c) What does updated gas usage while gas stuff not running mean?


Hi Costas,

a) The log mentions that there was a timeout and that the software was relogging-in. Which is what was added right?
b) Before this, the power usage was “stuck” on like 300W, now it is properly changing with the actual use (fluctuating)
c) Yesterday the gas usage was also stuck on the same amount (0.5m3 I believe), that was updated now to a value that I would expect after the family showering this morning. So it takes the new values (where it did not update / change them before the changes).

So all in all I think that everything is updated fine with that?


Yes, thanks for the clarifications. So the timeout message you mention comes from the library and is not the HA message of “something takes longer than 10 seconds to update”. if that is the case then that is the expected behavior and we are happy :slight_smile:


Following comments from @boltgolt (thanks!) I implemented logging out before re logging in on time out to clear out the stale session (hopefully.) I updated ToonHA to use 1.1.2 of toonlib. Please everybody, use that and provide feedback.


After a month of fixing issues and comments toon has been merged into the main repo. This means an older version of ToonHA will be available in home assistant by default from version 0.56🎉

I propose we finish testing and tweaking toonlib, and then merge the most stable version into home assistant. @costas I’ll modify the changes I made for the merge to fit the current state of ToonHA and put them in a new branch, we’ll discuss it in the MR afterwards.


Just migrated it…