Closed johndc7 closed 3 years ago
I second this. Even, I was seeing this error from 4-5 days. When I changed ApiVersion below to 5 from 5.2, everything is working.
_headers: { 'Content-Type': 'application/json', ApiVersion: '5', BrandId: '2', Culture: 'en', },
Q, @vikramprabhu123 - how are you using the src instead of the npm? Sorry for the dumb Q. I see what you have changed in the src but seems the npm (myq-api) is being used instead. Thoughts? thx
@cjustinhall You can change the source files under node_modules\myq-api
. The file I was referring to is under node_modules\myq-api\src\constants.js
.
@cjustinhall
Apology for not being clear.
Yes I modified "node_modules\myq-api\src\constants.js"
Good stuff. I found that/see that but when i run it seems it is using the (compiled?) myq-api from npm install and not the source. How can I get this setup to use the src not the npm?
npm is just cloning the github repo. This library is not minified or compiled. If you edit the file under node_modules
and reload your program, it should work.
@cjustinhall You might be already knowing the below.....
Make sure not to use global option for install, instead let it download in local project directory
So please use like below.
npm install myq-api --save
Got it. My stupidity. Working! Wahoo. Thanks all.
Had the same issue. I can confirm that this change
_headers: { ... ApiVersion: '5', ... },
in node_modules\myq-api\constants.js
fixed my getDevices()
failure
Apologies for the delay here! I cut a new release after #37 landed. Shoutout to @StrathCole for this!
Per the discussion on the linked PR, both 5
and 5.2
works, with us going ahead with the latter.
I cannot seem to list any of the devices on my account using
getDevices()
. I attempted this using example.js from the documentation.The only error that is logged is
MyQError: Unidentified error returned from service.
So I checked the response from axios and found the following response from MyQ:
Any ideas? I am using a MyQ integration for hubitat that still works so I assume MyQ didn't change anything.
Edit: If I change the API Version in
constants.js
to5
instead of5.1
everything works.