Toon van Eneco custom component


#182

It’s because of an internal change in 0.59, if you update to the latest version on github it should work again (hopefully).


#183

Hello everybody and happy new year! I have just uploaded the new toonapilib that works with the official toon api. Uploaded version is 0.1.1 and code can be found at https://github.com/costastf/toonapilib.git .The usability is exactly the same as well as the api. The only thing changed from the previous library is the main object signature which now requires two more values, the consumer_key and the consumer_secret that one would get from registering on the official api.

So basically the only thing we need to do to have this thing working “properly” is update the component to handle those extra configuration values and update the components documentation to describe the process of registering on the api to actually get those values.

@boltgolt would you be up to picking this up? :heart_eyes::stuck_out_tongue_winking_eye:


#184

@boltgolt, if you are up to it, quick tip here. On the registration it is required to specify a callback url since it depends on Oath2. I have build the library to not actually need any callback so there is no need for a service listening so using a value of “http://127.0.0.1” is fine for that field. The library identifies the request to redirect and gets the challenge code from the request and completes the authentication. Also I am automagically updating the token whenever it expires every two hours so the usage is seamless and the library can be used in a service context. Thats it for now…


#185

Sure thing, i’ll update to toonapilib in the coming days and pull it in ToonHA. Is it a good idea to test that for a week or so and then merge it into the home assistant main repo?


#186

That’s what I had in mind actually. I haven’t really tested it as a service and honestly I am quite busy these days. You rock!


#187

Will this be implemented in the next release? if you need testers please let me know what we can do to help out.

Thanks!


#188

I have a working implementation, just waiting for a tiny bugfix and then I’ll merge on the main ToonHA repo. Early testers would be great, could i notify you when a version is ready for testing?


#189

Yes sure, please note that i am using the hass.io pi3 image.

But feel free to reach out to me if i can still assist.


#190

You can count me in too


#191

Version 1.0.0 of toonapilib is uploaded to pypi. @boltgolt you are up! :slight_smile:


#192

Let me know too :smile:


#193

@PostSven @kurniawan77 @mlowijs Thanks for letting me notify you to test the beta!

The new version of the component has been merged at https://github.com/krocat/ToonHA, it would be great if you could test its stability and open an issue on github if any errors show up. The new hass docs are also ready, and are available here. If you have any any issues with it or see a spelling error, let me know.


#194

Awesome! Will get to it this right after i finished something else.


#195

It is not working for me, I am receiving the following error:

b’{“fault”:{“faultstring”:“Invalid Authorization Code”,“detail”:{“errorcode”:“keymanagement.service.invalid_request-authorization_code_invalid”}}}'
NoneType: None

followed by:

Setup failed for toon: Component failed to initialize.

GitHub issue has been logged.


#196

Looks like that issue has been solved by @costas, thanks a lot!

Shall we let this running locally, and start merging it into the main hass repo if no issues have been reported by Monday the 22th?


#197

Good idea.

i was also hoping that the hot tap water sensor would be implemented too, i used to see that in Domoticz before i came to Home Assistant.

Do you think you can implement that too?


#198

I’m a bit hesitant to implement this as there’s no such thing as a “tap water sensor” in the API. I think @Bprevaes was correct:

However, this would mean we’d have to figure out if the toon wants to burn or not by looking at the target temperature. This would not be reliable at all of course


#199

The underlying library already exposes a burner_on Boolean on whether the burner is working or not.


#200

It does, but not why the burner is on. The burner_on property is already implemented as a binary sensor, it might be possible to make something that tries to guess why the burner is on with a template or script in home assistant.


#201

Ah, right, now I get it.