I'm not a coder so I don't think I will be able to make this improvement to the code. But I think that others might benefit if something to solve these issues can be implemented.
1. Part of my network use parasitic power and can therefore not use the Simultaneous read option. Currently I'm doing this change in the code as a work around
hardware/1Wire.cpp
Code: Select all
if (m_sensors.size() > 200) # will not use Simultaneous read unless over 200 devices
2. Domoticz is not the only user of my 1wire network. I use a HA7NET and then everything including OWFS is communicating with the OWSERVER process. Maybe it is due to the slow ha7net, network layout or the type of sensors I have, but I have to heavily rely on cached values to get a stable network. With my cache tuning I'm very happy with system stability. I have around 20 devices connected to my HA7NET. When Domoticz refresh all sensors at the same time it puts load on my network and destroys the cache. E.g. if cache expired all 20 devices have to be refreshed and that is a very slow process in parasitic mode. My second modification is therefore to introduce a 3 sec sleep in the loop. By doing that only some of the devices will have to refresh there cached value. And the whole update process goes very smooth and does not interfere with my other scripts.
hardware/1Wire.cpp
Code: Select all
for (itt=m_sensors.begin(); itt!=m_sensors.end() && !m_stoprequested; ++itt)
{
sleep_milliseconds(3000);
I just wanted to share my experience and if others are in similar position maybe some changes can be done. If not I'm happy to just make my own changes before compiling.
PS. I'm normally not using OWFS. My OWSERVER is not even running in my Domoticz VM. All my other script uses the common ow tools. E.g. owread -s <server> <id> or the ow perl lib. So for future development it would be interesting to not read from /mnt/1wire but instead use the owdir, owread, etc. and just specify the server IP.
Thanks,
Patrik