preparing Zigate Debian package v4.12.087

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

Moderator: leecollings

Post Reply
pocock
Posts: 66
Joined: Monday 17 September 2018 9:39
Target OS: Linux
Domoticz version:

preparing Zigate Debian package v4.12.087

Post by pocock »

The current Debian package is plugin 4.4.9

I started looking at making an update for 4.12.087

Can you please comment on a few things:

a) I found it will not work any more if these user doesn't add HomeFolder to their PluginConf.txt file, could you adapt the code to work without HomeFolder specified? This would avoid the prompt for some users to compare the different file versions.

Code: Select all

--- /etc/domoticz/plugins/Domoticz-Zigate/PluginConf.txt.4.4.9	2020-12-30 21:06:24.307483538 +0100
+++ /etc/domoticz/plugins/Domoticz-Zigate/PluginConf.txt	2020-12-30 21:12:13.833698021 +0100
@@ -1,4 +1,5 @@
 {
+'HomeFolder':'/usr/lib/domoticz/plugins/Domoticz-Zigate/',
 'pluginData':'/var/lib/domoticz/plugins/Domoticz-Zigate/Data/',
 'pluginZData':'/var/lib/domoticz/plugins/Domoticz-Zigate/Zdatas/',
 'pluginReports':'/var/lib/domoticz/plugins/Domoticz-Zigate/Reports/',



b) are any other config file changes that I should consider? Here is the existing file on Debian with plugin 4.4.9:

Code: Select all

$ cat /etc/domoticz/plugins/Domoticz-Zigate/PluginConf.txt
{
'pluginData':'/var/lib/domoticz/plugins/Domoticz-Zigate/Data/',
'pluginZData':'/var/lib/domoticz/plugins/Domoticz-Zigate/Zdatas/',
'pluginReports':'/var/lib/domoticz/plugins/Domoticz-Zigate/Reports/',
'channel':'11,15,19,20,25,26',
'vibrationAqarasensitivity':'medium',
'resetMotiondelay':'30',
'enablegroupmanagement':'0',
'logLQI':'0',
'logFORMAT':'0'
}


c) it looks like the permit join procedure has changed a lot in both Domoticz and in the plugin. Domoticz has the new button on the settings page and the plugin has the web interface on port 9440. Can you please clarify how these work together, what are the exact steps a user should follow? My existing instructions don't appear to be valid for this new setup method.



d) if a user already has a working system with the old Domoticz package and plugin package 4.4.9, they run

Code: Select all

apt update && apt upgrade
to update the packages and they restart Domoticz, is it expected that all devices will continue working without any issues?
Daniel Pocock, Debian Developer
https://danielpocock.com
pipiche
Posts: 2009
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: preparing Zigate Debian package v4.12.087

Post by pipiche »

pocock wrote: Thursday 31 December 2020 9:37 The current Debian package is plugin 4.4.9

I started looking at making an update for 4.12.087

Can you please comment on a few things:

a) I found it will not work any more if these user doesn't add HomeFolder to their PluginConf.txt file, could you adapt the code to work without HomeFolder specified? This would avoid the prompt for some users to compare the different file versions.

Code: Select all

--- /etc/domoticz/plugins/Domoticz-Zigate/PluginConf.txt.4.4.9	2020-12-30 21:06:24.307483538 +0100
+++ /etc/domoticz/plugins/Domoticz-Zigate/PluginConf.txt	2020-12-30 21:12:13.833698021 +0100
@@ -1,4 +1,5 @@
 {
+'HomeFolder':'/usr/lib/domoticz/plugins/Domoticz-Zigate/',
 'pluginData':'/var/lib/domoticz/plugins/Domoticz-Zigate/Data/',
 'pluginZData':'/var/lib/domoticz/plugins/Domoticz-Zigate/Zdatas/',
 'pluginReports':'/var/lib/domoticz/plugins/Domoticz-Zigate/Reports/',
HomeFolder is not something related to the plugin. However homedirectory is the corresponding of the Domoticz HomeFolder and if it doesn't exist at startup it is automatically created.



b) are any other config file changes that I should consider? Here is the existing file on Debian with plugin 4.4.9:

Code: Select all

$ cat /etc/domoticz/plugins/Domoticz-Zigate/PluginConf.txt
{
'pluginData':'/var/lib/domoticz/plugins/Domoticz-Zigate/Data/',
'pluginZData':'/var/lib/domoticz/plugins/Domoticz-Zigate/Zdatas/',
'pluginReports':'/var/lib/domoticz/plugins/Domoticz-Zigate/Reports/',
'channel':'11,15,19,20,25,26',
'vibrationAqarasensitivity':'medium',
'resetMotiondelay':'30',
'enablegroupmanagement':'0',
'logLQI':'0',
'logFORMAT':'0'
}
"pluginConfig": "/var/lib/domoticz/plugins/Domoticz-Zigate/Conf/", # Config files 1 per ZiGate ( R should be ok )
"pluginData": "/var/lib/domoticz/plugins/Domoticz-Zigate/Data/", # Databases ( R/W)
"pluginHome": "/var/lib/domoticz/plugins/Domoticz-Zigate/", # Plugin Home directory
"pluginLogs": "/var/lib/domoticz/plugins/Domoticz-Zigate/Logs/", # plugin Logs file ( R/W)
"pluginOTAFirmware": "/var/lib/domoticz/plugins/Domoticz-Zigate/OTAFirmware/", # Folder where to find the Device firmware update
"pluginReports": "/var/lib/domoticz/plugins/Domoticz-Zigate/Reports/", # Folder where are store the Map Reports ( R/W )
"pluginWWW": "/var/lib/domoticz/plugins/Domoticz-Zigate/www/", # Web pages for the plugin



