999LV / SmartVirtualThermostat

Smart Virtual Thermostat python plugin for Domoticz home automation system
MIT License
41 stars 31 forks source link

Error at startup #14

Closed pipiche38 closed 5 years ago

pipiche38 commented 5 years ago

At startup of the Pluging I have the following errors

Oct 05 21:00:59 pi3 domoticz[26866]: 2018-10-05 21:00:59.347  (SVT-Salon) Heating 'Off'
Oct 05 21:00:59 pi3 domoticz[26866]: 2018-10-05 21:00:59.347  Error: (SVT-Salon) 'onStart' failed 'KeyError'.
Oct 05 21:00:59 pi3 domoticz[26866]: 2018-10-05 21:00:59.347  Error: (SVT-Salon) ----> Line 584 in '/var/lib/domoticz/plugins/SVT/plugin.py', function onStart
Oct 05 21:00:59 pi3 domoticz[26866]: 2018-10-05 21:00:59.347  Error: (SVT-Salon) ----> Line 238 in '/var/lib/domoticz/plugins/SVT/plugin.py', function onStart
Oct 05 21:00:59 pi3 domoticz[26866]: 2018-10-05 21:00:59.347  Error: (SVT-Salon) ----> Line 469 in '/var/lib/domoticz/plugins/SVT/plugin.py', function switchHeat

Here are the configuration that I'm using

screen shot 2018-10-05 at 21 02 40
pipiche38 commented 5 years ago

As well as :

Oct 05 21:05:14 pi3 domoticz[26866]: 2018-10-05 21:05:14.988  Error: (SVT-Salon) 'onCommand' failed 'KeyError'.
Oct 05 21:05:14 pi3 domoticz[26866]: 2018-10-05 21:05:14.988  Error: (SVT-Salon) ----> Line 594 in '/var/lib/domoticz/plugins/SVT/plugin.py', function onCommand
Oct 05 21:05:14 pi3 domoticz[26866]: 2018-10-05 21:05:14.988  Error: (SVT-Salon) ----> Line 268 in '/var/lib/domoticz/plugins/SVT/plugin.py', function onCommand
Oct 05 21:05:14 pi3 domoticz[26866]: 2018-10-05 21:05:14.988  Error: (SVT-Salon) ----> Line 349 in '/var/lib/domoticz/plugins/SVT/plugin.py', function onHeartbeat
Oct 05 21:05:14 pi3 domoticz[26866]: 2018-10-05 21:05:14.988  Error: (SVT-Salon) ----> Line 398 in '/var/lib/domoticz/plugins/SVT/plugin.py', function AutoMode
Oct 05 21:05:14 pi3 domoticz[26866]: 2018-10-05 21:05:14.989  Error: (SVT-Salon) ----> Line 469 in '/var/lib/domoticz/plugins/SVT/plugin.py', function switchHeat
999LV commented 5 years ago

Are the plugin devices created at startup (if not you need to enable this in the domoticz settings) ?

Alternatively Did you delete or modify any of these devices (assuming these were created in the first instance?

pipiche38 commented 5 years ago

I have (1) remove all SVT devices (2) remove the SVT Hardware plugin (3) add the SVT Hardware plugin

Still here is what I'm getting at after adding the


Oct 05 23:20:28 pi3 domoticz[26866]: 2018-10-05 23:20:28.386  Status: (SVT-Salon) Initialized version 0.4.1, author 'logread'
Oct 05 23:20:28 pi3 domoticz[26866]: 2018-10-05 23:20:28.395  (SVT-Salon) Debug logging mask set to: NONE
Oct 05 23:20:28 pi3 domoticz[26866]: 2018-10-05 23:20:28.865  Error: (SVT-Salon) 'onStart' failed 'KeyError'.
Oct 05 23:20:28 pi3 domoticz[26866]: 2018-10-05 23:20:28.865  Error: (SVT-Salon) ----> Line 584 in '/var/lib/domoticz/plugins/SVT/plugin.py', function onStart
Oct 05 23:20:28 pi3 domoticz[26866]: 2018-10-05 23:20:28.865  Error: (SVT-Salon) ----> Line 238 in '/var/lib/domoticz/plugins/SVT/plugin.py', function onStart
Oct 05 23:20:28 pi3 domoticz[26866]: 2018-10-05 23:20:28.865  Error: (SVT-Salon) ----> Line 469 in '/var/lib/domoticz/plugins/SVT/plugin.py', function switchHeat

and here is the screenshot of the new created devices

screen shot 2018-10-05 at 23 21 45
pipiche38 commented 5 years ago

And here is what I got when putting Thermosta Control to Auto

Oct 06 00:02:13 pi3 domoticz[26866]: 2018-10-06 00:02:13.361  (SVT-Salon) Inside Temperature = 22.0
Oct 06 00:02:13 pi3 domoticz[26866]: 2018-10-06 00:02:13.362  (SVT-Salon) Outside Temperature = 17.5
Oct 06 00:02:13 pi3 domoticz[26866]: 2018-10-06 00:02:13.362  (SVT-Salon) Calculation: Power = 0 -> heat duration = 0 minutes
Oct 06 00:02:13 pi3 domoticz[26866]: 2018-10-06 00:02:13.614  Error: (SVT-Salon) 'onCommand' failed 'KeyError'.
Oct 06 00:02:13 pi3 domoticz[26866]: 2018-10-06 00:02:13.614  Error: (SVT-Salon) ----> Line 594 in '/var/lib/domoticz/plugins/SVT/plugin.py', function onCommand
Oct 06 00:02:13 pi3 domoticz[26866]: 2018-10-06 00:02:13.614  Error: (SVT-Salon) ----> Line 268 in '/var/lib/domoticz/plugins/SVT/plugin.py', function onCommand
Oct 06 00:02:13 pi3 domoticz[26866]: 2018-10-06 00:02:13.614  Error: (SVT-Salon) ----> Line 349 in '/var/lib/domoticz/plugins/SVT/plugin.py', function onHeartbeat
Oct 06 00:02:13 pi3 domoticz[26866]: 2018-10-06 00:02:13.615  Error: (SVT-Salon) ----> Line 393 in '/var/lib/domoticz/plugins/SVT/plugin.py', function AutoMode
Oct 06 00:02:13 pi3 domoticz[26866]: 2018-10-06 00:02:13.615  Error: (SVT-Salon) ----> Line 469 in '/var/lib/domoticz/plugins/SVT/plugin.py', function switchHeat
999LV commented 5 years ago

I am confused... the line numbers in the error logs do not mean anything... which plugin version are you using ? If you are posting on github, I assume you are a developer and can dig a bit further, using the debug logging funtions ?

pipiche38 commented 5 years ago

Ok. I did further debuging, and the outcome is that switches is empty! May be I miss-understood the way the plugin work, but I was under the impression that you would play with Setpoint, and in fact you are only working with switches.

So it doesn't work for me ... As I wanted to use the Valve Setpoint :-(

999LV commented 5 years ago

Indeed the plugin « only » drives switches... not setpoints as it would make little sense (to me at least) to have a thermostat changing other thermostats’ settings... the end result would probably be impredictable...

Closing the issue, noting though that I need to improve the error handling of the plugin in situations like yours, that I never thought about...