Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On/Off switches not working #137

Closed
Coolio098 opened this issue Sep 12, 2021 · 23 comments
Closed

On/Off switches not working #137

Coolio098 opened this issue Sep 12, 2021 · 23 comments

Comments

@Coolio098
Copy link

Hey All,

I did a total reinstall and successfully connected to MyQ. If I click on "Garage Door" I'm able to open/close the garage with no issues. However, the on/off switches just hang and nothing happens and these are the switches that show up in Google Home. Any idea what I'm doing wrong?

Screenshot_20210912-132458_SmartThings

@hoolius
Copy link

hoolius commented Sep 12, 2021

Same behavior here. I get the error I noted in the other thread if I open the individual button card and run from there. Logging for those devices shows no activity.

@brbeaird
Copy link
Owner

Strange. The newest version should fix these buttons. I've not been able to reproduce this problem. You’re sure it’s using the newer “virtual switch” device and not the old “momentary button tile”?

@strakaido
Copy link

strakaido commented Sep 13, 2021

I have the same issue, where the virtual tiles do not function, using the current "virtual switch" and not the old "momentary button tile". I'm not sure if it makes a difference, but I do not have a door sensor set up (using NoSensor).

@Coolio098
Copy link
Author

Coolio098 commented Sep 13, 2021

Positive I'm using the new virtual switch. I uninstalled everything and did a fresh install based on the instructions. Also, I don't have a sensor.

@dekeweinblatt
Copy link

same issue here

@crogers2287
Copy link

Same issue here.

@felixling34
Copy link

Thanks for all your work on this. My on/off tiles are not working either. I deleted the old smart app and device handlers, and did a fresh install. I'm trying to use myq lite with Google home, using the no sensor device handler

@15niner
Copy link

15niner commented Sep 17, 2021

I too have the same issue... I do not possess, nor ever could, the intelligence required to code for this app or any other, but is it possible the issue is because the switches are set to "ON" by default? I'm only thinking in mechanical/electrical terms and you can't turn a switch more on if it is already on. So by my logic, if you ask Alexa/Google/SmartThings etc. to turn something "ON" that is defaulted to that position, nothing will occur...
20210917_154744 1

@brbeaird
Copy link
Owner

is it possible the issue is because the switches are set to "ON" by default?

That is part of the reason this is such a mystery to me. The SmartApp code explicitly sets the switches to OFF upon creation.

image

@brbeaird
Copy link
Owner

@15niner - can you post a screenshot of what your virtual switch looks like in your IDE? Just blur out your door's serial number.

Here's mine for comparison:
image

@brbeaird
Copy link
Owner

Also, could you verify one more time that the brbeaird:virtual switch in your device type handler list matches this code exactly?

https://github.com/brbeaird/SmartThings_MyQ/blob/master/devicetypes/brbeaird/virtual-switch.src/virtual-switch.groovy

@15niner
Copy link

15niner commented Sep 17, 2021

I copied and pasted the code from your link above and it did not fix the issue. I noticed from my screen shot my switch is on whereas yours is off... The other difference is your execution location is cloud and mine is "Local"
switch

@Coolio098
Copy link
Author

@15niner my device looks identical to yours

@brbeaird
Copy link
Owner

Hmm. If it shows local execution, that makes me wonder if it's actually using the native virtual switch instead of the brbeaird:virtual switch handler.

When you click the Edit button on that device, do you see multiple "virtual switch" entries in the drop down? If you do, can you try to select the other one and see if things work any differently? If so, I may need to rename this device to something more distinct.

@crogers2287
Copy link

crogers2287 commented Sep 17, 2021 via email

@15niner
Copy link

15niner commented Sep 18, 2021

There is one other "Virtual Switch" in the drop down menu. It is listed located alphabetically in the list near a virtual dimmer and a virtual appliance. I tried that one and it did not have any change. The original virtual switch that was selected is at the bottom of the list.

@15niner
Copy link

15niner commented Sep 18, 2021

I also noticed this warning at the top of the device handler code:

image

@felixling34
Copy link

felixling34 commented Sep 18, 2021

my IDE shows similar findings to 15niner and Coolio98 -- current state switch: On (not off), and Execution Location is Local (not cloud)

in SmartThings, the "Main Garage" device has an Open and Close -- pressing these does correctly open and close the garage.

however, the virtual tiles that are created, which are the ones needed for Google Home integration, are always reporting "On", and pressing them does not open or close the garage.

Update:

Ok not sure what this means, but a couple posts up brbeaird suggested looking for a different "virtual switch" option when editing the device. I went to my Main Garage Opener device, clicked Edit, and went to Type. The current selection is "Virtual Switch" at the very bottom of the list. But scrolling up, in the alphabetically organized section, there is another exactly same named "Virtual Switch", between "Virtual Dimmer Switch" and "Vision 4-in-1 Motion Sensor". When I select this Virtual Switch and hit Update, the tile in my SmartThings app suddenly switches from "On" to "Off", and without me actually pressing anything (other than updating the Virtual Switch type in the IDE), the action actually occurs (ie. Main Garage Opener opens the door when I update the virtual switch, and Main Garage Closer closers the door when I update its virtual switch).

Yada yada yada, I think the virtual tiles are working (for me!). Even tested in Google Home, which is all I really wanted to work again.

TL;dr -- I updated the Device Type to the 'other' Virtual Switch in the drop down menu, and now my SmartThing tiles correctly report in the "Off" status, and my virtual tiles work correctly now.

@crogers2287
Copy link

So trying felixling34's solution worked for me too, if i chose the generic Virtual Switch from the drop down and not the one created with your code, everything seems to work.

@15niner
Copy link

15niner commented Sep 18, 2021

Update: after seeing others have success using the virtual switch found alphabetically in the drop down menu rather than the one at the bottom of the list, I tried it again and all virtual switches are now set to "off" and work correctly. Hope this fix works for everyone!

There is one other "Virtual Switch" in the drop down menu. It is listed located alphabetically in the list near a virtual dimmer and a virtual appliance. I tried that one and it did not have any change. The original virtual switch that was selected is at the bottom of the list.

@strakaido
Copy link

Following others' solutions above also works for me! Thank you everyone for your input, and brbeaird for your incredible work on this! Happy voice-controlling!

@Coolio098
Copy link
Author

This also worked for me, thanks all!!!

@brbeaird
Copy link
Owner

brbeaird commented Sep 18, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants