Closed dpocock closed 5 years ago
Please provide the Log file as we cannot really see what is going on. Reporting via the forum would a good start
and can you explain how you put your device in discovery mode ? (for the xiaomi temp sensor for example)
for the Xiaomi temp sensor, I hold down the button until the blue light flashes three times and then I press the button again a few times until it flashes again.
I erased persistent data and deleted the Zigate from the hardware tab so that I would start again fresh and capture the logs from the beginning.
After joining the Xiaomi temp sensor, it was working for about 15 minutes. Then I restarted the domoticz process and the values didn't update any more.
Is there anything in particular to search for in the logs or do I need to post the whole log file?
Here are the steps I followed:
Please provide logs, we cannot analyse anything without it. Then when you do such Erase, did you also remove the DeviceList-xx which is the Plugin database ?
Again, this is not the best place , please use the forum where the community will benefits from that and where you can also get support.
I posted it in the forum: https://www.domoticz.com/forum/viewtopic.php?f=68&t=26121
I attached the logs but can't see them in the post
It appears difficult putting attachments in the forum, so here are the logs:
Then when you do such Erase, did you also remove the DeviceList-xx which is the Plugin database ?
It turns out this was quite a useful clue, it occurred to me some time after seeing this question that maybe the plugin is trying to write a file somewhere that it can't.
I'm currently testing the Debian packages of Domoticz and preparing to make an official package of the Zigate plugin to go with that. So my environment is like this:
/usr/lib/domoticz/plugins/Domoticz-Zigate
root
and not modifiable by other usersdomoticz
user on Linux, so it can't write to that directoryTo test, I tried making the directory writeable by the domoticz
user, repeated the whole setup process (erase, join, etc) and then I saw that DeviceList-2.txt
was created. I tried a few restarts of the process and everything still works after each restart.
Can you please tell me:
/var/lib/domoticz/something
? Is there a config option or will it require a patch?I'll also post more details in the Debian ITP about how I cross-compile the Domoticz package and Zigate package on a Debian machine to be installable with apt
on Raspbian stretch.
@dpocock Daniel, I don't know if you had a look to the Wiki, but there are some information available there.
I understand a bit better what you try to do , and I appreciate your effort to make a package of it.
The plugin has to manage its own database as Domoticz doesn't allow to do so via the Python Plugin Framework.
DeviceList-xx.txt is the plugin DB , where xx stands for the HardwareID of the plugin in Domoticz. ( at each startup, the plugin is creating a local copy of the file DeviceList-xx.txt )
PluginConf.txt ( PluginConf-xx.txt ) are config files which can be updated by the end user
In case you 'allowStoreDiscoveryFrames':'0' enable with '1', then a file will be created under Zdatas (which is under Domoticz-Zigate)
Some reports could be created and today 'Stable' 4.0.x they will be created on the Domoticz-Zigate directory:
LQI_report-
We are in the process of working on 4.1.x (currently under dev) and we will be implementing various report and also going to write some files on:
This is actually not as hard as it may appear, I've worked on many packages with similar issues. Package maintainers can do small workarounds with symlinks.
If the whole directory needs to be writeable then it is difficult but if all the writeable files are in a subdirectory then it is very easy. Can you just change the code to look for Zdatas/DeviceList-xx.txt
instead of DeviceList-xx.txt
?
For files that the user needs to modify, my package will install them in /etc/domoticz/plugins/Domoticz-Zigate
and I can symlink to /usr/lib/domoticz/plugins/Domoticz-Zigate/PluginConf-xx.txt
or you could also have a directory plugins/Domoticz-Zigate/etc
and I symlink the whole directory, that is easier to maintain in future.
If you can make every directory name configurable in a config file that is ideal but if that is too much work right now, simply having dedicated subdirectories for each type of file means that it is easy for a package maintainer to create the symlinks.
if the whole directory needs to be writeable then it is difficult but if all the writeable files are in a subdirectory then it is very easy. Can you just change the code to look for Zdatas/DeviceList-xx.txt instead of DeviceList-xx.txt ?
I need to think , as current installation must continue to work.
For files that the user needs to modify, my package will install them in /etc/domoticz/plugins/Domoticz-Zigate and I can symlink to /usr/lib/domoticz/plugins/Domoticz-Zigate/PluginConf-xx.txt or you could also have a directory plugins/Domoticz-Zigate/etc and I symlink the whole directory, that is easier to maintain in future.
Sound Good
If you can make every directory name configurable in a config file that is ideal but if that is too much work right now, simply having dedicated subdirectories for each type of file means that it is easy for a package maintainer to create the symlinks.
That I think what I'm going to address later, but that is the proper way forward
Implementation part of #299 https://github.com/sasu-drooz/Domoticz-Zigate/wiki/PluginConf
Link to #299. If not please feel free to re-open
Describe the bug I joined 2 temperature sensors (Xiaomi) and 1 motion sensor (Osram Lightify). In the devices tab, they appear in the list with the initial readings and the "Last Seen" column shows the time they joined. The values and "Last Seen" times are not changing.
To Reproduce Steps to reproduce the behavior:
Expected behavior Values updating periodically
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Plugin (please complete the following information):
Additional context Add any other context about the problem here.