So for me this all started with just wanting my porch lights to automatically turn on at dusk and off at dawn. A day/night sensor ~should~ be the easy solution, but neither fixture would accommodate one, and given that I rent my house, I couldn't just go install new fixtures or install timer switches.
Some time ago I saw a post about how to root the hub, and given Home Depot had a sale going on, it was the cheapest option and the obvious choice. Appalled at the absolute bloat (seriously, a 45 MB app to turn light bulbs on and off, just, really?!) and terrible reliability of the wink app (scheduler worked correctly 1 out of 7 days), it was time to start hacking.
*** Update: These tutorials are outdated. See my project log "Firmware update & rootwink forums" for the new stuff.***
Obtaining root proved to be more of a challenge than the HaD blog post seemed to indicate, but after a couple hours of tweaking and Google searches, I was logged in as root. (BTW, the first two command of this XDA forums post were what finally got me logged in as root. ) Next, I had to figure out how to control the bulbs via the "aprontest" command. Again, Google was of little help here, and the usual "--help" command line argument didn't give any examples (a stack of arguments are required to make it function), so I had to figure it out via trial and error message. Below is the "help" execution, for reference:
Usage: aprontest [OPTION]... Send commands and list information about connected devices Operations: -a Add a new home automation device -n Manually add a home automation device to the database only. USE WITH CAUTION. Only supports zigbee at this time. -d Delete a home automation device -f Force delete a home automation device from the database only. USE WITH CAUTION. Only supports zigbee at this time. -u Update the state of a home automation device with a new value -e Force a refresh of a home automation device -g Set a generic callback for a radio for one minute of radio testing -l List general information about automation devices, or specific information about one device --set-name Set user-readable name for a device Other Options: -r Specify a radio for an Add Device or Generic Callback operation. One of lutron, zwave, zigbee, kidde -m Specify a master device ID for a Delete, Update, Refresh, or List operation -t Specify an attribute ID for an Update operation -v Specify a new value to set for an Update operation Kidde Specific Operations: -k Set Kidde system ID Z-Wave Specific Operations: --zwave_controller_reset Reset the zwave controller. USE WITH CAUTION. Existing z-wave network will be lost. --zwave_remove_failed Remove a failed zwave device. --zwave_replace_failed Replace a failed zwave device. --zwave_learn_mode Enter Learn Mode on the Zwave Controller. --zwave_controller_shift Hand off control to another (new) Zwave controller. --zwave_exclusion_mode Enter Exclusion Mode on the Zwave Controller.
So first, to add a device (again the smartphone app completely failed here), the command is:
aprontest -a -r zigbee
Then the hub searches for any new zigbee devices and adds them. To view all paired devices, use
[root@flex-dvt ~]# aprontest -l Found 3 devices in database... MASTERID | INTERCONNECT | USERNAME 1 | ZIGBEE | front porch light 2 | ZIGBEE | kitchen porch light 3 | ZIGBEE | Engr unitNote: you can name the device (USERNAME column) with
aprontest -m 3 --set-name "living room"which will change the name of device #3 ("Engr unit) to living room. Note: -m 3 specifies device 3
[root@flex-dvt ~]# aprontest -m 3 --set-name "living room" [root@flex-dvt ~]# aprontest -l Found 3 devices in database... MASTERID | INTERCONNECT | USERNAME 1 | ZIGBEE | front porch light 2 | ZIGBEE | kitchen porch light 3 | ZIGBEE | living roomNext, each device has its own attributes you can set. In the case of the bulb, there is power (ON or OFF, case sensitive) and brightness (1 to 255). View as shown.
[root@flex-dvt ~]# aprontest -m3...Read more »