Page 3 of 15

Re: Error ToonThermostat

Posted: Sunday 17 February 2019 13:06
by Plantje
kevinvantuyl wrote: Sunday 17 February 2019 11:49 same here. i decided to switch from a normal (unrooted) Toon to a Rooted Toon. so much better... bye bye Eneco
How did this work out for you? Do you happen to know if there are some easy steps to follow? I should be able to figure it out based on what I can find online, but hey.... if there is an easy step-by-step-guide...

So, now you maintain the weekly program in Domoticz? And remotely you control the thermostat through Domoticz as well? No more monthly fee for Eneco?

I think it is rubbish anyway that Eneco says they cannot support you in estimating your usage compared to your monthly amount if you're not with Eneco. They have the data....should work the same!

Edit: And can you still maintain that program on the Toon itself?

Re: Error ToonThermostat

Posted: Sunday 17 February 2019 16:03
by darkrain
a3vd wrote: Sunday 17 February 2019 11:36 I think we need to update the source which you can find here :

https://github.com/domoticz/domoticz/bl ... mostat.cpp

https://github.com/domoticz/domoticz/bl ... ermostat.h

I have got the api working with source code from : https://toonapilib.readthedocs.io/en/latest/readme.html
Now i need some time to implement it in the source code. :shock:
Did you create your own app, with an API key en secret?
It would be inconvenient if every user has to do this themself, do you agree?
Wouldn't it be best if this was done for Domotiz by @Gizmocuz and that the app (Domoticz) was approved so only Toon username and password are required to make the oAuth connection?

Unfortunately I don't have the required (programming) skills to help get this in Domoticz...

Re: Error ToonThermostat

Posted: Sunday 17 February 2019 22:58
by astrapowerrr
So if I understand correctly.
API is in progress to get toon Fixed in Domoticz??

Re: Error ToonThermostat

Posted: Monday 18 February 2019 9:22
by a3vd
astrapowerrr wrote: Sunday 17 February 2019 22:58 So if I understand correctly.
API is in progress to get toon Fixed in Domoticz??
API is already available https://developer.toon.eu/ but needs to be implemented in domoticz, and indeed i think we all need a single api key :cry:

Re: Error ToonThermostat

Posted: Monday 18 February 2019 9:56
by astrapowerrr
a3vd wrote:
astrapowerrr wrote: Sunday 17 February 2019 22:58 So if I understand correctly.
API is in progress to get toon Fixed in Domoticz??
API is already available https://developer.toon.eu/ but needs to be implemented in domoticz, and indeed i think we all need a single api key :cry:
I’m not an expert in this but is this bad we need single api key?

And other domotica systems are working with this??


Verzonden vanaf mijn iPhone met Tapatalk

Re: Error ToonThermostat

Posted: Monday 18 February 2019 17:57
by darkrain
Another thing with the API I was thinking about (not sure how to solve this), the API needs a Callback URL so it can share the code needed to get a token after succefull oAuth connection. This means that this URL needs to be available on the internet (not everybody has inbound internet on their system I guess?) and the domoticz application needs to interpret this call to be able to get the token. So basically I think your domoticz now needs to be accesible via the internet, am I correct? (this is only one time, cause when you have a token you can renew this without entering the username and password again...).

Re: Error ToonThermostat

Posted: Monday 18 February 2019 19:32
by eenernl
But how is HomeAssistant doing the Auth part?
Can we use that knowledge to build this?

I’m thinking about switching to Nuon for the ThermoSmart Thermostat. The only thing I will miss are the energy readings. I don’t have a smart-meter. What are your meanings about the ThermoSmart?

Re: Error ToonThermostat

Posted: Monday 18 February 2019 19:34
by stephanvdplas
darkrain wrote: Monday 18 February 2019 17:57So basically I think your domoticz now needs to be accesible via the internet, am I correct?
I don't thinks so, because you can enter "localhost" or "127.0.0.1" as callback URL. I think it's only needed when creating apps that can be used to connect to multiple TOONs.

Re: Error ToonThermostat

Posted: Monday 18 February 2019 20:18
by darkrain
stephanvdplas wrote: Monday 18 February 2019 19:34
darkrain wrote: Monday 18 February 2019 17:57So basically I think your domoticz now needs to be accesible via the internet, am I correct?
I don't thinks so, because you can enter "localhost" or "127.0.0.1" as callback URL. I think it's only needed when creating apps that can be used to connect to multiple TOONs.
If that works, it's fine to do it this way.

Re: Error ToonThermostat

Posted: Tuesday 19 February 2019 9:40
by rene2716
maybe somebody has to kindly team with Franck Nijhof on the home assisent forum, seems they got it working in test over there

Re: Error ToonThermostat

Posted: Friday 22 February 2019 0:12
by waspy
Hello,

I think I have managed to get Toon working again by building a python plugin based on the toonapilib for python.
You should obtain a personal api key first, and install toonapilib on your device.

Check out https://github.com/JohnvandeVrugt/toonapilib4domoticz.
There you can find an installation guide as well.

It's probably far from perfect, but at least I'm able to log the temperatures and setpoints again.
Currently no support for smoke detectors and fibaro plugs. I do not own them, so it will be hard to test anyways.

I had some issues with the latest toonapilib, but v3.0.2 seems to be working quite well.

The plugin will automatically add devices. But if you are willing to hack the database, one can reuse the devices that were created by the native toon thermostat hardware to preserve history (log). Make sure to backup the db before hacking it ;)

Good luck!

Re: Error ToonThermostat

Posted: Friday 22 February 2019 6:41
by Pandabeer
Great job! Will try it directly this weekend!

Verstuurd vanaf mijn SM-G950F met Tapatalk


Re: Error ToonThermostat

Posted: Friday 22 February 2019 7:22
by astrapowerrr
Now it gets interesting !!


Verzonden vanaf mijn iPhone met Tapatalk

Re: Error ToonThermostat

Posted: Friday 22 February 2019 7:27
by dressie
Very nice! Will test it later today, but thanks for your work already!

Re: Error ToonThermostat

Posted: Friday 22 February 2019 9:38
by darkrain
I have installed the plugin and indeed with the latest (3.0.4) it is throwing an error.
With an older release it works fine.

Re: Error ToonThermostat

Posted: Friday 22 February 2019 9:56
by dressie
I get an error too with the latest version. Noob question, how do I install /get the 3.0.2 version?

Re: Error ToonThermostat

Posted: Friday 22 February 2019 10:53
by waspy
https://stackoverflow.com/questions/522 ... s-with-pip
So I guess 'pip3 install -I toonapilib==3.0.2' might do the trick?

Maybe you have to uninstall the previous library...
Good luck!

Re: Error ToonThermostat

Posted: Friday 22 February 2019 11:37
by dressie
waspy wrote: Friday 22 February 2019 10:53 https://stackoverflow.com/questions/522 ... s-with-pip
So I guess 'pip3 install -I toonapilib==3.0.2' might do the trick?

Maybe you have to uninstall the previous library...
Good luck!
I did install that version, thanks for that. But I get this in the logfiles:
Error: (ToonApiLib) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/toonapilib4domoticz/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2019-02-22 11:35:33.406 Error: (Toon) Module Import failed, exception: 'ImportError'
2019-02-22 11:35:33.406 Error: (Toon) Module Import failed: ' Name: toonapilib'
2019-02-22 11:35:33.406 Error: (Toon) Error Line details not available.

Re: Error ToonThermostat

Posted: Friday 22 February 2019 12:45
by tne7laa
Great job! Seems too simple...

Used also 'sudo pip3 install -I toonapilib==3.0.2'

Also first the ToonApiLib did not appear in the Hardware list.
After googling I needed to activate "Event Systeem (Lua/Blockly/Scripts)":
[Instellingen] - Tab [Overige] - [Event Systeem (Lua/Blockly/Scripts)] and select [Actief]. Restart.

Finally get installed the Python script in Domoticz but also get error messages:

Code: Select all

2019-02-22 12:30:08.944 Status: (Toon API) Started.
2019-02-22 12:30:09.106 Error: (ToonApiLib) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/toonapilib4domoticz/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2019-02-22 12:30:09.106 Error: (Toon API) Module Import failed, exception: 'ImportError'
2019-02-22 12:30:09.106 Error: (Toon API) Module Import failed: ' Name: toonapilib'
2019-02-22 12:30:09.106 Error: (Toon API) Error Line details not available.
2019-02-22 12:31:30.616 Error: Toon API hardware (13) thread seems to have ended unexpectedly
WishList:
- Also Fibaro Smart Plugs working
- HomeBridge working with Siri

Re: Error ToonThermostat

Posted: Friday 22 February 2019 14:22
by Ritchie
waspy wrote: Friday 22 February 2019 0:12 Hello,

I think I have managed to get Toon working again by building a python plugin based on the toonapilib for python.
You should obtain a personal api key first, and install toonapilib on your device.

Check out https://github.com/JohnvandeVrugt/toonapilib4domoticz.
There you can find an installation guide as well.

It's probably far from perfect, but at least I'm able to log the temperatures and setpoints again.
Currently no support for smoke detectors and fibaro plugs. I do not own them, so it will be hard to test anyways.

I had some issues with the latest toonapilib, but v3.0.2 seems to be working quite well.

The plugin will automatically add devices. But if you are willing to hack the database, one can reuse the devices that were created by the native toon thermostat hardware to preserve history (log). Make sure to backup the db before hacking it ;)

Good luck!
Nice one! Got it up and running again.
On the Fibaro plugs and smoke detectors, I will be able to test this, if you can let me know how.
Or, if needed, I am willing to provide a Fibaro plug for testing purposes.