Page 5 of 15

Re: Error ToonThermostat

Posted: Saturday 23 February 2019 0:00
by dressie
So if I understand correctly, this only work in the last beta? So no point trying to get it up and running in stable?

Re: Error ToonThermostat

Posted: Saturday 23 February 2019 0:03
by waspy
Well, I have not tested it with the latest stable, but I was able to make it work using a symbolic link like I explained in my previous posts.

Re: Error ToonThermostat

Posted: Saturday 23 February 2019 0:05
by dressie
waspy wrote: Saturday 23 February 2019 0:03 Well, I have not tested it with the latest stable, but I was able to make it work using a symbolic link like I explained in my previous posts.
I used that trick, but it didn't take. Second PI with Beta works now.

Re: Error ToonThermostat

Posted: Saturday 23 February 2019 4:26
by rinyheuvelman
Although I thought the installation guide is pretty straight forward, it turned out it wasn't as I thought it would be..?
Followed the directions, But Log shows:
2019-02-23 04:10:23.669 Status: (Toon) Entering work loop.
2019-02-23 04:10:23.670 Status: (Toon) Initialized version 1.0.0, author 'John van de Vrugt'

followed by:
2019-02-23 04:22:26.420 Error: (Toon) 'onHeartbeat' failed 'KeyError'.
2019-02-23 04:22:26.420 Error: (Toon) ----> Line 169 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py', function onHeartbeat
2019-02-23 04:22:26.420 Error: (Toon) ----> Line 94 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py', function onHeartbeat
2019-02-23 04:22:26.420 Error: (Toon) ----> Line 101 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py', function UpdateDevices

No devices added at all...?

Must be missing something, as others mentioned maybe a more step-by-step noob friendly install guide..?

Re: Error ToonThermostat

Posted: Saturday 23 February 2019 10:15
by Attie
After updating to the latest Beta I've got rit of the "failed to load 'plugin.py'" error and became a lot further.
Here is the log:

2019-02-23 10:02:49.316 Status: (Toon) Started.
2019-02-23 10:02:51.314 Status: (Toon) Entering work loop.
2019-02-23 10:02:51.315 Status: (Toon) Initialized version 1.0.0, author 'John van de Vrugt'
2019-02-23 10:02:51.519 Error: (Toon) 'onStart' failed 'NameError'.
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 141 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py', function onStart
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 35 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py', function onStart
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 101 in '/usr/local/lib/python3.5/dist-packages/toonapilib/toonapilib.py', function __init__
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 145 in '/usr/local/lib/python3.5/dist-packages/toonapilib/toonapilib.py', function _authenticate
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 122 in '/usr/local/lib/python3.5/dist-packages/toonapilib/toonapilib.py', function _get_challenge_code
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 258 in '/usr/local/lib/python3.5/dist-packages/toonapilib/toonapilib.py', function _patched_request
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 892 in '/usr/local/lib/python3.5/dist-packages/requests/models.py', function json
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 516 in '/usr/lib/python3/dist-packages/simplejson/__init__.py', function loads
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 374 in '/usr/lib/python3/dist-packages/simplejson/decoder.py', function decode
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 404 in '/usr/lib/python3/dist-packages/simplejson/decoder.py', function raw_decode
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 33 in '/usr/lib/python3/dist-packages/simplejson/scanner.py', function __init__

No devices found ...


UPDATE!!!
I saw there is a update on de plugin.py and I uploaded to the dir and now it works!
I see the toon devices in the list. Good work!

Re: Error ToonThermostat

Posted: Saturday 23 February 2019 10:41
by waspy
rinyheuvelman wrote: Saturday 23 February 2019 4:26 2019-02-23 04:10:23.669 Status: (Toon) Entering work loop.
2019-02-23 04:10:23.670 Status: (Toon) Initialized version 1.0.0, author 'John van de Vrugt'

followed by:
2019-02-23 04:22:26.420 Error: (Toon) 'onHeartbeat' failed 'KeyError'.
2019-02-23 04:22:26.420 Error: (Toon) ----> Line 169 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py', function onHeartbeat
2019-02-23 04:22:26.420 Error: (Toon) ----> Line 94 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py', function onHeartbeat
2019-02-23 04:22:26.420 Error: (Toon) ----> Line 101 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py', function UpdateDevices

No devices added at all...?
Riny,

Did you use an unique hardware name?

On start the plugin reads the number of devices that belong to the hardware.
If none, it will add all the devices that belong to the hardware/plugin.
Else it starts updating its devices.
From your log file I think that it somehow detects devices, but then during update it is missing devices that should have been created earlier.

My advise: a clean start

