philchillbill wrote:
> If you note any specifics for pCP that are different to a normal Debian
> install, I'd appreciate a summary so it can be added to the docs.
I'm still hacking my way around to get a feel for what needs to be done
to get it working and then redone after a reboot. So far I have it set
up such that pCP runs a script at startup (via the built-in 'User
Command's' tweak) e.g. /home/tc/.ngrok2/ngrok_startup.sh, which starts
ngrok and then finds the URL via that curl command. grep in Busybox
doesn't have the -P option, but I can get to the url with a bit of
awking:
Code:
--------------------
curl -s http://localhost:4040/api/tunnels | awk -F"https:// {'print $2'} |
awk -F" {'print $1'}
--------------------
I haven't attempted to make it a service, because this User Command
script seems sufficient - I can run the script manually if I ever need
to run it without a reboot, but since this is RPi3 is currently
dedicated to ngrok only, a reboot is fine.
I haven't got the python script working yet - it's failing at 'import
requests' and I can't see whether that, or json or urllib.parse, are
included in any of the python packages that are available for pCP. To
be investigated later if necessary.
I have installed the Alexa app on my iPhone and MediaServer is one of
'my' skills, and seems to have linked successfully, but since I don't
have a device yet I can't test it any further. And I also can't tell
what the final step of the python script should be doing, once it's
recovered the url. Maybe I can do that too with simple shell scripting,
but I need to find out what the python would do first.
------------------------------------------------------------------------
chill's Profile: http://forums.slimdevices.com/member.php?userid=10839
View this thread: http://forums.slimdevices.com/showthread.php?t=111016
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins