python plugin in windows 10

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
papergion
Posts: 5
Joined: Sunday 06 January 2019 16:59
Target OS: Windows
Domoticz version:
Contact:

python plugin in windows 10

Post by papergion »

hi
i am using domoticz 4.97 installed on windows 10.
now i am trying use a plugin (downloaded) named MQTT Discovery.
my installation directory is C:\Program Files (x86)\Domoticz\ but folder plugins does not exists.
i had make it manually. here i put a new folder "mqtt_discovery" containing file plugin.py.
on my machine is installed python 36 (64 bit).
but in domoticz (after restart), in new hardware tab i don't see my new hardware...
where am i wrong?
can someone help me?
thanks
zak45
Posts: 953
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: python plugin in windows 10

Post by zak45 »

papergion wrote: Sunday 06 January 2019 17:14 hi
i am using domoticz 4.97 installed on windows 10.
on my machine is installed python 36 (64 bit).
where am i wrong?
try x86
papergion
Posts: 5
Joined: Sunday 06 January 2019 16:59
Target OS: Windows
Domoticz version:
Contact:

Re: python plugin in windows 10

Post by papergion »

uninstalled python 64 bit
domoticz (without new plugin) work

installed python X86

domoticz (without new plugin) don't work - it say: DOMOTICZ OFFLINE
...
papergion
Posts: 5
Joined: Sunday 06 January 2019 16:59
Target OS: Windows
Domoticz version:
Contact:

Re: python plugin in windows 10

Post by papergion »

strange behaviour:
- starting domoticz directly from c:\program files(x86)\domoticz il work (without new plugin) - with new plugin it works but new hardware is not present

- starting domoticz with desktop icon don't work (domoticz offline) - link parameters say: "C:\Program Files (x86)\Domoticz\domoticz.exe" -www 8080 -sslwww 443
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: python plugin in windows 10

Post by Dnpwwo »

@papergion,

Did you follow the Windows Python install instructions on the wiki? The key thing is to install it for all users.

Troubleshooting this is a two step process:
  • Making sure Domoticz has picked up Python on your server.
  • Seeing if the plugin loaded
Sounds like you are at step 1.

When you start Domoticz look at the log, if Domoticz found and linked to Python there will be a message from the 'PluginSystem' informing you of the version it picked up. If you don't see that then the plugin will never appear in the hardware list.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
papergion
Posts: 5
Joined: Sunday 06 January 2019 16:59
Target OS: Windows
Domoticz version:
Contact:

Re: python plugin in windows 10

Post by papergion »

python was installed correctly, with same options as described in domoticz manual

i have now modified the properties of desktop domoticz icon (added underlined part) :
"C:\Program Files (x86)\Domoticz\domoticz.exe" -www 8080 -sslwww 443 -log D:\domoticz.log -logvevel 0 -verbose 1

startup result in "domoticz offline" message

file: d:\domoticz.log contains only:
2019-01-07 11:19:56.435 Status: RxQueue: queue worker started...
2019-01-07 11:19:57.805 Status: Incoming connection from: 127.0.0.1
2019-01-07 11:19:58.464 Status: EventSystem: reset all events...
2019-01-07 11:19:58.464 Status: EventSystem: reset all device statuses...
papergion
Posts: 5
Joined: Sunday 06 January 2019 16:59
Target OS: Windows
Domoticz version:
Contact:

Re: python plugin in windows 10

Post by papergion »

solved…

uninstalled python 3.7.2 x86
installed python 3.5.2 x86

work fine, plugin was loaded

conclusion: domoticz (in windows10) is NOT COMPATIBLE with python 3.7.2

thanks for your suggestions
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: python plugin in windows 10

Post by Plantje »

I'm going to try this as well. Still wondering: how on earth did you get to the conclusion that the version may be the culprit?
Nope... doesn't work here...

After installing 3.7.4 I got:
2019-10-14 14:00:32.416 Status: PluginSystem: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
And after installing 3.5.2 I got:
2019-10-14 13:22:11.373 Status: PluginSystem: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.

I know the time stamp for 3.5.2 is before the one from 3.7.4, but I first tried, 3.7.4...didn't work...read your comments here and then installed 3.5.2
Bako
Posts: 1
Joined: Friday 22 May 2020 21:16
Target OS: Windows
Domoticz version:
Contact:

Re: python plugin in windows 10

Post by Bako »

Hi, i'm trying this as well but it won't work till today. Questions:
1.There is no plugin folder. I made a plugins dir en then a homewizzard folder and put the python file there: is that correct?
2. do I have to do anything with Python (yes i've installed it, 32bits version fore all users)
3. when I put the python file in the plugin dir: the HW hardware should excist in Domoticz? or is it a dummy hardware?
4. when I put the python file in the plugin dir: there comes a warning that i have to have admin rights. Is that a problem with domoticz?

Hope that some can help. Thanks.

regards Bako
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: python plugin in windows 10

Post by Plantje »

Bako wrote: Friday 22 May 2020 21:27 Hi, i'm trying this as well but it won't work till today. Questions:
1.There is no plugin folder. I made a plugins dir en then a homewizzard folder and put the python file there: is that correct?
2. do I have to do anything with Python (yes i've installed it, 32bits version fore all users)
3. when I put the python file in the plugin dir: the HW hardware should excist in Domoticz? or is it a dummy hardware?
4. when I put the python file in the plugin dir: there comes a warning that i have to have admin rights. Is that a problem with domoticz?

Hope that some can help. Thanks.

regards Bako
Are you trying to upgrade or do a first install?
rippe
Posts: 7
Joined: Monday 07 October 2019 18:33
Target OS: Windows
Domoticz version:
Contact:

Re: python plugin in windows 10

Post by rippe »

Hi,

I have also run into problems.

It began trying to install deConz and conbee and get it to work with Domoticz. I was lacking 'requests' and noticed that it didn't matter what version of Python I installed (and after that - pip install requests | pip3 install requests), Domoticz was still running Python 3.5.2 (according to 'About-page'). So, even if I had a new python and 'requests' was installed, it wouldn't work. So, now I've unsinstalled 3.5.2 (the version Domoticz was using) and it reports I don't any Python version at all even though 3.9.1 is installedon the system.

I've been struggeling with this A LOT!!! What's wrong, or rather, waht am I doing wrong??? @Plantje, You seem to have gone through this before. Any suggestions?

(I am logged is as Administrator.)

Best regards,
Richard
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: python plugin in windows 10

Post by Plantje »

It's really a very finniky (is that proper English?) installation. I hope your Dutch is ok as I attached my part of the Zigbee installation..... sorry, I did not as it is too large. You can find it here
It is not perfect, because there may be unnecessary steps in there. But this should work.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest