basst85 / NextRemoteJs

Simple webinterface for the Ziggo Next setopbox
13 stars 4 forks source link

Directly use powerkey #4

Closed rgerrie closed 5 years ago

rgerrie commented 5 years ago

How can I execute the powerKey command directly? is this possible with a json post? or is there another way?

Thanks!

basst85 commented 5 years ago

Hello!

What do you exactly mean with "directly"? You first have to a authenticate and get the correct device (Next box).

rgerrie commented 5 years ago

by direct I mean without using the web interface. Everything works, but I want to switch off the media box with forexample an http request

basst85 commented 5 years ago

You can perform a POST request to http://localhost:8080/api with the following JSON body: {action: 'powerKey'}

localhost can also be a domain if you host it on a server, but that's not very secure because there is no authentication on /api

rgerrie commented 5 years ago

Thanks!!