Zigate error with plugin version pre-4.1

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

Re: Zigate error with plugin version pre-4.1

Post by geertvercamer »

Hi,

I can't get the plugin to work.
Domoticz is running on W10
I keep getting these errors:
2020-04-01 20:47:17.728 Status: (Zigate) Zigate plugin beta-4.8.008 started
2020-04-01 20:47:17.728 Status: (Zigate) Debug: 30
2020-04-01 20:47:17.732 Status: (Zigate) load PluginConf
2020-04-01 20:47:17.733 Error: (Zigate) 'onStart' failed 'PermissionError'.
2020-04-01 20:47:17.733 Error: (Zigate) ----> Line 898 in 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigate\plugin.py'
2020-04-01 20:47:17.733 Error: (Zigate) ----> Line 233 in 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigate\plugin.py'
2020-04-01 20:47:17.733 Error: (Zigate) ----> Line 247 in 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigate\Classes\PluginConf.py'
2020-04-01 20:47:17.733 Error: (Zigate) ----> Line 298 in 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigate\Classes\PluginConf.py'
2020-04-01 20:47:17.734 Error: (Zigate) ----> Line 355 in 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigate\Classes\PluginConf.py'
Thanks for any help
pipiche
Posts: 2009
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigate error with plugin version pre-4.1

Post by pipiche »

geertvercamer wrote:Hi,

I can't get the plugin to work.
Domoticz is running on W10
I keep getting these errors:
2020-04-01 20:47:17.728 Status: (Zigate) Zigate plugin beta-4.8.008 started
2020-04-01 20:47:17.728 Status: (Zigate) Debug: 30
2020-04-01 20:47:17.732 Status: (Zigate) load PluginConf
2020-04-01 20:47:17.733 Error: (Zigate) 'onStart' failed 'PermissionError'.
2020-04-01 20:47:17.733 Error: (Zigate) ----> Line 898 in 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigate\plugin.py'
2020-04-01 20:47:17.733 Error: (Zigate) ----> Line 233 in 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigate\plugin.py'
2020-04-01 20:47:17.733 Error: (Zigate) ----> Line 247 in 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigate\Classes\PluginConf.py'
2020-04-01 20:47:17.733 Error: (Zigate) ----> Line 298 in 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigate\Classes\PluginConf.py'
2020-04-01 20:47:17.734 Error: (Zigate) ----> Line 355 in 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-Zigate\Classes\PluginConf.py'
Thanks for any help
Could you please list all files and folder below Domoticz-Zigate


Envoyé de mon iPhone en utilisant Tapatalk
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

Re: Zigate error with plugin version pre-4.1

Post by geertvercamer »

sure:
Classes <DIR>
Conf <DIR>
CONTRIBUTING.md
Data <DIR>
dns <DIR>
images <DIR>
LICENSE.txt
Logs <DIR>
MANIFEST.in
Modules <DIR>
OTAFirmware <DIR>
plugin.py
readme.md
ReleaseNotes.md
Reports <DIR>
Tools <DIR>
www <DIR>
Zigate-Firmware <DIR>
pipiche
Posts: 2009
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigate error with plugin version pre-4.1

Post by pipiche »

geertvercamer wrote:sure:
Classes <DIR>
Conf <DIR>
CONTRIBUTING.md
Data <DIR>
dns <DIR>
images <DIR>
LICENSE.txt
Logs <DIR>
MANIFEST.in
Modules <DIR>
OTAFirmware <DIR>
plugin.py
readme.md
ReleaseNotes.md
Reports <DIR>
Tools <DIR>
www <DIR>
Zigate-Firmware <DIR>
Anything in the Conf folder ?


Envoyé de mon iPhone en utilisant Tapatalk
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

Re: Zigate error with plugin version pre-4.1

Post by geertvercamer »

yes,
folder Certified (containing more folders of brands)
DeviceConf.txt
pipiche
Posts: 2009
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigate error with plugin version pre-4.1

Post by pipiche »

geertvercamer wrote:yes,
folder Certified (containing more folders of brands)
DeviceConf.txt
I suspect that the plugin is not able to create a file which should be

Domoticz-Zigate/Conf/PluginConf-xx.json

Where xx is the hardwareId of the plugin

Is domoticz running with admin privileges ? What could prevent file creation ?


Envoyé de mon iPhone en utilisant Tapatalk
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

Re: Zigate error with plugin version pre-4.1

Post by geertvercamer »

running as a service with local system account. This is admin, right?
pipiche
Posts: 2009
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigate error with plugin version pre-4.1

Post by pipiche »

From the source code, the issue is Opening in creation mode a file named Domoticz-Zigate/Conf/PluginConf-xx.json

I'm not a Windows guy, so maybe the windows people could help here, but the message in the logs are clear

Code: Select all

2020-04-01 20:47:17.733 Error: (Zigate) 'onStart' failed 'PermissionError'.
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