1. Delete the plugin in the hardware page.
2. Stop the domoticz service (sudo service domoticz stop).
3. Remove the plugin from the domoticz plugin folder, e.g. cd /home/pi/dev-domoticz/plugins/; sudo rm -rf toonapilib4domoticz.
4. Double check if you removed the toonapilib4domoticz plugin.
5. clone the toonapilib from git again. (I just updated the script) cd /home/pi/dev-domoticz/plugins; git clone https://github.com/JohnvandeVrugt/toona ... moticz.git
6. Restart the domoticz service
7. Select the toonapilib hardware.
8. Use an unique hardware name.
9. Double check your credentials.
10. Press Add/Toevoegen

Check the log for errors / check if any devices are created.
Just followed the steps myself without any issues.

Good luck!

Re: Error ToonThermostat

Posted: Saturday 23 February 2019 10:47
by waspy
Attie wrote: Saturday 23 February 2019 10:15 After updating to the latest Beta I've got rit of the "failed to load 'plugin.py'" error and became a lot further.
Here is the log:

2019-02-23 10:02:49.316 Status: (Toon) Started.
2019-02-23 10:02:51.314 Status: (Toon) Entering work loop.
2019-02-23 10:02:51.315 Status: (Toon) Initialized version 1.0.0, author 'John van de Vrugt'
2019-02-23 10:02:51.519 Error: (Toon) 'onStart' failed 'NameError'.
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 141 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py', function onStart
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 35 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py', function onStart
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 101 in '/usr/local/lib/python3.5/dist-packages/toonapilib/toonapilib.py', function __init__
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 145 in '/usr/local/lib/python3.5/dist-packages/toonapilib/toonapilib.py', function _authenticate
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 122 in '/usr/local/lib/python3.5/dist-packages/toonapilib/toonapilib.py', function _get_challenge_code
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 258 in '/usr/local/lib/python3.5/dist-packages/toonapilib/toonapilib.py', function _patched_request
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 892 in '/usr/local/lib/python3.5/dist-packages/requests/models.py', function json
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 516 in '/usr/lib/python3/dist-packages/simplejson/__init__.py', function loads
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 374 in '/usr/lib/python3/dist-packages/simplejson/decoder.py', function decode
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 404 in '/usr/lib/python3/dist-packages/simplejson/decoder.py', function raw_decode
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 33 in '/usr/lib/python3/dist-packages/simplejson/scanner.py', function __init__

No devices found ...
Attie,
I think the plugin is not able to create the Toon object of the toonapilib.
Please double check your credentials. (user name, pass, api keys)

Re: Error ToonThermostat

Posted: Saturday 23 February 2019 11:16
by Attie
waspy wrote: Saturday 23 February 2019 10:47
Attie wrote: Saturday 23 February 2019 10:15 After updating to the latest Beta I've got rit of the "failed to load 'plugin.py'" error and became a lot further.
Here is the log:

2019-02-23 10:02:49.316 Status: (Toon) Started.
2019-02-23 10:02:51.314 Status: (Toon) Entering work loop.
2019-02-23 10:02:51.315 Status: (Toon) Initialized version 1.0.0, author 'John van de Vrugt'
2019-02-23 10:02:51.519 Error: (Toon) 'onStart' failed 'NameError'.
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 141 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py', function onStart
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 35 in '/home/pi/domoticz/plugins/toonapilib4domoticz/plugin.py', function onStart
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 101 in '/usr/local/lib/python3.5/dist-packages/toonapilib/toonapilib.py', function __init__
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 145 in '/usr/local/lib/python3.5/dist-packages/toonapilib/toonapilib.py', function _authenticate
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 122 in '/usr/local/lib/python3.5/dist-packages/toonapilib/toonapilib.py', function _get_challenge_code
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 258 in '/usr/local/lib/python3.5/dist-packages/toonapilib/toonapilib.py', function _patched_request
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 892 in '/usr/local/lib/python3.5/dist-packages/requests/models.py', function json
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 516 in '/usr/lib/python3/dist-packages/simplejson/__init__.py', function loads
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 374 in '/usr/lib/python3/dist-packages/simplejson/decoder.py', function decode
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 404 in '/usr/lib/python3/dist-packages/simplejson/decoder.py', function raw_decode
2019-02-23 10:02:51.519 Error: (Toon) ----> Line 33 in '/usr/lib/python3/dist-packages/simplejson/scanner.py', function __init__

No devices found ...
Attie,
I think the plugin is not able to create the Toon object of the toonapilib.
Please double check your credentials. (user name, pass, api keys)

I was using an older version of the plugin.py from last evening. I saw there was an update this morning and with this version I have no errors and the devices are listed. Updated the post above....

