Python plugin framework for Windows

Python and python framework
Post Reply
zak45
Posts: 321
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.8153
Contact:

Python plugin framework for Windows

Post by zak45 » Monday 13 February 2017 18:55

Hi All,
open this thread to have some feedback from you if you have been able to have a running Python Plugin system on your Windows machine.

On my side looks like this work except the onConnect function which give me always error. Have tried Kodi & Yamaha plugins.
this is my configuration :

W10 x64
Python x86 v 3.5.3
Domoticz v 3.6591 running as service using local system account

my log when start Domoticz
Spoiler: show
2017-02-13 17:47:04.266 Domoticz V3.6591 (c)2012-2017 GizMoCuz
2017-02-13 17:47:04.266 Build Hash: 0176f5fc, Date: 2017-02-03 10:30:02
2017-02-13 17:47:04.295 Sunrise: 08:00:00 SunSet:18:08:00
2017-02-13 17:47:04.295 EventSystem: reset all events...
2017-02-13 17:47:04.328 PluginSystem: Started, Python version '3.5.3'.
2017-02-13 17:47:04.333 Active notification Subsystems: email, kodi, pushbullet (3/12)
2017-02-13 17:47:04.335 WebServer(HTTP) started on address: :: with port 8080
2017-02-13 17:47:04.458 WebServer(SSL) started on address: :: with port 443
2017-02-13 17:47:04.460 Proxymanager started.
2017-02-13 17:47:04.461 Camera: settings (re)loaded
2017-02-13 17:47:04.462 Starting shared server on: :::6144
2017-02-13 17:47:04.462 TCPServer: shared server started...
2017-02-13 17:47:04.462 RxQueue: queue worker started...
2017-02-13 17:47:06.464 Wunderground: Worker started...
2017-02-13 17:47:06.465 Http: Worker started...
2017-02-13 17:47:06.465 Kodi: Started
2017-02-13 17:47:06.465 EventSystem: reset all events...
2017-02-13 17:47:06.466 EventSystem: reset all device statuses...
2017-02-13 17:47:06.468 EventSystem: Started
2017-02-13 17:47:06.566 Kodi: (KodiSalon) Starting thread.
2017-02-13 17:47:06.566 Kodi: (KodiCuisine) Starting thread.
2017-02-13 17:47:06.668 Kodi: Starting I/O service thread.
2017-02-13 17:47:06.714 Kodi: (KodiCuisine) Connected to '192.168.1.38:9090'.
2017-02-13 17:47:06.804 PluginSystem: Entering work loop.
2017-02-13 17:47:06.965 OpenZWave: Starting...
2017-02-13 17:47:06.965 OpenZWave: Version: 1.4.2340.g63fa7f6.dirty
2017-02-13 17:47:06.965 OpenZWave: using config in: C:\Program Files (x86)\Domoticz\Config/
2017-02-13 17:47:07.155 OpenZWave: Driver Ready
my log when I start the Kodi Player HW Python plugin:
Spoiler: show
2017-02-13 17:53:08.480 (Koditest) Initialized version 1.3.0, author 'dnpwwo'
2017-02-13 17:53:08.480 (Koditest) Debug log level set to: 'true'.
2017-02-13 17:53:08.480 (Koditest) 'Version':'1.3.0'
2017-02-13 17:53:08.480 (Koditest) 'Mode6':'Debug'
2017-02-13 17:53:08.481 (Koditest) 'Author':'dnpwwo'
2017-02-13 17:53:08.481 (Koditest) 'Key':'Kodi'
2017-02-13 17:53:08.481 (Koditest) 'Port':'9090'
2017-02-13 17:53:08.481 (Koditest) 'HomeFolder':'C:\Program Files (x86)\Domoticz\plugins\Kodi\'
2017-02-13 17:53:08.481 (Koditest) 'Mode2':'Ignore'
2017-02-13 17:53:08.481 (Koditest) 'HardwareID':'11'
2017-02-13 17:53:08.481 (Koditest) 'Mode3':'False'
2017-02-13 17:53:08.481 (Koditest) 'Address':'127.0.0.1'
2017-02-13 17:53:08.481 (Koditest) 'Name':'Koditest'
2017-02-13 17:53:08.481 (Koditest) Device count: 4
2017-02-13 17:53:08.481 (Koditest) Device: 1 - ID: 641, Name: 'Koditest - Status', nValue: 0, sValue: ''
2017-02-13 17:53:08.481 (Koditest) Device ID: '641'
2017-02-13 17:53:08.481 (Koditest) Device Name: 'Koditest - Status'
2017-02-13 17:53:08.481 (Koditest) Device nValue: 0
2017-02-13 17:53:08.481 (Koditest) Device sValue: ''
2017-02-13 17:53:08.481 (Koditest) Device LastLevel: 0
2017-02-13 17:53:08.481 (Koditest) Device: 2 - ID: 642, Name: 'Koditest - Source', nValue: 0, sValue: ''
2017-02-13 17:53:08.481 (Koditest) Device ID: '642'
2017-02-13 17:53:08.481 (Koditest) Device Name: 'Koditest - Source'
2017-02-13 17:53:08.481 (Koditest) Device nValue: 0
2017-02-13 17:53:08.481 (Koditest) Device sValue: ''
2017-02-13 17:53:08.481 (Koditest) Device LastLevel: 0
2017-02-13 17:53:08.481 (Koditest) Device: 3 - ID: 643, Name: 'Koditest - Volume', nValue: 0, sValue: ''
2017-02-13 17:53:08.481 (Koditest) Device ID: '643'
2017-02-13 17:53:08.481 (Koditest) Device Name: 'Koditest - Volume'
2017-02-13 17:53:08.481 (Koditest) Device nValue: 0
2017-02-13 17:53:08.481 (Koditest) Device sValue: ''
2017-02-13 17:53:08.481 (Koditest) Device LastLevel: 0
2017-02-13 17:53:08.482 (Koditest) Device: 4 - ID: 644, Name: 'Koditest - Playing', nValue: 0, sValue: ''
2017-02-13 17:53:08.482 (Koditest) Device ID: '644'
2017-02-13 17:53:08.482 (Koditest) Device Name: 'Koditest - Playing'
2017-02-13 17:53:08.482 (Koditest) Device nValue: 0
2017-02-13 17:53:08.482 (Koditest) Device sValue: ''
2017-02-13 17:53:08.482 (Koditest) Device LastLevel: 0
2017-02-13 17:53:08.482 (Koditest) Transport set to: 'TCP/IP', 127.0.0.1:9090.
2017-02-13 17:53:08.482 (Koditest) Protocol set to: 'JSON'.
2017-02-13 17:53:08.482 (Koditest) Heartbeat interval set to: 10.
2017-02-13 17:53:08.482 PluginSystem: Starting I/O service thread.
2017-02-13 17:53:08.482 (Koditest) Connect directive received, transport connect initiated successfully.
2017-02-13 17:53:09.488 (Koditest) Calling message handler 'onConnect'.
2017-02-13 17:53:09.488 Error: (Koditest) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.
2017-02-13 17:53:18.029 (Koditest) Calling message handler 'onHeartbeat'.
2017-02-13 17:53:18.845 (RFX433E) Temp + Humidity (433-TempSalon)
Thanks

