Comments (5)
Hey @hjdhjd - I wanted to mention that my new version of this integration does use your library. Just wanted to say thanks - it is really awesome and greatly simplified the work I had to do. Cheers.
https://github.com/brbeaird/SmartThings-MyQ-Edge
from smartthings_myq.
If you keep hitting issues with token generation, sit tight. I may have another solution that actually brings the whole thing back into the SmartApp so we can avoid it altogether. Will be another few days probably.
from smartthings_myq.
Hi guys…I thought you’d find this helpful….I’m the author and maintainer of the Homebridge myQ plugin. I’ve finally gotten around to breaking out my API implementation as it’s own library @hjdhjd/myq that you can use.
It’s a full implementation of the v6 myQ API, and I’ve had thousands of users on it for almost a year. It’s solid, though welcome any contributions or feedback to further improve it. I thought I’d raise it to your attention…there’s a lot of independent efforts around myQ out there, and thought it might be a good idea to try to get some critical mass around a robust implementation for those of us supporting the various smart home ecosystems to collaborate for the good of all.
It eliminates the need for the token generation process you’ve got here, for what it’s worth. Library’s pretty straightforward to use, and you can look at my own Homebridge plugin to see it in action if you want a live example to work from.
Welcome any thoughts…good luck!
from smartthings_myq.
I was able to use @hjdhjd's library successfully. Here is the code:
import { myQApi } from '@hjdhjd/myq';
const myQ = new myQApi('<email>', '<password>');
await myQ.refreshDevices();
console.log(myQ.refreshToken);
However, I also discovered something else. The MyQ
API seems sensitive to which IP address I'm using. While on WiFi at home, the MyQ app fails to login with There was an error connecting to the server. Please check your connection and try again.
. That corresponds to the error I get from @hjdhjd/myq
:
myQ API: https://partner-identity.myq-cloud.com/connect/authorize?client_id=IOS_CGI_MYQ&code_challenge=<challenge>&code_challenge_method=S256&redirect_uri=com.myqops%3A%2F%2Fios&response_type=code&scope=MyQ_Residential+offline_access
Error: 400 Bad Request
myQ API: Unable to access the OAuth authorization endpoint.
However, when I switch to the mobile network or VPN, both work successfully.
Unfortunately, I cannot get the @brbeaird SmartApp to work - presumably because my SmartThings controller is sitting on my network, using my IP.
from smartthings_myq.
A couple things here:
- Thanks, @hjdhjd for dropping by and for that sweet library. I will definitely make use of it in the next generation of this app. Sadly, I cannot make use of it here because the actual logic of this SmartApp runs in the SmartThings cloud on Groovy, so I cannot directly use it as-is. Eventually, these cloud-hosted Groovy apps will be deprecated, and I will probably write some kind of self-hosted javascript equivalent that uses the new SmartThings API and imports the new myQApi npm package.
- The good news is the token generator is no longer needed with the latest SmartApp version I pushed out. @laalfonso - feel free to give the latest code a try if you want to avoid the need for a manual token. Details on that change are now on the Readme.
from smartthings_myq.
Related Issues (20)
- myqtokengenerator-win closes HOT 5
- On/Off switches not working HOT 23
- Make latest changes compatible with Hubitat HOT 3
- I have 2 doors and I am unable to create two toggle doors HOT 1
- Can no longer update DTH through GitHub repository in IDE HOT 1
- Error creating "no sensor" version of SmartApp HOT 1
- Push button switches don't connect HOT 1
- could you please update the Hubitat version as well? HOT 1
- new myq code issues HOT 24
- java.lang.NullPointerException: Cannot invoke method post() on null object @line 418 (getVersionInfo) HOT 2
- MyQ on Smartthings still doesn't work HOT 1
- Can't authenticate on mobile app HOT 1
- Instructions don't seem to match current SmartThings app HOT 4
- Still having login error. HOT 1
- Controlling lights with Z-wave relay HOT 1
- java.lang.NullPointerException: Cannot get property deviceNetworkld' on null object. HOT 1
- delete
- No longer working with the retirement of SmartThings IDE HOT 1
- Error installing garage doors with sensor HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smartthings_myq.