I use custom API to control devices via a Hook Home Automation hub. For those of you not familiar with the Hook, it is a device that’s based on a Particle.io heart that allows control over RF-based devices (315 and 433 mhz frequencies). The API for this device that I’m using can be found at:
I’ve found that recently, the buttons in the Smartthings app that are associated with these connections are no longer working. I’m familiar with the fact that these “toggle” buttons don’t keep track of the state of the device (since there’s no backward check in from the device or the Hook).
The buttons in the Smartthings app no longer flip to the “Off” state of the button. I noticed that the buttons on the home screen of the app operated in this fashion. Now the switches are behaving in the same fashion. They no longer update to an “off” state and this behavior reflects in the loss of control of these switches from the Smartthings app. The functions still work under automations, Google Assistant as well as Alexa skills so I know the API is good for functionality.
Does anyone else have the same issues or concerns?
Buttons are supposed to represent the real current state of the associated Attribute, not necessarily the “nextState” setting in the Tile definition.
While nextState is helpful to make the button react “immediately”, it is meant purely for temporary display and not for any functionality.
That’s all well and good except that - because the button no longer changes
state when pressed, the nextstate of ON doesn’t exist. Here’s a transcript
of the behavior.
Previously: button toggles. It’s default state is on, so:
button state = On/ outlet on>button press >button state=off, the outlet
If the button state is on but the outlet is off, pressing it twice= button
on = outlet on.
Button state=ON, button press>button state=on but outlet DOES turn off.
But because the button state doesn’t change to off, the next state of ON
Can you make any suggestions on getting a non - toggle switch(one ON
switch, one OFF button)? I have very little groovy (or for that matter any)
programming language experience (except for very limited vb experience).
Okay, sorry that I’m just getting ’ round to this. I tried a couple of mods to the code and - obviously- I’m not getting “groovy”. While I was able to separate out the standard tiles, It still only populated one switch tile in the app. The code has a “toggle” functionality that I believe is affecting this. The code reads:
def params = [
[Yes- I did replace the yourhooktoken]
The code I’m working from is : https://github.com/beckyricha/smartthings-hook/blob/master/hook.src
Thanks again for looking in on this.
Im having the same problem
Same problem here. “toggle” is not the issue. That’s just a variable for the On or Off that is passed in the URL.
I am also having the same problem. I cannot get the device to cycle the power on/off.
Same here. Discussed with Smartthings support and they’re not willing to assist. Likely a push to sell more of their own outlets. This worked so well for so long. -.-
EDIT: A very kind gent on GitHub provided the fix for me by simply modifying the handler code to include “nextState” as shown here: https://github.com/beckyricha/smartthings-hook/issues/1#issuecomment-353414016
Hopefully that helps someone assuming the requirements are that of my own