I’m working on a custom device type that pulls the wind speed down from Weather-underground with the getWeatherFeature() method. It then sends the wind speed value to a ZigBee device over the level cluster. The app is done and working here is the code:
I would like to reach out to the developer community for some best practice guidance. All input is welcome as I plan on using this app as a sample in an article I’m working on.
First off this Custom Device type is unique (to me anyway) since it gets data from a web service and then sends that data to a ZigBee device without the use of a Smart App. I do this on the poll cycle by calling the getWeatherFeature() method, parsing the wind data out and then sending it with a ZigBee level cluster command. As long as my poll method gets called everything seems to be running just fine. Is this best practice? Is the poll schedule something I can rely on or should I do this with a Smart App? I noticed in the weather underground sample custom device type it has; installed(), uninstalled(), and updated() methods. I thought those methods were only called when placed in a Smart App? To test, I put them in my custom device type and sure enough they get called?? Is this an undocumented feature of a custom device type? Do I need them??