Hi all,
With the new functionality that’s being introduced such as reading all the configuration from a device when it is first detected (i.e. when there is no XML file!) comes a small downside. If the database is not correct for a device, then initialisation can be delayed, or stall. For example, if there is a configuration item listed in the database that doesn’t exist in a device, the initialisation sequence will request this, but the device will not respond (in my opinion this is poor protocol design on behalf of zwave, but we have to work with it). The binding should work past this (eventually - hopefully!), but it’s not nice, and in the case of battery devices it can delay initialisation considerably due to the wakeup cycle…..
So, what to do - there are two options…
My preference is to fix the database when these problems arise. To me, this is the correct way since even if we remove this functionality from the initialisation stages, timeouts will still occur when you ask for an update of the configuration through HABmin, since it will still request parameters that don’t exist.
Fixing the database isn’t hard, but it does mean we need to be a little more careful when making changes so that we correctly handle the different versions. For some devices, this is probably well defined (Fibaro nicely version all their manuals and devices), for others, it may be more problematic. However, I suspect that devices that are likely to change are the ones that are better documented, so hopefully this isn’t an issue.
There are 2 ways of handling the versioning - firstly by using the type/id and setting up a separate product. This is how it’s currently done for the 1 or 2 devices that have been split to different versions, but it has issues as we need to identify what type/id are related to what version, and secondly, some devices don’t do this - they use the same type/id for different versions, and then increment the firmware version.
So, enough about the issue - how to solve it -:
The database will be extended to add a config file version tag as follows.
<ConfigFile VersionMax=“1.8">fibaro/fgk101-18.xml</ConfigFile>
<ConfigFile VersionMin=“2.1” VersionMax="2.3">fibaro/fgk101-21.xml</ConfigFile>
Without the version tag(s) the database will work as it always has, so there’s no need to change everything if it’s not necessary. VersionMin and VersionMax are both optional, so we can just set a max to use a file up to a certain version. Version tags shouldn’t overlap though!
How to detect the issue…
Get a debug log after starting he binding and use the log file analyser to view the log. Filter the list to only display the node with the issue (by pressing the FILTER button). It should be plain where the issue is, and typically you would expect to see the initialisation stalled somewhere - you could expect to see something similar to the figure below…
This will show the error - now the database needs to be updated to remove this configuration parameter. Ideally to avoid breaking other versions we should try and work out what "Application Version" you have (HABmin displays this in the INFORMATION tab) and produce the correct versions for the device.
I hope this makes sense… I’m open to ideas of course, but I think getting the database right is important - this isn’t the first time this issue has arisen and since devices simply don’t respond to requested parameters they don’t support, it’s difficult to work around, and important that we don’t request such parameters since each timeout blocks the network from doing other things for up to 15 seconds!…
Chris
Hi all,
With the new functionality that’s being introduced such as reading all the configuration from a device when it is first detected (i.e. when there is no XML file!) comes a small downside. If the database is not correct for a device, then initialisation can be delayed, or stall. For example, if there is a configuration item listed in the database that doesn’t exist in a device, the initialisation sequence will request this, but the device will not respond (in my opinion this is poor protocol design on behalf of zwave, but we have to work with it). The binding should work past this (eventually - hopefully!), but it’s not nice, and in the case of battery devices it can delay initialisation considerably due to the wakeup cycle…..
So, what to do - there are two options…
- Remove this functionality from the initialisation. It’s not something we’ve had before, so I could just remove it. However, it’s useful information to have, and it’s sometimes confusing to beginners as they don’t know why this information isn’t available, and why it sometimes disappears (which occurs when the XML is deleted). I’m not in favour of this, and in any case, the root cause of the issue is the database is wrong and the underlying problem will still occur in other circumstances….
- Fix the database! If there are configurations in the database that don’t exist, then they should be removed. The issue here is that for some devices we add all the configuration for all versions, and not all versions of the devices firmware support all parameters. Fibaro devices are a perfect example of this! Here we need to split out the different versions into separate products - this has been done already for a couple of devices to avoid timeouts (well before the config parameter check was added to initialisation).
My preference is to fix the database when these problems arise. To me, this is the correct way since even if we remove this functionality from the initialisation stages, timeouts will still occur when you ask for an update of the configuration through HABmin, since it will still request parameters that don’t exist.
Fixing the database isn’t hard, but it does mean we need to be a little more careful when making changes so that we correctly handle the different versions. For some devices, this is probably well defined (Fibaro nicely version all their manuals and devices), for others, it may be more problematic. However, I suspect that devices that are likely to change are the ones that are better documented, so hopefully this isn’t an issue.
There are 2 ways of handling the versioning - firstly by using the type/id and setting up a separate product. This is how it’s currently done for the 1 or 2 devices that have been split to different versions, but it has issues as we need to identify what type/id are related to what version, and secondly, some devices don’t do this - they use the same type/id for different versions, and then increment the firmware version.
So, enough about the issue - how to solve it -:
The database will be extended to add a config file version tag as follows.
<ConfigFile VersionMax=“1.8">fibaro/fgk101-18.xml</ConfigFile>
<ConfigFile VersionMin=“2.1” VersionMax="2.3">fibaro/fgk101-21.xml</ConfigFile>
Without the version tag(s) the database will work as it always has, so there’s no need to change everything if it’s not necessary. VersionMin and VersionMax are both optional, so we can just set a max to use a file up to a certain version. Version tags shouldn’t overlap though!
How to detect the issue…
Get a debug log after starting he binding and use the log file analyser to view the log. Filter the list to only display the node with the issue (by pressing the FILTER button). It should be plain where the issue is, and typically you would expect to see the initialisation stalled somewhere - you could expect to see something similar to the figure below…
This will show the error - now the database needs to be updated to remove this configuration parameter. Ideally to avoid breaking other versions we should try and work out what version you have (HABmin displays this in the INFORMATION tab) and produce the correct versions for the device.
--
You received this message because you are subscribed to the Google Groups "openhab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.
To view this discussion on the web visit https://groups.google.com/d/msgid/openhab/19f39a73-f210-4bca-81ae-4e02e161693a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi all,
With the new functionality that’s being introduced such as reading all the configuration from a device when it is first detected (i.e. when there is no XML file!) comes a small downside. If the database is not correct for a device, then initialisation can be delayed, or stall. For example, if there is a configuration item listed in the database that doesn’t exist in a device, the initialisation sequence will request this, but the device will not respond (in my opinion this is poor protocol design on behalf of zwave, but we have to work with it). The binding should work past this (eventually - hopefully!), but it’s not nice, and in the case of battery devices it can delay initialisation considerably due to the wakeup cycle…..
So, what to do - there are two options…
- Remove this functionality from the initialisation. It’s not something we’ve had before, so I could just remove it. However, it’s useful information to have, and it’s sometimes confusing to beginners as they don’t know why this information isn’t available, and why it sometimes disappears (which occurs when the XML is deleted). I’m not in favour of this, and in any case, the root cause of the issue is the database is wrong and the underlying problem will still occur in other circumstances….
- Fix the database! If there are configurations in the database that don’t exist, then they should be removed. The issue here is that for some devices we add all the configuration for all versions, and not all versions of the devices firmware support all parameters. Fibaro devices are a perfect example of this! Here we need to split out the different versions into separate products - this has been done already for a couple of devices to avoid timeouts (well before the config parameter check was added to initialisation).
My preference is to fix the database when these problems arise. To me, this is the correct way since even if we remove this functionality from the initialisation stages, timeouts will still occur when you ask for an update of the configuration through HABmin, since it will still request parameters that don’t exist.
Fixing the database isn’t hard, but it does mean we need to be a little more careful when making changes so that we correctly handle the different versions. For some devices, this is probably well defined (Fibaro nicely version all their manuals and devices), for others, it may be more problematic. However, I suspect that devices that are likely to change are the ones that are better documented, so hopefully this isn’t an issue.
There are 2 ways of handling the versioning - firstly by using the type/id and setting up a separate product. This is how it’s currently done for the 1 or 2 devices that have been split to different versions, but it has issues as we need to identify what type/id are related to what version, and secondly, some devices don’t do this - they use the same type/id for different versions, and then increment the firmware version.
So, enough about the issue - how to solve it -:
The database will be extended to add a config file version tag as follows.
<ConfigFile VersionMax=“1.8">fibaro/fgk101-18.xml</ConfigFile>
<ConfigFile VersionMin=“2.1” VersionMax="2.3">fibaro/fgk101-21.xml</ConfigFile>
Without the version tag(s) the database will work as it always has, so there’s no need to change everything if it’s not necessary. VersionMin and VersionMax are both optional, so we can just set a max to use a file up to a certain version. Version tags shouldn’t overlap though!
How to detect the issue…
Get a debug log after starting he binding and use the log file analyser to view the log. Filter the list to only display the node with the issue (by pressing the FILTER button). It should be plain where the issue is, and typically you would expect to see the initialisation stalled somewhere - you could expect to see something similar to the figure below…
This will show the error - now the database needs to be updated to remove this configuration parameter. Ideally to avoid breaking other versions we should try and work out what "Application Version" you have (HABmin displays this in the INFORMATION tab) and produce the correct versions for the device.
I would steer clear! ;)