SmartThings Community

[WITHDRAWN] MyQ LiftMaster/Chamberlain

dth_garage

(Megan) #226

I have 2 doors, and I have the app installed two times


(Terry) #227

Wow, you were right! On the chamberlain website I renamed my “Home” to “House” and my “garage Door Opener” to “GarageDoor” and then went back into ST and it worked! Coming through perfectly. Thanks.


(Brian) #228

Awesome! Glad that worked for you. Nice to confirm that actually makes a difference.


(Gary) #229

Uninstalled the SmartApps; re installed just the one and added both doors to it. It now works correctly. Interesting to know you got it to work with two SmartApps though. Thanks!


(Mark Abraham) #230

This is my learning experience on trying to use 3rd party apps. So close yet so far. I found the smart apps and smart devices things by following your links. I found your code by following your link. I’m not finding how to “load” your code. It thinks I want to write an app, as I’m listed as the author. I think we can all see that is way beyond me right now.
Here is what I tried. I shared your code with my clipboard, then went to smartapps to add a new one. Pasted it. It didn’t seem to get all the code and said setup failed.
Am I on the right track? How do I load an app?


#231

See if this helps:


(Mark Abraham) #232

So I was on the right track. Is “create” synonymous with “publish” as I don’t see a publish button. When I hit create I got…
startup failed: script1432253260510334166787.groovy: 1: unexpected token: * @ line 1, column 2. * MyQ Service Manager SmartApp ^ 1 error


(Mark Abraham) #233

Success, I’ll get this all figured out eventually. Thanks for the help.


(Marc) #234

Thanks for this tip. Commenting out the code has stopped the issues where it would report my door open or closed in a false positive state. I now rely on Pollster, which is another problem as it crashes sometimes and I have to go back into the smartapp to re-initialize it. I’ve had pollster crash on me twice in the last 2 days…


(Megan) #235

I have been having issues with the app not reporting right the last 3 days. It will say it is open when it is closed and say it is closed when it is open.


(Brian) #236

I’ve had the same problem - Pollster crashed twice in the last couple days. I suspect it was something on the ST server side.

If I get a few minutes today, I’m going to look into tweaking the code to use the app’s built-in poller (with properly calling refresh) so I can dump pollster. Hopefully whatever it is that causes pollster to die won’t kill an app’s internal polling so easily.

If that’s still not reliable, I’m afraid the only other real option will be getting a stand-alone z-wave sensor on the door for real-time reporting and none of this silly polling Liftmaster business.


#237

I’m seeing the exactly same problem. Seems to be related to using ST to open the door but then using the switch or other method to close it.

I’ve just stopped using ST to open close the door which makes the integration kinda blah since all it’s useful for now is status when it can be trusted. I have an IP cam in my garage that i use to ignore all the false opens I get. :frowning:


(Brian) #238

Looked at the code again today. The initialize method does this to create the app’s internal poll:

schedule(“0 0/” + ((settings.polling.toInteger() > 0 )? settings.polling.toInteger() : 1) + " * * * ?", refresh )

That should be fine since it calls the refresh method, which goes out to the API and grabs fresh values.

I opened the MyQ configuration and just clicked through it, which initialized that scheduler and then did some debugging to confirm it’s running correctly. I also removed the garage door refresh call from pollster. We’ll see if things stay in sync now or if the app’s poll schedule crashes for some reason.

My theory is that if you’re going to run pollster for this, you need to make sure those lines I mentioned above are commented out; otherwise, the poll() and refresh() methods clash. I still have those lines commented out, but it doesn’t really matter because the internal polling never calls that method anyhow.


(Marc) #239

Ugh Pollster crashed again today at 11am for me. I’ve already commented out the refresh syntax but where do I add the schedule command?


(Brian) #240

It should actually already be there by default. In the MyQ smartapp code around line 160. Make sure it’s not commented out. Then, go into the MyQ setup, click through everything, and that should initiate the schedule.


(Marc) #241

I’m confused though. If the code was already there, why didn’t it work out of the box well which made us resort to Pollster in the first place? It seemed to always stop working and without pollster in the logs, it was hard to tell when it broke. The only difference is now we commented out those other lines. Would that help?


(Brian) #242

That’s my question exactly. Originally I thought it may be totally broken, but now that I know that isn’t the case,hopefully I can watch it closer and figure out the cause if it does suddenly stop and maybe add in some extra bits in the code to keep it going.


(Brian) #243

Yeah, so the out of the box scheduler definitely crashes worse for me. I haven’t been able to figure out why. I’m wondering if maybe the Liftmaster API occasionally times out or just glitches. It’s possible something causes an unhandled error that would probably kill the scheduler altogether. I’m trying a different method now using chained RunIn() calls once a minute. In this case, the “next poll” is created new each time before it even attempts a refresh, so even if something goes wrong in that refresh, the schedule has already been set for it to try again in another minute.


(Marc) #244

Thanks. This has been the one device that just has not worked reliably since day 1. Hopefully your idea will work.


(Brian) #245

Alright - have been running my new polling version all day, and so far everything looks good. Polling has been 100% right on with no crashing even through several door cycles, both manual and through ST automatic actions. If you’d like to give it a test, you can find my forked copy of the code here: https://github.com/brbeaird/SmartThings_MyQ. Just copy the SmartApp over as that’s the only one that matters.

Don’t forget to publish it for yourself. After that, go into the MyQ smartapp on your phone and just click through the setup prompts to make sure it kills the old scheduler and starts the new one.

Will have to see if this remains stable for a few days to see if it’s more reliable than pollster. If it works, I’ll submit a pull request to get it into the original version. If not, I’ll continue pulling my hair out.