For example, when entering the command GW=1, the OT monitor gives the answer: HTTP/1.1 400 Bad Request
What is going on here?
OTGW monitor displays Bad Request messages
Moderator: hvxl
-
- Starting Member
- Posts: 7
- Joined: Thu Dec 21, 2023 1:46 pm
Re: OTGW monitor displays Bad Request messages
Works for me (webserver configured for http on port 1480):
Via: http://localhost:1480/configure.html, Miscellaneous tab:
Using: `wget -qO- http://localhost:1480/command?GW=1`
Or with curl:
Via: http://localhost:1480/configure.html, Miscellaneous tab:
Code: Select all
10:12:30.614655 Command (via websocket): GW=1
10:12:30.640845 GW: 1
Code: Select all
10:12:37.559266 Command (via web API from ::1:58020): GW=1
10:12:37.584049 GW: 1
Code: Select all
curl -v http://localhost:1480/command?GW=1
* Trying 127.0.0.1:1480...
* Connected to localhost (127.0.0.1) port 1480 (#0)
> GET /command?GW=1 HTTP/1.1
> Host: localhost:1480
> User-Agent: curl/8.0.1
> Accept: */*
>
< HTTP/1.1 200
< content-type: text/plain
< content-length: 5
<
* Connection #0 to host localhost left intact
GW: 1
Schelte
-
- Starting Member
- Posts: 7
- Joined: Thu Dec 21, 2023 1:46 pm
Re: OTGW monitor displays Bad Request messages
Doesn't work for me (with the web server on port 80)
None of the three proposed codes, entered via the Miscellaneous tab, work properly. Each time the command GW=1 gives the following response:
HTTP/1.1 400 Bad Request
For example:
None of the three proposed codes, entered via the Miscellaneous tab, work properly. Each time the command GW=1 gives the following response:
HTTP/1.1 400 Bad Request
For example:
- Attachments
-
- Schermafbeelding 2024-01-01 om 17.43.26.jpg (18.85 KiB) Viewed 2715 times
Re: OTGW monitor displays Bad Request messages
Ah, so it's not OTmonitor that gives the answer "HTTP/1.1 400 Bad Request". OTmonitor only reports that whatever it is connected to produced "HTTP/1.1 400 Bad Request". So it seems that you are not connected to the serial data port of the OTGW.
From a previous post I understand you have an OTGW with a Wemos module running the OTGW-firmware by rvdbreemen. With that configuration you need to connect OTmonitor to port 25238 at the IP address of the Wemos. My guess is you connected to port 80 instead.
From a previous post I understand you have an OTGW with a Wemos module running the OTGW-firmware by rvdbreemen. With that configuration you need to connect OTmonitor to port 25238 at the IP address of the Wemos. My guess is you connected to port 80 instead.
Schelte
-
- Starting Member
- Posts: 7
- Joined: Thu Dec 21, 2023 1:46 pm
Re: OTGW monitor displays Bad Request messages
Ja. Ik geloof dat nu alles werkt. Bedankt.
Translation:
Yes, I think everything works now. Thanks.
Translation:
Yes, I think everything works now. Thanks.