User avatar
StanHD
Posts: 541
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Python plugin framework for Windows

Post by StanHD » Monday 13 February 2017 20:49

Hi,

Windows 7
Python x86 v 3.4.3
Domoticz v 3.6694 running as service

Sonos python plug-in, no errors works great.
Domotica - Intel nuc Celeron, Domoticz - Windows, RFXTRX433E. 1-Wire USB. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub, Broadlink RM2, HA-Bridge with Amazon Echo / Alexa.

zak45
Posts: 321
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.8153
Contact:

Re: Python plugin framework for Windows

Post by zak45 » Monday 13 February 2017 21:42

@StanHD
if you have opportunity to try / test the Kodi plugin and see how is going could be great.
You can test it even if you do not have kodi...
thanks a lot.

User avatar
StanHD
Posts: 541
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Python plugin framework for Windows

Post by StanHD » Monday 13 February 2017 22:59

Ok, did that and after re-starting Domoticz service and adding hardware log shows:

2017-02-13 20:51:59.374 (Test) Initialized version 1.2.0, author 'dnpwwo'
2017-02-13 20:51:59.449 (Test) Devices created.
2017-02-13 20:51:59.456 PluginSystem: Starting I/O service thread.
2017-02-13 20:52:00.505 (Test) Failed to connect (10061) to: 127.0.0.1:

