Chamberlain MyQ Binding

OK did a clean load of 2.5 installed myq binding 1.14.0 put did myq.cfg file home.items and home.sitemap. Everything for both doors show up in all my sight maps but I get the error

==> /var/log/openhab2/openhab.log <==

2020-02-18 22:28:07.825 [ome.event.ItemCommandEvent] - Item ‘GarageDoorSwitch’ received command ON

==> /var/log/openhab2/openhab.log <==

2020-02-18 22:28:08.001 [WARN ] [nhab.binding.myq.internal.MyqBinding] - no MyQ device found with index: 0

==> /var/log/openhab2/events.log <==

2020-02-18 22:28:08.005 [vent.ItemStateChangedEvent] - GarageDoorSwitch changed from OFF to ON

==> /var/log/openhab2/openhab.log <==

2020-02-18 22:28:10.296 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-misc-restdocs’

==> /var/log/openhab2/events.log <==

2020-02-18 22:28:11.417 [ome.event.ItemCommandEvent] - Item ‘GarageDoorSwitch1’ received command ON

==> /var/log/openhab2/openhab.log <==

2020-02-18 22:28:11.571 [WARN ] [nhab.binding.myq.internal.MyqBinding] - no MyQ device found with index: 0

==> /var/log/openhab2/events.log <==

2020-02-18 22:28:11.575 [vent.ItemStateChangedEvent] - GarageDoorSwitch1 changed from OFF to ON

Can anyone point me to what I have done wrong. I hate to say i seem to get it running and it breaks, get it running and it breaks.

The 1.14 binding no longer works, you must use the 2.5 snapshot binding in post 477 above. Chamberlain MyQ Binding

OK, thank you. I assumed when I loaded the new 2.5 the bindings would be correct. I have been fighting with this for weeks, off and on. I am getting ready to expand my home controls and sensors, but didn’t want to move forward till I got this working. Thanks again.

The new binding link works great. Question, how do we get this added to the openhab remote respository so it is no longer necessary to download manually?
Cheers

I proposed this to the author that I would help with a “proper submission” but I received no response. I would definitely need his help and permission to get started.

1 Like

I submitted the binding for review over a year ago and got lots of feedback. They wanted the json parsing all rewrite to use GSON serialization. After I updated the code for this, the server side code no longer worked. I cant get Eclipses debugging to work to try to figure it out. I haven’t tried recently to work on this maybe it is easier now.

This binding works great. Much easier than the 1.x bindings

@scooter_seh if you want help, let me know. If you wouldn’t mind somehow sharing the feedback (beyond the GSON serialization part), I can tackle that too.

1 Like

@scooter_seh. Can you please point me to a post on how i can install this addon manually on openhab2 2.5?

-newbie

Where’s the source code? I’ve worked on a couple of bindings and even made my own. I’d like to help out where I can.

I just moved to a house that has a chamberlain myq system installed and would like to get it working.

Thanks

@ancheta61
See https://www.openhab.org/docs/configuration/addons.html. The last section at the bottom tells you how to install the .JAR binding manually.

Snapshot 2.5 binding is working well for me so far, after ~1 day of experience with goofing around with it.
Just a couple thoughts from me that might help others…

If you send too many commands to the garage door before it’s finished its current job, it gets confused, and stops receiving commands. If you look in the official Chamberlain myQ app at that point, a ‘Close Error’ is shown, and you are then instructed to operate the opener locally to get past the error. (This happens even if you send a bunch of commands through the myQ app before the door finishes moving … it’s not an openHAB issue as far as I can tell).
Seriously, Chamberlain? I thought the whole point of remote control capability is always being able to control remotely, not just when the stars align. Well, to overcome this, I created additional switch items, a rule with a timer, and visibility conditions on the sitemap that prevent someone from hammering myQ with commands and confusing everything.

(the below is in addition to all of the typical other items and sitemap entries)

Switch preventDoorOpenCommands      "Prevent door open commands during waiting periods"
Switch preventDoorCloseCommands      "Prevent door close commands during waiting periods"
rule "Garage door change inhibit"
when
	Item GarageDoorShutter received command
then
	// rainforest Eagle is rebooting; check 10 min later; if not back up, then reboot again!
	logInfo("myQ", "Inhibiting garage door commands after command was sent..")
    preventDoorCloseCommands.postUpdate(ON)
	preventDoorOpenCommands.postUpdate(ON)
	createTimer(now.plusSeconds(60))
	[
		// after time expires, check state and re-enable the appropriate button
		if (GarageDoorString.state == 'open')
		{ 
			preventDoorCloseCommands.postUpdate(OFF)
		} else {
			preventDoorOpenCommands.postUpdate(OFF)
		}									
	]
end
Switch item=GarageDoorShutter	mappings=[ UP='Open']								visibility=[preventDoorOpenCommands==OFF]
Switch item=GarageDoorShutter	mappings=[ DOWN='Close']							visibility=[preventDoorCloseCommands==OFF]
Text item=GarageDoorString		label="Garage Door Status [MAP(myq.map):%s]"		valuecolor=[open="red",closed="green"]

I found the ‘X’ button in the “default” Rollershutter/switch sitemap option to do nothing, and I preferred buttons anyway, hence the Switch items with my own single-entry mappings.

Hope this helps someone.

@Dave_Baldwin I added it but i still don’t see it installed on paper UI as installed. I also don’t see the other bindings i installed from the paper ui in the addons directory.

[05:01:29] openhabian@openhab:/usr/share/openhab2/addons$ ls -ltr
total 52
-rw-rw-r-- 1 openhab openhab 70 Jan 12 21:53 README
-rw-r–r-- 1 openhabian openhabian 46414 Mar 5 05:46 org.openhab.binding.chamberlainmyq-2.5.0-SNAPSHOT.jar
[05:01:30] openhabian@openhab:/usr/share/openhab2/addons$

OK, the binding had been working great now it has stopped and it says it is uninitialized and in the log file I have ==> /var/log/openhab2/openhab.log <==

2020-03-29 14:47:53.743 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-misc-restdocs, openhab-binding-“Myq”’

I don’t even know where to start should I uninstall and try again, looks like the last time it worked was March 17. Having a stay at home order I didn’t notice it had quit working, till now.

Same here. Was working well but now it is not.

What version of the binding are you using? Can you please share the output from the karaf console “bundle::list” command?

Mine is still working fine - what error are you receiving?

It was not initialized for some reason, I just deleted and added things back and it is working now. Thanks for the help.

I am using 2.5. I rebooted the raspberry pi and forgot it would wipe any bindings not listed so it removed MQTT binding. After I got that fixed MYq was working again

I have the binding loaded by it is not showing any things to add. Is there any directions on setting up the binding?

TIA