invoke local webserver

Here you are welcome to post Push2Run feature requests
Post Reply
lucab76
Posts: 2
Joined: Sat May 26, 2018 1:02 pm

invoke local webserver

Post 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.
RobLatour
Site Admin
Posts: 1017
Joined: Mon Feb 19, 2018 11:43 am

Re: invoke local webserver

Post 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
lucab76
Posts: 2
Joined: Sat May 26, 2018 1:02 pm

Re: invoke local webserver

Post 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.
RobLatour
Site Admin
Posts: 1017
Joined: Mon Feb 19, 2018 11:43 am

Re: invoke local webserver

Post 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
Post Reply