Attaching Devices to Rooted Wink Hub?

Are you stuck at a particular point, can't find the answer elsewhere, here's the place to ask.
mothpaul
Posts: 5
Joined: Sat Jan 10, 2015 2:38 pm

Attaching Devices to Rooted Wink Hub?

Postby mothpaul » Sat Jan 10, 2015 2:46 pm

I have rooted my new Wink Hub, and I can ssh into it. I have the stock firmware, which I think is version .33

I can send curl commands to my rooted Wink Hub from my Raspberry Pi, but I don't have any devices attached to the Hub. If I had attached devices (light bulbs, etc), I beleive I could command them, but I can seem to figure how to attached devices to this Hub that is not connected to the Wink Cloud and without an iOS app.

Any help would be appriciated.

CloneNum3
Site Admin
Posts: 107
Joined: Wed Jan 07, 2015 10:02 am

Re: Attaching Devices to Rooted Wink Hub?

Postby CloneNum3 » Sat Jan 10, 2015 4:45 pm

Here is the database information I have for a GE Link BR30 bulb:

Code: Select all

[root@flex-dvt tmp]# aprontest -l -m 1
Gang ID: 0x7ce6f3cb
Manufacturer ID: 0x10dc, Product Number: 0xce3d
Device has 12 attributes...
New HA Dimmable Light
   ATTRIBUTE |                         DESCRIPTION |   TYPE | MODE |                              GET |                              SET
       61440 |                          ZCLVersion |  UINT8 |    R |                                1 |                                 
       61441 |                  ApplicationVersion |  UINT8 |    R |                                4 |                                 
       61442 |                        StackVersion |  UINT8 |    R |                                2 |                                 
       61443 |                           HWVersion |  UINT8 |    R |                                1 |                                 
       61444 |                    ManufacturerName | STRING |    R |                    GE_Appliances |                                 
       61445 |                     ModelIdentifier | STRING |    R |                        ZLL Light |                                 
       61446 |                            DateCode | STRING |    R |                         20140812 |                                 
       61447 |                         PowerSource |  UINT8 |    R |                                1 |                                 
           4 |                         NameSupport |  UINT8 |    R |                                0 |                                 
           1 |                              On_Off | STRING |  R/W |                               ON |                               ON
           2 |                               Level |  UINT8 |  R/W |                              163 |                              163
     1699842 |               ZB_CurrentFileVersion | UINT32 |    R |                         16974848 |                                 

[root@flex-dvt tmp]#


At this point in time, I see no reason why you shouldn't let the hub connect to the cloud. It should not update unless you instruct it to via the app. You can then add the devices via the app... or, you can use the above info as a guide and try and add it manually using the information in your /tmp/messages and the above info.

Here are some examples of controlling a bulb directly (it's very fast to respond because it does not go through the cloud) using aprontest.

Turn bulb 1 off

Code: Select all

aprontest -u -m 1 -t 1 -v OFF


Turn bulb 1 on at last set brightness

Code: Select all

aprontest -u -m 1 -t 1 -v ON


Turn bulb 1 on full brightness

Code: Select all

aprontest -u -m 1 -t 1 -v ON
aprontest -u -m 1 -t 2 -v 255


Turn bulb 1 on at lowest brightness

Code: Select all

aprontest -u -m 1 -t 1 -v ON
aprontest -u -m 1 -t 2 -v 0


-u = update
-m = id of bulb
-t = attribute (see top of post for the different attributes for the device)
-v = value

Code: Select all

[root@flex-dvt tmp]# aprontest
Usage: aprontest [OPTION]...
Send commands and list information about connected devices

Operations:
  -a            Add a new home automation device. Add an existing device to a group
  -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. Remove an existing device from a group
  -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 or group
  --set-name    Set user-readable name for a device
  --toggle-test Toggle given attribute between 0 and 255, 100 times

Other Options:
  -r <radio>    Specify a radio for an Add Device or Generic Callback operation.
                One of lutron, zwave, zigbee, kidde
  -m <id>       Specify a master device ID for a Delete, Update, Refresh, or
                List operation
  -t <id>       Specify an attribute ID for an Update operation
  -v <value>    Specify a new value to set for an Update operation
  -x <value>    Specify a group for an add, delete, or update

Kidde Specific Operations:
  -k <ID>       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.

Lutron Specific Operations:
  --lutron_pico_add <dimmerMasterId>    Add dimmerMasterId to the control list for the pico controller with masterId set via -m
  --lutron_pico_del <dimmerMasterId>    Delete dimmerMasterId from the control list for the pico controller with masterId set via -m

Zigbee Group Operations:
        -s <name>               Zigbee Add group name.
        -w <id>         Zigbee Delete group.
        -x <id> -m <id>         Zigbee Node add/remove to group. use with -a or -d

[root@flex-dvt tmp]#

mothpaul
Posts: 5
Joined: Sat Jan 10, 2015 2:38 pm

Re: Attaching Devices to Rooted Wink Hub?

Postby mothpaul » Mon Jan 12, 2015 2:56 pm

Thanks CloneNum3,

I don't know much about apron test, but I did find out how to attached devices to the Wink Hub without the app; light bulbs at least. When I tried with the app, it wouldn't do anything until I had updated the firmware, which would have eliminated my root access. I won't be updating the firmware anytime soon, unless someone can provide advantages for updating firmware - I might re-evaluate.

The trick to attaching lightbulbs was to turn on the wink bulb, then issue this aprontest command (I did it within 3 seconds of turning the bulb on):

Code: Select all

aprontest -a -r zigbee

The Hub immediately picked up the bulb and flashed it a number of times - it thereafter becames available for Wink Hub commands.

BTW - I am not seeing any difference in having the bulb turned off verses having it set at the lowest light setting

Code: Select all

aprontest -u -m 1 -t 1 -v OFF

verses

Code: Select all

aprontest -u -m 1 -t 2 -v 0


Any insight into that?

Thanks again,

CloneNum3
Site Admin
Posts: 107
Joined: Wed Jan 07, 2015 10:02 am

Re: Attaching Devices to Rooted Wink Hub?

Postby CloneNum3 » Wed Jan 14, 2015 11:41 pm

I was able to add a bulb the same way.

Code: Select all

[root@flex-dvt ]# aprontest -a -r zigbee
Add device for Zigbee
Waiting for 1 callbacks...
New Zigbee node: 1
[root@flex-dvt ]#


Something to keep in mind is the on/off and the level are separate attributes. So when attribute 1 is OFF, you can set attribute 2 to anything and it doesn't make a difference.

Code: Select all

           1 |                              On_Off | STRING |  R/W |                               ON |                                 
           2 |                               Level |  UINT8 |  R/W |                              254 |                               


But to your point, I am experiencing the same as you... the lowest (but still lit) value appears to be 1. When I set the bulb to 0 brightness, it basically turns off. I would have to hook up a volt meter to see if it's actually drawing more or less than in the off state. It may be drawing some current but just not enough to light the LEDs... or it could be the same as setting attribute 1 to OFF.

As for reason for upgrading... The newer firmware appears to be far more reliable, at least that is my experience. I have not seen a down side to upgrading.

Code: Select all

[root@flex-dvt database]# for i in `ls cf_*`
> do
> A=`cat $i`
> echo $A $i
> done
00.01 cf_build
00.01 cf_fver0
00.05 cf_fver1
00.01 cf_fver2
00.55 cf_fver3

danimal1228
Posts: 5
Joined: Sun Jan 18, 2015 11:23 pm

Re: Attaching Devices to Rooted Wink Hub?

Postby danimal1228 » Sun Jan 18, 2015 11:32 pm

I noticed that the output of aprontest on my Wink is different than that of others. I don't have the option to create Zigbee Groups. I think I am on version 00.01 "/database/cf_build = 00.01"

Is this because I am on the original version and have an older version of aprontest? Can I just install the new version of aprontest or do I need to upgrade FW?

I am reluctant to upgrade FWbecause I know I will mess it up. Everything works great now so I would prefer not to upgrade....although the Zigbee groups would be nice...


Code: Select all

[root@flex-dvt ~]# aprontest
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 <radio>   Specify a radio for an Add Device or Generic Callback operation.
      One of lutron, zwave, zigbee, kidde
  -m <id>   Specify a master device ID for a Delete, Update, Refresh, or
      List operation
  -t <id>   Specify an attribute ID for an Update operation
  -v <value>   Specify a new value to set for an Update operation

Kidde Specific Operations:
  -k <ID>   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.

winker
Posts: 7
Joined: Fri Jan 16, 2015 5:14 pm

Re: Attaching Devices to Rooted Wink Hub?

Postby winker » Mon Jan 19, 2015 10:24 am

danimal1228 wrote:I noticed that the output of aprontest on my Wink is different than that of others. I don't have the option to create Zigbee Groups. I think I am on version 00.01 "/database/cf_build = 00.01"

Is this because I am on the original version and have an older version of aprontest? Can I just install the new version of aprontest or do I need to upgrade FW?

I am reluctant to upgrade FWbecause I know I will mess it up. Everything works great now so I would prefer not to upgrade....although the Zigbee groups would be nice...



Yeah, I get what you're saying. I had mine on 0.33 for a while (rooted). I was reluctant to upgrade. But it wasn't so bad.

The only reason I upgraded was because I wanted to try the new Cree Zigbee bulbs when they come out later this month. I also wanted to test out a tripper sensor, which v.33 didn't have.

If you look for an old Wink App apk (Android installable), you can add devices without updating your hub. The newer version of the Wink Android app requires you to update your hub before it'll let you add devices. Not so with the old app. You'll be limited to the devices the app supported at the time of course (GE Link bulbs are there, but not the Cree ones). But at least your guaranteed to be able to use that 0.33 hub with the devices that were out at the time.

CloneNum3
Site Admin
Posts: 107
Joined: Wed Jan 07, 2015 10:02 am

Re: Attaching Devices to Rooted Wink Hub?

Postby CloneNum3 » Thu Jan 22, 2015 8:59 pm

I have on my to-do list to write a script that does all the updating work for you... for users who get to the point where they have root and network connectivity. I think it should be something as simple as:

Code: Select all

curl -s http://foobar.com/upgrademywink.sh | sh


and let it do it's thing. I may want a guinea pig to try it out before suggesting others use it.

but anyhow... as long as you...
[*]touch /database/ENABLE_SSH
[*]cat /root/.ssh/authorized_keys > /database/authorized_keys

those two pieces might be enough to get into your hub at least up through the 00.55 firmware release.

hossman
Posts: 7
Joined: Wed Feb 11, 2015 7:37 pm

Re: Attaching Devices to Rooted Wink Hub?

Postby hossman » Mon Feb 23, 2015 8:44 pm

I'm trying to add devices using aprontest. The light flash and shows in the list but it doesn't respond to controls

Code: Select all

[root@flex-dvt database]# aprontest -l
Found 1 devices in database...
MASTERID |     INTERCONNECT |                         USERNAME
       1 |           ZIGBEE |            New HA Dimmable Light
[root@flex-dvt database]# aprontest -l -m 1
Device has 2 attributes...
New HA Dimmable Light
ATTRIBUTE |               DESCRIPTION |   TYPE | MODE |          GET |          SET
        1 |                    On_Off | STRING |  R/W |              |           
        2 |                     Level |  UINT8 |  R/W |              |           

[root@flex-dvt database]# aprontest -u -m 1 -t 1 -v OFF
Update device with master ID 1, setting value OFF
i: [1351.2af31460] apronHandleMessage() (sdk/sd:156): Got response for command 0
i: [1351.2af31460] apronHandleMessage() (sdk/sd:170): Got callback for command 0
i: [1351.2af31460] apronHandleMessage() (sdk/sd:205): SDK received nodeData_t callback type 2
Update callback: Status 2 on updating master ID: 1
[root@flex-dvt database]# aprontest -l -m 1
Device has 2 attributes...
New HA Dimmable Light
ATTRIBUTE |               DESCRIPTION |   TYPE | MODE |          GET |          SET
        1 |                    On_Off | STRING |  R/W |              |          OFF
        2 |                     Level |  UINT8 |  R/W |              |           


I've update to the latest firmware, although the phone app says I still need to update and doesn't show any devices.
Not sure what I need to do to add and control lights. I've even tried adding additional lights and even though it flashed I still only have 1 device listed.

CloneNum3
Site Admin
Posts: 107
Joined: Wed Jan 07, 2015 10:02 am

Re: Attaching Devices to Rooted Wink Hub?

Postby CloneNum3 » Tue Feb 24, 2015 9:15 am

hossman wrote:I'm trying to add devices using aprontest. The light flash and shows in the list but it doesn't respond to controls

Code: Select all

[root@flex-dvt database]# aprontest -l -m 1
Device has 2 attributes...
New HA Dimmable Light
ATTRIBUTE |               DESCRIPTION |   TYPE | MODE |          GET |          SET
        1 |                    On_Off | STRING |  R/W |              |          OFF
        2 |                     Level |  UINT8 |  R/W |              |           


I've update to the latest firmware, although the phone app says I still need to update and doesn't show any devices.
Not sure what I need to do to add and control lights. I've even tried adding additional lights and even though it flashed I still only have 1 device listed.


It would appear to me you are running an old firmware. There should be a dozen or so attributes as opposed to the two listed in your output.

What is the output of "cat /database/cf_fver3" ? It should be 00.56 if you are current.

Code: Select all

[root@flex-dvt ~]# cat /database/cf_fver3
00.56


Here is what mine looks like with one of the same bulbs.

Code: Select all

[root@flex-dvt ~]# aprontest -l -m 1
Gang ID: 0x7ceb81ed
Manufacturer ID: 0x10dc, Product Number: 0xce3d
Device has 12 attributes...
New HA Dimmable Light
   ATTRIBUTE |                         DESCRIPTION |   TYPE | MODE |                              GET |                              SET
       61440 |                          ZCLVersion |  UINT8 |    R |                                1 |                                 
       61441 |                  ApplicationVersion |  UINT8 |    R |                                4 |                                 
       61442 |                        StackVersion |  UINT8 |    R |                                2 |                                 
       61443 |                           HWVersion |  UINT8 |    R |                                1 |                                 
       61444 |                    ManufacturerName | STRING |    R |                    GE_Appliances |                                 
       61445 |                     ModelIdentifier | STRING |    R |                        ZLL Light |                                 
       61446 |                            DateCode | STRING |    R |                         20140812 |                                 
       61447 |                         PowerSource |  UINT8 |    R |                                1 |                                 
           4 |                         NameSupport |  UINT8 |    R |                                0 |                                 
           1 |                              On_Off | STRING |  R/W |                               ON |                              OFF
           2 |                               Level |  UINT8 |  R/W |                              254 |                              255
     1699842 |               ZB_CurrentFileVersion | UINT32 |    R |                         16974848 |                                 

[root@flex-dvt ~]#


I would suggest re-updating the hub. If cf_fver3 for some reason does actually report 00.56, you should be able to simply delete /database/cf_fver3 and the update should re-apply the update.

-CloneNum3

hossman
Posts: 7
Joined: Wed Feb 11, 2015 7:37 pm

Re: Attaching Devices to Rooted Wink Hub?

Postby hossman » Tue Feb 24, 2015 9:05 pm

Deleting /database/cf_fver3 and re-updating worked. The phone app now reports version 00.56 and is no longer nagging that I need to update. It also displayed a light connected but I couldn't control it or more accurately it didn't do anything so I removed using the app. I've tried re-adding it using the app It get to the screen where it say hub is ready and to turn light on. It stays on the spinner for a while then says it failed. during this time the blue light on the hub is flashing. After it fails it blinks red then returns to solid blue.

I've tried adding via command line and it times out there as well.

Code: Select all

[root@flex-dvt ~]# aprontest -a -r zigbee
Add device for Zigbee
Waiting for 1 callbacks...
Timed out of Zigbee add mode


Is there a trick to rest the bulbs so they can be rediscovered? I've tried turning the switch off and on and even unscrewed the bulb.


Return to “Help me, I can't do xyz”

Who is online

Users browsing this forum: No registered users and 0 guests