Closed Addie363 closed 4 years ago
Did you update to the latest version of both the plugin and the library we use?
The authentication mechanism used by the API is changed quite a bit, therefore some changes are made to both the plugin and the library and you have to create an Access Token now to be able to connect.
Just did an new install, but i think there are no changes on de directorys. I can't even add the hardware anymore in the ToonApiLib4Domoticz type selection box. Is there a way to remove all off the installation and begin allover? I think there is no effect on the directorys on an the last install...
Closed the issue by mistake. is there a way to completely begin all over? I think nothing happens on the directorys. With the last install I blew it all for i can't see even the ToonApiLib4Domoticz type selection box.....
You can remove the plugin from "domoticz/plugins" then the plugin is gone.
For the toonapilib I would suggest to just run "sudo pip3 install toonapilib -U" on raspberry PI or "pip install toonapilib -U" when on Windows to make sure it is the latest version.
Then put back the folder for the plugin with the plugin.py and the devices folder inside it.
Then restart Domoticz and after that select the plugin again, fill in the Access Token you got from: "https://api.toon.eu/toonapi-accesstoken?tenant_id=eneco&client_id=
Good luck.
The Domoticz is running on a Pi. I get "Requirement already satisfied, skipping upgrade" on "sudo pip3 install toonapilib -U", so no changes are made on this setup. The only option i see is the old type "Toon Thermostat" but this one does not work since last februari. Tommorow I wil give it another try...
Did you get it to work?
Last evening I've removed the toonapilib4domoticz dir's and did a new install, and it works now. The devices are present now. I think the fault was that there were tree directories: toonapilib4domoticz, toonapilib4domoticz.old and a toonapilib4domoticz.old1. It is working now, but it less from stable. I have to restart the domoticz services frequently. When I stop the Toonadlib in hardware it is stable. I see no errors...
What did you configure as update rate? Mine is pretty stable at 2 minutes (this is perhaps already to much for the API) but in that case there is an error in the log. Did you btw turn debug logging on?
Update rate is on 2 munites and the debug is on true. There is logging, but the tab probleem is empty. Seems to crash before it can be logged?
Do you run the latest beta from Domoticz?
Yes, allways running latest Beta version. I think I,ve captured a error in the logging now! 2019-12-06 12:11:02.069 Error: (Toon) 'onCommand' failed 'AttributeError':''NoneType' object has no attribute 'on_command''. 2019-12-06 12:11:02.069 Error: (Toon) ----> Line 109 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py' 2019-12-06 12:11:02.069 Error: (Toon) ----> Line 69 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py'
In these lines in the script is the word "Hue" present. Are the the Philips Hue?
No that is not the Philips Hue as support for that is not yet added to the plugin, I do have a PR ready to add it, but the native Hue in Domoticz is way better ;)
Those errors mean most likely that there is something wrong with the Toon object, perhaps the Access Token is not correct and therefore the object is not created, search the log for "Could not create a toonapilib object" to see if that is the case.
I can't find the error "Could not create a toonapilib object", but with the ToonApiLib hardware disabled I get every minuut "Error: Switch command not send!, Hardware device disabled or not found!"
I've created a new acces token and created a new peace of hardware. Devices are created and show themselfs in the devices tab. See what it wil do...
fingers crossed.
No errors or crashes for an hour now.... I think that I am going to make as the sodemieter an image of the config as it is now!
It has take some time, but it's back again....
2019-12-06 17:17:52.647 (Toon) Update power/solar usage: 8125118;8062532;3182909;7343892;4330;0
2019-12-06 17:18:00.183 EventSystem: Event triggered: Toon nw_2
2019-12-06 17:18:00.279 (Toon) onCommand called for Unit 9: Parameter 'Off', Level: 0
2019-12-06 17:18:30.328 Error: (Toon) 'onCommand' failed 'JSONDecodeError'.
2019-12-06 17:18:30.328 Error: (Toon) ----> Line 109 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py'
2019-12-06 17:18:30.328 Error: (Toon) ----> Line 69 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py'
I don't have any more ideas. @JohnvandeVrugt do you perhaps know what is going on here?
Not running the latest beta. No issues here. Little bit short on free time to test with latest beta...
I'm restarting the service now for every 30 minutes. It starts without errors. See how long it lives... Tomorrow I will put the time-out on one hour. Looks like I'm the only one with this issue?
Running 4.10717 here without errors
Op vr 6 dec. 2019 18:53 schreef Addie363 notifications@github.com:
I'm restarting the service now for every 30 minutes. It starts without errors. See how long it lives... Tomorrow I will put the time out on one hour. Looks like I'm the only one with this issue?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JohnvandeVrugt/toonapilib4domoticz/issues/28?email_source=notifications&email_token=AJWNAS55DCVPWA5AID7GMQLQXKGQHA5CNFSM4JTWDGEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGE3OLQ#issuecomment-562673454, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWNAS5PT4DIPSJUNX57AR3QXKGQHANCNFSM4JTWDGEA .
V4.11551 running over an hour without any issues. Reverting to stable V4.10717 that runs just fine with this plugin for a long time running on Pi3.
I'm on V4.11553 and sometimes it lifes for 6 hours. How can i revert to, say V4.10717? Is it somewhere available?
The only way to do that is to start over and restore a backup from V4.10717 or earlier. Downgrading Domoticz is not supported and the developers always say one should not downgrade.
Maybe it have something tot do with the troubles, but since last update to V4.11554 there was no crash anymore. Also the logging is very clean...
Still had troubles till last monday. After a reset of the Toon it all works fine. No errors and all scripts are working. This was the solution to me... Thanks for support!
Since last week i see in the logging of Domoticz these errors and there are no commands send anymore to Toon: 2019-12-02 14:48:00.233 Error: (Toon) 'onCommand' failed 'AttributeError':''NoneType' object has no attribute 'on_command''. 2019-12-02 14:48:00.233 Error: (Toon) ----> Line 115 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py' 2019-12-02 14:48:00.233 Error: (Toon) ----> Line 72 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py'
What is wrong?