I try to read a JSON file from the integrated Webserver of a B&R PLC.
However I get the following error message in the logger:
Logger: homeassistant.components.rest.data
Quelle: components/rest/data.py:181
Integration: RESTful (Dokumentation, Probleme)
Erstmals aufgetreten: 14:01:29 (2 Vorkommnisse)
Zuletzt protokolliert: 14:01:40
Error fetching data: http://192.168.0.12/indexjson.asp failed with 400, message="Invalid HTTP version:\n\n b'HTTP/3.12.15 Python/3.13 200 OK '\n ^", url='http://192.168.0.12/indexjson.asp'
When I read the file with curl, I get this:
$curl -v http://192.168.0.12/indexjson.asp
* Trying 192.168.0.12:80...
* Established connection to 192.168.0.12 (192.168.0.12 port 80) from 192.168.1.20 port 43402
* using HTTP/1.x
> GET /indexjson.asp HTTP/1.1
> Host: 192.168.0.12
> User-Agent: curl/8.16.0
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 200 OK
< Date: Wed, 29 Oct 2025 14:04:01 GMT
< Expires: Wed, 29 Oct 2025 14:04:01 GMT
< Server: B&R Web Server Ver. {2-231112-19}
< Content-Type: text/html; charset=utf-8
< Content-Length: 753
< Connection: close
<
{
"tempAussen": 153,
"tempPufferOben": 565,
"tempPufferVorlaufHk": 452,
"tempPufferUnten": 443,
"betriebsArt": 1,
"stateHk1": 1,
"stateHk2": 1,
"modeHk1": "hkAutomatik",
"modeHk2": "hkAutomatik",
"Hk1TempIst": 350,
"Hk2TempIst": 258,
"Hk1TempSoll": 347,
"Hk2TempSoll": 258,
"anfBrenner": 0,
"Hk1TempVAus": 240,
"Hk2TempVAus": 232,
"Hk1Pumpe": 1,
"Hk2Pumpe": 1,
"Hk1MischerZu": 0,
"Hk1MischerAuf": 0,
"Hk2MischerZu": 0,
"Hk2MischerAuf": 0,
"anfBrennerManuell": 0,
"reglerHk": {
"E": 4,
"P": 320.0,
"I": 0.0,
"D": 200.0
},
"reglerFbh": {
"E": -1,
"P": -100.0,
"I": 0.0,
"D": 0.0
}
}
* shutting down connection #0
What’s the issue?