I can’t for the life of me figure out why this switch configuration isn’t working using smart lighting.
Have you tried to look at the logs and see what happens when you try to run the command?
i tried another approach, this time a piston. it’s working but i’m finding issues. i’ll press the button and the lights will turn on and off quickly or it won’t respond at all.
The button attributes reflect the state of the physical buttons on the device. While the button is depressed the value is on and as soon as you let go it will change back to off (the resting state). So that makes sense that the lights flick on and then back off as you press and release the buttons.
If you want it to change with the state of the loads attached to the Wink Relay, you’ll need to mirror the child switch’s state.
I’m not sure I follow, is it possible to show what I should do with the piston to make it work?
I want to use the buttons to control smart bulbs.
How do you want to use the buttons to control the smart bulbs? The buttons are momentary and don’t keep state themselves. So if you push a button, it’s just temporarily pushed (or ‘on’) and then immediately goes back to the ‘off’ state… so they are good for triggering an action like toggling a light or a routine or something of the sort.
If that’s all you want then just setup a piston that toggles the desired lights.
If you want to share or track state, then you need to decide where you want to do that. Is it just a variable in webCoRE? Is it a virtual switch? Is it a real switch?
okay so my setup is pretty simple for the wink relay. I have it in the hallway and would like it to control 2 hallway smartbulbs. Using the top button I simply want it to toggle on vs off for these two lights. I thought the piston I created effectively does this but I guess i’m doing it wrong.
You just need the first half of your example piston and need to call a toggle() action on your bulbs if they have one.
I can’t recall if webCoRE has a virtual toggle as I don’t personally use it - if it doesn’t then you may need to check the state of each device and then take the opposite action (eg.
if light 1 == on then with light1 do off() endwith else if light 1 == off then with light 1 do on() endwith)
if Wink Relay Upstairs topButton changes to on: then with Upstairs Light 1 and Upstairs Light 2 do toggle() endwith endif
Again, the ‘off’ status of the
topButton attribute just means you have released your finger from it. So in your original design, as soon as you hold the button down the lights will come on, but as soon as you release the button, the lights will go off.
oh wait I guess I don’t need the 2nd part at all.
Right. Remove the second part… otherwise that seems right assuming the Toggle part actually works.
Edit: One thing to keep in mind with toggling multiple devices is what happens when one of them is out of sync with the other. Sometimes you may want to just toggle a single light and then setup another rule so that the other lights follow the primary one.
Otherwise if somehow one light is on and the other is off… then when you trigger the toggle, you’ll still have one light off and one light on – just different lights!
fortunately this won’t apply here since the two bulbs are for one fixture. thank you so much for all of you help and hard work on this project!
so the toggle piston works, but not all of the time. It’s weird, i’ll have to reboot my relay and then it’ll start working again. not sure why this would happen, the piston remains unchanged. any ideas?
Have you checked the SmartThings IDE live logs while it is failing? My suspicions would be the device isn’t responding anymore. Maybe the internal webserver is down. You should be able to visit the Settings screen of the STWinkRelay app and there is a screen for checking the status of the services which should also try to restart them if they are stopped.
so i’m having the issue again, here’s what i see. all of the services are running, live logging and pushing the button shows no updates at all, and it webcore shows that the piston was last used 10 hours ago.
What version of the STWinkRelay.apk are you running? 0.4.0a is the latest version which was pushed to the update service.
If you are on 0.4.0a and are still having the issues… when you experience the issue again, please use the log uploader to upload your logs and then send me:
- The log ID
- The approximate time it was working as expected
- The approximate time it was failing to work as expected
I didn’t see a post with a resolution to that error. Did you figure it out? I have 2 relays that I want to reset to defaults but each time they show this error with edison.zip (E:Error in /cache/recovery/edison.zip
). It’s also restoring every app/setting on reboot so can’t change anything.
Nope. I just lived with it for a while and each time it rebooted or there was a power outage I just ran through the updates and reconfigured things.
I recently swapped my main Wink Relay out with a 10" Fire HD wall mounted with the SharpTools.io web dashboard running on it. I still have another Wink Relay new in box, but they just seem to die over time so I’m not sure I’m willing to put the effort into it right now.
That looks awesome, i am going to try it out!
If we use that sharptools.io on a browser with a wink relay, do you think it will remain logged in without disabling the wink app?
From what I’ve read, it sounds like the stock Wink Relay app is clearing accounts stored at the Android level. So as long as it’s not also clearing the browser cache, then it should remain logged in.
PS. Your beta request for the SharpTools.io Rule Engine was approved as well.