-
Posts
1028 -
Joined
-
Last visited
Everything posted by xKing
-
For those who run ISY with 5.0.X firmware please look here, this will be a solution going forward. Same functionality as ISYNNode, but now within the Polyglot v2 framework.
-
yup, I know...
-
works great unless app developer uses certificate pinning so app won't accept "fake" Fiddler's root certificate. But in that case you can sniff exchange between your browser and web portal (there is no pinning possible in this case)
-
huh? No, just configure my pc as a proxy on iPhone for that session
-
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.
-
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
-
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
-
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.
-
That does not look like a full path, think you missing / in front ('/home/pi/node/config.ini')
-
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.
-
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
-
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.
-
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.
-
Interesting, thanks! Try setting TOKENTTL to 8 then Sent from my iPhone using Tapatalk
-
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.
-
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
-
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.
-
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.
-
yup, that's the cause. How do you start NodeLink ?
-
do the ps -ef | grep mono bet your dscServer is running as root
-
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?
-
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.
-
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.
-
yeah, change to pi (chown -R pi:pi /home/pi/node) I don't see the need to run anything as root
-
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?