Page 1 of 1
invoke local webserver
Posted: Sat May 26, 2018 3:14 pm
by lucab76
Is it possible to invoke a local http webserver with POST?
I would like to be able to invoke 'OmerTu/GoogleHomeKodi' in local node webserver.
Re: invoke local webserver
Posted: Sat May 26, 2018 4:26 pm
by RobLatour
I don't use kodi - but from this link it looks quite possible yes
https://github.com/OmerTu/GoogleHomeKodi
It seems you just need to fill in the url as described in the link above under 'Setting up other actions:'
for example with Push2Run
you would have it listed for 'ok google tell my computer to pause kodi'
and then in the push2run open field type
YOUR_NODE_SERVER/playpause
or to listed for 'ok google tell my computer to ask kodi to play $'
and then in the push2run open field type
YOUR_NODE_SERVER/playtvshow?q=$
but like I say, I don't use kodi myself so you may need to play with it a bit.
If you get it working, it would be great if you post back here
Re: invoke local webserver
Posted: Sun May 27, 2018 12:13 pm
by lucab76
The problem is also to send the POST containing the authentication token.
I partly solved this by writing a java program that was invoked by P2R and that makes the HTTP call with POST.
If a day P2R will allow the invocation of web servers with POST I can skip a step.
Re: invoke local webserver
Posted: Mon Feb 18, 2019 6:06 pm
by RobLatour
I use push2run and curl to post to a webpage served on a little esp32 device I built to control an ir device (emulating a tv remote); now I'm working on something similar for my garage door.
You may want to look a curl.
https://curl.haxx.se/
https://curl.haxx.se/download.html
https://gist.github.com/subfuzion/08c5d85437d5d4f00e58