Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: cannot unpack non-iterable NoneType object #2

Open
stefeis opened this issue Apr 9, 2022 · 17 comments
Open

TypeError: cannot unpack non-iterable NoneType object #2

stefeis opened this issue Apr 9, 2022 · 17 comments

Comments

@stefeis
Copy link

stefeis commented Apr 9, 2022

hi!
I got my windhager biowin 3 weeks ago and I was very happy to find an integration for HA but it doesn´t work for me and my knowledge in python = "0".
so I hope you can support me...

I´m running 2022.2.9, local connection is ok (also tested by browser).
all mycomfort entities are visible but not available.

that´s what I find at the log:
Logger: homeassistant.helpers.entity
Source: custom_components/mycomfort/mycomfortclient/myComfortGateway.py:163
Integration: myComfort Windhager integration (documentation, issues)
First occurred: 8. April 2022, 20:31:42 (10716 occurrences)
Last logged: 11:23:41

Update for sensor.mycomfort_biowin_2_pellet_consumption_since_bulk_fill fails
Update for sensor.mycomfort_biowin_2_pellet_consumption_total fails
Update for sensor.mycomfort_biowin_2_boiler_operating_time_cleaning fails
Update for sensor.mycomfort_biowin_2_boiler_operating_time_main_cleaning fails
Update for sensor.mycomfort_biowin_2_boiler_operating_time_maintenance fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 521, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 725, in async_device_update
raise exc
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/mycomfort/sensor.py", line 273, in update
self._state = self._sensorCONF_GETTER
File "/config/custom_components/mycomfort/sensor.py", line 77, in
CONF_GETTER: lambda api: api.getBoilerTemperature(),
File "/config/custom_components/mycomfort/mycomfortclient/myComfortBoiler.py", line 30, in getBoilerTemperature
return self._gateway.value("/1/" + self._id + "/0/" + self._gateway.oid("Boiler temp. actual value") + "/0")
File "/config/custom_components/mycomfort/mycomfortclient/myComfortGateway.py", line 163, in oid
id,subid = self._VarIdentTexte.getid(description)
TypeError: cannot unpack non-iterable NoneType object

thanks!
stefan

@sarabanjina
Copy link
Owner

Hi,

According to the error in logs you sent, my integration isn't able to find the string "Boiler temp. actual value" in the "VarIdentTexte_xx" on your gateway. Can you post the content of this file on your gateway :
http://x.x.x.x/res/xml/VarIdentTexte_en.xml

Cheers,
Nicolas

@sarabanjina
Copy link
Owner

I just post a patch to mycomfortclient to prevent your crash. Can you try it and post your VarIdentTexte_en.xml?

Cheers,
Nicolas

@stefeis
Copy link
Author

stefeis commented May 1, 2022

hi Nicolas.

thanks a lot for your support - that´s just great!
sorry, I didn´t manage to run it after having updated the 2 files and reboot.

2022-05-01 18:34:06 ERROR (SyncWorker_4) [mycomfortclient] Exception getting VarIdentTexte from server
2022-05-01 18:34:06 ERROR (SyncWorker_4) [mycomfortclient] Exception getting AufzaehlTexte from server

Logger: mycomfortclient
Source: custom_components/mycomfort/mycomfortclient/VarIdentTexte.py:38
Integration: myComfort Windhager integration (documentation, issues)
First occurred: 18:34:06 (1 occurrences)
Last logged: 18:34:06
Exception getting VarIdentTexte from server

Logger: mycomfortclient
Source: custom_components/mycomfort/mycomfortclient/AufzaehlTexte.py:36
Integration: myComfort Windhager integration (documentation, issues)
First occurred: 18:34:06 (1 occurrences)
Last logged: 18:34:06

Exception getting AufzaehlTexte from server

when I open the url you sent me I just get "Welcome to your Windhager InfowinTouch hosting nginx! You can now access the comWinStack API." how can I access this file or get the content?

thanks
stefan

@stefeis
Copy link
Author

stefeis commented May 7, 2022

hi.
now it looks like this:
Unable to decode data from myComfort gateway
19:34:20 – (FEHLER) myComfort Windhager integration (benutzerdefinierte Integration) - Die Nachricht ist zum ersten Mal um 19:32:20 aufgetreten und erscheint 6 mal
Exception getting AufzaehlTexte from server
19:31:15 – (FEHLER) myComfort Windhager integration (benutzerdefinierte Integration)
Exception getting VarIdentTexte from server
19:31:15 – (FEHLER) myComfort Windhager integration (benutzerdefinierte Integration)

@sarabanjina
Copy link
Owner

Hi,

It seems that you don't have the same gateway as mine. Can you post a screenshot to see the web interface?

windhager

Cheers,
Nicolas

@sarabanjina
Copy link
Owner

Hi,

I think I know why it isn't working : There is now a whole new (external) controller called Infinity TA. I found this info here : Windhager BioWin (MES Infinity Steuerung) in den HS einbinden

However, it seems that you can query the datapoints in the same manner... You could try my client in debug mode to see what you get :
python3 -m mycomfortclient --hostname x.x.x.x --username USER --password 'xxxxxxxx' --debug

Cheers,
Nicolas

@stefeis
Copy link
Author

stefeis commented May 11, 2022 via email

@sarabanjina
Copy link
Owner

Hi,

If you would like to, I can have a look to your gateway to estimate the work needed and the differences with the old gateway...

Regards,
Nicolas

@stefeis
Copy link
Author

stefeis commented May 11, 2022 via email

@sarabanjina
Copy link
Owner

Hi,

You could try these urls first to see if the api is the same:
http://x.x.x.x/api/1.0/datapoints (cached values on gateway)
http://x.x.x.x/api/1.0/datapoint/1/60/0/0/7/0 (actual boiler temperature)

Regards,
Nicolas

@stefeis
Copy link
Author

stefeis commented Oct 15, 2022 via email

@domfie
Copy link

domfie commented Dec 4, 2022

Hi Nicolas, hi Stefan,

I think this could be the InfoWin Touch Server. It's a control display with a network interface. It is connected to the LON Bus of the Heater and can identify all used components and read/set all values. The API functionality is the same as for the RC7030 but I also have values in this online interface where I do not see any labels for.

I have written a simple python script which just pushes the values I am interested in to openhab REST API. But since last week my pi crashed and the backup of openhab was not really working out of the box (and I personally dislike Java), I am going to move over to HomeAssistant.

@sarabanjina thank you for the HA addon, I will have a look how to make it work with the InfoWin Touch.
@stefeis does your control panel look like this?
winhager

The webinterface looks also identically:
InfoWin

I see 3 different modules in the controller:

  • BioWIN XL: The heater
  • UMUMLZ: The controller for the radiator circuit (being able to control two heating circuits, but I only have one)
  • WFBPK: The controller for the buffer circuit

I had contacted windhager to get to know what the cryptic designation should mean and got following explanation in german:

Funktionsmodule

UMUMLZ

U - Umwälzpumpe Heizkreis 1
M - Mischer Heizkreis 1
U - Umwälzpumpe Heizkreis 2
M - Mischer Heizkreis 2
L - Ladepumpe Warmwasser
Z - Zirkulationspumpe

Beim WFBPK ist es so das dieses Modul 2 Funktionen hat

  • Pufferladung von einem automatischen Wärmeerzeuger (zb. Pelletskessel)
  • Pufferladung von einem händisch beschickten Wärmerzeuger (Holzkessel)
  • Ansteuerung eines fremden (nicht Windhager) automatschen Wärmeerzeugers

Da diese Seite die Sie nutzen nicht für Anlagenbetreiber freigegen ist gibt es hier keine Übersetzung der Variablen.

Here is the complete script. It accesses all Items through
http://192.168.1.103/api/1.0/lookup/.

If we look at the ID for the total pellet consumption ( 1/60/0/23/103/0) it's this structure:
1 - NetId
60 - DeviceId (BioWIN XL)
0 - Function of the module (Heater)
23 - Subfunction
103 - Key
0 - Version (0 seams to be the real time value)

`import logging
import requests
from requests.auth import HTTPDigestAuth

CONFIG = {
"wOutside_temperature": "1/15/0/0/0/0",
"wPellet_consumption": "1/60/0/23/103/0",

"wHeater_state": "1/15/0/3/50/0",
"wHeater_preTemp": "1/15/0/0/2/0",
"wHeater_burnTemp": "1/60/0/0/7/0",
"wHeater_pump": "1/15/0/1/20/0",
"wHeater_mixer": "1/15/0/1/21/0",

"wBuffer_state": "1/16/1/20/15/0",
"wBuffer_PostTemp": "1/16/1/0/8/0",
"wBuffer_top": "1/16/1/21/65/0",
"wBuffer_bottom": "1/16/1/21/66/0",
"wBuffer_pump": "1/16/1/1/22/0",
"wBuffer_mixer": "1/16/1/1/102/0",

"wBurner_alarm": "1/60/0/2/0/0",
"wBurner_runtime": "1/60/0/2/81/0",
"wBurner_cleantime": "1/60/0/20/61/0",
"wBurner_performance": "1/60/0/0/9/0",
"wBurner_startcount": "1/60/0/2/80/0",
"wBurner_exhaustTemp": "1/60/0/0/11/0",
"wBurner_innerTemp": "1/60/0/0/7/0",
"wBurner_phase": "1/60/0/2/1/0"
}

POST_URL = "http://192.168.1.106:8080/rest/items/"
GET_URL = "http://192.168.1.103/api/1.0/lookup/"

for key in CONFIG:
try:
r = requests.get(GET_URL + CONFIG[key], auth=HTTPDigestAuth('Service', '123'))
data = r.json()['value']
r = requests.post(url=POST_URL + key, data=data)
except BaseException as e:
print(str(e))
`

I will try to upload a tcpdump of the interaction with the interface.

@stefeis
Copy link
Author

stefeis commented Dec 8, 2023

no totally different:
image
image

image

@domfie
Copy link

domfie commented Dec 19, 2023

@stefeis congratulations, I just got the same control for my second windhager heater. Looks like they are now using off the shelf CAN-Bus Controllers with custom firmware to control the peripherals. The device which shows "Passwort eingeben" is actually this controller https://www.ta.co.at/x2-frei-programmierbare-regler/uvr610s-mit-modbus-schnittstelle. It runs a program flashed by windhager and thus has a password on it which is unkown. Everything can be set up using the CAN Monitor.

The server which serves the nginx message is inside of your biowin heater. It can be accessed just like the older units, but is lacking the Web-UI. Furthermore this unit is only in charge of controlling of the heater and the buffer storage. Thus you can access all values associated to them, but no parameters like the Vorlauftemperatur. But for me it's sufficient to see the current pellet consumption and the temperatures of the buffer. I will try to add this functionality over christmas (hopefully got time 😆 )

Since I fear loosing local access to the api when using the Windhager App, I can not test out if my assumption that I can not see the parameters of the peripherals is correct

@stefeis
Copy link
Author

stefeis commented Dec 19, 2023

thanks for your investigations :-) I also use the windhager app. right now windhager is trying to optimize my heater because it started up to 26 times a day... now we are at 19, hope it will get lower. I´m looking forward to you changes - if you find some time. don´t hurry, enjoy some silent days at home :-)

@domfie
Copy link

domfie commented Dec 27, 2023

@stefeis are you able to see values beyond the ones of the heater in the app? Like the outside temperature or the Vorlauftemperatur? Just had a look though all advertised functions and I can only see the heater and buffer values though the API. If you see more it could be valueable to checkout their app api?

@stefeis
Copy link
Author

stefeis commented Dec 27, 2023

using the mobile app I see at "biowin": Reinigung (h), Hauptreinigung (h), Wartung (h), aktuelle Leistung (%), Kesseltemperatur, Kesseltemperatur Sollwert, Brennkammertemperatur, Abgastemperatur, Anzahl Brennerstarts, Brennstoffverbrauch gesamt (t), Befüllgrad Vorratsbehälter (%), Befüllgrad Lagerraum (%), Betriebsstunden (h),
at "Heizkreis UMLZ(1): Raumtemperatur aktueller Wert, Raum Temperatur Sollwert, WW Temperatur aktuell, WW Temperatur Soll, Aussentemperatur, Vorlauf Temperatur aktuell, Vorlauftemperatur Soll, Betriebsart
at "Heizkreis UM (2)": Raumtemperatur SOll, AUssentemperatur, VOrlauf Temperatur aktuell, Vorlauf Temperatur soll, Betriebsart,
hope this helps...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants