Toon van Eneco custom component

A new day, a new error:

requests.exceptions.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:1769)

Toon is still updating though

This is a connection error. I have still to bump on the de authentication issue… Things still update happily. I think it will happen some time during the weekend though… I have never been excited to get de authenticated before :slight_smile: (well I have but that is another story.)

i have just registered to say thanks for the effort you guys putting into this component.

For me most parts are working fine except for the gas readings ( shows 0 ) at the moment. i didn’t spend time yet searching for errors.

Edit: i had to wait longer… Gas usage is visible now.

Thanks @smikje, I’m glad everything is working ok. It can take a bit of time for all the sensors to be updated. We are still working on that. I find that it sometimes helps to launch the Toon app on my phone.

Hey @costas, happy Monday! Did you run into the de-authentication yet? My log is full of errors, but HA is still updating. If our current version can run for days or perhaps even a week without crashing, perhaps we should just get it out there, don’t you think? We can debug faster if we have a larger group of users

Hey @krocat, happy Monday to you too! I have not bumped into any de authentication and it might just be that they are not doing any. Since this is a standard practice I was expecting that it is implemented but it seems that it is not. I will turn some logging from warning to debbuging and release a v1 some time during the day and let you know so we can go forward with releasing this. It has run for me without any issue, apart from some messages from the api and their load balancers and nothing else.

Thanks @smikje, much appreciated!

toonlib-1.0.0 is out. It is the version I have been testing all these days with some logging levels lowered to debug so we get less noise for stuff we can’t do anything about. I think we are good to go. It wouldn’t hurt if you tried it out for a day before we submit to mainline. I will update mine right now.

Thanks Costas, I will upgrade today and let it run for a while. Let’s see if we can submit by Wednesday

Yey! sounds great!

ToonHA 0.6 with toonlib 1.0.0 running smoothly on HA 0.44.1. No errors in the logs!

@costas what’s the refresh-rate on 1.0.0? Did you increase to 30 seconds like you said earlier?

BTW, it didn’t discover my smoke detectors, so a full sync of the json is still not guaranteed.

Instead of doing three calls per retrieval I scaled back to one and turned down the caching to 30 seconds. The api responds with much less errors if it is not hammered three times per call. That means that we may miss some values but having a lower caching takes care of that. For me it has worked really well so far. As for the initial setting up, I am putting on the table the double call to update upon instantiation of the object on the component. :slight_smile:

Which on second thought would not do anything since it would happen in the 30 seconds window of the caching so if it didn’t retrieve things on the first call we would just get stale data on the second one too… :frowning:

So the only thing we have is to force things on the configuration. well… whatever works…

Something to work on post-go-live of our component on HA I would say. Let’s run this for 24 hours to see if anything breaks and then announce to the world that we created something very nice :slight_smile:

Silence of the lamps on my logs and everything chirping happily away! I would say this looks good. Any negative feedback from anyone?

Hey Costas, why would we still see this? ToonHA is referencing cached data in the toonlib isn’t it:

2017-05-08 11:39:08 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.power_today is taking over 10 seconds

It is but when a value is accessed and the cache has been invalidated it needs to repopulate. So it does the network call and it cannot return the value unless the network call has completed because the update is not asynchronous. When the network returns even if it has failed you get a value from the saved state but it still needs to wait for the call to happen. Thus, sometimes we will get this message, but not much else…