The failed to connect I guess is because I don't have Kodi installed local.
I do get the 4 devices created in the switch tab.

Does that help?
Domotica - Intel nuc Celeron, Domoticz - Windows, RFXTRX433E. 1-Wire USB. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub, Broadlink RM2, HA-Bridge with Amazon Echo / Alexa.

zak45
Posts: 321
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.8153
Contact:

Re: Python plugin framework for Windows

Post by zak45 » Tuesday 14 February 2017 14:13

yes.. thanks.
this show that something is wrong with my install, but not able to find what :-(

can you do this for me please:
open cmd as admin
and type :
python
import sys
print (sys.path)

interested to see the output.

User avatar
Brutus
Posts: 286
Joined: Friday 26 September 2014 9:33
Target OS: Windows
Domoticz version:
Location: Heerlen, The Netherlands
Contact:

Re: Python plugin framework for Windows

Post by Brutus » Tuesday 14 February 2017 15:35

I have the kodi plugin working with my kodi that is running on the same Widows installation.

Windows 7 x64
Python 3.5.2 x86
Domoticz V3.6694 As Service

Kodi and Buienradar plugin.
1x Intel NUC D54250WYK (Windows 7)
1x Aeon Labs USB Z-Stick S2
1x P1 Smart Meter USB
17x Fibaro Modules

User avatar
StanHD
Posts: 541
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Python plugin framework for Windows

Post by StanHD » Tuesday 14 February 2017 16:24

zak45 wrote:yes.. thanks.
this show that something is wrong with my install, but not able to find what :-(

can you do this for me please:
open cmd as admin
and type :
python
import sys
print (sys.path)

interested to see the output.
Here you go:- :)

Image
Domotica - Intel nuc Celeron, Domoticz - Windows, RFXTRX433E. 1-Wire USB. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub, Broadlink RM2, HA-Bridge with Amazon Echo / Alexa.

zak45
Posts: 321
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.8153
Contact:

Re: Python plugin framework for Windows

Post by zak45 » Tuesday 14 February 2017 19:52

@StanHD
Thanks

@Brutus
One quick question : do you compile Domoticz by your own or download already compiled version from the Website ?

FYI: have done fresh install of Domoticz & Python 3.5.3 on W7 x64 computer. tested the Kodi plugin and got the onConnect error :?

User avatar
Brutus
Posts: 286
Joined: Friday 26 September 2014 9:33
Target OS: Windows
Domoticz version:
Location: Heerlen, The Netherlands
Contact:

Re: Python plugin framework for Windows

Post by Brutus » Wednesday 15 February 2017 0:07

zak45 wrote:@StanHD
Thanks

@Brutus
One quick question : do you compile Domoticz by your own or download already compiled version from the Website ?

FYI: have done fresh install of Domoticz & Python 3.5.3 on W7 x64 computer. tested the Kodi plugin and got the onConnect error :?
I always download the beta's from the website.
1x Intel NUC D54250WYK (Windows 7)
1x Aeon Labs USB Z-Stick S2
1x P1 Smart Meter USB
17x Fibaro Modules

zak45
Posts: 321
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.8153
Contact:

Re: Python plugin framework for Windows

Post by zak45 » Thursday 16 February 2017 20:21

Have installed last Domoticz beta on new fresh w7 x64.
Have installed Python 3.5.3, checked put into PATH & for All users.
Tested Kodi plugin v 1.2.0.

Still onConnect error :roll:
Spoiler: show
2017-02-16 19:11:06.074 Domoticz V3.6722 (c)2012-2017 GizMoCuz

2017-02-16 19:11:06.094 Build Hash: 00b71110, Date: 2017-02-16 09:26:28

2017-02-16 19:11:06.094 Startup delay... waiting 10 seconds...

2017-02-16 19:11:16.235 Sunrise: 07:55:00 SunSet:18:13:00

2017-02-16 19:11:16.235 EventSystem: reset all events...

2017-02-16 19:11:16.298 PluginSystem: Started, Python version '3.5.3'.

2017-02-16 19:11:16.298 Active notification Subsystems: (0/12)

2017-02-16 19:11:16.313 WebServer(HTTP) started on address: :: with port 8080

2017-02-16 19:11:16.532 WebServer(SSL) started on address: :: with port 443

2017-02-16 19:11:16.532 Proxymanager started.

2017-02-16 19:11:16.532 Starting shared server on: :::6144

2017-02-16 19:11:16.532 TCPServer: shared server started...

2017-02-16 19:11:16.532 RxQueue: queue worker started...

2017-02-16 19:11:18.622 EventSystem: reset all events...

2017-02-16 19:11:18.622 EventSystem: reset all device statuses...

2017-02-16 19:11:18.622 EventSystem: Started

2017-02-16 19:11:18.856 PluginSystem: Entering work loop.

2017-02-16 19:11:18.903 (test) Initialized version 1.2.0, author 'dnpwwo'

2017-02-16 19:11:18.903 (test) Debug log level set to: 'true'.

2017-02-16 19:11:18.903 (test) 'Mode2':'Ignore'

2017-02-16 19:11:18.903 (test) 'Address':'127.0.0.1'

2017-02-16 19:11:18.903 (test) 'HomeFolder':'C:\Program Files (x86)\Domoticz\plugins\Kodi\'

2017-02-16 19:11:18.903 (test) 'Name':'test'

2017-02-16 19:11:18.903 (test) 'Mode3':'False'

2017-02-16 19:11:18.903 (test) 'Key':'Kodi'

2017-02-16 19:11:18.903 (test) 'Mode6':'Debug'

2017-02-16 19:11:18.903 (test) 'Author':'dnpwwo'

2017-02-16 19:11:18.903 (test) 'HardwareID':'3'

2017-02-16 19:11:18.903 (test) 'Version':'1.2.0'

2017-02-16 19:11:18.903 (test) 'Port':'9090'

2017-02-16 19:11:18.903 (test) Device count: 4

2017-02-16 19:11:18.903 (test) Device: 1 - ID: 2, Name: 'test - Status', nValue: 0, sValue: ''

2017-02-16 19:11:18.903 (test) Device ID: '2'

2017-02-16 19:11:18.903 (test) Device Name: 'test - Status'

2017-02-16 19:11:18.903 (test) Device nValue: 0

2017-02-16 19:11:18.903 (test) Device sValue: ''

2017-02-16 19:11:18.903 (test) Device LastLevel: 0

2017-02-16 19:11:18.903 (test) Device: 2 - ID: 3, Name: 'test - Source', nValue: 0, sValue: ''

2017-02-16 19:11:18.903 (test) Device ID: '3'

2017-02-16 19:11:18.903 (test) Device Name: 'test - Source'

2017-02-16 19:11:18.903 (test) Device nValue: 0

2017-02-16 19:11:18.903 (test) Device sValue: ''

2017-02-16 19:11:18.903 (test) Device LastLevel: 0

2017-02-16 19:11:18.903 (test) Device: 3 - ID: 4, Name: 'test - Volume', nValue: 0, sValue: ''

2017-02-16 19:11:18.903 (test) Device ID: '4'

2017-02-16 19:11:18.903 (test) Device Name: 'test - Volume'

2017-02-16 19:11:18.903 (test) Device nValue: 0

2017-02-16 19:11:18.903 (test) Device sValue: ''

2017-02-16 19:11:18.903 (test) Device LastLevel: 0

2017-02-16 19:11:18.903 (test) Device: 4 - ID: 5, Name: 'test - Playing', nValue: 0, sValue: ''

2017-02-16 19:11:18.903 (test) Device ID: '5'

2017-02-16 19:11:18.903 (test) Device Name: 'test - Playing'

2017-02-16 19:11:18.903 (test) Device nValue: 0

2017-02-16 19:11:18.903 (test) Device sValue: ''

2017-02-16 19:11:18.903 (test) Device LastLevel: 0

2017-02-16 19:11:18.903 (test) Transport set to: 'TCP/IP', 127.0.0.1:9090.

2017-02-16 19:11:18.903 (test) Protocol set to: 'JSON'.

2017-02-16 19:11:18.903 (test) Heartbeat interval set to: 10.

2017-02-16 19:11:18.903 PluginSystem: Starting I/O service thread.

2017-02-16 19:11:18.903 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:11:20.011 (test) Calling message handler 'onConnect'.

2017-02-16 19:11:20.011 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:11:28.871 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:11:29.168 Incoming connection from: 127.0.0.1

2017-02-16 19:11:39.308 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:11:49.729 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:11:49.729 PluginSystem: Starting I/O service thread.

2017-02-16 19:11:49.729 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:11:50.774 (test) Calling message handler 'onConnect'.

2017-02-16 19:11:50.774 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:12:00.212 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:12:10.633 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:12:21.069 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:12:21.069 PluginSystem: Starting I/O service thread.

2017-02-16 19:12:21.069 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:12:22.130 (test) Calling message handler 'onConnect'.

2017-02-16 19:12:22.130 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:12:31.568 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:12:41.973 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:12:52.409 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:12:52.409 PluginSystem: Starting I/O service thread.

2017-02-16 19:12:52.409 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:12:53.470 (test) Calling message handler 'onConnect'.

2017-02-16 19:12:53.470 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:13:02.908 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:13:13.329 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:13:23.734 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:13:23.734 PluginSystem: Starting I/O service thread.

2017-02-16 19:13:23.734 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:13:24.811 (test) Calling message handler 'onConnect'.

2017-02-16 19:13:24.811 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:13:34.233 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:13:44.607 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:13:55.168 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:13:55.168 PluginSystem: Starting I/O service thread.

2017-02-16 19:13:55.168 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:13:56.229 (test) Calling message handler 'onConnect'.

2017-02-16 19:13:56.229 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:14:05.511 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:14:16.010 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:14:26.431 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:14:26.431 PluginSystem: Starting I/O service thread.

2017-02-16 19:14:26.431 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:14:27.507 (test) Calling message handler 'onConnect'.

2017-02-16 19:14:27.507 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:14:36.867 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:14:47.366 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:14:57.771 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:14:57.771 PluginSystem: Starting I/O service thread.

2017-02-16 19:14:57.771 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:14:58.832 (test) Calling message handler 'onConnect'.

2017-02-16 19:14:58.832 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:15:08.207 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:15:18.706 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:15:29.111 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:15:29.111 PluginSystem: Starting I/O service thread.

2017-02-16 19:15:29.111 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:15:30.172 (test) Calling message handler 'onConnect'.

2017-02-16 19:15:30.172 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:15:39.532 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:15:50.031 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:16:00.467 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:16:00.467 PluginSystem: Starting I/O service thread.

2017-02-16 19:16:00.467 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:16:01.528 (test) Calling message handler 'onConnect'.

2017-02-16 19:16:01.528 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:16:10.873 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:16:21.371 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:16:31.808 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:16:31.808 PluginSystem: Starting I/O service thread.

2017-02-16 19:16:31.808 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:16:32.869 (test) Calling message handler 'onConnect'.

2017-02-16 19:16:32.869 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:16:42.229 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:16:52.712 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:17:03.133 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:17:03.133 PluginSystem: Starting I/O service thread.

2017-02-16 19:17:03.133 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:17:04.209 (test) Calling message handler 'onConnect'.

2017-02-16 19:17:04.209 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:17:13.569 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:17:24.068 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:17:34.473 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:17:34.473 PluginSystem: Starting I/O service thread.

2017-02-16 19:17:34.473 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:17:35.534 (test) Calling message handler 'onConnect'.

2017-02-16 19:17:35.534 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.
What I missing ???

User avatar
Brutus
Posts: 286
Joined: Friday 26 September 2014 9:33
Target OS: Windows
Domoticz version:
Location: Heerlen, The Netherlands
Contact:

Re: Python plugin framework for Windows

Post by Brutus » Friday 17 February 2017 0:22

zak45 wrote:Have installed last Domoticz beta on new fresh w7 x64.
Have installed Python 3.5.3, checked put into PATH & for All users.
Tested Kodi plugin v 1.2.0.

Still onConnect error :roll:
Spoiler: show
2017-02-16 19:11:06.074 Domoticz V3.6722 (c)2012-2017 GizMoCuz

2017-02-16 19:11:06.094 Build Hash: 00b71110, Date: 2017-02-16 09:26:28

2017-02-16 19:11:06.094 Startup delay... waiting 10 seconds...

2017-02-16 19:11:16.235 Sunrise: 07:55:00 SunSet:18:13:00

2017-02-16 19:11:16.235 EventSystem: reset all events...

2017-02-16 19:11:16.298 PluginSystem: Started, Python version '3.5.3'.

2017-02-16 19:11:16.298 Active notification Subsystems: (0/12)

2017-02-16 19:11:16.313 WebServer(HTTP) started on address: :: with port 8080

2017-02-16 19:11:16.532 WebServer(SSL) started on address: :: with port 443

2017-02-16 19:11:16.532 Proxymanager started.

2017-02-16 19:11:16.532 Starting shared server on: :::6144

2017-02-16 19:11:16.532 TCPServer: shared server started...

2017-02-16 19:11:16.532 RxQueue: queue worker started...

2017-02-16 19:11:18.622 EventSystem: reset all events...

2017-02-16 19:11:18.622 EventSystem: reset all device statuses...

2017-02-16 19:11:18.622 EventSystem: Started

2017-02-16 19:11:18.856 PluginSystem: Entering work loop.

2017-02-16 19:11:18.903 (test) Initialized version 1.2.0, author 'dnpwwo'

2017-02-16 19:11:18.903 (test) Debug log level set to: 'true'.

2017-02-16 19:11:18.903 (test) 'Mode2':'Ignore'

2017-02-16 19:11:18.903 (test) 'Address':'127.0.0.1'

2017-02-16 19:11:18.903 (test) 'HomeFolder':'C:\Program Files (x86)\Domoticz\plugins\Kodi\'

2017-02-16 19:11:18.903 (test) 'Name':'test'

2017-02-16 19:11:18.903 (test) 'Mode3':'False'

2017-02-16 19:11:18.903 (test) 'Key':'Kodi'

2017-02-16 19:11:18.903 (test) 'Mode6':'Debug'

2017-02-16 19:11:18.903 (test) 'Author':'dnpwwo'

2017-02-16 19:11:18.903 (test) 'HardwareID':'3'

2017-02-16 19:11:18.903 (test) 'Version':'1.2.0'

2017-02-16 19:11:18.903 (test) 'Port':'9090'

2017-02-16 19:11:18.903 (test) Device count: 4

2017-02-16 19:11:18.903 (test) Device: 1 - ID: 2, Name: 'test - Status', nValue: 0, sValue: ''

2017-02-16 19:11:18.903 (test) Device ID: '2'

2017-02-16 19:11:18.903 (test) Device Name: 'test - Status'

2017-02-16 19:11:18.903 (test) Device nValue: 0

2017-02-16 19:11:18.903 (test) Device sValue: ''

2017-02-16 19:11:18.903 (test) Device LastLevel: 0

2017-02-16 19:11:18.903 (test) Device: 2 - ID: 3, Name: 'test - Source', nValue: 0, sValue: ''

2017-02-16 19:11:18.903 (test) Device ID: '3'

2017-02-16 19:11:18.903 (test) Device Name: 'test - Source'

2017-02-16 19:11:18.903 (test) Device nValue: 0

2017-02-16 19:11:18.903 (test) Device sValue: ''

2017-02-16 19:11:18.903 (test) Device LastLevel: 0

2017-02-16 19:11:18.903 (test) Device: 3 - ID: 4, Name: 'test - Volume', nValue: 0, sValue: ''

2017-02-16 19:11:18.903 (test) Device ID: '4'

2017-02-16 19:11:18.903 (test) Device Name: 'test - Volume'

2017-02-16 19:11:18.903 (test) Device nValue: 0

2017-02-16 19:11:18.903 (test) Device sValue: ''

2017-02-16 19:11:18.903 (test) Device LastLevel: 0

2017-02-16 19:11:18.903 (test) Device: 4 - ID: 5, Name: 'test - Playing', nValue: 0, sValue: ''

2017-02-16 19:11:18.903 (test) Device ID: '5'

2017-02-16 19:11:18.903 (test) Device Name: 'test - Playing'

2017-02-16 19:11:18.903 (test) Device nValue: 0

2017-02-16 19:11:18.903 (test) Device sValue: ''

2017-02-16 19:11:18.903 (test) Device LastLevel: 0

2017-02-16 19:11:18.903 (test) Transport set to: 'TCP/IP', 127.0.0.1:9090.

2017-02-16 19:11:18.903 (test) Protocol set to: 'JSON'.

2017-02-16 19:11:18.903 (test) Heartbeat interval set to: 10.

2017-02-16 19:11:18.903 PluginSystem: Starting I/O service thread.

2017-02-16 19:11:18.903 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:11:20.011 (test) Calling message handler 'onConnect'.

2017-02-16 19:11:20.011 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:11:28.871 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:11:29.168 Incoming connection from: 127.0.0.1

2017-02-16 19:11:39.308 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:11:49.729 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:11:49.729 PluginSystem: Starting I/O service thread.

2017-02-16 19:11:49.729 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:11:50.774 (test) Calling message handler 'onConnect'.

2017-02-16 19:11:50.774 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:12:00.212 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:12:10.633 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:12:21.069 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:12:21.069 PluginSystem: Starting I/O service thread.

2017-02-16 19:12:21.069 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:12:22.130 (test) Calling message handler 'onConnect'.

2017-02-16 19:12:22.130 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:12:31.568 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:12:41.973 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:12:52.409 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:12:52.409 PluginSystem: Starting I/O service thread.

2017-02-16 19:12:52.409 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:12:53.470 (test) Calling message handler 'onConnect'.

2017-02-16 19:12:53.470 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:13:02.908 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:13:13.329 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:13:23.734 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:13:23.734 PluginSystem: Starting I/O service thread.

2017-02-16 19:13:23.734 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:13:24.811 (test) Calling message handler 'onConnect'.

2017-02-16 19:13:24.811 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:13:34.233 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:13:44.607 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:13:55.168 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:13:55.168 PluginSystem: Starting I/O service thread.

2017-02-16 19:13:55.168 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:13:56.229 (test) Calling message handler 'onConnect'.

2017-02-16 19:13:56.229 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:14:05.511 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:14:16.010 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:14:26.431 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:14:26.431 PluginSystem: Starting I/O service thread.

2017-02-16 19:14:26.431 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:14:27.507 (test) Calling message handler 'onConnect'.

2017-02-16 19:14:27.507 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:14:36.867 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:14:47.366 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:14:57.771 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:14:57.771 PluginSystem: Starting I/O service thread.

2017-02-16 19:14:57.771 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:14:58.832 (test) Calling message handler 'onConnect'.

2017-02-16 19:14:58.832 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:15:08.207 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:15:18.706 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:15:29.111 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:15:29.111 PluginSystem: Starting I/O service thread.

2017-02-16 19:15:29.111 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:15:30.172 (test) Calling message handler 'onConnect'.

2017-02-16 19:15:30.172 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:15:39.532 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:15:50.031 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:16:00.467 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:16:00.467 PluginSystem: Starting I/O service thread.

2017-02-16 19:16:00.467 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:16:01.528 (test) Calling message handler 'onConnect'.

2017-02-16 19:16:01.528 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:16:10.873 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:16:21.371 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:16:31.808 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:16:31.808 PluginSystem: Starting I/O service thread.

2017-02-16 19:16:31.808 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:16:32.869 (test) Calling message handler 'onConnect'.

2017-02-16 19:16:32.869 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:16:42.229 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:16:52.712 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:17:03.133 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:17:03.133 PluginSystem: Starting I/O service thread.

2017-02-16 19:17:03.133 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:17:04.209 (test) Calling message handler 'onConnect'.

2017-02-16 19:17:04.209 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.

2017-02-16 19:17:13.569 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:17:24.068 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:17:34.473 (test) Calling message handler 'onHeartbeat'.

2017-02-16 19:17:34.473 PluginSystem: Starting I/O service thread.

2017-02-16 19:17:34.473 (test) Connect directive received, transport connect initiated successfully.

2017-02-16 19:17:35.534 (test) Calling message handler 'onConnect'.

2017-02-16 19:17:35.534 Error: (test) 'onConnect' failed 'TypeError':'onConnect() missing 2 required positional arguments: 'Status' and 'Description''.
What I missing ???
Dnpwwo helped me with a nice install instruction maybe you are doing something different?

http://www.domoticz.com/forum/viewtopic ... 20#p110486
1x Intel NUC D54250WYK (Windows 7)
1x Aeon Labs USB Z-Stick S2
1x P1 Smart Meter USB
17x Fibaro Modules

zak45
Posts: 321
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.8153
Contact:

Re: Python plugin framework for Windows

Post by zak45 » Friday 17 February 2017 13:57

Thanks, this one has already helped me.

My last test has been to uninstall 3.5.3 and install 3.5.2... just in case of !!!

And ... same error.
So, I'm a little bit lost :!:

What is frustrating is that you know there is something wrong somewhere.. but not able to find it ...

zak45
Posts: 321
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.8153
Contact:

Re: Python plugin framework for Windows

Post by zak45 » Friday 17 February 2017 19:50

so, looks like found something


viewtopic.php?f=6&t=16168




thanks a lot guys

User avatar
StanHD
Posts: 541
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: RE: Re: Python plugin framework for Windows

Post by StanHD » Friday 17 February 2017 21:55

zak45 wrote:so, looks like found something


viewtopic.php?f=6&t=16168




thanks a lot guys
Wow that's an unexpected find, Microsoft eh?. Well done glad you found the problem
Domotica - Intel nuc Celeron, Domoticz - Windows, RFXTRX433E. 1-Wire USB. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub, Broadlink RM2, HA-Bridge with Amazon Echo / Alexa.

Vzet
Posts: 5
Joined: Friday 21 July 2017 9:32
Target OS: Windows
Domoticz version:
Contact:

Re: Python plugin framework for Windows

Post by Vzet » Wednesday 25 October 2017 10:52

I’m quite new to Domoticz and struggling with plugins.
Can someone please explain to me, how to “activate” a python plugin for Domoticz running under Windows?

zak45
Posts: 321
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.8153
Contact:

Re: Python plugin framework for Windows

Post by zak45 » Wednesday 25 October 2017 17:46

Vzet wrote:
Wednesday 25 October 2017 10:52
I’m quite new to Domoticz and struggling with plugins.
Can someone please explain to me, how to “activate” a python plugin for Domoticz running under Windows?
Welcome to this wonderfull world ... but can make some frustration also at the beginning !!!
just to try to provide some help:
install python 32 b
select custom installation and choose for "all users"...
see this link viewtopic.php?f=41&t=7098&p=110486&hili ... er#p110486

Vzet
Posts: 5
Joined: Friday 21 July 2017 9:32
Target OS: Windows
Domoticz version:
Contact:

Re: Python plugin framework for Windows

Post by Vzet » Monday 30 October 2017 10:43

Hi Zak45, thanks for your answer.

I already installed Python before, but what is not clear to me is:
do I have to run the plugin once manually, and is it than completely integrated in Domoticz, or do I have to call it in Domoticz somehow, or do I need to call the plugin in a script in Domoticz, or do I just need to place the Python plugin in a certain directory, or.………???

zak45
Posts: 321
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.8153
Contact:

Re: Python plugin framework for Windows

Post by zak45 » Monday 30 October 2017 13:54

see http://www.domoticz.com/wiki/Using_Python_plugins
you need also to follow the instruction provided by the plugin devloper
e.g:
Capture.JPG
Capture.JPG (39.86 KiB) Viewed 317 times

Vzet
Posts: 5
Joined: Friday 21 July 2017 9:32
Target OS: Windows
Domoticz version:
Contact:

Re: Python plugin framework for Windows

Post by Vzet » Wednesday 01 November 2017 0:11

Thnx again for the answers.
I don’t have a “plugins” directory under my Domoticz directory (under Program Files). Maybe something went wrong installing Python.
I will try to reinstall Python, with your link in an earlier post.

Post Reply

Who is online

Users browsing this forum: dmotion and 3 guests