Help With MyQ DeviceType No Longer Working

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

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

But I want to continue using this one.

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.

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

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.

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

@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.

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

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

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)!

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…

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

1 Like

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.

1 Like

Don’t know why or what is going on.

1 Like

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.

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

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?

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.

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