Some time ago I asked to add support for a valve thermostat from Danfoss. While trying to find out the proper device name I've digged a little bit through the code and it seems that device detection is basically done by hard coded device name detection, right?
I do not have a lot "in production" experience but that seems likely to break, e.g. after a firmware update.
However, I have to admit that I have no suggestion for a less error prone approach. (I'm just wondering why the devices just don't report what kind of device they actually are.)
But if it the detection is already string based there could be an alternative path for device detection by just using the user given name. A user might just add a pre- or postfix, like [DHC-Z_WAVE_VERSION_X-VALVE] which could be translate in a generic device.
Some time ago I asked to add support for a valve thermostat from Danfoss. While trying to find out the proper device name I've digged a little bit through the code and it seems that device detection is basically done by hard coded device name detection, right? I do not have a lot "in production" experience but that seems likely to break, e.g. after a firmware update. However, I have to admit that I have no suggestion for a less error prone approach. (I'm just wondering why the devices just don't report what kind of device they actually are.) But if it the detection is already string based there could be an alternative path for device detection by just using the user given name. A user might just add a pre- or postfix, like
[DHC-Z_WAVE_VERSION_X-VALVE]
which could be translate in a generic device.What do you think?