THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.

Begonnen von immi, 02 Februar 2015, 11:42:16

Vorheriges Thema - Nächstes Thema

mlb

Yes, this module is the best part of FHEM  :)

By the way - has anyone tried to integrate it with other systems via MQTT? I'm trying to connect FHEM and the Home Assistant https://www.home-assistant.io/ (where you can build very nice user interfaces and integrate a lot of home automation devices).

I was able to send all readings, just I cannot get MQTT messages to control eg. THZ/LWZ settings...

Here is  my code (that works except of last line):

define fhemMQTT MQTT2_CLIENT mqtt_ip_address:1883
attr fhemMQTT username my_mqtt_username
attr fhemMQTT subscriptions /Mythz/+/set

defmod mqttGeneric MQTT_GENERIC_BRIDGE fhem room=LWZHeating
attr mqttGeneric IODev
attr mqttGeneric globalPublish *:topic={"/$device/$reading"}
#this is not working:
attr mqttGeneric mqttSubscribe *:topic={"/Mythz/$reading/set"}


It would be cool to be able for example to start  fans, or change temperature, or force the start of heating or solar pump, etc.

Sorry if that goes a bit out of topic  ::)
LWZ 403SOL, FHEM + HomeAssistant

immi

Zitat von: mlb am 16 April 2019, 22:33:53
I was able to send all readings,
mlb thanks for the nice words,
I do not understand how you can send the readings, it should not work: 
IODev is missing the parameter.
attr mqttGeneric IODev fhemMQTT

Nevertheless I do not use MQTT; I suggest you  to post in MQTT dedicated sub-forum
https://forum.fhem.de/index.php/board,94.0.html
immi

mlb

Thanks, immi - I'm constantly impressed with your work.

I do not know why, but it works like that  :)
After a few days of tests I gave up to use MQTT to update FHEM, and now I'm sending values to FHEM via shell commands - it seems to work fine.

Here is an example (in HA configuration.yaml - just in case useful for someone):
shell_command:
   set_unscheduled_vent: 'curl -s http://my_fhem_ip_address:8086/fhem?cmd=set%20Mythz%20p99startUnschedVent%20{{level}} >/dev/null'


For the above to work, the FHEM API needs to be activated in fhem.cfg:define WEBapi FHEMWEB 8086 global
attr WEBapi csrfToken none
LWZ 403SOL, FHEM + HomeAssistant

andy1986

Hallo Zusammen,

ich bekomme nur noch folgende Meldungen im Log:
019.06.09 13:46:52 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- FB ->
2019.06.09 13:47:47 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 13:49:48 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 13:51:50 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 13:51:53 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- FB ->
2019.06.09 13:53:51 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 13:55:52 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 13:56:54 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- FB ->
2019.06.09 13:57:53 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 13:59:54 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 14:01:55 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 14:01:56 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- FB ->
2019.06.09 14:03:56 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 14:05:57 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->


Was kann ich machen damit es wieder funktioniert?

VG

immi

Zitat von: andy1986 am 09 Juni 2019, 14:08:33
Hallo Zusammen,
ich bekomme nur noch folgende Meldungen im Log:
019.06.09 13:46:52 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow
Was kann ich machen damit es wieder funktioniert?
VG
Hi Andy
would you be so nice  to provide some backhround information?
has it ever worked for you? how do you connect? config file? tecalor model/year? fhem version and module version?
immi

andy1986

Hi,

sorry sure:

I worked fine for me then the USB cable broke. So i ordered a new one and then it worked for a second. After that no longer.
Connected via USB cable. Tecalor 403 (n.a._04.39HW74SW2.08Date) from 2012/2013.
Modul Version: 0.180
FHEM Version:  17371 2018-09-19 09:28:18Z rudolfkoenig


immi

Zitat von: andy1986 am 09 Juni 2019, 20:00:07
I worked fine for me then the USB cable broke. So i ordered a new one and then it worked for a second. After that no longer.
an update of the whole system is suggested  but will not solve your problem, which does not seam to be software related.
type "update"
wait 4 min
type "shutdown restart"

It is not clear for me how you have broken the usb-cable. Even harder to understand how you realized that the cable was broken. Even stranger that you brke a second cable after 1 second.
Have you considered that maybe your powersupply of fhem-computer could have a problem? If you read in the forum some people reported noise linked to earth connection (or missing earth).
immi

andy1986

Hi,

i did a update now, but as you said: same Problem.

I'm sorry I think we misunderstood. The cable ran for about 1 year and then I noticed that the status went red. With another USB cable it worked. The current cable shows a green status but just the errors in the log. so the new cable is not broken, I think

willybauss

What is the cable length? Might be the new one is of bad quality.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

andy1986

It is 10m (with an repeater) but it is the same as before

immi

Hi Andy
10m usb ... :(
why don't you remove the repeater and go with a raspi or a old fritzbox in between (next to the heatpump)?
after that you reach your main fhem-server with ethernet or wlan.
immi

willybauss

10m - it is just based on good luck if it works. The repeater causes a delay, and the THZ communication is very sensitive in case of wrong timing/late answers.
You must try with a much shorter cable before anything else.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

andy1986

Zitat von: immi am 10 Juni 2019, 11:31:48
Hi Andy
10m usb ... :(
why don't you remove the repeater and go with a raspi or a old fritzbox in between (next to the heatpump)?
after that you reach your main fhem-server with ethernet or wlan.
immi

How does it work with an raspi or an fritzbox in between?

immi

Zitat von: andy1986 am 10 Juni 2019, 16:55:38
How does it work with an raspi or an fritzbox in between?

you can chose to install fhem on the raspi (or on the old fritzbox) and connect the 2 fhem via module fhem2fhem

or you can chose to install ser2net on the raspi (or on the old fritzbox) and
define Mythz THZ old_fritz:2003
where 2003 is the ser2net port and old_fritz is where you have running ser2net

I use the second option since years without any problem.
for an old fritzbox you probably need https://freetz.github.io/
for raspi there is enough support in forum

Stonemuc

I use a 10m USB Cable without repeater. No problem here. It's a cheap one from china I think. I ordered it on amazon.
FHEM aus Raspberry PI 3 B+, Haussteuerung auf EnOcean Basis, Tecalor THZ 404eco Wärmepumpe