c) it looks like the permit join procedure has changed a lot in both Domoticz and in the plugin. Domoticz has the new button on the settings page and the plugin has the web interface on port 9440. Can you please clarify how these work together, what are the exact steps a user should follow? My existing instructions don't appear to be valid for this new setup method.
Domoticz changes its behaviour without notice and it is hard on the plugin side to follow. The most important thing is the plugin never get a notification from Domoticz when there is a change to this Add Device button.

Here is the plugin wiki which explains what to do:
https://github.com/pipiche38/Domoticz-Z ... gDevice.md


d) if a user already has a working system with the old Domoticz package and plugin package 4.4.9, they run

Code: Select all

apt update && apt upgrade
to update the packages and they restart Domoticz, is it expected that all devices will continue working without any issues?
Are you talking about 4.4.9 or 4.9.4 ? if it is 4.9.4 this should work. if it is 4.4.9 I have no clue but there is a good chance that it doesn't work
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
pipiche
Posts: 2009
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: preparing Zigate Debian package v4.12.087

Post by pipiche »

BTW, I plan to issue an update to 'stable' branche 4.11 most-likely on Jan 1st ou 2nd. I would strongly recommend to have the package on stable rather than beta branch
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
pocock
Posts: 66
Joined: Monday 17 September 2018 9:39
Target OS: Linux
Domoticz version:

Re: preparing Zigate Debian package v4.12.087

Post by pocock »

Yes, I can wait for stable 4.11.x

Here is some more detail, any static file (e.g. *.py) is installed under /usr and from there I have symlinks to the other locations (/var, /etc) to make sure that:

a) the plugin code can find things in the way you are developing it, but

b) Linux users who expect things to be split between /usr, /etc and /var will be completely comfortable, upgrades work, etc

Code: Select all

$ ls -l /usr/lib/domoticz/plugins/Domoticz-Zigate/
total 60
drwxr-xr-x 1 domoticz domoticz   322 Dec 30 21:17 Classes
lrwxrwxrwx 1 domoticz domoticz    37 Aug  6  2019 Conf -> /etc/domoticz/plugins/Domoticz-Zigate
drwxr-xr-x 1 domoticz domoticz   766 Dec 30 21:17 dns
drwxr-xr-x 1 domoticz domoticz   298 Dec 30 21:17 images
lrwxrwxrwx 1 domoticz domoticz    41 Dec 30 20:45 Logs -> /var/log/domoticz/plugins/Domoticz-Zigate
-rw-r--r-- 1 domoticz domoticz   188 Dec 30 20:43 MANIFEST.in
drwxr-xr-x 1 domoticz domoticz  1260 Dec 30 21:17 Modules
drwxr-xr-x 1 domoticz domoticz   144 Dec 30 21:17 OTAFirmware
-rwxr-xr-x 1 domoticz domoticz 48089 Dec 30 20:43 plugin.py
drwxr-xr-x 1 domoticz domoticz    42 Dec 30 20:48 __pycache__
drwxr-xr-x 1 domoticz domoticz   332 Dec 30 21:17 serial
drwxr-xr-x 1 domoticz domoticz   302 Dec 30 21:17 Tools
drwxr-xr-x 1 domoticz domoticz  3210 Dec 30 21:17 www
For the OTAFirmware, what you distribute in the repository goes in /usr

If people have to obtain things from third party sources (e.g. web sites, extraction from a device, ...) then we have to find a solution, for example:

a) giving the users a script that downloads firmware to /var/cache/.... and symlink to there

b) giving users a script that downloads the firmware and rolls it into Debian and RPM packages on demand. In this method, the files end up in /usr/lib/...

Furthermore, it would be useful if the plugin is able to look for firmware in multiple locations, for example, we may need to configure it with a list or 2 or 3 directories such as [ '/var/cache/domoticz/plugins/Domoticz-Zigate/OTAFirmware' , '/usr/lib/domoticz/plugins/Domoticz-Zigate/OTAFirmware' ]
Daniel Pocock, Debian Developer
https://danielpocock.com
pocock
Posts: 66
Joined: Monday 17 September 2018 9:39
Target OS: Linux
Domoticz version:

Re: preparing Zigate Debian package v4.12.087

Post by pocock »

I've built a package of 4.12.102 and placed it in the apt repository for Debian sid, Debian buster and Raspbian buster

The package should install using the usual instructions

Apt should upgrade the package automatically for anybody who installed the old version using apt.
Daniel Pocock, Debian Developer
https://danielpocock.com
pipiche
Posts: 2009
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: preparing Zigate Debian package v4.12.087

Post by pipiche »

Thanks @pocock
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