Everything posted by xKing
- 
	
		
		Python control of MyQ Garage Doors
		
		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).
 - 
	
		
		Python control of MyQ Garage Doors
		
		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.
 - 
	
		
		Python control of MyQ Garage Doors
		
		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
 - 
	
		
		Python control of MyQ Garage Doors
		
		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
 - 
	
		
		Python control of MyQ Garage Doors
		
		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
 - 
	
		
		Python control of MyQ Garage Doors
		
		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?
 - 
	
		
		Python control of MyQ Garage Doors
		
		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.
 - 
	
		
		Google Home
		
		Make the phrase look like "Turn the Fan On" do not include "Ok, Google" on IFTTT (you can also say "Hey, Google", BTW)
 - 
	
		
		Google Home
		
		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
 - 
	
		
		Google Home
		
		https://wiki.universal-devices.com/index.php?title=ISY_Portal_Installation_Instructions
 - 
	
		
		Google Home
		
		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.
 - 
	
		
		Google Home
		
		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)
 - 
	
		
		Google Home
		
		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.
 - 
	
		
		Control your NEST with Raspberry Pi (or any other Unix)
		
		I've uploaded node.js project here: https://github.com/exking/isynnode
 - 
	
		
		Introducing ISYPortal
		
		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.
 - 
	
		
		MyQ control with Network resource and Pi
		
		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
 - 
	
		
		Introducing ISYPortal
		
		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
 - 
	
		
		Provisioning ISY-994iZS with Oncor
		
		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
 - 
	
		
		Introducing ISYPortal
		
		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.
 - 
	
		
		Control your NEST with Raspberry Pi (or any other Unix)
		
		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
 - 
	
		
		MyQ control with Network resource and Pi
		
		Would be cool to find out Like for my Nest "Node Server" I just use Firebase and getting all updates on line.
 - 
	
		
		MyQ control with Network resource and Pi
		
		you think the MyQ app subscribes to the updates? Not just polling it?..
 - 
	
		
		MyQ control with Network resource and Pi
		
		eyaniv, thank you for your feedback! Unfortunately I'm not aware of a way to "subscribe" to MyQ so I can have an always up to date status. There is what I can do: 1) Have the script update ISY automatically when you invoke "status" - that would eliminate the need for the bash script. 2) Re-write it as a "server" in NODE.JS so it would run all the time and poll the MyQ server periodically (with configurable interval) and update ISY when needed (update won't be instant of course). Node server would be similar to option 2, but with the same limitation - I'm not aware of the way to "subscribe" to the MyQ. I personally have a magnetic contact on my garage door tied to my security system so I know door status from it instantly.
 - 
	
		
		Control your NEST with Raspberry Pi (or any other Unix)
		
		Is anyone interested in NODE.JS script that is using the NEST API (Firebase) and capable of reporting thermostat status back to ISY (as variables)? It's pretty rough right now but if you understand NODE.JS (Javascript) you can customize it to your taste.
 - 
	
		
		HomeKit Support via HomeBridge - Siri Voice Control
		
		Did you actually add the device (entered PIN, etc)?