Re: Error ToonThermostat

Posted: Saturday 23 February 2019 11:17
by eenernl
My domoticz crashes when plug-in is installed. There is a script working too long... when I remove the “plugin.py” it’s working again...

I installed python3
Then I installed toonapilib
Placed plugin.py in the pluginsfolder
Added hardware

I have a raspberry pi B+
Installed latest beta 4.10447

Re: Error ToonThermostat

Posted: Saturday 23 February 2019 11:24
by darkrain
eenernl wrote: Saturday 23 February 2019 11:17 My domoticz crashes when plug-in is installed. There is a script working too long... when I remove the “plugin.py” it’s working again...

I installed python3
Then I installed toonapilib
Placed plugin.py in the pluginsfolder
Added hardware

I have a raspberry pi B+
Installed latest beta 4.10447
did you make a folder inside the pluginsfolder?

You have to make a subfolder and place the script "plugin.py" inside that folder.

Re: Error ToonThermostat

Posted: Saturday 23 February 2019 12:02
by eenernl
darkrain wrote: Saturday 23 February 2019 11:24
eenernl wrote: Saturday 23 February 2019 11:17 My domoticz crashes when plug-in is installed. There is a script working too long... when I remove the “plugin.py” it’s working again...

I installed python3
Then I installed toonapilib
Placed plugin.py in the pluginsfolder
Added hardware

I have a raspberry pi B+
Installed latest beta 4.10447
did you make a folder inside the pluginsfolder?

You have to make a subfolder and place the script "plugin.py" inside that folder.
Yes, I made the subfolder.

Re: Error ToonThermostat

Posted: Saturday 23 February 2019 12:07
by dressie
eenernl wrote: Saturday 23 February 2019 11:17 My domoticz crashes when plug-in is installed. There is a script working too long... when I remove the “plugin.py” it’s working again...

I installed python3
Then I installed toonapilib
Placed plugin.py in the pluginsfolder
Added hardware

I have a raspberry pi B+
Installed latest beta 4.10447
Did you get this version:
pip3 install -I toonapilib==3.0.2

Re: Error ToonThermostat

Posted: Saturday 23 February 2019 12:41
by eenernl
Yup I installed 3.0.2
But i couldn’t use that command becaus I hadn’t python installed. So I installed python3-pip first. After that I followed the instructions.

Re: Error ToonThermostat

Posted: Saturday 23 February 2019 19:52
by a3vd
Yes it's working again will look in to the scripts later to make the light switch working again but this is great !

Big thanks to John (y)

Re: Error ToonThermostat

Posted: Saturday 23 February 2019 20:09
by jvliere
Yes! It's working after I've update Domoticz to the betaversion.
Some small issue:
- On top of the gas and elektra graphs, the buttons "back" and "report" are missing.

Re: Error ToonThermostat

Posted: Sunday 24 February 2019 11:46
by GCB2016
I just wanted to say THANK YOU to everyone involved with fixing this issue :) Have a nice Sunday.

Re: Error ToonThermostat

Posted: Sunday 24 February 2019 11:48
by darkrain
Hi @waspy

How do you want us (me) to report issues, is it OK to use github for this?

Really like this and I am willing to help, but my Python skills are none existing...
But with some help from perhaps others we can make this plugin better and better...

Re: Error ToonThermostat

Posted: Sunday 24 February 2019 11:59
by waspy
darkrain wrote:Hi @waspy

How do you want us (me) to report issues, is it OK to use github for this?

Really like this and I am willing to help, but my Python skills are none existing...
But with some help from perhaps others we can make this plugin better and better...
Github is fine. I'm not a python coder myself, but learn while trying...

Note that I plan to add smoke detector and light/power plug support in the coming days. Same goes for thermostat states and burner states.

Last 2 days I was quite busy supporting users.
Now I want to focus on features once more.

Now its time to ride the woods

Verstuurd vanaf mijn SM-G935F met Tapatalk


Re: Error ToonThermostat

Posted: Sunday 24 February 2019 13:48
by Pandabeer
Great job @Waspy - running in test enviroment on Windows10, Domoticz 4.10449, latest python version en latest (3.06) toonapilib! Should be great to have the other options available but enjoy the good weather and cycling in the woods...!

Re: Error ToonThermostat

Posted: Sunday 24 February 2019 18:24
by HansieNL
@waspy : Thanks for this solution :D
I'm only using just two settings of Toon: Setpoint and Room temperature. If I just remove the other devices will they be added again if check for new hardware? Or have I to strip unused devices from the python script?
Can I remove Toon - Source also? It's not clear to me what it does.
Thanks for your help.