Git Product home page Git Product logo

Comments (31)

dre2901 avatar dre2901 commented on July 22, 2024 1

the errors are coming because region (suffix -east or -west) is not present in both Urls above.. which means the patch for @hjdhjd/myq/myq-api.js was not applied or was somehow rolled back.. weird

from node-red-contrib-myq.

rgerrans avatar rgerrans commented on July 22, 2024

I reinstalled the new version (had fully uninstalled the nodes) and reconfigured my node. My first info request produced a normal output. Every one after that is generating the same errors as above except I'm not getting the correct status of the devices after that very first request, just the error messages

from node-red-contrib-myq.

rgerrans avatar rgerrans commented on July 22, 2024

This may help from my log file:

Error: 403 Forbidden
myQ API: Unable to access the OAuth authorization endpoint.

from node-red-contrib-myq.

dre2901 avatar dre2901 commented on July 22, 2024

that's exactly the error that was fixed with 0.0.9. have you tried to change the region from east to west? I don't have any errors anymore with 0.0.9

from node-red-contrib-myq.

k5map avatar k5map commented on July 22, 2024

@dre2901 ... my apologizes as I don't recall seeing how to change regions. I just checked the node and do not see that option. How do I change regions?

from node-red-contrib-myq.

k5map avatar k5map commented on July 22, 2024

@dre2901 Ok after a reboot of my RPi, I now see the region option. I was set to East but when I change to West I am receiving the same errors. Also like @rgerrans I am not receiving any status on either device.

I read in another post you released v0.0.10. My NR hasn't seen that release so will upgrade as soon as I can to confirm if the errors still persist.

from node-red-contrib-myq.

k5map avatar k5map commented on July 22, 2024

@dre2901 ... after doing more investigating, I'm finding even though I send "info" request every 30 seconds (I get the errors each time this request is made) I get the actual status of each device every 6 minutes. Not sure why I can't get the status more often but wanted to pass along my findings.

from node-red-contrib-myq.

k5map avatar k5map commented on July 22, 2024

Things just get more bizarre... this morning all of the errors I've been receiving have stopped AND I did not make any changes on my end. I'm still running v0.0.9 because my NR does not show I can download v0.0.10. Anyone else who were seeing errors, not now?

from node-red-contrib-myq.

rgerrans avatar rgerrans commented on July 22, 2024

I upgraded to v0.0.10 and still get the errors. I also can't switch from east to west (I try and it just stays east when I reopen the config node)

from node-red-contrib-myq.

k5map avatar k5map commented on July 22, 2024

Well I jinked myself... the errors are back... @rgerrans I have the same issue with v0.0.9 in that if I set it to West, when I reopen the node it shows East.

from node-red-contrib-myq.

ahakobyan79 avatar ahakobyan79 commented on July 22, 2024

Having the same problems, with same errors, even though everything seems to be correct.
It's also impossible to change from East to West, as soon as I close the node settings it changes back to East.

from node-red-contrib-myq.

dre2901 avatar dre2901 commented on July 22, 2024

