Closed Asti79 closed 1 year ago
Try just the IP. No http prefix
only IP yes, thx for remind me to check the user input
This is what I entered.
I enabled the JSON mode and sat a password of the boiler before this. I am running version: Touch V3.00b 04112019 on the boiler, if this is of any help.
I am not quite sure, where to look for a logfile.
@Asti79 If you type in your browser http://192.168.50.70:4321/PASSWORD/all do you get a json response?
The output of the link:
These values matches the vaules of the boiler, so I think it works fine.
Will take a look at it
@Asti79 Can you provide the output of http://192.168.50.70:4321/PASSWORD/all?
(with ending ?
)
The output file should be formatted like this:
{
"system":{
"system_info":"system global variables",
"L_ambient":{"val":4, "unit":"°C", "factor":0.1, "min":-32768, "max":32767},
"L_errors":{"val":0, "factor":1, "min":-32768, "max":32767},
"L_usb_stick":{"val":0, "format":"0:Aus|1:Ein"},
"L_existing_boiler":{"val":0, "unit":"°C", "factor":0.1, "min":-32768, "max":32767}
}
}
Here is the output: oekofenjson2.txt
Thank you very much @Asti79 I will take a look into it. I will setup a Dev-Server to check your json against my library. I should find time at the weekend.
No, hurry. Just say, when I can be of any help.
Hi @Asti79 could you check out the new version? Your Touch IP Version might be different, I have V4.00b.
My JSON
{
"system":{
"system_info":"system global variables",
"L_ambient":{"val":90, "unit":"°C", "factor":0.1, "min":-32768, "max":32767},
"L_errors":{"val":0, "factor":1, "min":-32768, "max":32767},
"L_usb_stick":{"val":0, "format":"0:Aus|1:Ein"},
"L_existing_boiler":{"val":0, "unit":"°C", "factor":0.1, "min":-32768, "max":32767}
},
}
Your JSON
{
"system":{
"system_info":"system global variables",
"L_ambient":{"val":"90", "unit":"°C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_errors":{"val":"0", "factor":"1", "min":"-32768", "max":"32767"},
"L_usb_stick":{"val":"0", "format":"0:Aus|1:Ein"},
"L_existing_boiler":{"val":"0", "unit":"°C", "factor":"0.1", "min":"-32768", "max":"32767"}
},
}
If you look carefully, your JSON puts integers and floats in brackets, thats makes it a string. I tried to workaround this in https://github.com/ckarrie/oekofen-api/commit/d6cabfab18035e460c0105cb620ab46b2426ad2b
Hello, I have uninstalled the integration and reinstalled and it says this now. I am not sure if this is the latest version from you. Sorry I am pretty new on Github.
When I run the setup again I get his error:
@Asti79 Can you provide the output of http://192.168.50.70:4321/PASSWORD/??
(with two ending ??
)
this should contain your Touch Version
Of course, here it is: oekofenjson3.txt
Ah yes I see, there is no Version string in the first line. Gonna fix that.
Additional to that, the 'st5k' Domain could clash with my domain index detection.
Edit: st5k
is not in your JSON, should be not the problem.
@Asti79 I can't reproduce your error, could you try following
create a python venv
# Create a Virtual Python Environment
python3 -m venv oekofen-test
cd oekofen-test
# Activate the Environment
source bin/activate
pip install oekofen-api
Start python3
python3
run following code and check if there are any errors?
import oekofen_api
import asyncio
import time
client = oekofen_api.Oekofen("192.168.50.70", "PASSWORD")
version = asyncio.run(client.get_version())
data = asyncio.run(client.update_data())
client.get_status()
client.get_weather_temp()
client.get_heating_circuit_temp()
print("version", version) # --> should be None in your case
print("data", data) # --> generated data
Additional to that, could you please check in your HomeAssistant in Menu Settings > System > Log (Einstellungen > System > Logs in german) and look for "ha_oekofen" Errors?
Something like that:
I think I am getting closer now:
Homeassistant: 192.168.50.7 Boiler: 192.168.50.70
I have doublechecked the IP multi times now and the errormessage states the IP: 192.168.50.7 but i definititly typed: 192.168.50.70.
I have tried changing the boiler ip to .17 but still got the same errormessage.
Boiler now: 192.168.50.17
I am trying to install the venv, but first have to read up on how to do this.
https://github.com/ckarrie/homeassistant-oekofen/issues/6#issue-1584029434 Alles klar, ich war mir nicht sicher :-)
Ich habe mal ein Video von dem Fehler erstellt. Vielleicht hilft es. https://youtu.be/ovnau_93HYM
Hi @Asti79 bist du dir sicher, dass du bei der Passwort-Eingabe das JSON-Passwort verwendest und nicht das vom WebUI?
Weil genau diesen Fehler "Expecting value..." bekomme ich, wenn ich versuche die "Fehlerseite" (siehe Kommentar https://github.com/ckarrie/homeassistant-oekofen/issues/1#issuecomment-1428253001) des Ökofens auszulesen.
Der letzte Screenshotfehler ist wahrscheinlich ein falsches Passwort. Der Fehler im Video ist mit korrektem Passwort. Ich habe jetzt nochmal das Passwort auf 1234 gesetzt, den Ofen neugestartet und http://192.168.50.17:4321/1234/all aufgerufen und gültige Werte erhalten.
Trotzdem erhalten ich folgenden Fehler beim einrichten der Integration.
Ich werde nebenbei mal versuchen die neueste Softwareversion zu bekommen.
Der Fehler deutet darauf hin, dass der Ökofen auf eine Anfrage nicht mit einem JSON antwortet. Interessant wäre natürlich zu wissen, wo genau es hakt. Dann müsste man kein Firmwareupdate durchführen. Daher wäre einer genauere Analyse via Python3 Virtualenv (virtuelle Umgebung) (https://github.com/ckarrie/homeassistant-oekofen/issues/1#issuecomment-1429689303) sicherlich aufschlussreich.
Laut deinem Video nutzt du Windows, schau mal hier für eine Anleitung
Kann es die Tage ebenfalls mal unter Windows austesten, dann kann ich dir eine genaue Anleitung schicken
OK, ich schaue mir die Anleitung am Wochenende mal an und taste mich daran.
Ich habe die virtuelle Umgebung in einem Ubuntu auf Windows 11 installiert und deiner Anleitung gefolgt
bpladmin@Bastian-PC:~$ sudo apt install python3.10-venv
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
python3.10-venv
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 5722 B of archives.
After this operation, 28.7 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 python3.10-venv amd64 3.10.6-1~22.04.2 [5722 B]
Fetched 5722 B in 0s (22.5 kB/s)
Selecting previously unselected package python3.10-venv.
(Reading database ... 31561 files and directories currently installed.)
Preparing to unpack .../python3.10-venv_3.10.6-1~22.04.2_amd64.deb ...
Unpacking python3.10-venv (3.10.6-1~22.04.2) ...
Setting up python3.10-venv (3.10.6-1~22.04.2) ...
bpladmin@Bastian-PC:~$ sudo python3 -m venv oekofen-test
bpladmin@Bastian-PC:~$ cd oekofen-test/
bpladmin@Bastian-PC:~/oekofen-test$ source bin/activate
(oekofen-test) bpladmin@Bastian-PC:~/oekofen-test$ pip install oekofen-api
Collecting oekofen-api
Downloading oekofen_api-0.0.17-py3-none-any.whl (11 kB)
Collecting voluptuous>=0.13.1
Downloading voluptuous-0.13.1-py3-none-any.whl (29 kB)
Collecting aiohttp>=3.8.1
Downloading aiohttp-3.8.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 11.3 MB/s eta 0:00:00
Collecting async-timeout<5.0,>=4.0.0a3
Downloading async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting charset-normalizer<4.0,>=2.0
Downloading charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (198 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 198.8/198.8 KB 36.8 MB/s eta 0:00:00
Collecting yarl<2.0,>=1.0
Downloading yarl-1.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (264 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 264.0/264.0 KB 35.5 MB/s eta 0:00:00
Collecting multidict<7.0,>=4.5
Downloading multidict-6.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 114.5/114.5 KB 34.7 MB/s eta 0:00:00
Collecting attrs>=17.3.0
Downloading attrs-22.2.0-py3-none-any.whl (60 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.0/60.0 KB 26.0 MB/s eta 0:00:00
Collecting frozenlist>=1.1.1
Downloading frozenlist-1.3.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (149 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 149.6/149.6 KB 38.0 MB/s eta 0:00:00
Collecting aiosignal>=1.1.2
Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Collecting idna>=2.0
Downloading idna-3.4-py3-none-any.whl (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 KB 26.1 MB/s eta 0:00:00
Installing collected packages: voluptuous, charset-normalizer, multidict, idna, frozenlist, attrs, async-timeout, yarl, aiosignal, aiohttp, oekofen-api
Successfully installed aiohttp-3.8.4 aiosignal-1.3.1 async-timeout-4.0.2 attrs-22.2.0 charset-normalizer-3.0.1 frozenlist-1.3.3 idna-3.4 multidict-6.0.4 oekofen-api-0.0.17 voluptuous-0.13.1 yarl-1.8.2
(oekofen-test) bpladmin@Bastian-PC:~/oekofen-test$ python3
und bekomme diesen Fehler hier:
>>> import oekofen_api
>>> import asyncio
>>> import time
>>> client = oekofen_api.Oekofen("192.168.50.17", "1234")
>>> version = asyncio.run(client.get_version())
_fetch_data http://192.168.50.17:4321/1234/??
>>> data = asyncio.run(client.update_data())
_fetch_data http://192.168.50.17:4321/1234/all??
Expecting property name enclosed in double quotes: line 2 column 1 (char 2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/home/bpladmin/oekofen-test/lib/python3.10/site-packages/oekofen_api/__init__.py", line 38, in update_data
self._raw_data = await self._fetch_data(path=const.URL_PATH_ALL_WITH_FORMATS, is_json=True)
File "/home/bpladmin/oekofen-test/lib/python3.10/site-packages/oekofen_api/__init__.py", line 153, in _fetch_data
json_response = await resp.json(content_type=None)
File "/home/bpladmin/oekofen-test/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1120, in json
return loads(stripped.decode(encoding))
File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 2 column 1 (char 2)
Es werden keine Daten übernommen. Die letzten Befehle geben ein leeres Ergebnis zurück:
>>> client.get_status()
>>> client.get_weather_temp()
>>> client.get_heating_circuit_temp()
>>> print("version", version)
version None
>>> print("data", data)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'data' is not defined
Die Zeile http://192.168.50.17:4321/1234/all?
spuckt dieses hier aus:
{
"system":{
"system_info":"system global variables",
"L_ambient":{"val":"27", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_errors":{"val":"0", "factor":"1", "min":"-32768", "max":"32767"},
"L_usb_stick":{"val":"false", "format":"0:Aus|1:Ein"}
},
"weather":{
"weather_info":"current weather data",
"L_temp":{"val":"50", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_clouds":{"val":"82", "unit":"%", "factor":"1", "min":"-32768", "max":"32767"},
"L_forecast_temp":{"val":"80", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_forecast_clouds":{"val":"100", "unit":"%", "factor":"1", "min":"-32768", "max":"32767"},
"L_forecast_today":{"val":"false", "format":"0:Heute|1:Morgen"},
"L_starttime":{"val":"920", "factor":"1", "min":"-32768", "max":"32767"},
"L_endtime":{"val":"1550", "factor":"1", "min":"-32768", "max":"32767"},
"L_source":{"val":"http://www.openweathermap.org", "length":"20"},
"L_location":{"val":"Kropp|DE|6551974", "length":"20"},
"cloud_limit":{"val":"55", "unit":"%", "factor":"1", "min":"0.0", "max":"100.0"},
"hysteresys":{"val":"-40", "unit":"K", "factor":"0.1", "min":"-200.0", "max":"0.0"},
"offtemp":{"val":"-100", "unit":"?C", "factor":"0.1", "min":"-300.0", "max":"200.0"},
"lead":{"val":"120", "unit":"min", "factor":"1", "min":"0.0", "max":"600.0"},
"refresh":{"val":"false"},
"oekomode":{"val":"1", "format":"0:Aus|1:Ein"}
},
"forecast":{
"forecast_info":"date|temp|cloud|speed|image|code|unit[|sunrise|sunset] code see https://openweathermap.org/weather-conditions",
"L_w_0":{"val":"So, 19 Feb 18:46|5|82|18 km/h|04n|803|C|07:35|17:36", "length":"20"},
"L_w_1":{"val":"So, 19 Feb 19:00|5|82|18 km/h|04n|803|C", "length":"20"},
"L_w_2":{"val":"So, 19 Feb 22:00|4|100|23 km/h|04n|804|C", "length":"20"},
"L_w_3":{"val":"Mo, 20 Feb 01:00|5|100|29 km/h|10n|500|C", "length":"20"},
"L_w_4":{"val":"Mo, 20 Feb 04:00|6|100|35 km/h|10n|500|C", "length":"20"},
"L_w_5":{"val":"Mo, 20 Feb 07:00|7|100|35 km/h|04n|804|C", "length":"20"},
"L_w_6":{"val":"Mo, 20 Feb 10:00|8|100|38 km/h|04d|804|C", "length":"20"},
"L_w_7":{"val":"Mo, 20 Feb 13:00|9|100|39 km/h|04d|804|C", "length":"20"},
"L_w_8":{"val":"Mo, 20 Feb 16:00|8|100|33 km/h|04d|804|C", "length":"20"},
"L_w_9":{"val":"Mo, 20 Feb 19:00|8|100|30 km/h|04n|804|C", "length":"20"},
"L_w_10":{"val":"Mo, 20 Feb 22:00|8|100|24 km/h|04n|804|C", "length":"20"},
"L_w_11":{"val":"Di, 21 Feb 01:00|8|100|25 km/h|04n|804|C", "length":"20"},
"L_w_12":{"val":"Di, 21 Feb 04:00|7|100|22 km/h|10n|500|C", "length":"20"},
"L_w_13":{"val":"Di, 21 Feb 07:00|7|100|23 km/h|04n|804|C", "length":"20"},
"L_w_14":{"val":"Di, 21 Feb 10:00|8|100|20 km/h|04d|804|C", "length":"20"},
"L_w_15":{"val":"Di, 21 Feb 13:00|9|99|22 km/h|04d|804|C", "length":"20"},
"L_w_16":{"val":"Di, 21 Feb 16:00|9|97|16 km/h|04d|804|C", "length":"20"},
"L_w_17":{"val":"Di, 21 Feb 19:00|7|96|10 km/h|04n|804|C", "length":"20"},
"L_w_18":{"val":"Di, 21 Feb 22:00|7|100|8 km/h|10n|500|C", "length":"20"},
"L_w_19":{"val":"Mi, 22 Feb 01:00|7|100|8 km/h|10n|500|C", "length":"20"},
"L_w_20":{"val":"Mi, 22 Feb 04:00|6|100|8 km/h|04n|804|C", "length":"20"},
"L_w_21":{"val":"Mi, 22 Feb 07:00|5|100|8 km/h|04n|804|C", "length":"20"},
"L_w_22":{"val":"Mi, 22 Feb 10:00|8|97|10 km/h|04d|804|C", "length":"20"},
"L_w_23":{"val":"Mi, 22 Feb 13:00|11|98|12 km/h|04d|804|C", "length":"20"},
"L_w_24":{"val":"Mi, 22 Feb 16:00|12|90|7 km/h|04d|804|C", "length":"20"}
},
"hk1":{
"hk_info":"heating circuit data",
"L_roomtemp_act":{"val":"0", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_roomtemp_set":{"val":"250", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_flowtemp_act":{"val":"580", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_flowtemp_set":{"val":"573", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_comfort":{"val":"0", "unit":"K", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_state":{"val":"32", "factor":"1"},
"L_statetext":"Heizbetrieb aktiv",
"L_pump":{"val":"true", "format":"0:Aus|1:Ein"},
"remote_override":{"val":"0", "unit":"K", "factor":"0.1", "min":"-32768", "max":"32767"},
"mode_auto":{"val":"1", "format":"0:Aus|1:Auto|2:Heizen|3:Absenken"},
"time_prg":{"val":"0", "format":"0:Zeit 1|1:Zeit 2"},
"temp_setback":{"val":"138", "unit":"?C", "factor":"0.1", "min":"100.0", "max":"400.0"},
"temp_heat":{"val":"250", "unit":"?C", "factor":"0.1", "min":"100.0", "max":"400.0"},
"temp_vacation":{"val":"150", "unit":"?C", "factor":"0.1", "min":"100.0", "max":"400.0"},
"name":{"val":"", "length":"20"},
"oekomode":{"val":"3", "format":"0:Aus|1:Komfort|2:Minimum|3:?kologisch"},
"autocomfort":{"val":"-1", "format":"0:Aus|1:Ein|2:Morgens|3:Abends"},
"autocomfort_sunset":{"val":"0", "unit":"min", "factor":"1", "min":"-120.0", "max":"120.0"},
"autocomfort_sunrise":{"val":"0", "unit":"min", "factor":"1", "min":"-120.0", "max":"120.0"}
},
"pu1":{
"pu_info":"accu data",
"L_tpo_act":{"val":"695", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_tpo_set":{"val":"643", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_tpm_act":{"val":"648", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_tpm_set":{"val":"643", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_pump_release":{"val":"695", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_pump":{"val":"31", "unit":"%", "factor":"1", "min":"0.0", "max":"100.0"},
"L_state":{"val":"528", "factor":"1"},
"L_statetext":"Nachlauf aktiv|Anforderung Aus",
"mintemp_off":{"val":"80", "unit":"?C", "factor":"0.1", "min":"80.0", "max":"900.0"},
"mintemp_on":{"val":"80", "unit":"?C", "factor":"0.1", "min":"80.0", "max":"900.0"},
"ext_mintemp_off":{"val":"80", "unit":"?C", "factor":"0.1", "min":"80.0", "max":"900.0"},
"ext_mintemp_on":{"val":"80", "unit":"?C", "factor":"0.1", "min":"80.0", "max":"900.0"}
},
"ww1":{
"ww_info":"domestic hot water data",
"L_temp_set":{"val":"550", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_ontemp_act":{"val":"624", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_offtemp_act":{"val":"624", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_pump":{"val":"false", "format":"0:Aus|1:Ein"},
"L_state":{"val":"8208", "factor":"1"},
"L_statetext":"Zeit innerhalb Zeitprogramm|Anforderung Aus",
"time_prg":{"val":"1", "format":"0:Zeit 1|1:Zeit 2"},
"sensor_on":{"val":"0", "format":"0:WW|1:TPO|2:TPM|3:SpUnten"},
"sensor_off":{"val":"0", "format":"0:WW|1:TPO|2:TPM|3:SpUnten"},
"mode_auto":{"val":"1", "format":"0:Aus|1:Auto|2:Ein"},
"mode_dhw":{"val":"1", "format":"0:Aus|1:Auto|2:Ein"},
"heat_once":{"val":"false", "format":"0:Aus|1:Ein"},
"temp_min_set":{"val":"300", "unit":"?C", "factor":"0.1", "min":"80.0", "max":"800.0"},
"temp_max_set":{"val":"600", "unit":"?C", "factor":"0.1", "min":"80.0", "max":"800.0"},
"name":{"val":"", "length":"20"},
"smartstart":{"val":"0", "unit":"min", "factor":"1", "min":"0.0", "max":"90.0"},
"use_boiler_heat":{"val":"0", "format":"0:Aus|1:Ein"},
"oekomode":{"val":"3", "format":"0:Aus|1:Komfort|2:Minimum|3:?kologisch"}
},
"sk1":{
"sk_info":"solar circuit data",
"L_koll_temp":{"val":"48", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_spu":{"val":"477", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_pump":{"val":"0", "unit":"%", "factor":"1", "min":"0.0", "max":"100.0"},
"L_state":{"val":"32", "factor":"1"},
"L_statetext":"Differenz Kollektor-Speicher zu niedrig",
"mode":{"val":"1", "format":"0:Aus|1:Ein"},
"cooling":{"val":"1", "format":"0:Aus|1:?kologisch|2:Ein"},
"spu_max":{"val":"750", "unit":"?C", "factor":"0.1", "min":"200.0", "max":"900.0"},
"name":{"val":"", "length":"20"}
},
"pe1":{
"pe_info":"pellematic data",
"L_temp_act":{"val":"696", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_temp_set":{"val":"80", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_ext_temp":{"val":"-32768", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_frt_temp_act":{"val":"5146", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_frt_temp_set":{"val":"80", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_br":{"val":"false", "format":"0:Aus|1:Ein"},
"L_ak":{"val":"false", "format":"0:Aus|1:Ein"},
"L_not":{"val":"true", "format":"0:Aus|1:Ein"},
"L_stb":{"val":"true", "format":"0:Aus|1:Ein"},
"L_modulation":{"val":"0", "unit":"%", "factor":"1", "min":"-32768", "max":"32767"},
"L_uw_speed":{"val":"31", "unit":"%", "factor":"1", "min":"-32768", "max":"32767"},
"L_state":{"val":"5", "format":"0:Dauerlauf|1:Start|2:Zuendung|3:Softstart|4:Leistungsbrand|5:Nachlauf|6:Aus|7:Saugen|8:! Asche !|9:! Pellets !|10:Pell Switch|11:St?rung|12:Einmessen|13:1|14:1|15:1|16:1|17:1|18:1|19:1|20:1|21:1|22:1|23:1|24:1|25:1|26:1|27:1|28:1|29:1|30:1|31:1|32:1|33:1|34:1|35:1|36:1|37:1|38:1|39:1|40:1|41:1|42:1|43:1|44:1|45:1|46:1|47:1|48:1|49:1|50:1|51:1|52:1|53:1|54:1|55:1|56:1|57:1|58:1|59:1|60:1|61:1|62:1|63:1|64:1|65:1|66:1|67:1|68:1|69:1|70:1|71:1|72:1|73:1|74:1|75:1|76:1|77:1|78:1|79:1|80:1|81:1|82:1|83:1|84:1|85:1|86:1|87:1|88:1|89:1|90:1|91:1|92:1|93:1|94:1|95:1|96:1|97:Aus|98:Aus|99:Aus|100:Aus|101:Aus"},
"L_statetext":"Nachlauf",
"L_type":{"val":"0", "format":"0:PE|1:PES|2:PEK|3:PESK|4:SMART V1|5:SMART V2|6:CONDENS|7:SMART XS|8:SMART V3|9:COMPACT|10:AIR"},
"L_starts":{"val":"14297", "factor":"1"},
"L_runtime":{"val":"23428", "unit":"h", "factor":"1"},
"L_avg_runtime":{"val":"98", "unit":"min", "factor":"1"},
"L_uw_release":{"val":"695", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_uw":{"val":"31", "unit":"%", "factor":"1", "min":"-32768", "max":"32767"},
"L_storage_fill":{"val":"20208", "unit":"kg", "factor":"1"},
"L_storage_min":{"val":"400", "unit":"kg", "factor":"1", "min":"0.0", "max":"4000.0"},
"L_storage_max":{"val":"6000", "unit":"kg", "factor":"1", "min":"150.0", "max":"30000.0"},
"L_storage_popper":{"val":"0", "unit":"kg", "factor":"1", "min":"-32768", "max":"32767"},
"storage_fill_today":{"val":"0", "unit":"kg", "factor":"1", "min":"-32768", "max":"32767"},
"storage_fill_yesterday":{"val":"0", "unit":"kg", "factor":"1", "min":"-32768", "max":"32767"},
"mode":{"val":"1", "format":"0:Aus|1:Auto|2:Ein"}
},
"error":{
}
}
Super, wir kommen dem Problem näher. Kannst du in deinem Virtualenv bitte nochmal folgendes ausführe und das Ergebnis hier posten? Ich vermute mal, dass der ÖkoFEN das JSON mit irgendwelchen Tabs oder anderen Zeichen beantwortet.
import asyncio
import aiohttp
async def main():
async with aiohttp.ClientSession(auto_decompress=False) as session:
async with session.get('http://192.168.50.17:4321/1234/all??') as resp:
print(resp.status)
print(await resp.read())
asyncio.run(main())
# enter
Hier der Output:
>>> import asyncio
async def main():
async with aiohttp.ClientSession(auto_decompress=False) as session:
async with session.get('http://192.168.50.17:4321/1234/all??') as resp:
print(resp.status)
print(await resp.read())
asyncio.run(main())
# enter>>> import aiohttp
>>>
>>>
>>> async def main():
... async with aiohttp.ClientSession(auto_decompress=False) as session:
... async with session.get('http://192.168.50.17:4321/1234/all??') as resp:
... print(resp.status)
... print(await resp.read())
...
>>>
>>> asyncio.run(main())
200
b"{\nhttp://www.oekofen.at\n\nusage:\nhttp://touch_ip:JSON_port/password/command\n\nread example:\nhttp://192.168.50.17:4321/********/all?\n\n all[?] displays values of all available components\n optional parameter [?] adds meta data\n\n system[?]\n system global variables\n\n weather[?]\n current weather data\n\n forecast[?]\n date|temp|cloud|speed|image|code|unit[|sunrise|sunset] code see https://openweathermap.org/weather-conditions\n\n power[?]\n powermeter data\n\n stirling[?]\n stirling data\n\n hk[1..6][?]\n heating circuit data\n\n thirdparty[1..10][?]\n third party sensor\n\n pu[1..3][?]\n accu data\n\n ww[1..3][?]\n domestic hot water data\n\n sk[1..6][?]\n solar circuit data\n\n se[1..3][?]\n solar gain data\n\n circ[1..3][?]\n circulation pump data\n\n pe[1..4][?]\n pellematic data\n\n st5k[1..4][?]\n 5kw stirling data\n\n\n\nset example:\nhttp://192.168.50.17:4321/********/id(0..6)_variable=value\n\n system\n system global variables\n\n weather\n current weather data\n\n forecast\n date|temp|cloud|speed|image|code|unit[|sunrise|sunset] code see https://openweathermap.org/weather-conditions\n\n power\n powermeter data\n\n stirling\n stirling data\n\n hk(1..6)\n heating circuit data\n\n thirdparty(1..10)\n third party sensor\n\n pu(1..3)\n accu data\n\n ww(1..3)\n domestic hot water data\n\n sk(1..6)\n solar circuit data\n\n se(1..3)\n solar gain data\n\n circ(1..3)\n circulation pump data\n\n pe(1..4)\n pellematic data\n\n st5k(1..4)\n 5kw stirling data\n\n\nonly variables without a leading 'L_' can be set.\n"
>>>
>>> # enter
Das ist kein JSON. Mein Touch IP v3 liefert an dieser Stelle ein JSON.
Kannst du im gleichen Script etwas an der URL versuchen (?
dazu bzw. ?
am Ende wegnehmen), sodass ein JSON im folgenden Format rauskommt:
b'{\n "system":{\n "system_info":"system global variables",\n "L_ambient":{"val":97, "unit":"\xb0C", "factor":0.1, "min":-32768, "max":32767},...'
nicht dieses Format hier
b'{\n "system":{\n "L_ambient":97, \n "L_errors":0, \n "L_usb_stick":0...'
D.h. hinter den Variablennamen ("L_ambient", "L_usb_stick", etc) sollte ein "beschreibendes" Element mit Meta-Daten wie "val", "unit" etc kommen und nicht nur der Wert.
Ich habe jetzt ein wenig herumgespielt und bekomme diese Outputs. Firefox: http://192.168.50.17:4321/1234/all?
{
"system":{
"system_info":"system global variables",
"L_ambient":{"val":"-2", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_errors":{"val":"0", "factor":"1", "min":"-32768", "max":"32767"},
"L_usb_stick":{"val":"false", "format":"0:Aus|1:Ein"}
},
"weather":{
"weather_info":"current weather data",
"L_temp":{"val":"20", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_clouds":{"val":"9", "unit":"%", "factor":"1", "min":"-32768", "max":"32767"},
"L_forecast_temp":{"val":"20", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_forecast_clouds":{"val":"10", "unit":"%", "factor":"1", "min":"-32768", "max":"32767"},
"L_forecast_today":{"val":"true", "format":"0:Heute|1:Morgen"},
"L_starttime":{"val":"910", "factor":"1", "min":"-32768", "max":"32767"},
"L_endtime":{"val":"1550", "factor":"1", "min":"-32768", "max":"32767"},
"L_source":{"val":"http://www.openweathermap.org", "length":"20"},
"L_location":{"val":"Kropp|DE|6551974", "length":"20"},
"cloud_limit":{"val":"55", "unit":"%", "factor":"1", "min":"0.0", "max":"100.0"},
"hysteresys":{"val":"-40", "unit":"K", "factor":"0.1", "min":"-200.0", "max":"0.0"},
"offtemp":{"val":"-100", "unit":"?C", "factor":"0.1", "min":"-300.0", "max":"200.0"},
"lead":{"val":"120", "unit":"min", "factor":"1", "min":"0.0", "max":"600.0"},
"refresh":{"val":"false"},
"oekomode":{"val":"1", "format":"0:Aus|1:Ein"}
},
"forecast":{
"forecast_info":"date|temp|cloud|speed|image|code|unit[|sunrise|sunset] code see https://openweathermap.org/weather-conditions",
"L_w_0":{"val":"Sa, 25 Feb 11:06|2|9|31 km/h|01d|800|C|07:21|17:48", "length":"20"},
"L_w_1":{"val":"Sa, 25 Feb 16:00|3|14|24 km/h|02d|801|C", "length":"20"},
"L_w_2":{"val":"Sa, 25 Feb 19:00|0|13|21 km/h|02n|801|C", "length":"20"},
"L_w_3":{"val":"Sa, 25 Feb 22:00|-1|22|19 km/h|02n|801|C", "length":"20"},
"L_w_4":{"val":"So, 26 Feb 01:00|-1|15|17 km/h|02n|801|C", "length":"20"},
"L_w_5":{"val":"So, 26 Feb 04:00|-1|8|14 km/h|01n|800|C", "length":"20"},
"L_w_6":{"val":"So, 26 Feb 07:00|-2|11|15 km/h|02n|801|C", "length":"20"},
"L_w_7":{"val":"So, 26 Feb 10:00|2|9|19 km/h|01d|800|C", "length":"20"},
"L_w_8":{"val":"So, 26 Feb 13:00|4|8|18 km/h|01d|800|C", "length":"20"},
"L_w_9":{"val":"So, 26 Feb 16:00|4|6|17 km/h|01d|800|C", "length":"20"},
"L_w_10":{"val":"So, 26 Feb 19:00|0|7|8 km/h|01n|800|C", "length":"20"},
"L_w_11":{"val":"So, 26 Feb 22:00|0|7|7 km/h|01n|800|C", "length":"20"},
"L_w_12":{"val":"Mo, 27 Feb 01:00|-1|6|6 km/h|01n|800|C", "length":"20"},
"L_w_13":{"val":"Mo, 27 Feb 04:00|-1|3|5 km/h|01n|800|C", "length":"20"},
"L_w_14":{"val":"Mo, 27 Feb 07:00|-1|4|8 km/h|01n|800|C", "length":"20"},
"L_w_15":{"val":"Mo, 27 Feb 10:00|4|10|6 km/h|01d|800|C", "length":"20"},
"L_w_16":{"val":"Mo, 27 Feb 13:00|7|10|8 km/h|01d|800|C", "length":"20"},
"L_w_17":{"val":"Mo, 27 Feb 16:00|6|37|9 km/h|03d|802|C", "length":"20"},
"L_w_18":{"val":"Mo, 27 Feb 19:00|2|50|9 km/h|03n|802|C", "length":"20"},
"L_w_19":{"val":"Mo, 27 Feb 22:00|1|54|9 km/h|04n|803|C", "length":"20"},
"L_w_20":{"val":"Di, 28 Feb 01:00|1|39|7 km/h|03n|802|C", "length":"20"},
"L_w_21":{"val":"Di, 28 Feb 04:00|0|11|5 km/h|02n|801|C", "length":"20"},
"L_w_22":{"val":"Di, 28 Feb 07:00|0|10|4 km/h|01n|800|C", "length":"20"},
"L_w_23":{"val":"Di, 28 Feb 10:00|4|10|3 km/h|01d|800|C", "length":"20"},
"L_w_24":{"val":"Di, 28 Feb 13:00|7|10|5 km/h|01d|800|C", "length":"20"}
},
"hk1":{
"hk_info":"heating circuit data",
"L_roomtemp_act":{"val":"0", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_roomtemp_set":{"val":"235", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_flowtemp_act":{"val":"576", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_flowtemp_set":{"val":"572", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_comfort":{"val":"0", "unit":"K", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_state":{"val":"262176", "factor":"1"},
"L_statetext":"Heizbetrieb aktiv|Sch?nwetterprognose Solltemp verringert",
"L_pump":{"val":"true", "format":"0:Aus|1:Ein"},
"remote_override":{"val":"0", "unit":"K", "factor":"0.1", "min":"-32768", "max":"32767"},
"mode_auto":{"val":"1", "format":"0:Aus|1:Auto|2:Heizen|3:Absenken"},
"time_prg":{"val":"0", "format":"0:Zeit 1|1:Zeit 2"},
"temp_setback":{"val":"138", "unit":"?C", "factor":"0.1", "min":"100.0", "max":"400.0"},
"temp_heat":{"val":"250", "unit":"?C", "factor":"0.1", "min":"100.0", "max":"400.0"},
"temp_vacation":{"val":"150", "unit":"?C", "factor":"0.1", "min":"100.0", "max":"400.0"},
"name":{"val":"", "length":"20"},
"oekomode":{"val":"3", "format":"0:Aus|1:Komfort|2:Minimum|3:?kologisch"},
"autocomfort":{"val":"-1", "format":"0:Aus|1:Ein|2:Morgens|3:Abends"},
"autocomfort_sunset":{"val":"0", "unit":"min", "factor":"1", "min":"-120.0", "max":"120.0"},
"autocomfort_sunrise":{"val":"0", "unit":"min", "factor":"1", "min":"-120.0", "max":"120.0"}
},
"pu1":{
"pu_info":"accu data",
"L_tpo_act":{"val":"707", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_tpo_set":{"val":"642", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_tpm_act":{"val":"460", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_tpm_set":{"val":"642", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_pump_release":{"val":"80", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_pump":{"val":"0", "unit":"%", "factor":"1", "min":"0.0", "max":"100.0"},
"L_state":{"val":"512", "factor":"1"},
"L_statetext":"Anforderung Aus",
"mintemp_off":{"val":"80", "unit":"?C", "factor":"0.1", "min":"80.0", "max":"900.0"},
"mintemp_on":{"val":"80", "unit":"?C", "factor":"0.1", "min":"80.0", "max":"900.0"},
"ext_mintemp_off":{"val":"80", "unit":"?C", "factor":"0.1", "min":"80.0", "max":"900.0"},
"ext_mintemp_on":{"val":"80", "unit":"?C", "factor":"0.1", "min":"80.0", "max":"900.0"}
},
"ww1":{
"ww_info":"domestic hot water data",
"L_temp_set":{"val":"400", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_ontemp_act":{"val":"592", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_offtemp_act":{"val":"592", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_pump":{"val":"false", "format":"0:Aus|1:Ein"},
"L_state":{"val":"1056784", "factor":"1"},
"L_statetext":"Zeit innerhalb Zeitprogramm|Anforderung Aus|Sch?nwetterprognose Solltemp verringert",
"time_prg":{"val":"1", "format":"0:Zeit 1|1:Zeit 2"},
"sensor_on":{"val":"0", "format":"0:WW|1:TPO|2:TPM|3:SpUnten"},
"sensor_off":{"val":"0", "format":"0:WW|1:TPO|2:TPM|3:SpUnten"},
"mode_auto":{"val":"1", "format":"0:Aus|1:Auto|2:Ein"},
"mode_dhw":{"val":"1", "format":"0:Aus|1:Auto|2:Ein"},
"heat_once":{"val":"false", "format":"0:Aus|1:Ein"},
"temp_min_set":{"val":"300", "unit":"?C", "factor":"0.1", "min":"80.0", "max":"800.0"},
"temp_max_set":{"val":"600", "unit":"?C", "factor":"0.1", "min":"80.0", "max":"800.0"},
"name":{"val":"", "length":"20"},
"smartstart":{"val":"0", "unit":"min", "factor":"1", "min":"0.0", "max":"90.0"},
"use_boiler_heat":{"val":"0", "format":"0:Aus|1:Ein"},
"oekomode":{"val":"3", "format":"0:Aus|1:Komfort|2:Minimum|3:?kologisch"}
},
"sk1":{
"sk_info":"solar circuit data",
"L_koll_temp":{"val":"869", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_spu":{"val":"400", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_pump":{"val":"100", "unit":"%", "factor":"1", "min":"0.0", "max":"100.0"},
"L_state":{"val":"0", "factor":"1"},
"mode":{"val":"1", "format":"0:Aus|1:Ein"},
"cooling":{"val":"1", "format":"0:Aus|1:?kologisch|2:Ein"},
"spu_max":{"val":"750", "unit":"?C", "factor":"0.1", "min":"200.0", "max":"900.0"},
"name":{"val":"", "length":"20"}
},
"pe1":{
"pe_info":"pellematic data",
"L_temp_act":{"val":"782", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_temp_set":{"val":"80", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_ext_temp":{"val":"-32768", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_frt_temp_act":{"val":"1115", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_frt_temp_set":{"val":"80", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_br":{"val":"false", "format":"0:Aus|1:Ein"},
"L_ak":{"val":"false", "format":"0:Aus|1:Ein"},
"L_not":{"val":"true", "format":"0:Aus|1:Ein"},
"L_stb":{"val":"true", "format":"0:Aus|1:Ein"},
"L_modulation":{"val":"0", "unit":"%", "factor":"1", "min":"-32768", "max":"32767"},
"L_uw_speed":{"val":"0", "unit":"%", "factor":"1", "min":"-32768", "max":"32767"},
"L_state":{"val":"99", "format":"0:Dauerlauf|1:Start|2:Zuendung|3:Softstart|4:Leistungsbrand|5:Nachlauf|6:Aus|7:Saugen|8:! Asche !|9:! Pellets !|10:Pell Switch|11:St?rung|12:Einmessen|13:1|14:1|15:1|16:1|17:1|18:1|19:1|20:1|21:1|22:1|23:1|24:1|25:1|26:1|27:1|28:1|29:1|30:1|31:1|32:1|33:1|34:1|35:1|36:1|37:1|38:1|39:1|40:1|41:1|42:1|43:1|44:1|45:1|46:1|47:1|48:1|49:1|50:1|51:1|52:1|53:1|54:1|55:1|56:1|57:1|58:1|59:1|60:1|61:1|62:1|63:1|64:1|65:1|66:1|67:1|68:1|69:1|70:1|71:1|72:1|73:1|74:1|75:1|76:1|77:1|78:1|79:1|80:1|81:1|82:1|83:1|84:1|85:1|86:1|87:1|88:1|89:1|90:1|91:1|92:1|93:1|94:1|95:1|96:1|97:Aus|98:Aus|99:Aus|100:Aus|101:Aus"},
"L_statetext":"Aus",
"L_type":{"val":"0", "format":"0:PE|1:PES|2:PEK|3:PESK|4:SMART V1|5:SMART V2|6:CONDENS|7:SMART XS|8:SMART V3|9:COMPACT|10:AIR"},
"L_starts":{"val":"14341", "factor":"1"},
"L_runtime":{"val":"23489", "unit":"h", "factor":"1"},
"L_avg_runtime":{"val":"98", "unit":"min", "factor":"1"},
"L_uw_release":{"val":"707", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_uw":{"val":"0", "unit":"%", "factor":"1", "min":"-32768", "max":"32767"},
"L_storage_fill":{"val":"20208", "unit":"kg", "factor":"1"},
"L_storage_min":{"val":"400", "unit":"kg", "factor":"1", "min":"0.0", "max":"4000.0"},
"L_storage_max":{"val":"6000", "unit":"kg", "factor":"1", "min":"150.0", "max":"30000.0"},
"L_storage_popper":{"val":"0", "unit":"kg", "factor":"1", "min":"-32768", "max":"32767"},
"storage_fill_today":{"val":"0", "unit":"kg", "factor":"1", "min":"-32768", "max":"32767"},
"storage_fill_yesterday":{"val":"0", "unit":"kg", "factor":"1", "min":"-32768", "max":"32767"},
"mode":{"val":"1", "format":"0:Aus|1:Auto|2:Ein"}
},
"error":{
}
}
Virtuelle Umgebung:
>>> async def main():
... async with aiohttp.ClientSession(auto_decompress=False) as session:
... async with session.get('http://192.168.50.17:4321/1234/all?') as resp:
... print(resp.status)
... print(await resp.read())
...
cio.run(>>>
>>> asyncio.run(main())
200
b'{\n "system":{\n "L_ambient":"-2",\n "L_errors":"0",\n "L_usb_stick":"false"\n },\n "weather":{\n "L_temp":"20",\n "L_clouds":"9",\n "L_forecast_temp":"20",\n "L_forecast_clouds":"10",\n "L_forecast_today":"true",\n "L_starttime":"910",\n "L_endtime":"1550",\n "L_source":"http://www.openweathermap.org",\n "L_location":"Kropp|DE|6551974",\n "cloud_limit":"55",\n "hysteresys":"-40",\n "offtemp":"-100",\n "lead":"120",\n "refresh":"false",\n "oekomode":"1"\n },\n "forecast":{\n "L_w_0":"Sa, 25 Feb 11:06|2|9|31 km/h|01d|800|C|07:21|17:48",\n "L_w_1":"Sa, 25 Feb 16:00|3|14|24 km/h|02d|801|C",\n "L_w_2":"Sa, 25 Feb 19:00|0|13|21 km/h|02n|801|C",\n "L_w_3":"Sa, 25 Feb 22:00|-1|22|19 km/h|02n|801|C",\n "L_w_4":"So, 26 Feb 01:00|-1|15|17 km/h|02n|801|C",\n "L_w_5":"So, 26 Feb 04:00|-1|8|14 km/h|01n|800|C",\n "L_w_6":"So, 26 Feb 07:00|-2|11|15 km/h|02n|801|C",\n "L_w_7":"So, 26 Feb 10:00|2|9|19 km/h|01d|800|C",\n "L_w_8":"So, 26 Feb 13:00|4|8|18 km/h|01d|800|C",\n "L_w_9":"So, 26 Feb 16:00|4|6|17 km/h|01d|800|C",\n "L_w_10":"So, 26 Feb 19:00|0|7|8 km/h|01n|800|C",\n "L_w_11":"So, 26 Feb 22:00|0|7|7 km/h|01n|800|C",\n "L_w_12":"Mo, 27 Feb 01:00|-1|6|6 km/h|01n|800|C",\n "L_w_13":"Mo, 27 Feb 04:00|-1|3|5 km/h|01n|800|C",\n "L_w_14":"Mo, 27 Feb 07:00|-1|4|8 km/h|01n|800|C",\n "L_w_15":"Mo, 27 Feb 10:00|4|10|6 km/h|01d|800|C",\n "L_w_16":"Mo, 27 Feb 13:00|7|10|8 km/h|01d|800|C",\n "L_w_17":"Mo, 27 Feb 16:00|6|37|9 km/h|03d|802|C",\n "L_w_18":"Mo, 27 Feb 19:00|2|50|9 km/h|03n|802|C",\n "L_w_19":"Mo, 27 Feb 22:00|1|54|9 km/h|04n|803|C",\n "L_w_20":"Di, 28 Feb 01:00|1|39|7 km/h|03n|802|C",\n "L_w_21":"Di, 28 Feb 04:00|0|11|5 km/h|02n|801|C",\n "L_w_22":"Di, 28 Feb 07:00|0|10|4 km/h|01n|800|C",\n "L_w_23":"Di, 28 Feb 10:00|4|10|3 km/h|01d|800|C",\n "L_w_24":"Di, 28 Feb 13:00|7|10|5 km/h|01d|800|C"\n },\n "hk1":{\n "L_roomtemp_act":"0",\n "L_roomtemp_set":"235",\n "L_flowtemp_act":"577",\n "L_flowtemp_set":"572",\n "L_comfort":"0",\n "L_state":"262176",\n "L_statetext":"Heizbetrieb aktiv|Sch?nwetterprognose Solltemp verringert",\n "L_pump":"true",\n "remote_override":"0",\n "mode_auto":"1",\n "time_prg":"0",\n "temp_setback":"138",\n "temp_heat":"250",\n "temp_vacation":"150",\n "name":"",\n "oekomode":"3",\n "autocomfort":"-1",\n "autocomfort_sunset":"0",\n "autocomfort_sunrise":"0"\n },\n "pu1":{\n "L_tpo_act":"709",\n "L_tpo_set":"642",\n "L_tpm_act":"470",\n "L_tpm_set":"642",\n "L_pump_release":"80",\n "L_pump":"0",\n "L_state":"512",\n "L_statetext":"Anforderung Aus",\n "mintemp_off":"80",\n "mintemp_on":"80",\n "ext_mintemp_off":"80",\n "ext_mintemp_on":"80"\n },\n "ww1":{\n "L_temp_set":"400",\n "L_ontemp_act":"593",\n "L_offtemp_act":"593",\n "L_pump":"false",\n "L_state":"1056784",\n "L_statetext":"Zeit innerhalb Zeitprogramm|Anforderung Aus|Sch?nwetterprognose Solltemp verringert",\n "time_prg":"1",\n "sensor_on":"0",\n "sensor_off":"0",\n "mode_auto":"1",\n "mode_dhw":"1",\n "heat_once":"false",\n "temp_min_set":"300",\n "temp_max_set":"600",\n "name":"",\n "smartstart":"0",\n "use_boiler_heat":"0",\n "oekomode":"3"\n },\n "sk1":{\n "L_koll_temp":"809",\n "L_spu":"403",\n "L_pump":"100",\n "L_state":"0",\n "mode":"1",\n "cooling":"1",\n "spu_max":"750",\n "name":""\n },\n "pe1":{\n "L_temp_act":"781",\n "L_temp_set":"80",\n "L_ext_temp":"-32768",\n "L_frt_temp_act":"1182",\n "L_frt_temp_set":"80",\n "L_br":"false",\n "L_ak":"false",\n "L_not":"true",\n "L_stb":"true",\n "L_modulation":"0",\n "L_uw_speed":"0",\n "L_state":"99",\n "L_statetext":"Aus",\n "L_type":"0",\n "L_starts":"14341",\n "L_runtime":"23489",\n "L_avg_runtime":"98",\n "L_uw_release":"709",\n "L_uw":"0",\n "L_storage_fill":"20208",\n "L_storage_min":"400",\n "L_storage_max":"6000",\n "L_storage_popper":"0",\n "storage_fill_today":"0",\n "storage_fill_yesterday":"0",\n "mode":"1"\n },\n "error":{\n }\n}\n'
>>>
Sobald ich mehr als ein "?" hinzufüge bekomme ich einen Fehler mit dem Hinweiß auf die Homepage usw. Es ist egal ob 2 oder 3 "?" am Ende der URL.
>>> async def main():
ttp.Cli... async with aiohttp.ClientSession(auto_decompress=False) as session:
... async with session.get('http://192.168.50.17:4321/1234/all??') as resp:
... print(resp.status)
... print(await resp.read())
...
yncio.ru>>>
>>> asyncio.run(main())
200
b"{\nhttp://www.oekofen.at\n\nusage:\nhttp://touch_ip:JSON_port/password/command\n\nread example:\nhttp://192.168.50.17:4321/********/all?\n\n all[?] displays values of all available components\n optional parameter [?] adds meta data\n\n system[?]\n system global variables\n\n weather[?]\n current weather data\n\n forecast[?]\n date|temp|cloud|speed|image|code|unit[|sunrise|sunset] code see https://openweathermap.org/weather-conditions\n\n power[?]\n powermeter data\n\n stirling[?]\n stirling data\n\n hk[1..6][?]\n heating circuit data\n\n thirdparty[1..10][?]\n third party sensor\n\n pu[1..3][?]\n accu data\n\n ww[1..3][?]\n domestic hot water data\n\n sk[1..6][?]\n solar circuit data\n\n se[1..3][?]\n solar gain data\n\n circ[1..3][?]\n circulation pump data\n\n pe[1..4][?]\n pellematic data\n\n st5k[1..4][?]\n 5kw stirling data\n\n\n\nset example:\nhttp://192.168.50.17:4321/********/id(0..6)_variable=value\n\n system\n system global variables\n\n weather\n current weather data\n\n forecast\n date|temp|cloud|speed|image|code|unit[|sunrise|sunset] code see https://openweathermap.org/weather-conditions\n\n power\n powermeter data\n\n stirling\n stirling data\n\n hk(1..6)\n heating circuit data\n\n thirdparty(1..10)\n third party sensor\n\n pu(1..3)\n accu data\n\n ww(1..3)\n domestic hot water data\n\n sk(1..6)\n solar circuit data\n\n se(1..3)\n solar gain data\n\n circ(1..3)\n circulation pump data\n\n pe(1..4)\n pellematic data\n\n st5k(1..4)\n 5kw stirling data\n\n\nonly variables without a leading 'L_' can be set.\n"
>>>
Hier das Ganze nochmal ohne "?" Firefox:
{
"system":{
"L_ambient":"-1",
"L_errors":"0",
"L_usb_stick":"false"
},
"weather":{
"L_temp":"20",
"L_clouds":"9",
"L_forecast_temp":"20",
"L_forecast_clouds":"10",
"L_forecast_today":"true",
"L_starttime":"910",
"L_endtime":"1550",
"L_source":"http://www.openweathermap.org",
"L_location":"Kropp|DE|6551974",
"cloud_limit":"55",
"hysteresys":"-40",
"offtemp":"-100",
"lead":"120",
"refresh":"false",
"oekomode":"1"
},
"forecast":{
"L_w_0":"Sa, 25 Feb 11:06|2|9|31 km/h|01d|800|C|07:21|17:48",
"L_w_1":"Sa, 25 Feb 16:00|3|14|24 km/h|02d|801|C",
"L_w_2":"Sa, 25 Feb 19:00|0|13|21 km/h|02n|801|C",
"L_w_3":"Sa, 25 Feb 22:00|-1|22|19 km/h|02n|801|C",
"L_w_4":"So, 26 Feb 01:00|-1|15|17 km/h|02n|801|C",
"L_w_5":"So, 26 Feb 04:00|-1|8|14 km/h|01n|800|C",
"L_w_6":"So, 26 Feb 07:00|-2|11|15 km/h|02n|801|C",
"L_w_7":"So, 26 Feb 10:00|2|9|19 km/h|01d|800|C",
"L_w_8":"So, 26 Feb 13:00|4|8|18 km/h|01d|800|C",
"L_w_9":"So, 26 Feb 16:00|4|6|17 km/h|01d|800|C",
"L_w_10":"So, 26 Feb 19:00|0|7|8 km/h|01n|800|C",
"L_w_11":"So, 26 Feb 22:00|0|7|7 km/h|01n|800|C",
"L_w_12":"Mo, 27 Feb 01:00|-1|6|6 km/h|01n|800|C",
"L_w_13":"Mo, 27 Feb 04:00|-1|3|5 km/h|01n|800|C",
"L_w_14":"Mo, 27 Feb 07:00|-1|4|8 km/h|01n|800|C",
"L_w_15":"Mo, 27 Feb 10:00|4|10|6 km/h|01d|800|C",
"L_w_16":"Mo, 27 Feb 13:00|7|10|8 km/h|01d|800|C",
"L_w_17":"Mo, 27 Feb 16:00|6|37|9 km/h|03d|802|C",
"L_w_18":"Mo, 27 Feb 19:00|2|50|9 km/h|03n|802|C",
"L_w_19":"Mo, 27 Feb 22:00|1|54|9 km/h|04n|803|C",
"L_w_20":"Di, 28 Feb 01:00|1|39|7 km/h|03n|802|C",
"L_w_21":"Di, 28 Feb 04:00|0|11|5 km/h|02n|801|C",
"L_w_22":"Di, 28 Feb 07:00|0|10|4 km/h|01n|800|C",
"L_w_23":"Di, 28 Feb 10:00|4|10|3 km/h|01d|800|C",
"L_w_24":"Di, 28 Feb 13:00|7|10|5 km/h|01d|800|C"
},
"hk1":{
"L_roomtemp_act":"0",
"L_roomtemp_set":"235",
"L_flowtemp_act":"575",
"L_flowtemp_set":"571",
"L_comfort":"0",
"L_state":"262176",
"L_statetext":"Heizbetrieb aktiv|Sch?nwetterprognose Solltemp verringert",
"L_pump":"true",
"remote_override":"0",
"mode_auto":"1",
"time_prg":"0",
"temp_setback":"138",
"temp_heat":"250",
"temp_vacation":"150",
"name":"",
"oekomode":"3",
"autocomfort":"-1",
"autocomfort_sunset":"0",
"autocomfort_sunrise":"0"
},
"pu1":{
"L_tpo_act":"704",
"L_tpo_set":"641",
"L_tpm_act":"449",
"L_tpm_set":"641",
"L_pump_release":"80",
"L_pump":"0",
"L_state":"512",
"L_statetext":"Anforderung Aus",
"mintemp_off":"80",
"mintemp_on":"80",
"ext_mintemp_off":"80",
"ext_mintemp_on":"80"
},
"ww1":{
"L_temp_set":"400",
"L_ontemp_act":"592",
"L_offtemp_act":"592",
"L_pump":"false",
"L_state":"1056784",
"L_statetext":"Zeit innerhalb Zeitprogramm|Anforderung Aus|Sch?nwetterprognose Solltemp verringert",
"time_prg":"1",
"sensor_on":"0",
"sensor_off":"0",
"mode_auto":"1",
"mode_dhw":"1",
"heat_once":"false",
"temp_min_set":"300",
"temp_max_set":"600",
"name":"",
"smartstart":"0",
"use_boiler_heat":"0",
"oekomode":"3"
},
"sk1":{
"L_koll_temp":"943",
"L_spu":"394",
"L_pump":"100",
"L_state":"0",
"mode":"1",
"cooling":"1",
"spu_max":"750",
"name":""
},
"pe1":{
"L_temp_act":"781",
"L_temp_set":"80",
"L_ext_temp":"-32768",
"L_frt_temp_act":"1045",
"L_frt_temp_set":"80",
"L_br":"false",
"L_ak":"false",
"L_not":"true",
"L_stb":"true",
"L_modulation":"0",
"L_uw_speed":"0",
"L_state":"99",
"L_statetext":"Aus",
"L_type":"0",
"L_starts":"14341",
"L_runtime":"23489",
"L_avg_runtime":"98",
"L_uw_release":"704",
"L_uw":"0",
"L_storage_fill":"20208",
"L_storage_min":"400",
"L_storage_max":"6000",
"L_storage_popper":"0",
"storage_fill_today":"0",
"storage_fill_yesterday":"0",
"mode":"1"
},
"error":{
}
}
Virtuelle Umgebung:
>>> async def main():
... async with aiohttp.ClientSession(auto_decompress=False) as session:
... async with session.get('http://192.168.50.17:4321/1234/all') as resp:
... print(resp.status)
... print(await resp.read())
...
>>>
>>> asyncio.run(main())
200
b'{\n "system":{\n "L_ambient":"-2",\n "L_errors":"0",\n "L_usb_stick":"false"\n },\n "weather":{\n "L_temp":"20",\n "L_clouds":"9",\n "L_forecast_temp":"20",\n "L_forecast_clouds":"10",\n "L_forecast_today":"true",\n "L_starttime":"910",\n "L_endtime":"1550",\n "L_source":"http://www.openweathermap.org",\n "L_location":"Kropp|DE|6551974",\n "cloud_limit":"55",\n "hysteresys":"-40",\n "offtemp":"-100",\n "lead":"120",\n "refresh":"false",\n "oekomode":"1"\n },\n "forecast":{\n "L_w_0":"Sa, 25 Feb 11:06|2|9|31 km/h|01d|800|C|07:21|17:48",\n "L_w_1":"Sa, 25 Feb 16:00|3|14|24 km/h|02d|801|C",\n "L_w_2":"Sa, 25 Feb 19:00|0|13|21 km/h|02n|801|C",\n "L_w_3":"Sa, 25 Feb 22:00|-1|22|19 km/h|02n|801|C",\n "L_w_4":"So, 26 Feb 01:00|-1|15|17 km/h|02n|801|C",\n "L_w_5":"So, 26 Feb 04:00|-1|8|14 km/h|01n|800|C",\n "L_w_6":"So, 26 Feb 07:00|-2|11|15 km/h|02n|801|C",\n "L_w_7":"So, 26 Feb 10:00|2|9|19 km/h|01d|800|C",\n "L_w_8":"So, 26 Feb 13:00|4|8|18 km/h|01d|800|C",\n "L_w_9":"So, 26 Feb 16:00|4|6|17 km/h|01d|800|C",\n "L_w_10":"So, 26 Feb 19:00|0|7|8 km/h|01n|800|C",\n "L_w_11":"So, 26 Feb 22:00|0|7|7 km/h|01n|800|C",\n "L_w_12":"Mo, 27 Feb 01:00|-1|6|6 km/h|01n|800|C",\n "L_w_13":"Mo, 27 Feb 04:00|-1|3|5 km/h|01n|800|C",\n "L_w_14":"Mo, 27 Feb 07:00|-1|4|8 km/h|01n|800|C",\n "L_w_15":"Mo, 27 Feb 10:00|4|10|6 km/h|01d|800|C",\n "L_w_16":"Mo, 27 Feb 13:00|7|10|8 km/h|01d|800|C",\n "L_w_17":"Mo, 27 Feb 16:00|6|37|9 km/h|03d|802|C",\n "L_w_18":"Mo, 27 Feb 19:00|2|50|9 km/h|03n|802|C",\n "L_w_19":"Mo, 27 Feb 22:00|1|54|9 km/h|04n|803|C",\n "L_w_20":"Di, 28 Feb 01:00|1|39|7 km/h|03n|802|C",\n "L_w_21":"Di, 28 Feb 04:00|0|11|5 km/h|02n|801|C",\n "L_w_22":"Di, 28 Feb 07:00|0|10|4 km/h|01n|800|C",\n "L_w_23":"Di, 28 Feb 10:00|4|10|3 km/h|01d|800|C",\n "L_w_24":"Di, 28 Feb 13:00|7|10|5 km/h|01d|800|C"\n },\n "hk1":{\n "L_roomtemp_act":"0",\n "L_roomtemp_set":"235",\n "L_flowtemp_act":"578",\n "L_flowtemp_set":"572",\n "L_comfort":"0",\n "L_state":"262176",\n "L_statetext":"Heizbetrieb aktiv|Sch?nwetterprognose Solltemp verringert",\n "L_pump":"true",\n "remote_override":"0",\n "mode_auto":"1",\n "time_prg":"0",\n "temp_setback":"138",\n "temp_heat":"250",\n "temp_vacation":"150",\n "name":"",\n "oekomode":"3",\n "autocomfort":"-1",\n "autocomfort_sunset":"0",\n "autocomfort_sunrise":"0"\n },\n "pu1":{\n "L_tpo_act":"710",\n "L_tpo_set":"642",\n "L_tpm_act":"472",\n "L_tpm_set":"642",\n "L_pump_release":"80",\n "L_pump":"0",\n "L_state":"512",\n "L_statetext":"Anforderung Aus",\n "mintemp_off":"80",\n "mintemp_on":"80",\n "ext_mintemp_off":"80",\n "ext_mintemp_on":"80"\n },\n "ww1":{\n "L_temp_set":"400",\n "L_ontemp_act":"593",\n "L_offtemp_act":"593",\n "L_pump":"false",\n "L_state":"1056784",\n "L_statetext":"Zeit innerhalb Zeitprogramm|Anforderung Aus|Sch?nwetterprognose Solltemp verringert",\n "time_prg":"1",\n "sensor_on":"0",\n "sensor_off":"0",\n "mode_auto":"1",\n "mode_dhw":"1",\n "heat_once":"false",\n "temp_min_set":"300",\n "temp_max_set":"600",\n "name":"",\n "smartstart":"0",\n "use_boiler_heat":"0",\n "oekomode":"3"\n },\n "sk1":{\n "L_koll_temp":"800",\n "L_spu":"404",\n "L_pump":"100",\n "L_state":"0",\n "mode":"1",\n "cooling":"1",\n "spu_max":"750",\n "name":""\n },\n "pe1":{\n "L_temp_act":"781",\n "L_temp_set":"80",\n "L_ext_temp":"-32768",\n "L_frt_temp_act":"1195",\n "L_frt_temp_set":"80",\n "L_br":"false",\n "L_ak":"false",\n "L_not":"true",\n "L_stb":"true",\n "L_modulation":"0",\n "L_uw_speed":"0",\n "L_state":"99",\n "L_statetext":"Aus",\n "L_type":"0",\n "L_starts":"14341",\n "L_runtime":"23489",\n "L_avg_runtime":"98",\n "L_uw_release":"710",\n "L_uw":"0",\n "L_storage_fill":"20208",\n "L_storage_min":"400",\n "L_storage_max":"6000",\n "L_storage_popper":"0",\n "storage_fill_today":"0",\n "storage_fill_yesterday":"0",\n "mode":"1"\n },\n "error":{\n }\n}\n'
>>>
Habe ich befürchet.
Problem: Die URL des Ökofens ist nicht RFC kompatibel (http://192.168.178.222:4321/PASS/all?
), hinter dem ?
müsste ein key-value pair kommen. Also z.B. all?blabla
, das mag wiederum der Ökofen nicht.
Die schlechte Nachricht: mit den Python aiohttp oder requests Bibliotheken ist das nicht möglich. Die gute Nachricht: mit urllib-Biblio ist es möglich.
Teste bitte mal folgendes aus:
import urllib.request
import json
response = urllib.request.urlopen("http://192.168.50.17:4321/1234/all?")
raw_data = response.read()
#encoding = response.info().get_content_charset('utf-8')
encoding = response.info().get_content_charset('ISO-8859-1')
jdata = json.loads(raw_data.decode(encoding))
print(jdata)
Hier der Output:
>>> import urllib.request
>>> import json
>>> response = urllib.request.urlopen("http://192.168.50.17:4321/1234/all?")
raw_data = response.read()
#encoding = response.info().get_content_charset('utf-8')
encoding = response.info().get_content_charset('ISO-8859-1')
jdata = json.loads(raw_data.decode(encoding))
print(jdata)>>> raw_data = response.read()
>>> #encoding = response.info().get_content_charset('utf-8')
>>> encoding = response.info().get_content_charset('ISO-8859-1')
>>> jdata = json.loads(raw_data.decode(encoding))
>>> print(jdata)
{'system': {'system_info': 'system global variables', 'L_ambient': {'val': '2', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_errors': {'val': '0', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_usb_stick': {'val': 'false', 'format': '0:Aus|1:Ein'}}, 'weather': {'weather_info': 'current weather data', 'L_temp': {'val': '20', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_clouds': {'val': '16', 'unit': '%', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_forecast_temp': {'val': '40', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_forecast_clouds': {'val': '9', 'unit': '%', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_forecast_today': {'val': 'false', 'format': '0:Heute|1:Morgen'}, 'L_starttime': {'val': '910', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_endtime': {'val': '1550', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_source': {'val': 'http://www.openweathermap.org', 'length': '20'}, 'L_location': {'val': 'Kropp|DE|6551974', 'length': '20'}, 'cloud_limit': {'val': '55', 'unit': '%', 'factor': '1', 'min': '0.0', 'max': '100.0'}, 'hysteresys': {'val': '-40', 'unit': 'K', 'factor': '0.1', 'min': '-200.0', 'max': '0.0'}, 'offtemp': {'val': '-100', 'unit': '?C', 'factor': '0.1', 'min': '-300.0', 'max': '200.0'}, 'lead': {'val': '120', 'unit': 'min', 'factor': '1', 'min': '0.0', 'max': '600.0'}, 'refresh': {'val': 'false'}, 'oekomode': {'val': '1', 'format': '0:Aus|1:Ein'}}, 'forecast': {'forecast_info': 'date|temp|cloud|speed|image|code|unit[|sunrise|sunset] code see https://openweathermap.org/weather-conditions', 'L_w_0': {'val': 'Sa, 25 Feb 17:52|2|16|21 km/h|02n|801|C|07:21|17:48', 'length': '20'}, 'L_w_1': {'val': 'Sa, 25 Feb 22:00|0|11|18 km/h|02n|801|C', 'length': '20'}, 'L_w_2': {'val': 'So, 26 Feb 01:00|-1|8|16 km/h|01n|800|C', 'length': '20'}, 'L_w_3': {'val': 'So, 26 Feb 04:00|-1|7|13 km/h|01n|800|C', 'length': '20'}, 'L_w_4': {'val': 'So, 26 Feb 07:00|-1|24|14 km/h|02n|801|C', 'length': '20'}, 'L_w_5': {'val': 'So, 26 Feb 10:00|2|20|18 km/h|02d|801|C', 'length': '20'}, 'L_w_6': {'val': 'So, 26 Feb 13:00|4|13|19 km/h|02d|801|C', 'length': '20'}, 'L_w_7': {'val': 'So, 26 Feb 16:00|4|6|17 km/h|01d|800|C', 'length': '20'}, 'L_w_8': {'val': 'So, 26 Feb 19:00|0|5|10 km/h|01n|800|C', 'length': '20'}, 'L_w_9': {'val': 'So, 26 Feb 22:00|-1|5|9 km/h|01n|800|C', 'length': '20'}, 'L_w_10': {'val': 'Mo, 27 Feb 01:00|-1|7|7 km/h|01n|800|C', 'length': '20'}, 'L_w_11': {'val': 'Mo, 27 Feb 04:00|-1|25|7 km/h|03n|802|C', 'length': '20'}, 'L_w_12': {'val': 'Mo, 27 Feb 07:00|-1|44|7 km/h|03n|802|C', 'length': '20'}, 'L_w_13': {'val': 'Mo, 27 Feb 10:00|3|8|7 km/h|01d|800|C', 'length': '20'}, 'L_w_14': {'val': 'Mo, 27 Feb 13:00|6|9|10 km/h|01d|800|C', 'length': '20'}, 'L_w_15': {'val': 'Mo, 27 Feb 16:00|6|13|11 km/h|02d|801|C', 'length': '20'}, 'L_w_16': {'val': 'Mo, 27 Feb 19:00|1|12|8 km/h|02n|801|C', 'length': '20'}, 'L_w_17': {'val': 'Mo, 27 Feb 22:00|0|38|8 km/h|03n|802|C', 'length': '20'}, 'L_w_18': {'val': 'Di, 28 Feb 01:00|0|48|6 km/h|03n|802|C', 'length': '20'}, 'L_w_19': {'val': 'Di, 28 Feb 04:00|1|92|5 km/h|04n|804|C', 'length': '20'}, 'L_w_20': {'val': 'Di, 28 Feb 07:00|2|96|3 km/h|04n|804|C', 'length': '20'}, 'L_w_21': {'val': 'Di, 28 Feb 10:00|3|100|2 km/h|04d|804|C', 'length': '20'}, 'L_w_22': {'val': 'Di, 28 Feb 13:00|6|98|3 km/h|04d|804|C', 'length': '20'}, 'L_w_23': {'val': 'Di, 28 Feb 16:00|7|69|4 km/h|04d|803|C', 'length': '20'}, 'L_w_24': {'val': 'Di, 28 Feb 19:00|2|40|1 km/h|03n|802|C', 'length': '20'}}, 'hk1': {'hk_info': 'heating circuit data', 'L_roomtemp_act': {'val': '0', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_roomtemp_set': {'val': '250', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_flowtemp_act': {'val': '607', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_flowtemp_set': {'val': '598', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_comfort': {'val': '0', 'unit': 'K', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_state': {'val': '32', 'factor': '1'}, 'L_statetext': 'Heizbetrieb aktiv', 'L_pump': {'val': 'true', 'format': '0:Aus|1:Ein'}, 'remote_override': {'val': '0', 'unit': 'K', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'mode_auto': {'val': '1', 'format': '0:Aus|1:Auto|2:Heizen|3:Absenken'}, 'time_prg': {'val': '0', 'format': '0:Zeit 1|1:Zeit 2'}, 'temp_setback': {'val': '138', 'unit': '?C', 'factor': '0.1', 'min': '100.0', 'max': '400.0'}, 'temp_heat': {'val': '250', 'unit': '?C', 'factor': '0.1', 'min': '100.0', 'max': '400.0'}, 'temp_vacation': {'val': '150', 'unit': '?C', 'factor': '0.1', 'min': '100.0', 'max': '400.0'}, 'name': {'val': '', 'length': '20'}, 'oekomode': {'val': '3', 'format': '0:Aus|1:Komfort|2:Minimum|3:?kologisch'}, 'autocomfort': {'val': '-1', 'format': '0:Aus|1:Ein|2:Morgens|3:Abends'}, 'autocomfort_sunset': {'val': '0', 'unit': 'min', 'factor': '1', 'min': '-120.0', 'max': '120.0'}, 'autocomfort_sunrise': {'val': '0', 'unit': 'min', 'factor': '1', 'min': '-120.0', 'max': '120.0'}}, 'pu1': {'pu_info': 'accu data', 'L_tpo_act': {'val': '703', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_tpo_set': {'val': '698', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_tpm_act': {'val': '647', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_tpm_set': {'val': '698', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_pump_release': {'val': '703', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_pump': {'val': '42', 'unit': '%', 'factor': '1', 'min': '0.0', 'max': '100.0'}, 'L_state': {'val': '256', 'factor': '1'}, 'L_statetext': 'Anforderung Ein', 'mintemp_off': {'val': '80', 'unit': '?C', 'factor': '0.1', 'min': '80.0', 'max': '900.0'}, 'mintemp_on': {'val': '80', 'unit': '?C', 'factor': '0.1', 'min': '80.0', 'max': '900.0'}, 'ext_mintemp_off': {'val': '80', 'unit': '?C', 'factor': '0.1', 'min': '80.0', 'max': '900.0'}, 'ext_mintemp_on': {'val': '80', 'unit': '?C', 'factor': '0.1', 'min': '80.0', 'max': '900.0'}}, 'ww1': {'ww_info': 'domestic hot water data', 'L_temp_set': {'val': '550', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_ontemp_act': {'val': '622', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_offtemp_act': {'val': '622', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_pump': {'val': 'false', 'format': '0:Aus|1:Ein'}, 'L_state': {'val': '8208', 'factor': '1'}, 'L_statetext': 'Zeit innerhalb Zeitprogramm|Anforderung Aus', 'time_prg': {'val': '1', 'format': '0:Zeit 1|1:Zeit 2'}, 'sensor_on': {'val': '0', 'format': '0:WW|1:TPO|2:TPM|3:SpUnten'}, 'sensor_off': {'val': '0', 'format': '0:WW|1:TPO|2:TPM|3:SpUnten'}, 'mode_auto': {'val': '1', 'format': '0:Aus|1:Auto|2:Ein'}, 'mode_dhw': {'val': '1', 'format': '0:Aus|1:Auto|2:Ein'}, 'heat_once': {'val': 'false', 'format': '0:Aus|1:Ein'}, 'temp_min_set': {'val': '300', 'unit': '?C', 'factor': '0.1', 'min': '80.0', 'max': '800.0'}, 'temp_max_set': {'val': '600', 'unit': '?C', 'factor': '0.1', 'min': '80.0', 'max': '800.0'}, 'name': {'val': '', 'length': '20'}, 'smartstart': {'val': '0', 'unit': 'min', 'factor': '1', 'min': '0.0', 'max': '90.0'}, 'use_boiler_heat': {'val': '0', 'format': '0:Aus|1:Ein'}, 'oekomode': {'val': '3', 'format': '0:Aus|1:Komfort|2:Minimum|3:?kologisch'}}, 'sk1': {'sk_info': 'solar circuit data', 'L_koll_temp': {'val': '23', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_spu': {'val': '439', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_pump': {'val': '0', 'unit': '%', 'factor': '1', 'min': '0.0', 'max': '100.0'}, 'L_state': {'val': '32', 'factor': '1'}, 'L_statetext': 'Differenz Kollektor-Speicher zu niedrig', 'mode': {'val': '1', 'format': '0:Aus|1:Ein'}, 'cooling': {'val': '1', 'format': '0:Aus|1:?kologisch|2:Ein'}, 'spu_max': {'val': '750', 'unit': '?C', 'factor': '0.1', 'min': '200.0', 'max': '900.0'}, 'name': {'val': '', 'length': '20'}}, 'pe1': {'pe_info': 'pellematic data', 'L_temp_act': {'val': '712', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_temp_set': {'val': '760', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_ext_temp': {'val': '-32768', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_frt_temp_act': {'val': '8092', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_frt_temp_set': {'val': '7741', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_br': {'val': 'false', 'format': '0:Aus|1:Ein'}, 'L_ak': {'val': 'false', 'format': '0:Aus|1:Ein'}, 'L_not': {'val': 'true', 'format': '0:Aus|1:Ein'}, 'L_stb': {'val': 'true', 'format': '0:Aus|1:Ein'}, 'L_modulation': {'val': '94', 'unit': '%', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_uw_speed': {'val': '42', 'unit': '%', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_state': {'val': '4', 'format': '0:Dauerlauf|1:Start|2:Zuendung|3:Softstart|4:Leistungsbrand|5:Nachlauf|6:Aus|7:Saugen|8:! Asche !|9:! Pellets !|10:Pell Switch|11:St?rung|12:Einmessen|13:1|14:1|15:1|16:1|17:1|18:1|19:1|20:1|21:1|22:1|23:1|24:1|25:1|26:1|27:1|28:1|29:1|30:1|31:1|32:1|33:1|34:1|35:1|36:1|37:1|38:1|39:1|40:1|41:1|42:1|43:1|44:1|45:1|46:1|47:1|48:1|49:1|50:1|51:1|52:1|53:1|54:1|55:1|56:1|57:1|58:1|59:1|60:1|61:1|62:1|63:1|64:1|65:1|66:1|67:1|68:1|69:1|70:1|71:1|72:1|73:1|74:1|75:1|76:1|77:1|78:1|79:1|80:1|81:1|82:1|83:1|84:1|85:1|86:1|87:1|88:1|89:1|90:1|91:1|92:1|93:1|94:1|95:1|96:1|97:Aus|98:Aus|99:Aus|100:Aus|101:Aus'}, 'L_statetext': 'Leistungsbrand', 'L_type': {'val': '0', 'format': '0:PE|1:PES|2:PEK|3:PESK|4:SMART V1|5:SMART V2|6:CONDENS|7:SMART XS|8:SMART V3|9:COMPACT|10:AIR'}, 'L_starts': {'val': '14343', 'factor': '1'}, 'L_runtime': {'val': '23494', 'unit': 'h', 'factor': '1'}, 'L_avg_runtime': {'val': '98', 'unit': 'min', 'factor': '1'}, 'L_uw_release': {'val': '703', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_uw': {'val': '42', 'unit': '%', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_storage_fill': {'val': '20208', 'unit': 'kg', 'factor': '1'}, 'L_storage_min': {'val': '400', 'unit': 'kg', 'factor': '1', 'min': '0.0', 'max': '4000.0'}, 'L_storage_max': {'val': '6000', 'unit': 'kg', 'factor': '1', 'min': '150.0', 'max': '30000.0'}, 'L_storage_popper': {'val': '0', 'unit': 'kg', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'storage_fill_today': {'val': '0', 'unit': 'kg', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'storage_fill_yesterday': {'val': '0', 'unit': 'kg', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'mode': {'val': '1', 'format': '0:Aus|1:Auto|2:Ein'}}, 'error': {}}
>>>
Jawohl, dann haben wir ja ne Lösung gefunden! Danke für die Mithilfe, ich passe das die Tage an.
Gern geschehen. Ich bin gespannt :)
Benötige nochmal deine Hilfe. Kannst du als Encoding Charset mal latin-1
ausprobieren anstelle von ISO-8859-1
?
Bei unit
ist es noch falsch mit ?C
anstelle von °C
.
Danke!
import urllib.request
port json
response = urllib.request.urlopen("http://192.168.50.17:4321/1234/all?")
raw_data = response.read()
#encoding = response.info().get_content_charset('utf-8')
encoding = response.info().get_content_charset('latin-1')
jdata = json.loads(raw_data.decode(encoding))
print(jdata)>>> import json
>>> response = urllib.request.urlopen("http://192.168.50.17:4321/1234/all?")
>>> raw_data = response.read()
>>> #encoding = response.info().get_content_charset('utf-8')
>>> encoding = response.info().get_content_charset('latin-1')
>>> jdata = json.loads(raw_data.decode(encoding))
>>> print(jdata)
{'system': {'system_info': 'system global variables', 'L_ambient': {'val': '0', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_errors': {'val': '0', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_usb_stick': {'val': 'false', 'format': '0:Aus|1:Ein'}}, 'weather': {'weather_info': 'current weather data', 'L_temp': {'val': '20', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_clouds': {'val': '16', 'unit': '%', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_forecast_temp': {'val': '40', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_forecast_clouds': {'val': '9', 'unit': '%', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_forecast_today': {'val': 'false', 'format': '0:Heute|1:Morgen'}, 'L_starttime': {'val': '910', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_endtime': {'val': '1550', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_source': {'val': 'http://www.openweathermap.org', 'length': '20'}, 'L_location': {'val': 'Kropp|DE|6551974', 'length': '20'}, 'cloud_limit': {'val': '55', 'unit': '%', 'factor': '1', 'min': '0.0', 'max': '100.0'}, 'hysteresys': {'val': '-40', 'unit': 'K', 'factor': '0.1', 'min': '-200.0', 'max': '0.0'}, 'offtemp': {'val': '-100', 'unit': '?C', 'factor': '0.1', 'min': '-300.0', 'max': '200.0'}, 'lead': {'val': '120', 'unit': 'min', 'factor': '1', 'min': '0.0', 'max': '600.0'}, 'refresh': {'val': 'false'}, 'oekomode': {'val': '1', 'format': '0:Aus|1:Ein'}}, 'forecast': {'forecast_info': 'date|temp|cloud|speed|image|code|unit[|sunrise|sunset] code see https://openweathermap.org/weather-conditions', 'L_w_0': {'val': 'Sa, 25 Feb 17:52|2|16|21 km/h|02n|801|C|07:21|17:48', 'length': '20'}, 'L_w_1': {'val': 'Sa, 25 Feb 22:00|0|11|18 km/h|02n|801|C', 'length': '20'}, 'L_w_2': {'val': 'So, 26 Feb 01:00|-1|8|16 km/h|01n|800|C', 'length': '20'}, 'L_w_3': {'val': 'So, 26 Feb 04:00|-1|7|13 km/h|01n|800|C', 'length': '20'}, 'L_w_4': {'val': 'So, 26 Feb 07:00|-1|24|14 km/h|02n|801|C', 'length': '20'}, 'L_w_5': {'val': 'So, 26 Feb 10:00|2|20|18 km/h|02d|801|C', 'length': '20'}, 'L_w_6': {'val': 'So, 26 Feb 13:00|4|13|19 km/h|02d|801|C', 'length': '20'}, 'L_w_7': {'val': 'So, 26 Feb 16:00|4|6|17 km/h|01d|800|C', 'length': '20'}, 'L_w_8': {'val': 'So, 26 Feb 19:00|0|5|10 km/h|01n|800|C', 'length': '20'}, 'L_w_9': {'val': 'So, 26 Feb 22:00|-1|5|9 km/h|01n|800|C', 'length': '20'}, 'L_w_10': {'val': 'Mo, 27 Feb 01:00|-1|7|7 km/h|01n|800|C', 'length': '20'}, 'L_w_11': {'val': 'Mo, 27 Feb 04:00|-1|25|7 km/h|03n|802|C', 'length': '20'}, 'L_w_12': {'val': 'Mo, 27 Feb 07:00|-1|44|7 km/h|03n|802|C', 'length': '20'}, 'L_w_13': {'val': 'Mo, 27 Feb 10:00|3|8|7 km/h|01d|800|C', 'length': '20'}, 'L_w_14': {'val': 'Mo, 27 Feb 13:00|6|9|10 km/h|01d|800|C', 'length': '20'}, 'L_w_15': {'val': 'Mo, 27 Feb 16:00|6|13|11 km/h|02d|801|C', 'length': '20'}, 'L_w_16': {'val': 'Mo, 27 Feb 19:00|1|12|8 km/h|02n|801|C', 'length': '20'}, 'L_w_17': {'val': 'Mo, 27 Feb 22:00|0|38|8 km/h|03n|802|C', 'length': '20'}, 'L_w_18': {'val': 'Di, 28 Feb 01:00|0|48|6 km/h|03n|802|C', 'length': '20'}, 'L_w_19': {'val': 'Di, 28 Feb 04:00|1|92|5 km/h|04n|804|C', 'length': '20'}, 'L_w_20': {'val': 'Di, 28 Feb 07:00|2|96|3 km/h|04n|804|C', 'length': '20'}, 'L_w_21': {'val': 'Di, 28 Feb 10:00|3|100|2 km/h|04d|804|C', 'length': '20'}, 'L_w_22': {'val': 'Di, 28 Feb 13:00|6|98|3 km/h|04d|804|C', 'length': '20'}, 'L_w_23': {'val': 'Di, 28 Feb 16:00|7|69|4 km/h|04d|803|C', 'length': '20'}, 'L_w_24': {'val': 'Di, 28 Feb 19:00|2|40|1 km/h|03n|802|C', 'length': '20'}}, 'hk1': {'hk_info': 'heating circuit data', 'L_roomtemp_act': {'val': '0', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_roomtemp_set': {'val': '250', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_flowtemp_act': {'val': '610', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_flowtemp_set': {'val': '600', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_comfort': {'val': '0', 'unit': 'K', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_state': {'val': '32', 'factor': '1'}, 'L_statetext': 'Heizbetrieb aktiv', 'L_pump': {'val': 'true', 'format': '0:Aus|1:Ein'}, 'remote_override': {'val': '0', 'unit': 'K', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'mode_auto': {'val': '1', 'format': '0:Aus|1:Auto|2:Heizen|3:Absenken'}, 'time_prg': {'val': '0', 'format': '0:Zeit 1|1:Zeit 2'}, 'temp_setback': {'val': '138', 'unit': '?C', 'factor': '0.1', 'min': '100.0', 'max': '400.0'}, 'temp_heat': {'val': '250', 'unit': '?C', 'factor': '0.1', 'min': '100.0', 'max': '400.0'}, 'temp_vacation': {'val': '150', 'unit': '?C', 'factor': '0.1', 'min': '100.0', 'max': '400.0'}, 'name': {'val': '', 'length': '20'}, 'oekomode': {'val': '3', 'format': '0:Aus|1:Komfort|2:Minimum|3:?kologisch'}, 'autocomfort': {'val': '-1', 'format': '0:Aus|1:Ein|2:Morgens|3:Abends'}, 'autocomfort_sunset': {'val': '0', 'unit': 'min', 'factor': '1', 'min': '-120.0', 'max': '120.0'}, 'autocomfort_sunrise': {'val': '0', 'unit': 'min', 'factor': '1', 'min': '-120.0', 'max': '120.0'}}, 'pu1': {'pu_info': 'accu data', 'L_tpo_act': {'val': '711', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_tpo_set': {'val': '700', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_tpm_act': {'val': '659', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_tpm_set': {'val': '700', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_pump_release': {'val': '711', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_pump': {'val': '42', 'unit': '%', 'factor': '1', 'min': '0.0', 'max': '100.0'}, 'L_state': {'val': '256', 'factor': '1'}, 'L_statetext': 'Anforderung Ein', 'mintemp_off': {'val': '80', 'unit': '?C', 'factor': '0.1', 'min': '80.0', 'max': '900.0'}, 'mintemp_on': {'val': '80', 'unit': '?C', 'factor': '0.1', 'min': '80.0', 'max': '900.0'}, 'ext_mintemp_off': {'val': '80', 'unit': '?C', 'factor': '0.1', 'min': '80.0', 'max': '900.0'}, 'ext_mintemp_on': {'val': '80', 'unit': '?C', 'factor': '0.1', 'min': '80.0', 'max': '900.0'}}, 'ww1': {'ww_info': 'domestic hot water data', 'L_temp_set': {'val': '550', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_ontemp_act': {'val': '618', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_offtemp_act': {'val': '618', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_pump': {'val': 'false', 'format': '0:Aus|1:Ein'}, 'L_state': {'val': '8208', 'factor': '1'}, 'L_statetext': 'Zeit innerhalb Zeitprogramm|Anforderung Aus', 'time_prg': {'val': '1', 'format': '0:Zeit 1|1:Zeit 2'}, 'sensor_on': {'val': '0', 'format': '0:WW|1:TPO|2:TPM|3:SpUnten'}, 'sensor_off': {'val': '0', 'format': '0:WW|1:TPO|2:TPM|3:SpUnten'}, 'mode_auto': {'val': '1', 'format': '0:Aus|1:Auto|2:Ein'}, 'mode_dhw': {'val': '1', 'format': '0:Aus|1:Auto|2:Ein'}, 'heat_once': {'val': 'false', 'format': '0:Aus|1:Ein'}, 'temp_min_set': {'val': '300', 'unit': '?C', 'factor': '0.1', 'min': '80.0', 'max': '800.0'}, 'temp_max_set': {'val': '600', 'unit': '?C', 'factor': '0.1', 'min': '80.0', 'max': '800.0'}, 'name': {'val': '', 'length': '20'}, 'smartstart': {'val': '0', 'unit': 'min', 'factor': '1', 'min': '0.0', 'max': '90.0'}, 'use_boiler_heat': {'val': '0', 'format': '0:Aus|1:Ein'}, 'oekomode': {'val': '3', 'format': '0:Aus|1:Komfort|2:Minimum|3:?kologisch'}}, 'sk1': {'sk_info': 'solar circuit data', 'L_koll_temp': {'val': '8', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_spu': {'val': '460', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_pump': {'val': '0', 'unit': '%', 'factor': '1', 'min': '0.0', 'max': '100.0'}, 'L_state': {'val': '32', 'factor': '1'}, 'L_statetext': 'Differenz Kollektor-Speicher zu niedrig', 'mode': {'val': '1', 'format': '0:Aus|1:Ein'}, 'cooling': {'val': '1', 'format': '0:Aus|1:?kologisch|2:Ein'}, 'spu_max': {'val': '750', 'unit': '?C', 'factor': '0.1', 'min': '200.0', 'max': '900.0'}, 'name': {'val': '', 'length': '20'}}, 'pe1': {'pe_info': 'pellematic data', 'L_temp_act': {'val': '720', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_temp_set': {'val': '760', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_ext_temp': {'val': '-32768', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_frt_temp_act': {'val': '7760', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_frt_temp_set': {'val': '7736', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_br': {'val': 'false', 'format': '0:Aus|1:Ein'}, 'L_ak': {'val': 'false', 'format': '0:Aus|1:Ein'}, 'L_not': {'val': 'true', 'format': '0:Aus|1:Ein'}, 'L_stb': {'val': 'true', 'format': '0:Aus|1:Ein'}, 'L_modulation': {'val': '94', 'unit': '%', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_uw_speed': {'val': '42', 'unit': '%', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_state': {'val': '4', 'format': '0:Dauerlauf|1:Start|2:Zuendung|3:Softstart|4:Leistungsbrand|5:Nachlauf|6:Aus|7:Saugen|8:! Asche !|9:! Pellets !|10:Pell Switch|11:St?rung|12:Einmessen|13:1|14:1|15:1|16:1|17:1|18:1|19:1|20:1|21:1|22:1|23:1|24:1|25:1|26:1|27:1|28:1|29:1|30:1|31:1|32:1|33:1|34:1|35:1|36:1|37:1|38:1|39:1|40:1|41:1|42:1|43:1|44:1|45:1|46:1|47:1|48:1|49:1|50:1|51:1|52:1|53:1|54:1|55:1|56:1|57:1|58:1|59:1|60:1|61:1|62:1|63:1|64:1|65:1|66:1|67:1|68:1|69:1|70:1|71:1|72:1|73:1|74:1|75:1|76:1|77:1|78:1|79:1|80:1|81:1|82:1|83:1|84:1|85:1|86:1|87:1|88:1|89:1|90:1|91:1|92:1|93:1|94:1|95:1|96:1|97:Aus|98:Aus|99:Aus|100:Aus|101:Aus'}, 'L_statetext': 'Leistungsbrand', 'L_type': {'val': '0', 'format': '0:PE|1:PES|2:PEK|3:PESK|4:SMART V1|5:SMART V2|6:CONDENS|7:SMART XS|8:SMART V3|9:COMPACT|10:AIR'}, 'L_starts': {'val': '14343', 'factor': '1'}, 'L_runtime': {'val': '23494', 'unit': 'h', 'factor': '1'}, 'L_avg_runtime': {'val': '98', 'unit': 'min', 'factor': '1'}, 'L_uw_release': {'val': '711', 'unit': '?C', 'factor': '0.1', 'min': '-32768', 'max': '32767'}, 'L_uw': {'val': '42', 'unit': '%', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'L_storage_fill': {'val': '20208', 'unit': 'kg', 'factor': '1'}, 'L_storage_min': {'val': '400', 'unit': 'kg', 'factor': '1', 'min': '0.0', 'max': '4000.0'}, 'L_storage_max': {'val': '6000', 'unit': 'kg', 'factor': '1', 'min': '150.0', 'max': '30000.0'}, 'L_storage_popper': {'val': '0', 'unit': 'kg', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'storage_fill_today': {'val': '0', 'unit': 'kg', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'storage_fill_yesterday': {'val': '0', 'unit': 'kg', 'factor': '1', 'min': '-32768', 'max': '32767'}, 'mode': {'val': '1', 'format': '0:Aus|1:Auto|2:Ein'}}, 'error': {}}
>>>
Änderungen sind Live
Sorry sind noch Bugs drin
Bitte https://github.com/ckarrie/homeassistant-oekofen/commit/97b1e4972cc4bbc76be003713575ef0eb2a8ec03 / v0.0.18 austesten
Diese 2 Fehler bekomme ich:
Logger: homeassistant.util.async_
Source: util/async_.py:182
First occurred: 22:15:00 (2 occurrences)
Last logged: 22:15:32
Detected blocking call to putrequest inside the event loop. This is causing stability issues. Please report issue to the custom integration author for ha_oekofen doing blocking calls at custom_components/ha_oekofen/config_flow.py, line 62: await client.update_data()
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: oekofen_api
Source: custom_components/ha_oekofen/config_flow.py:62
Integration: Oekofen Integration (documentation)
First occurred: 22:15:00 (2 occurrences)
Last logged: 22:15:32
Blocking calls must be done in the executor or a separate thread; Use `await hass.async_add_executor_job()`; at custom_components/ha_oekofen/config_flow.py, line 62: await client.update_data()
Es klappt :) Echt klasse!
Tausend Dank. Eine kleine Frage hätte ich noch. Besteht die Möglichkeit einen Wert hinzuzufügen? Ich habe einen Pufferspeicher mit Solarthermie mit angeschlossen und es fehlt mir der Wert des unteren Puffersensors sowie die Leistung der Pumpe:
"L_spu"
"L_pump"
"sk1":{
"sk_info":"solar circuit data",
"L_koll_temp":{"val":"483", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_spu":{"val":"433", "unit":"?C", "factor":"0.1", "min":"-32768", "max":"32767"},
"L_pump":{"val":"51", "unit":"%", "factor":"1", "min":"0.0", "max":"100.0"},
"L_state":{"val":"0", "factor":"1"},
"mode":{"val":"1", "format":"0:Aus|1:Ein"},
"cooling":{"val":"1", "format":"0:Aus|1:?kologisch|2:Ein"},
"spu_max":{"val":"750", "unit":"?C", "factor":"0.1", "min":"200.0", "max":"900.0"},
"name":{"val":"", "length":"20"}
},
Bitte dazu ein neues Issue erstellen, sonst wird das hier zu unübersichtlich
Hi, first I must say thank you for this integration and second that I just startet on HA a few days ago. When I start the setup, I enter the IP, port and password (I set on the boiler) but I get an error:
"Expecting property name enclosed in double quotes: line 2 column 1 (char 2)"