Page 2 of 2
Re: Zigate error with plugin version pre-4.1
Posted: Wednesday 01 April 2020 20:52
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
Re: Zigate error with plugin version pre-4.1
Posted: Wednesday 01 April 2020 21:09
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
Re: Zigate error with plugin version pre-4.1
Posted: Wednesday 01 April 2020 22:10
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>
Re: Zigate error with plugin version pre-4.1
Posted: Wednesday 01 April 2020 22:18
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
Re: Zigate error with plugin version pre-4.1
Posted: Wednesday 01 April 2020 22:31
by geertvercamer
yes,
folder Certified (containing more folders of brands)
DeviceConf.txt
Re: Zigate error with plugin version pre-4.1
Posted: Wednesday 01 April 2020 22:35
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
Re: Zigate error with plugin version pre-4.1
Posted: Thursday 02 April 2020 7:51
by geertvercamer
running as a service with local system account. This is admin, right?
Re: Zigate error with plugin version pre-4.1
Posted: Thursday 02 April 2020 15:05
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'.
Re: Zigate error with plugin version pre-4.1
Posted: Wednesday 08 April 2020 18:29
by geertvercamer
there's no way to have the config files written anywhere else?
Re: Zigate error with plugin version pre-4.1
Posted: Wednesday 08 April 2020 19:00
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/"
}
Re: Zigate error with plugin version pre-4.1
Posted: Thursday 09 April 2020 20:32
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.
Re: Zigate error with plugin version pre-4.1
Posted: Thursday 09 April 2020 20:35
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
Re: Zigate error with plugin version pre-4.1
Posted: Sunday 12 April 2020 11:27
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\\"
}
Re: Zigate error with plugin version pre-4.1
Posted: Monday 29 June 2020 20:00
by pipiche
Make sure to run Domoticz with Administrator rights

- Screenshot 2020-06-29 at 19.57.48.png (286.66 KiB) Viewed 612 times