There are somehow illegal characters in your openhab.cfg file. Open it with a text filed editor and remove the garbage characters, save, and restart openHAB.
I have 9 MyQ Items
1 Universal MyQ Gateway + GDO
4 Lamp modules
5 Switches
Iām using the 1.9.0 Snapshot Binding from the 1.9.0 Binding Package.
2016-12-29 20:45:12.803 [ERROR] [inding.myq.internal.MyqBinding] - Could not connect to MyQ service java.io.IOException: Null response from MyQ server at org.openhab.binding.myq.internal.MyqData.request(MyqData.java:208) ~[bundlefile:na] at org.openhab.binding.myq.internal.MyqData.getMyqData(MyqData.java:120) ~[bundlefile:na] at org.openhab.binding.myq.internal.MyqBinding.poll(MyqBinding.java:204) [bundlefile:na] at org.openhab.binding.myq.internal.MyqBinding.access$0(MyqBinding.java:196) [bundlefile:na] at org.openhab.binding.myq.internal.MyqBinding$1.run(MyqBinding.java:401) [bundlefile:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_65] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_65] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_65] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_65] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_65] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_65] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65]
I get this error pretty often. I find that if I disable most of the attributes it happens less. Is this something that can be fixed by adjusting the timeout or the refresh interval?
Any one have any clue why I periodically get Cannot connect to MyQ Service?
Am I hitting a limit on the API.
Is anyone else seeing this type of behaviour?
When I take a look at the code of the binding it looks like when the binding gets a command it enters in to a rapid poll rate. Which makes sense for a garage door openers (GDO) to get the open/close and intermediate states.
I think with multiple MyQ none-(GDO) items Iām maybe overwhelming the API with the rapid refresh and this also introduces some oddities in to the Bus.
I notice that when Iām using a switch for a scene or a rule that links many MyQ items that when for example Item myQ_light1 changes to ON sendcommand MyQ_light2 ON and another condition for an off condition. Light2 during the rapid refresh period will do on off on off cycle because the MyQ API reports the changing status of Light1 about 3 times a second. This also results in more commands being sent for light2 than desired and floods the bus. So far Iāve been using thread::sleep (5000) to ensure that I donāt send too many updates/commands in to the bus.
Does anyone notice this? Would disabling rapid refresh for non-GDO be a good change for the lamp portion of the plugin and let the bus post the updates?
Or am I completely off base?
``} else if (device instanceof LampDevice) {
-
LampDevice lampModule = (LampDevice) device;
-
if (command.equals(OnOffType.ON)) {
-
myqOnlineData.executeMyQCommand(
-
lampModule.getDeviceId(), "desiredlightstate",
-
1);
-
**beginRapidPoll(true);**
-
} else if (command.equals(OnOffType.OFF)) {
-
myqOnlineData.executeMyQCommand(
-
lampModule.getDeviceId(), "desiredlightstate",
-
0);
-
**beginRapidPoll(true);**
-
} else {
-
logger.warn("Unknown command {}", command);``
After you first post I thought the start rapid polling code might be the problem. I will change it and get you a jar to try soon.
Thanks,
Scott
@ scooter_seh
Youāre fast.
I had built my own Jar to test my theory.
I was going to report back after I had confirmed it.
I had set the code to false for lamp modules and fixed some typos in the
MyQResponseCode.java
``` UNKNOWN(-1, āUnknow resonseā);``
The jar with the disabled rapid poll for lamp modules fixes the first error I saw and reported.
The response of lamp modules especially in groups is slightly faster and more robust as now itās only reporting status on change and @ 1 per minute as per the configured refresh interval.
From my short test I think having rapid poll false for lamp modules is the way to go.
I have 11 MyQ items in total and with the official 1.9.0 SNAPSHOT binding anytime I was sending commands to myq group triggered by a myq status change would result in some disneyās haunted mansion craziness and slow response on my Rpi2 due to the bus getting flooded.
@tebore
I removed quick polling for the lamp modules but I didnāt want to wait a full minute for the status update. So I added a get status call 2 seconds after the set state request is sent. I am going to make it a configurable parameter but I wanted to get a fix for you to try. I hope to work on it some more tonight and add the source code to my github if you want to test it.
Thanks,
Scott
@ scooter_seh
Iām curious if that 2 second poll after the set state is required.
Iām just thinking out loud.
Commands sent via HAB update the states, unless for some reason the API is slow and the tail end 60 second refresh of the states overrides the sent command with the actual state of the item before the desired state is set at the switch (Iāve had this happen once or twice but waiting a bit eventually everything syncs up).
I also remember that if the switch changes physically (physically flipping of the switch) it also updates the API and that will update the HAB.
I took a look at the code, thereās no way to make MyQ response times better correct? The delay is in the cloud nature of the product? Thereās a ~ 1 second delay on top of the Native MyQ App.
Its been a week and the new binding has been working like a charm
Just a suggestion: The Ecobee and Garadget bindings have a āquick pollā configuration setting that tells the binding to poll state sooner after a command is sent to the remote system, so the user gets feedback sooner than a normal poll cycle. It might be one way to look at how to poll state for MyQ.
Hi everyone,
Iām new to Openhab and setup, and Iāve been trying to read and figure this out myself, but Iām not having any success.
Iāve configured MyQ with one garage door successfully and would like to add a second garage door, but Iām not sure where to start. Iāve made the following changes to my items and sitemap files but it still only recognizes one garage.
Group gMyOpenHAB
/MYQ Garage/
Group Garages
Switch GarageDoorSwitch āGarage Door Openā (Garages, gMyOpenHAB) { myq=ā1ā }
String GarageDoorString āGarage Door [%s]ā (Garages, gMyOpenHAB) { myq=ā1ā }
Contact GarageDoorContact āGarage Door [%s]ā (Garages, gMyOpenHAB) { myq=ā1ā }
Rollershutter GarageDoorShutter āGarage Door Openā (Garages, gMyOpenHAB) { myq=ā1ā }
String GarageDoorDesc āGarage Door Desc [%s]ā (Garages) { myq=ā1#descā }
String GarageDoorOnline āGarage Door Online [%s]ā (Garages) { myq=ā1#onlineā }
String GarageDoorDeviceId āGarage Door Device Id [%s]ā (Garages) { myq=ā1#MyQDeviceIdā }
String GarageDoorDeviceType āGarage Door DeviceType [%s]ā (Garages) { myq=ā1#MyQDeviceTypeNameā }
String GarageDoorSerialNumber āGarage Door SerialNumber [%s]ā (Garages) { myq=ā1#SerialNumberā }
Switch GarageDoorSwitch2 āGarage Door Openā (Garages, gMyOpenHAB) { myq=ā2ā }
String GarageDoorString2 āGarage Door [%s]ā (Garages, gMyOpenHAB) { myq=ā2ā }
Contact GarageDoorContact2 āGarage Door [%s]ā (Garages, gMyOpenHAB) { myq=ā2ā }
Rollershutter GarageDoorShutter2 āGarage Door Openā (Garages, gMyOpenHAB) { myq=ā2ā }
String GarageDoorDesc2 āGarage Door Desc [%s]ā (Garages) { myq=ā2#descā }
String GarageDoorOnline2 āGarage Door Online [%s]ā (Garages) { myq=ā2#onlineā }
String GarageDoorDeviceId2 āGarage Door Device Id [%s]ā (Garages) { myq=ā2#MyQDeviceIdā }
String GarageDoorDeviceType2 āGarage Door DeviceType [%s]ā (Garages) { myq=ā2#MyQDeviceTypeNameā }
String GarageDoorSerialNumber2 āGarage Door SerialNumber [%s]ā (Garages) { myq=ā2#SerialNumberā }
Thanks in advance.
Start numbering at 0 not 1
Myq= 0
I assume youāve already added the second Door to your myq account? Do you have any other MyQ items added to your account
This is a great binding! I was using it on 1.8 and now I have it working in 2.0 also.
Does anyone know if the api yet allows us to control the garage door light or get updates from the motion detector? Some discussion above seemed to be about an add on light device, I am only referring to the built in opener light and motion detector.
Thanks!
Thatās not exposed in the Chamberlain API. Maybe in Garage 2.0 theyāll open up the API some more.
Iām a little new with 2.0. Can you help me or point me in the right direction to integrate this to my installation. Not sure if it will fix my problem, in the last few weeks it seems something has changed and I get errors trying to connect to chamberlain.
Anyone else having a problem connecting to the MyQ server? Mine just up and stopped working for some reason.
The trace shows that the request for a security token gets denied.
https://myqexternal.myqdevice.com/
Shows your request has been denied.
@scooter_seh looks like Chamberlain updated/deprecated their API.
A lot of people who rely on their unofficial API is going to be in for a surprise
http://forum.micasaverde.com/index.php/topic,24715.625/wap2.html
Found a discussion here.
Someone needs to hack the protocol on the other side of this, forget the cloudā¦ maybe dns intercept? Iāll have to look into this as soon as mine comes.