Everything posted by xKing
- 
	
		
		Python control of MyQ Garage Doors
		
		huh? No, just configure my pc as a proxy on iPhone for that session
 - 
	
		
		Python control of MyQ Garage Doors
		
		I've used Windows app called "Fiddler" previously (and set it as proxy on my iPhone) to sniff out the exchange between MyQ app and their server, not sure if that technique still works, give it a try.
 - 
	
		
		Control your NEST with Raspberry Pi (or any other Unix)
		
		Thanks jshank! Reasonable pull requests are always welcome, however I'm kinda waiting to get my hands on a good 5.0.X firmware so I can re-write the isynnode to be a Node Server
 - 
	
		
		Python control of MyQ Garage Doors
		
		btw, I have a cgi script if you like running under apache https://github.com/exking/myq-cgi and it uses different token save filename
 - 
	
		
		Python control of MyQ Garage Doors
		
		you can fetch the fixed version here https://github.com/exking/myq-garage/ I've also submitted a pull request to the original repository so waiting on Mr. Einstein.42's approval to do so.
 - 
	
		
		Python control of MyQ Garage Doors
		
		That does not look like a full path, think you missing / in front ('/home/pi/node/config.ini')
 - 
	
		
		Python control of MyQ Garage Doors
		
		Awesome! If it runs good for some time - you can probably bump it up to like 45 or 60 minutes and let it handle re-authentication.
 - 
	
		
		Python control of MyQ Garage Doors
		
		you can pull the updated myq-garage.py from here https://github.com/exking/myq-garage/ or wait for Einstein.42 to review the change
 - 
	
		
		Python control of MyQ Garage Doors
		
		I've added a retry logic, script would try to re-authenticate once if saved token did not work. Waiting for Einstein.42's approval to merge.
 - 
	
		
		Python control of MyQ Garage Doors
		
		Well, if TOKENTTL is 8 minutes - it will save the auth token and only use it for 8 minutes, after that it will just fetch a new one. Since MyQ web site does not return token validity period - we could only assume how long it's good for... Apparently 60 is way too much. We'll need to correct token caching logic a bit.
 - 
	
		
		Python control of MyQ Garage Doors
		
		Interesting, thanks! Try setting TOKENTTL to 8 then Sent from my iPhone using Tapatalk
 - 
	
		
		Python control of MyQ Garage Doors
		
		Hm... does it happen immediately or after some time? Like 30 minutes? Maybe TOKENTTL value of 60 is too big, try setting it to 30? I will look at the script again, may need to enhance it to re-fetch the token on 1st error with the saved one.
 - 
	
		
		Python control of MyQ Garage Doors
		
		hm... so what is the exact problem you experiencing when the file IS actually there like on the output above?... P.S. If you set TOKENTTL=0 in the config - it won't even create the file, but you loosing the token caching
 - 
	
		
		Python control of MyQ Garage Doors
		
		do you mean /tmp/myqtoken.json? Is it getting created as root? can you show ls -la /tmp at that time? do you call myq-garage from anywhere else except the nodeLink? maybe crontab or something? you'll need to find out what calls script as root.
 - 
	
		
		Python control of MyQ Garage Doors
		
		change your line to look like su pi -c "mono /home/pi/node/NodeLink.exe" & make sure config.xml is pi owned so you won't prevent NodeLink from updating it of course.
 - 
	
		
		Python control of MyQ Garage Doors
		
		yup, that's the cause. How do you start NodeLink ?
 - 
	
		
		Python control of MyQ Garage Doors
		
		do the ps -ef | grep mono bet your dscServer is running as root
 - 
	
		
		Python control of MyQ Garage Doors
		
		Is myqtoken.json getting root ownership? If yes - make sure you don't have script run as root anywhere. Crontab maybe (don't use /etc/crontab, run crontab -e as pi instead)? dscServer?
 - 
	
		
		Python control of MyQ Garage Doors
		
		Perhaps you invoking the script with dscServer which you run as root?... Make sure to run it as pi (you may need to change it's config.xml ownership to pi as well) I would recommend against running anything which is not a system service as root.
 - 
	
		
		Python control of MyQ Garage Doors
		
		Yup, what Jimbo said Please don't run the script as root. BTW setting 755 vs 644 makes no sense since you just adding eXecutable bit on the file which is useless on text.
 - 
	
		
		Python control of MyQ Garage Doors
		
		yeah, change to pi (chown -R pi:pi /home/pi/node) I don't see the need to run anything as root
 - 
	
		
		Python control of MyQ Garage Doors
		
		sounds like a permissions problem? how does /home/pi/node/logs/myq-garage.log file permissions/ownership look like? could it be that you've run it as root one day so the log is root owned and can't be written by the "pi" user?
 - 
	
		
		Python control of MyQ Garage Doors
		
		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
 - 
	
		
		Python control of MyQ Garage Doors
		
		until next time they change the API
 - 
	
		
		Python control of MyQ Garage Doors
		
		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.