Re: Zigate error with plugin version pre-4.1

Post by geertvercamer »

there's no way to have the config files written anywhere else?
pipiche
Posts: 2009
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigate error with plugin version pre-4.1

Post by pipiche »

Conf is a must from the plugin code. Eventually you might create a file in this folder

Here after is an exemple of Conf/PluginConf-05.json

So for your , you need to check what is the HardwareID (this is available in Domoticz Hardware. The Id of the Zigate Hardware, padded with 0)

Code: Select all

{
  "filename": "/var/lib/domoticz/plugins/Domoticz-Zigate/Conf/PluginConf-05.json",
  "homedirectory": "/var/lib/domoticz/plugins/Domoticz-Zigate/",
  "pluginConfig": "/var/lib/domoticz/plugins/Domoticz-Zigate/Conf/",
  "pluginData": "/var/lib/domoticz/plugins/Domoticz-Zigate/Data/",
  "pluginHome": "/var/lib/domoticz/plugins/Domoticz-Zigate/",
  "pluginLogs": "/var/lib/domoticz/plugins/Domoticz-Zigate/Logs/",
  "pluginOTAFirmware": "/var/lib/domoticz/plugins/Domoticz-Zigate/OTAFirmware/",
  "pluginReports": "/var/lib/domoticz/plugins/Domoticz-Zigate/Reports/",
  "pluginWWW": "/var/lib/domoticz/plugins/Domoticz-Zigate/www/"
}
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

Re: Zigate error with plugin version pre-4.1

Post by geertvercamer »

Well, this helped A LOT!
Thanks.

I first tried to set all these to 'C:\\Program Files (x86)\\Domoticz\\plugins\\Domoticz-Zigate\\' but still got an error on writing Zigate.json.
There may be a / too much in Modeles/database.py on line 272.

Code: Select all

        json_filename = self.pluginconf.pluginConf['pluginData'] + "/Zigate.json" 
I removed it but eventually also had to modify so the data and logs are written to a folder out of '\Program Files\....'

Thanks a million.
pipiche
Posts: 2009
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigate error with plugin version pre-4.1

Post by pipiche »

So you mean that if we remove the / in database.py line 272, it fixes the problem ?
Would you mind to attach the PluginConf-xx.json, so I'll put it in the distribution as a ref for Windows users
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

Re: Zigate error with plugin version pre-4.1

Post by geertvercamer »

sorry for the delay.

I first tried to map all the entries in PluginConf-xx.json to "C:\\Program Files (x86)\\Domoticz\\plugins\\Domoticz-Zigate\\"
It took me a few steps further but got the error that it couldn't access c:\program files...\Domoticz-Zigate\/Zigate.json.
Mind the extra /
I tracked it to line 272 where the setting is used "C:\\Program Files (x86)\\Domoticz\\plugins\\Domoticz-Zigate\\Data\\" + "/Zigate.json"

In your example, all the settings have end in '/' (need converting to \\ in Windows), so on line 272 you would get:
"/var/lib/domoticz/plugins/Domoticz-Zigate/Data/" + "/Zigate.json"
=>
"/var/lib/domoticz/plugins/Domoticz-Zigate/Data//Zigate.json"

Maybe that doesn't throw an error in Linux, I don't know, I'd say there's no need for the '/' on line 272. Definitely not on Windows

Finally I had to move the pluginData and pluginLogs to another place as there were still problems with write rights.

PluginConf-xx.json:

Code: Select all

{
  "filename": "C:\\Program Files (x86)\\Domoticz\\plugins\\Domoticz-Zigate\\Conf\\PluginConf-19.json",
  "homedirectory": "C:\\Program Files (x86)\\Domoticz\\plugins\\Domoticz-Zigate\\",
  "pluginConfig": "C:\\Program Files (x86)\\Domoticz\\plugins\\Domoticz-Zigate\\Conf\\",
  "pluginData": "D:\\DomoticzExtra\\Zigate\\Data\\",
  "pluginHome": "C:\\Program Files (x86)\\Domoticz\\plugins\\Domoticz-Zigate\\",
  "pluginLogs": "D:\\DomoticzExtra\\Zigate\\Logs\\",
  "pluginOTAFirmware": "C:\\Program Files (x86)\\Domoticz\\plugins\\Domoticz-Zigate\\OTAFirmware\\",
  "pluginReports": "C:\\Program Files (x86)\\Domoticz\\plugins\\Domoticz-Zigate\\Reports\\",
  "pluginWWW": "C:\\Program Files (x86)\\Domoticz\\plugins\\Domoticz-Zigate\\www\\"
}
pipiche
Posts: 2009
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigate error with plugin version pre-4.1

Post by pipiche »

Make sure to run Domoticz with Administrator rights
Screenshot 2020-06-29 at 19.57.48.png
Screenshot 2020-06-29 at 19.57.48.png (286.66 KiB) Viewed 597 times
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest