Yes, you are correct regarding the platform issues, and perhaps I should wait. The strange part is that some of the SMARTWINK devices are responding whereas others are not. So I am not sure this is a platform issue or not.
But, I will continue to troubleshoot while awaiting the all clear form SmartThings Support.
Adding some more information on the topic. I was able to telnet directly to the Wink Hub and manually control the Lutron Casetta devices. After making sure they were controllable, I removed the two Lutron Casettas outlets that I had added through SmartWink thinking that would return control to the SmartWink app. This did not work and I still get the error 357 form the Smartapp and still receive blank screens from within the app.
I have tried to remove the Wink Hub from within the app and this does not work either.
If youāve already removed the devices, Iād remove and reinstall the app - I noticed yesterday that the keys and values across all smartapp data were briefly swapped (I suspect the SmartThings ādatabase updateā), and had to uninstall and reinstall a bunch of them (my hue bulbs stopped working in particular). If this continues past the duration of the outage, Iāll investigate the IllegalArgumentException you saw.
Thanks Michael, Although painful to remove and re-add all the PICO and Casetta devices, this did the trick. I removed the SmartApp and Re-added it. It is now functioning again so all I have to do is rebuild all my SmartLighting routines.
Thanks again for the advice and for the great SmartApp!
Great, glad that worked! I think this was a one-off issue resulting from the SmartThings downtime yesterday, but if it does happen again, let me know and Iāll investigate further.
Iām trying out the Smartwink code, I just rooted my spare updated wink hub via the NAND method and was trying to untar the binaries file and encountered the āinvalid tar magicā. Can you give me a step by step? I tried to ugzip the file first on the wink before trying to untar it but no dice. Used to a tar version that can do it all.
I found this thread a few days ago and it was exactly what I was looking for. I have Wink hub which I started my home automation with and it was frustrating experience. Then I moved to Staples Connect and it worked fine except it is closed platform and Staples is abandoning it. So I decided to try out SmartThings. My only problem is that I already heavily invested in Lutron Caseta and ST hub is not supporting ClearConnect.
So my configuration is the following Wink hub already updated to the latest version and the second generation of ST hub. I rooted my Wink hub and followed your instructionsā¦
Eventually, I was able to see my hub in the ST mobile app and even pair one of my Lutron in-wall dimmers. However, the dimmer was not accepting commands and the app were stuck in āturningonā/āturningoffā state with no effect on lights. I started digging into the problem. I found that āset.phpā fails with āno such deviceā when I simulate the call from curl. I added my own list.php to return all devices from ālutronDevicesā table from /database/apron.db" and it appeared to be empty, while āDeviceā table in ā/database/lutron-db.sqliteā contained a record for my dimmer. āaprontest -lā also returns list with my dimmer in it and I am able to turn it on and off via āaprontest -uā command.
I had some issues during rooting and perhaps broke something. For instance, my hub is not connecting to Wink servers anymore though I didnāt change hosts file. And start-stop-daemon wasnāt starting apron-wrapper saying about problems with pid file, so I had to change file name to āaprond-wrapper.pidā insead of āapron.pidā.
Is there any idea on what went wrong with my setup?
It sounds like apron recognizes your device, but lutron-core doesnāt (or isnāt writing it to /database/lutron-db.sqlite). Do you know what firmware version youāre on, offhand? Also, what do you see when you issue ls -l /database/lutron*?
Actually, /database/lutron-db.sqlite contains right records, so lutron.php correctly returns my device:
[{āidā:4,āserialā:21131947,ānameā:āCaseta Wall Dimmerā,ātypeā:āWALL_DIMMERā}]
It is apron.db which is not populated by adding this device record into ālutronDeviceā.
Hub version is 2.49
[root@flex-dvt ]# ls -l /database/lutron*
-rw-rār-- 1 root root 295936 Mar 27 22:56 /database/lutron-db.sqlite
/database/lutron.d:
total 8
-rw-rār-- 1 root root 9 Jan 1 1970 coproc-os-version-programmed
-rw-rār-- 1 root root 69 Jan 1 1970 database-converted
Some other thoughts. It looks like scripts from /etc/rc.d/init.d are not auto-starting at boot. So they only start when monit detects they are not running and restarts them. So the boot log looks like this:
Jan 2 07:43:48 flex-dvt user.info monit[1164]: Starting monit daemon with http interface at [127.0.0.1:2812]
Jan 2 07:43:48 flex-dvt user.info monit[1164]: Starting monit HTTP server at [127.0.0.1:2812]
Jan 2 07:43:48 flex-dvt user.info monit[1164]: monit HTTP server started
Jan 2 07:43:48 flex-dvt user.info monit[1164]: āflex-dvtā Monit started
Jan 2 07:43:49 flex-dvt user.err monit[1164]: āntpdā process is not running
Jan 2 07:43:49 flex-dvt user.info monit[1164]: āntpdā trying to restart
Jan 2 07:43:49 flex-dvt user.info monit[1164]: āntpdā stop: /etc/rc.d/init.d/ntp
Jan 2 07:43:49 flex-dvt user.info root: Stopping ntpd
Jan 2 07:43:49 flex-dvt user.info monit[1164]: āntpdā start: /etc/rc.d/init.d/ntp
Jan 2 07:43:49 flex-dvt user.info root: Process: ntpd not found.
Jan 2 07:43:50 flex-dvt user.info root: Starting ntpd
Jan 2 07:43:51 flex-dvt kern.info kernel:Bluetooth: 83193eec
Jan 2 07:43:51 flex-dvt kern.err kernel:wlan0 (WE) : Wireless Event too big (4128)
Jan 2 07:43:51 flex-dvt user.notice root: Received event: CONNECTED
Jan 2 07:43:52 flex-dvt daemon.info udhcpc[1225]: udhcpc (v1.22.1) started
Jan 2 07:43:52 flex-dvt user.debug root: udhcpc deconfig
Jan 2 07:43:52 flex-dvt daemon.info udhcpc[1225]: Sending discoverā¦
Jan 2 07:43:52 flex-dvt daemon.info udhcpc[1225]: Sending select for 192.168.1.165ā¦
Jan 2 07:43:52 flex-dvt daemon.info udhcpc[1225]: Lease of 192.168.1.165 obtained, lease time 86400
Jan 2 07:43:52 flex-dvt user.debug root: udhcpc renew or bound
Jan 2 07:43:52 flex-dvt kern.warning kernel:dhd_aoe_hostip_clr failed code -23
Jan 2 07:43:52 flex-dvt kern.warning kernel:aoe_update_host_ipv4_table failed
Jan 2 07:43:54 flex-dvt user.err monit[1164]: ālutron-coreā process is not running
Jan 2 07:43:54 flex-dvt user.info monit[1164]: ālutron-coreā trying to restart
Jan 2 07:43:54 flex-dvt user.info monit[1164]: āaprondā stop: /etc/rc.d/init.d/apron
Jan 2 07:43:54 flex-dvt user.info root: Stopping aprond
Jan 2 07:43:54 flex-dvt user.info monit[1164]: ālutron-coreā stop: /etc/rc.d/init.d/lutron
Jan 2 07:43:54 flex-dvt user.info root: Stopping lutron-wrapper
Jan 2 07:43:54 flex-dvt user.info monit[1164]: ālutron-coreā start: /etc/rc.d/init.d/lutron
Jan 2 07:43:54 flex-dvt user.info root: Process: lutron-wrapper not found.
Jan 2 07:43:54 flex-dvt user.info root: Starting lutron-wrapper
Jan 2 07:43:55 flex-dvt user.info lutron-core: Core version 00.06.00a000 startingā¦
Jan 2 07:43:55 flex-dvt user.info lutron-core: Daemonizingā¦
Jan 2 07:43:55 flex-dvt user.info lutron-core: lutron-core starting
Jan 2 07:43:55 flex-dvt user.info lutron-core: Starting linkā¦
Jan 2 07:43:55 flex-dvt user.info lutron-core: Link Started
Yep, your lutron-db is in the right place and isnāt empty.
Itās interesting that aprontest shows the device, but itās not in apron.db. Do the same with /database/apron*? Also check that aprond is running (ps a | grep apron).
If youāve got strace installed (opkg install strace if you donāt), you can try an strace -f aprontest -l 2>&1 | grep āopen.*apron.dā. This will show you the file that aprontest is reading from to pull its information.
The last command shows /var/lib/database/apron.db. I changed set.php to use the db file at this location and now my light turns on and off!!! There is 1-2 extra seconds lag comparing to Staples Connect hub I am currently using with Lutron devices. But it is still better than using Wink hub with their app directly.
Thank you, Michael. You did a great job by creating this solution!
As part of a general feedback, I think something needs to be done on ST device handler side to process errors when Wink hub is not responding or responding with an error. ST app just stuck with transitional stage āturning of/orfā forever and even refresh button doesnāt help. Since now it is working Iāll play a bit more with it and let you know, if I find some other issues.
Excellent, glad to hear itās working, and Iāll take that feedback into account. Iāll also make sure it looks in /var/lib/database as well as /database, since it sounds like certain versions of the Wink firmware have placed it there.
The extra 1-2s latency over using Staples Connect is almost entirely SmartThings, Iām afraid. Staples Connect has local processing, so itās much faster than SmartThings is (pity Staples never really built it out; they could have had a nice platform). But see the āhard link picoā app in the same package if youād like to hardware-pair Pico remotes to Caseta dimmers, specifically - this will give you instant control of those dimmers with the picos.
I have a wink hub on the way to try this out. Iām a little concerned because I have a feeling it may already be updated past the version where rooting is going to be easy, or possible. Itās from amazon warehouse deals, so no idea how long this device may be sitting aroundā¦
So far though the Lutron caseta switches Iāve installed have been FANTASTIC for solving some of the issues Iāve had with installing 3/4/5 way switches - they just work and with ledās with no neutral wires.
Can you guys point out any sources (even specific google searches) that might help with the process? Iāve been looking at forum.xda-developers.com
Hi @e8link, If you are talking about the hardwire root, do a search on the KEYWORDS Root and WINK. I actually used the information from three different sites and was able to accomplish it using a Raspberry PI and an accessory wire. If you read the information out there, you can do it with little prior knowledge. Once you get in, as long as you donāt update the hub, you will be able to connect over SSH.
Yep, you need to pair the remotes as well by holding the off button for six seconds once the hub is placed in pairing mode (until the lights on the remotes flash). You should see the text in the app change when theyāre successfully paired.
Sounds like my hub may be having issues getting into pairing mode because it sits on the āPlease wait while we put your hub in pairing mode.ā Do you have tips to troubleshoot?
Check the log at the SmartThings IDE - commands and responses relating to pairing should be shown there. You can also work around this by sshing into the hub and issuing aprontest -a -r lutron manually, then pairing your pico remotes there. They should then be picked up when you install / configure the SmartApp.