Jump to content

xKing

Administrators
  • Posts

    1028
  • Joined

  • Last visited

Everything posted by xKing

  1. Does the status work for you? [andrey@penguin ~/src/GitHub/Einstein42/myq-garage]$ ./myq-garage.py status Garage Door is Closed. Last changed at Sat 25 Feb 2017 10:33:04
  2. until next time they change the API
  3. Well, find the line config.read('config.ini') and change it to the absolute path like config.read('/home/pi/myq-garage/config.ini') so you could still use the config.ini App ID is still the same and there is no way to figure it out automatically rather than trace what real iOS or Android app sends. P.S. Please use "git pull" to fetch the updated version from the git hub, disregard the zip file please.
  4. Got the pull request done (I'm pretty new to git, using SVN at work) so please review. I've also added my "token caching" functionality so authentication is not done on each request, token is now cached in the temporary file for the amount of minutes configured in the TOKENTTL variable. That should reduce load to MyQ Auth server and mimic the real app better, plus people should be able to pull the door status more frequent (but I still agree that 5 minutes is a good interval, if realtime update is desired - use door sensor instead).
  5. Ok I see that you actually support a few different brands in the config.ini so I'll need to adjust my changes to account for that, will try to find some time this week.
  6. Attached the modified file. I did not test it since I use my own script, but I think it should work. I can create a pull request of course if Mr. Einstein 42 would like myq-garage.zip
  7. Yeah, try something like this diff --git a/myq-garage.py b/myq-garage.py index 568bf82..00af49e 100755 --- a/myq-garage.py +++ b/myq-garage.py @@ -207,8 +207,12 @@ class MyQ: self.baseurl = SERVICE self.username = USERNAME self.password = PASSWORD - self.headers = { "User-Agent": "Chamberlain/2786", "MyQApplicationId": self.appid } - self.authurl = self.baseurl+"/api/user/validatewithculture" + self.headers = { "User-Agent": "Chamberlain/3.73", + "BrandId": "2", + "ApiVersion": "4.1", + "Culture": "en", + "MyQApplicationId": self.appid } + self.authurl = self.baseurl+"/api/v4/User/Validate" self.enumurl = self.baseurl+"/api/v4/userdevicedetails/get" self.seturl = self.baseurl+"/api/v4/DeviceAttribute/PutDeviceAttribute" self.geturl = self.baseurl+"/api/v4/deviceattribute/getdeviceattribute" @@ -218,8 +222,8 @@ class MyQ: def login(self): - payload = { "appId": self.appid, "username": self.username, "password": self.password, "culture": "en" } - req=self.session.get(self.authurl, headers=self.headers, params=payload) + payload = { "username": self.username, "password": self.password } + req=self.session.post(self.authurl, headers=self.headers, json=payload) if (req.status_code != requests.codes.ok): print "Login err code: " + req.status_code
  8. Well, I extracted my appID about a few months ago? Probably they updated it again and you have the most recent one now Sent from my iPhone using Tapatalk
  9. Just Fiddler P.S. I really recommend that you save off the token in a temp file, it's good for about 1 hour, at least that is how the iOS app does it. What's the point of getting a new one every 5 minutes?
  10. My CGI script still works (at least for me), every time they change something I have to use Fiddler to sniff SSL traffic iOS app sends to MyQ to figure out what changed.
  11. Make the phrase look like "Turn the Fan On" do not include "Ok, Google" on IFTTT (you can also say "Hey, Google", BTW)
  12. Sure, for now (until Google releases API for the Home) - just link it to IFTTT and use IF "Google Assistant" THEN "Maker" make a web request applet, there is how to use ISY Portal with IFTTT Maker https://wiki.universal-devices.com/index.php?title=ISY_Portal_IFTTT_Integration
  13. https://wiki.universal-devices.com/index.php?title=ISY_Portal_Installation_Instructions
  14. Yeah, that's what I'm doing right now If I don't want to pay for ISY Portal - I'd just throw a python script to my own existing web server that would accept Maker's requests and relay them to ISY over the LAN.
  15. Yeah, to get a direct REST to ISY I'll need 3 things: 1) Assign ISY a real SSL certificate (which is easy) 2) Save my ISY username/password on IFTTT site as a part on an URL for Maker to access (which I don't really like, it's cleartext out there) 3) Expose my ISY's HTTPS port to the outside (not sure if I like it). If IFTTT would expose the list of IPs they are coming from - I can probably allow these only. OR come up with my own reverse proxy for maker to access ISY directly (instead of the portal) (this is probably the best solution in terms of security and expense) P.S. Loaded a 2048 bit SSL certificate to the ISY - man, it takes like 5 seconds for it to respond via SSL! (5.0.4)
  16. Well, got my "Home" today and managed to pull it off via IFTTT integration, just make a recipe "IF Google Assistant" (make a phrase you want like "turn ON Kitchen lights") and "THEN MAKER" - use URL for the IFTTT integration for ISY portal to turn on the scene. You'll need to add each specific command you want "Home" to understand.
  17. I've uploaded node.js project here: https://github.com/exking/isynnode
  18. couple more methods of remote access: 1) VPN server - some routers support creating a VPN server which you can use to remotely VPN into your home network and access ISY just like you sitting next to it. 2) SSH forwarding - if you have something at home that can do SSH Server (like a Raspberry Pi) - you can SSH to it remotely and have it forward the port to ISY just for the duration of the SSH session. That way your traffic is encrypted. For example - I can't VPN from work, but I can do SSH and access ISY that way.
  19. It looks like MyQ changed the API a little, so there is a very quick fix in order for it to work with that new /api/v4 myqcgi.zip
  20. You don't need a MobiLinc portal for the direct IP use so you should be ok For portal setup - go to http://my.isy.ioand register it
  21. BTW, I'm not in Oncor service area, we have a co-op called CoServ - I've reached out to them and they say they agree to help me if I would like to connect ISY to my meter They also gave me the person's name who is Meter Communication Superintendent to work with. So even if your utility does not list that possibility - reach out to them and they might agree to work with you! Unfortunately I already have a Z-Wave module in ISY, sounds like I need a second one
  22. OFFTOPIC: BTW, there is a more secure alternative to port forwarding and not VPNing Assuming you have a Pi or other server with SSH enabled - you can just SSH to that server and do SSH tunnel from your remote computer to ISY. Of course your SSH server has to be secure enough.
  23. resend, can you please send me your e-mail as a PM? I have a bit better script (NODE.JS now) which runs on Pi all the time and talks to Nest via their official API, it's also capable of setting variables back on ISY
  24. Would be cool to find out Like for my Nest "Node Server" I just use Firebase and getting all updates on line.
  25. you think the MyQ app subscribes to the updates? Not just polling it?..
×
×
  • Create New...