Help With MyQ DeviceType No Longer Working


(Convinced ST will never be unbroken…) #1

My MyQ Device type has been working for over a year, but is now causing errors. It took me an hour to get the device removed due to all of SmartThings stupid interdependencies, but once finally removed, I can not re-instantiate it due to the following error returned by the IDE regarding the deviceType:

java.lang.NullPointerException: Cannot get property 'door_name' on null object @ line 184

Here are lines 184 - 188:

 if ((settings.door_name ?: "blank").isLong() == true) {
    	log.debug "Door Name:  Assuming Door Name is a Device ID, $settings.door_name"
        state.DeviceID = settings.door_name
        return
    }

I’m reasonably certain they broke some syntax here, but don’t know what its replacement might be. Anyone have any ideas?

Thanks!

SiP


(Brian) #2

Lookup, find and install the newest MyQ device. It works awesome. Searching MyQ will usually find it.


(Convinced ST will never be unbroken…) #3

But I want to continue using this one.


(Patrick Stuart [@pstuart]) #4

Well it looks like settings.door_name isn’t set thus the null…

So somewhere else, this should be getting set, but isn’t.

Without seeing the whole code, pretty hard to figure out where the issue is.


(Convinced ST will never be unbroken…) #5

Deleted as community developed integrations seem to be in violation of MyQ TOS.


(Patrick Stuart [@pstuart]) #6

stupid question, but did you set a door_name in the input preferences of the device? Did you happen to go into this again and not reset it?

There is a bug that resets some input values in preferences every time it is opened.


(Convinced ST will never be unbroken…) #7

The device has been removed. At this point I can not even save and publish the deviceType without the aforementioned error in the IDE.


(Ron S) #8

@scottinpollock I am using the old version of the same code that you posted which you helped me with nearly one year back. Just out of curiousity, I looked at my things and the garage door now appears as “unknown”. Not sure when this happened. MyQ.


(Convinced ST will never be unbroken…) #9

Same here… that is why I removed it to re-instantiate, but the IDE no longer likes the code.


(Patrick Stuart [@pstuart]) #10

Hmm, yeah, something broke. Wonder if the IDE is now doing Null Pointer checking on install of code?


(Convinced ST will never be unbroken…) #11

That’s insane for a deviceType. This platform is becoming a bigger steaming pile of doo as time goes on.

Went to take a shower while waiting for your reply. No hot water (AGAIN)!


(Brian) #12

Hot water is important to me. I treat it like thermostats, I will only bump temps (so it’s never off), and I program double checks into critical systems like it. I’d be curious what the root cause of your hot water being off is…


(Convinced ST will never be unbroken…) #13

Same as most of my issues with SmartThings… scheduled tasks are not reliable.


(Brian) #14

You shouldn’t have to do this but if it were me, I’d put notifications on for it, and I’d even consider using the IFTTT trick I use to track recent sunrise/sunset issues (though it only happened once to me.). Again, you should’t have to, this is an ST problem they need to fix. But just for greatest happiness in your house. I’d be strung up in my house if I took away hot water.


(Patrick Stuart [@pstuart]) #15

Don’t know why or what is going on.


(Convinced ST will never be unbroken…) #16

Thanks… it does save and publish, but I get the helpful “an unexpected error occurred” when trying to install the device.

This is really getting old.


(Brian) #17

Usually when that happens you can see the error in live logging in the IDE. I think.


(Patrick Stuart [@pstuart]) #18

Well, the device really doesn’t have very good error handling… It also didn’t have a namespace, that could be the issue.

Or ST is just broken at the moment.

Where are you getting the unexpected error? When you install the device in the IDE or is this in the mobile app?


(Convinced ST will never be unbroken…) #19

Thanks. What I will do tonight is move that schedule (like most of my other ones) to my Indigo Server. I also need to get started on adding scheduling to HAM Bridge so I can phase out Indigo, which was the whole plan after acquiring SmartThings back in 2013. Unfortunately, SmartThings has gone from bad to worse in recent months, and I am starting to run out of patience.


(Convinced ST will never be unbroken…) #20

In the mobile app, either when trying to add it to a room, or clicking done after filling out the prefs.