Ok, another attempt with 0.0.11. It might be that if you have multiple MyQ nodes there is a kind of throttling on MyQ server and you get kicked out. In my case I have only one node for garage node which I ping every 30 seconds so I have no issues at all.
In 0.0.11 I've moved api server declaration into global config node so it will be shared between all your MyQ nodes. Also bug with saving of region is fixed.
Now you need to specify the region on the credentials page. Make sure you provide the rest of credentials like username and password there too, as usually password is not saved in flow so you need to re-enter it when changing config page, otherwise after redeploy you'll get all those Could not refresh devices! errors.
If still having errors, please post your log here (you can get it with node-red-log when on Raspi https://nodered.org/docs/user-guide/runtime/logging)

from node-red-contrib-myq.

rgerrans avatar rgerrans commented on July 22, 2024

from node-red-contrib-myq.

ahakobyan79 avatar ahakobyan79 commented on July 22, 2024

myQ API: https://partner-identity.myq-cloud.com/connect/authorize?client_id=*******&code_challenge=**********************************&code_challenge_method=S256&redirect_uri=com.myqops%3A%2F%2Fios&response_type=code&scope=MyQ_Residential+offline_access Error: 403 Forbidden
myQ API: Unable to access the OAuth authorization endpoint.
11 Sep 09:18:06 - [error] [myq-device-node:Garage Door] Error received:
11 Sep 09:18:06 - [error] [myq-device-node:Garage Door] Could not refresh devices!
11 Sep 09:18:06 - [error] [myq-device-node:Garage Door] Error code: undefined
11 Sep 09:18:06 - [error] [myq-device-node:Garage Door] Error message: undefined
11 Sep 09:18:06 - [error] [myq-device-node:Garage Door] Could not refresh devices!
myQ API: throttling refreshDevices API call. Using cached data from the past two seconds.
11 Sep 09:18:52 - [error] [myq-device-node:Garage Door] Error received:
11 Sep 09:18:52 - [error] [myq-device-node:Garage Door] Could not refresh devices!
11 Sep 09:18:52 - [error] [myq-device-node:Garage Door] Error code: undefined
11 Sep 09:18:52 - [error] [myq-device-node:Garage Door] Error message: undefined
11 Sep 09:18:52 - [error] [myq-device-node:Garage Door] Could not refresh devices!
myQ API: throttling refreshDevices API call. Using cached data from the past two seconds.
myQ API: throttling refreshDevices API call. Using cached data from the past two seconds.
11 Sep 09:18:54 - [error] [myq-device-node:Garage Door] Error received:
11 Sep 09:18:54 - [error] [myq-device-node:Garage Door] Could not refresh devices!
11 Sep 09:18:54 - [error] [myq-device-node:Garage Door] Error code: undefined
11 Sep 09:18:54 - [error] [myq-device-node:Garage Door] Error message: undefined
11 Sep 09:18:54 - [error] [myq-device-node:Garage Door] Could not refresh devices!

from node-red-contrib-myq.

dre2901 avatar dre2901 commented on July 22, 2024

Ok, instead of patching the original @hjdhjd/myq library, I've switched to it's fork @brbeaird/myq which was downgraded from es module to commonjs. So we can make sure it's not a conflict with other dependencies..
published as 0.0.12

from node-red-contrib-myq.

k5map avatar k5map commented on July 22, 2024

@dre2901... I think you fixed it with v0.0.12. I just upgraded; updated my credentials; assigned West as my region and so far no error. YEAH!

My next test is to see if I can get "opening" and "closing" status to work.

from node-red-contrib-myq.

k5map avatar k5map commented on July 22, 2024

@dre2901 ... v0.0.12 is working GREAT. All 3 of the new statuses (opening, closing and stopped) are returned with INFO. Can't thank you enough for getting the errors and new statuses working.

from node-red-contrib-myq.

ahakobyan79 avatar ahakobyan79 commented on July 22, 2024

I upgraded, it worked right away,
then i tried to turn off the light, I got the same set of errors, and now every command give me the same errors again.

from node-red-contrib-myq.

rgerrans avatar rgerrans commented on July 22, 2024

from node-red-contrib-myq.

ahakobyan79 avatar ahakobyan79 commented on July 22, 2024

@dre2901 should the node still work for the lights too? I'm only able to open and close with payload, anything else causes it to fail again for everything else too, as sson as i try to change the light status.

from node-red-contrib-myq.

dre2901 avatar dre2901 commented on July 22, 2024

@dre2901 should the node still work for the lights too? I'm only able to open and close with payload, anything else causes it to fail again for everything else too, as sson as i try to change the light status.

Can't test for lamp as I don't have any but I don't any reason why it should not work. We just pass the payload to APIs.

But what I've noticed (and I presume it's exactly your issue) is that if I send some nonsense payload to my garage door then, of course, it fails but also API we are using treats it as authorization error and deletes oauth token. Normally, on next devices refresh call (status) that token is refreshed. But there is some throttling hardcoded inside which does not allow to call authorization endpoint more than once per 2 minutes. That's why you start getting error even for door opener. I have same behaviour. Then, at least for me, everything returns to normal when that 2 minutes timer elapses.

