Last version: 1.0.3 (2016-07-09)
Tested with: v2.2.4-rc2
STATUS: Stable
Download: Online Appstore
userModule XMLDevice
XMLDevice has been developed in response to the existing httpDevice. Both do create "normalised" virtual devices that are compatible with the Z-Way Home Automation system.
This module has been derived from the OpenWeather module. It is meant to turn a single XML element into a virtual device. In the configuration screen the user has to specify a number of parameters that defines the virtual device. It is important to adhere as close as possible to standard terminology as defined in the scales.xml file from Z-Way.
For the time being sources are only kept on Github.
[userModule] XMLDevice
[userModule] XMLDevice
Since 29-12-2016 I am no longer a moderator for this forum
Re: [userModule] XMLDevice
I would like to extend this module with an automatic selection of a metric-type icon to be displayed on the Home Automation screen.
- What is the path to the icon folder used with the automatically generated virtual devices?
- How to deal with user supplied icons?
Re: [userModule] XMLDevice
A few days ago, I did encounter a problem with this module. The values assigned to this virtual device, probably is of type:string. I found out because the userModule Arithmetic could not deal with the value. That worked after I added parseFloat to the code (not yet on github)
So I guess the module should at least have the options to deliver the retrieved XML element as:
type:float
type:int
type:text
Unfortunately the Z-Way API does not list a DeviceType in which I can store text. Float and Int types can quite well fit in sensorMultilevel, but text is appropriate.
How do I solve this? Can I use DeviceType text, just as in the new InfoWidget module? Is DeviceType:text now formally part of your apiary.io, and recognised by the HA engine?
17:00 Updated last two lines
So I guess the module should at least have the options to deliver the retrieved XML element as:
type:float
type:int
type:text
Unfortunately the Z-Way API does not list a DeviceType in which I can store text. Float and Int types can quite well fit in sensorMultilevel, but text is appropriate.
How do I solve this? Can I use DeviceType text, just as in the new InfoWidget module? Is DeviceType:text now formally part of your apiary.io, and recognised by the HA engine?
17:00 Updated last two lines
Re: [userModule] XMLDevice
It would be good to add a checkbox in options to select between numeric (float/int) and text values and change deviceType accordingly. text like in InfoWidget is perfect.
Re: [userModule] XMLDevice
Thanks, this helps to simplify it for the user side.
Re: [userModule] XMLDevice
There is a new release on Github (see link in first post) that uses PoltoS' suggestion.
Worked for me as text and numerical nodes. The later both with float/integer conversions.
Worked for me as text and numerical nodes. The later both with float/integer conversions.
Re: [userModule] XMLDevice
I've also updated CodeDevice and HTTPDevice recently on github. I think you might want to add these new features to your module too.
https://github.com/Z-Wave-Me/home-autom ... 51123d228f
https://github.com/Z-Wave-Me/home-autom ... 51123d228f
Re: [userModule] XMLDevice
It crossed my mind yesterday while perusing the changes on github.PoltoS wrote:I've also updated CodeDevice and HTTPDevice recently on github. I think you might want to add these new features to your module too.
The starting point of XMLDevice was in the OpenWeather module, from which I derived this generalisation for a single XML sensor module. Actually a a slow module for not to rapidly changing data. As a result, as it is now, the minimum polling interval is one minute.
If you think a device like this is something that should be part of your core collection of modules, please feel free to take it further. Almost all IP comes from you anyhow .
Though I have learned a little bit of JS recently, I say it again, I am not a programmer! Making this in something comparable to the http device is well beyond my league and ambitions.
Re: [userModule] XMLDevice
We will try to review it once we are ready with our modules "shop"
Re: [userModule] XMLDevice
If you do want your own XML Device, don't try to fix mine, but throw it away, and do it properly based on the idea/functionality of the present modulePoltoS wrote:We will try to review it once we are ready with our modules "shop"