Error ToonThermostat

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
dressie
Posts: 156
Joined: Monday 25 May 2015 22:44
Target OS: Raspberry Pi / ODroid
Domoticz version: V2020.2
Location: Netherlands
Contact:

Re: Error ToonThermostat

Post 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?
waspy
Posts: 52
Joined: Friday 22 February 2019 0:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10430
Contact:

Re: Error ToonThermostat

Post 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.
dressie
Posts: 156
Joined: Monday 25 May 2015 22:44
Target OS: Raspberry Pi / ODroid
Domoticz version: V2020.2
Location: Netherlands
Contact:

Re: Error ToonThermostat

Post 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.
rinyheuvelman
Posts: 15
Joined: Wednesday 19 December 2018 14:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10427
Contact:

Re: Error ToonThermostat

Post 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..?
Attie
Posts: 5
Joined: Tuesday 02 May 2017 21:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Error ToonThermostat

Post 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!
Last edited by Attie on Saturday 23 February 2019 10:51, edited 1 time in total.
waspy
Posts: 52
Joined: Friday 22 February 2019 0:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10430
Contact:

Re: Error ToonThermostat

Post 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!
waspy
Posts: 52
Joined: Friday 22 February 2019 0:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10430
Contact:

Re: Error ToonThermostat

Post 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)
Attie
Posts: 5
Joined: Tuesday 02 May 2017 21:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Error ToonThermostat

Post 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....
eenernl
Posts: 21
Joined: Sunday 09 August 2015 12:44
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Error ToonThermostat

Post 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
* Raspberry Pi B rev2 (with latest Beta of Domoticz)
* 1x RFXtrx433E
* 4x TX320 Temperature/humidity sensors
* 6x KaKu ACD-3500 | Kaku ALED-2709 | KaKu ACM-100 | 2x KaKu AMU-500 | KaKu AWMR-300
* 1x Toon Thermostat (via ToonApiLib)
darkrain
Posts: 18
Joined: Saturday 21 February 2015 13:19
Target OS: Linux
Domoticz version: beta
Contact:

Re: Error ToonThermostat

Post 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.
eenernl
Posts: 21
Joined: Sunday 09 August 2015 12:44
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Error ToonThermostat

Post 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.
* Raspberry Pi B rev2 (with latest Beta of Domoticz)
* 1x RFXtrx433E
* 4x TX320 Temperature/humidity sensors
* 6x KaKu ACD-3500 | Kaku ALED-2709 | KaKu ACM-100 | 2x KaKu AMU-500 | KaKu AWMR-300
* 1x Toon Thermostat (via ToonApiLib)
dressie
Posts: 156
Joined: Monday 25 May 2015 22:44
Target OS: Raspberry Pi / ODroid
Domoticz version: V2020.2
Location: Netherlands
Contact:

Re: Error ToonThermostat

Post 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
eenernl
Posts: 21
Joined: Sunday 09 August 2015 12:44
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Error ToonThermostat

Post 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.
* Raspberry Pi B rev2 (with latest Beta of Domoticz)
* 1x RFXtrx433E
* 4x TX320 Temperature/humidity sensors
* 6x KaKu ACD-3500 | Kaku ALED-2709 | KaKu ACM-100 | 2x KaKu AMU-500 | KaKu AWMR-300
* 1x Toon Thermostat (via ToonApiLib)
User avatar
a3vd
Posts: 22
Joined: Tuesday 25 February 2014 14:02
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Noordwijk, The Netherlands
Contact:

Re: Error ToonThermostat

Post 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)
Attachments
Knipsel.JPG
Knipsel.JPG (58.76 KiB) Viewed 2132 times
Raspberry 3+ / 4
P1 smartcable / RFXtrx433 FW 182 / Several 1 wire Temp Sensors /DHT12/Conbee2 (zigbee)
Several Kaku switches/ Weather Underground / Hue
jvliere
Posts: 2
Joined: Wednesday 13 February 2019 13:54
Target OS: -
Domoticz version:
Contact:

Re: Error ToonThermostat

Post 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.
GCB2016
Posts: 33
Joined: Thursday 10 November 2016 22:13
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.9208
Location: Rotterdam
Contact:

Re: Error ToonThermostat

Post by GCB2016 »

I just wanted to say THANK YOU to everyone involved with fixing this issue :) Have a nice Sunday.
darkrain
Posts: 18
Joined: Saturday 21 February 2015 13:19
Target OS: Linux
Domoticz version: beta
Contact:

Re: Error ToonThermostat

Post 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...
waspy
Posts: 52
Joined: Friday 22 February 2019 0:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10430
Contact:

Re: Error ToonThermostat

Post 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

Pandabeer
Posts: 35
Joined: Monday 18 December 2017 11:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 10265
Location: Zwolle
Contact:

Re: Error ToonThermostat

Post 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...!
Little expert running Domoticz on a Raspberry Pi

Code: Select all

Toon Thermostat | Mi-Light | Z-Wave Thermostat valves and CO2 / fire detection units | KiKa | Heat-IT Zwave thermostat |
User avatar
HansieNL
Posts: 957
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Error ToonThermostat

Post 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.
Blah blah blah
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest