Hi Everyone!
I’ve created a digital solar tracking controller that has xbee functionality built into it for serial command/response capability (think telnet), so it would seem that creating a SmartThings device type/handler should be a straight forward process, but I’m quickly getting confused, so maybe someone can clarify the development process for my scenario (I’ve been writing firmware for years in C so this high level Groovy stuff is pretty mind blowing).
Hardware wise my device is basically equivalent to an Arduino with an Zbee shield. My Xbee doesn’t have the special firmware of the SmartThings Arduino Shield so I guess I’m going to have to implement all the handshaking for joining the hub unless there’s some library for that I haven’t caught on to.
The phase 1 goal: There’s all sorts of tracking data and sensor values that could be shared, not to mention configuration values, but that can all wait. For now the goal is to be able to issue a command to start tracking, and stop tracking (park), Additionally the solar tracker has a wind sensor input which triggers a suspension of tracking and puts the array in safe park position. The tracker posts these wind events which need to become triggers like a motion detector event for a SmartApp to send a text or whatever.
First issue: What is my thing like that I can start from?
So solar tracker can be thought of as ON when tracking, and OFF when parked, but there’s this extra high wind mode and a maintenance (cleaning) mode as well. Should i start with a basic switch or is there something better?
Second issue: Zigbee Clusters
So my controller just uses a Xbee module as a wireless serial modem, and doesn’t even access api mode, just a few AT commands. Am I right that the Zigbee cluster library specifications are specifically targeted towards devices utilizing the other zigbee (non-serial) i/o pins for hardware control? And since I’m just using the serial interface most of that doesn’t matter?
With something like the refresh method for example, I need to ask my firmware what the mode is, not the zigbee module’s firmware, so why would I ever want to follow the zigbee device type example with a call like: zigbee.readAttribute(0x0B04, 0x050B)
That won’t send the serial data to my micro unless I’m missing something here.
And if I don’t follow the example, then what’s a good example for my situation?
Thanks for any pointers