kyrahabattoir / ToyWebBridge

A simple web bridge for https://buttplug.io/
Other
16 stars 3 forks source link

127.0.0.1:8008 always 404 #3

Open Bluscream opened 1 year ago

Bluscream commented 1 year ago

I tried using the webinterface while the tool and intiface are running but i always get a 404

info: Microsoft.Hosting.Lifetime[0]
      Now listening on: http://[::]:8008
info: ToyWebBridge.Services.WebsocketService[0]
      Toy Web Bridge is starting.
warn: ToyWebBridge.Services.WebsocketService[0]

 /!\ Web bridge SecretKey: t8HYEncTdJDjpbUc0asm /!\

info: ToyWebBridge.Services.WebsocketService[0]
      Websocket url is: ws://localhost:12345/buttplug
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
      Content root path: C:\Users\blusc\Downloads\twb\ToyWebBridge
info: ToyWebBridge.Services.WebsocketService[0]
      Connecting...
info: ToyWebBridge.Services.WebsocketService[0]
      Connected to intiface!
info: ToyWebBridge.Services.WebsocketService[0]
      Scanning for devices...
info: ToyWebBridge.Services.DeviceRegister[0]

New device detected
Buttplug (Satisfyer Rotator Plug 2+)
  Update rate: 50ms
  Power: 100%
C:\Windows\system32>curl -vvvvv "http://127.0.0.1:8008" -H "SecretKey: t8HYEncTdJDjpbUc0asm" -H "Connection: keep-alive"
*   Trying 127.0.0.1:8008...
* Connected to 127.0.0.1 (127.0.0.1) port 8008 (#0)
> GET / HTTP/1.1
> Host: 127.0.0.1:8008
> User-Agent: curl/7.83.1
> Accept: */*
> SecretKey: t8HYEncTdJDjpbUc0asm
> Connection: keep-alive
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Date: Sat, 29 Oct 2022 23:01:25 GMT
< Server: Kestrel
< Content-Length: 0
<
* Connection #0 to host 127.0.0.1 left intact
kyrahabattoir commented 1 year ago

the controller root it /api

try http://127.0.0.1:8008/api/Device/List

Bluscream commented 1 year ago

Oh. Is there a frontend for it?

kyrahabattoir commented 1 year ago

https://github.com/kyrahabattoir/ToyWebBridge#api details all the ways you can list, control toys & send patterns.

Bluscream commented 1 year ago

No i mean a webUI. I want to host a website locally on my Pi that i can send my friends so they can control me without me needing to have my PC up

kyrahabattoir commented 1 year ago

This is more of a webAPI, try https://xtoys.app/ instead.

Bluscream commented 1 year ago

This is more of a webAPI, try https://xtoys.app/ instead.

Xtoys seems to be cloud and account based and seems to require android instead of a browser/linux machine. I want something selfhosted and always available independent of accounts

Do you know of any frontends that use your api? Otherwise i'll just have to write my own with php and bootstrap

kyrahabattoir commented 1 year ago

I don't know any i'm afraid.

Bluscream commented 1 year ago

Thanks, i'll look into making a simple frontend with sliders and buttons Can the api retrieve the current motor state/strength from intiface?

kyrahabattoir commented 1 year ago

Unfortunately no.