I am working on a device driver for the Dyson Heat/Cool Fan and I’ve realized I have no idea what I am doing. What I was hoping to do is use the thermostat capability, but that has extra buttons I don’t want to see. Is there a better way to go about this?
All I really need are the following buttons:
On/Off
Fan On (This would be for cooling)
Auto
Fan Speed (Adjustable 1 -10)
Heating on/off
Heat Temp Setting
Oscillation On/Off
Diffuse On/Off
Night Mode On/Off
Timer (Adjustable)
Are there any examples I can follow on how to create a custom device type like this? It going to control a Lan Device.
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
2
If you haven’t coded a LAN DTH before, then start with a very, very, very simple one … i.e., just get on/off working; and then incrementally add more functions, one at a time, until it breaks. There is no debugger, so if you try to code too much at once, you can easily get bogged down and not realize where the problem is.
Conversely, if you are confident, you could start with a WiFi/LAN based thermostat DTH (if you can find an example open source), and then trim out the parts you don’t want. Deleting Tiles and methods is generally easy and safe.
I don’t have documentation on it but someone has written this cool little python module that interfaces with it nicely. I was just going to set up a web server and have each button reference a specific end point. He also gives an example on how to start a service that listens for events on the dyson which I can send back to the device type.
I’ve tested all of the scripts from my webserver host, I just want to create a device type that will reflect the data that returns as well as send the appropriate end points. If I can figure out how to get the buttons I want in the device to display correctly I will be able to figure out what to do as I go from the docs.
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
4
Using the Classic API, “Standard Tiles” are pretty easy to use. Each is attached to a specific Attribute and it’s States, and a Command Method to call when tapped.
But LAN Connected devices are inherently more complex than Z-Wave or ZigBee, due to the need for a Service Manager SmartApp. The Command Methods need to refer to the SmartApp.