So my suggestion, check what payload you are sending to your lamp. Maybe it's just a wrong one / not supported

from node-red-contrib-myq.

ahakobyan79 avatar ahakobyan79 commented on July 22, 2024

@dre2901 should the node still work for the lights too? I'm only able to open and close with payload, anything else causes it to fail again for everything else too, as sson as i try to change the light status.

Can't test for lamp as I don't have any but I don't any reason why it should not work. We just pass the payload to APIs.

But what I've noticed (and I presume it's exactly your issue) is that if I send some nonsense payload to my garage door then, of course, it fails but also API we are using treats it as authorization error and deletes oauth token. Normally, on next devices refresh call (status) that token is refreshed. But there is some throttling hardcoded inside which does not allow to call authorization endpoint more than once per 2 minutes. That's why you start getting error even for door opener. I have same behaviour. Then, at least for me, everything returns to normal when that 2 minutes timer elapses.

So my suggestion, check what payload you are sending to your lamp. Maybe it's just a wrong one / not supported

What you are saying makes absolute sense. And it seems that the 2 min thing is true also, I waited, and it worked again.
Thank you for that.

As far as other options go, I follow your directions and applied the appropriate string to msg.payload:
lamp_on
lamp_off
on
off - for the light

Please let me know if I'm doing something wrong

from node-red-contrib-myq.

dre2901 avatar dre2901 commented on July 22, 2024

can you try with turnon and turnoff ?

from node-red-contrib-myq.

ahakobyan79 avatar ahakobyan79 commented on July 22, 2024

can you try with turnon and turnoff ?

same results. 1st request comesback with msg.payload: false, the second time i get the errors.

from node-red-contrib-myq.

ahakobyan79 avatar ahakobyan79 commented on July 22, 2024

@dre2901 I am really interested in getting to the lights control. Searched google, couldn't find MyQ API anywhere. Do you mind sharing the link to their API Docs if you have it?
Thank you.

from node-red-contrib-myq.

kskenyon avatar kskenyon commented on July 22, 2024

I don't think the built in light on the opener itself can be controlled remotely. The optional accessory light probably can be though.

from node-red-contrib-myq.

dre2901 avatar dre2901 commented on July 22, 2024

Ah.. I thought you have a separate light device and trying to control it. No, of course, it does not work with opener and that's why you get errors - it does not understand "light/lamp" commands.
And, no, I don't have any official docs and presume all those API libraries are results of MyQ app's reverse engineering. But I might be wrong

from node-red-contrib-myq.

hitnrun30 avatar hitnrun30 commented on July 22, 2024

It's back... All of a sudden I'm getting the infamous myq credentials error.

I might have a little insight. The myq integration for home assistant had to do an overhaul to work. That may be the reason I am having an issue.

from node-red-contrib-myq.

rgerrans avatar rgerrans commented on July 22, 2024

from node-red-contrib-myq.

hitnrun30 avatar hitnrun30 commented on July 22, 2024

I had forgotten to reconnect my auto check and it looks like mine is producing errors as well once I started polling the api again

On Sun, Oct 15, 2023 at 3:58 PM hitnrun30 @.> wrote: It's back... All of a sudden I'm getting the infamous myq credentials error. I might have a little insight. The myq integration for home assistant had to do an overhaul to work. That may be the reason I am having an issue. — Reply to this email directly, view it on GitHub <#12 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEOC2HAQ3AGMP5NZVLVKBQTX7RMA5AVCNFSM6AAAAAA4QX3RYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRTGUYTKMBUHA . You are receiving this because you were mentioned.Message ID: @.>

I believe there is already an update that needs to be pushed. The myq in home assistant was just updated. All that is needed is to reference version 1.0.3 instead of 1.0.2

from node-red-contrib-myq.

dre2901 avatar dre2901 commented on July 22, 2024

fixed in 0.0.15 - new api dependency (with explicit login function in new api)

from node-red-contrib-myq.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.