THZ / LWZ Tecalor Stiebel Eltron Heizung

Begonnen von Heiner, 02 Juni 2013, 11:39:13

Vorheriges Thema - Nächstes Thema

micomat

maybe you've configured a wrong verbose level in your config?
but anyway, if it's working now, have fun :)
Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200

immi

Zitat von: kabelsurfer am 30 September 2014, 23:01:16


# $Id: fhem.pl 6623 2014-09-26 17:55:17Z rudolfkoenig $
# $Id: 01_FHEMWEB.pm 6611 2014-09-24 07:48:32Z rudolfkoenig $
# $Id: 92_FileLog.pm 6571 2014-09-19 16:05:56Z rudolfkoenig $
# $Id: 99_SUNRISE_EL.pm 5851 2014-05-13 19:39:03Z rudolfkoenig $
# $Id: 99_Utils.pm 6574 2014-09-19 17:32:48Z rudolfkoenig $
# $Id: 98_autocreate.pm 6505 2014-09-06 12:24:48Z rudolfkoenig $
# $Id: 91_eventTypes.pm 6428 2014-08-20 11:51:27Z rudolfkoenig $
# $Id: 91_notify.pm 6371 2014-08-07 05:33:37Z rudolfkoenig $
# $Id: 98_telnet.pm 6611 2014-09-24 07:48:32Z rudolfkoenig $


Why are only these shown? Is it only the FHEMWEB plus the modules starting with IDs of 9 that are displayed with 'version'?

"version" command should list all currently loaded modules:
havn't you said that you have defined thz?
something like this is missing
# $Id: 00_THZ.pm 6363 2014-08-05 19:03:32Z immiimmi $

immi

micomat

Immi,

i just updated my fhem and now i see a strange error message in the log while starting:


2014.10.01 10:13:09 3: Mythz device opened
False [] range "\w-" in regex; marked by <-- HERE in m/^(\s*([\w- <-- HERE \.]+)(:\S*)?\s+((\w+)\s+)?({.*?})\s*)(,\s*(.*))*$/ at fhem.pl line 2240, <$fh> line 129.
2014.10.01 10:13:10 3: Opening FritzBox device 192.168.178.1:1012


not sure if it's a problem of Mythz module? Anyway everything is working fine :)

Markus
Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200

immi

Markus
Same problem. but do not know if connected with THZ.

root cause is a fix from Rudolf in usrreadings in order to allow points.......
http://forum.fhem.de/index.php/topic,27442.0.html
https://github.com/mhop/fhem-mirror/commit/1e2f6bf54160be8a78f6c6c63383696f72e6c333

untill 03.10 I cannot play around
immi

micomat

Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200

kabelsurfer

Zitat von: immi am 01 Oktober 2014, 08:10:50
"version" command should list all currently loaded modules:
havn't you said that you have defined thz?
something like this is missing
# $Id: 00_THZ.pm 6363 2014-08-05 19:03:32Z immiimmi $

immi
Yes, good point, but I do not know why there are only so view entries. Any hints are welcome.

My THZ (from 2008) has the software/firmware version 2.16. Does anybody know how I can make the fhem THZ module work for this old version? I am willing to contribute to testing, i.e. reading values etc.

micomat

i guess it will work once it's working ;)

try the following:
update force
update 00_THZ.pm
shutdown restart

list Mythz (or however you defined the name of your THZ)
Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200

kabelsurfer

#862

Thanks, I have done all that. After the 'shutdown restart' I got this despite that I had defined Mythz (define Mythz THZ 192.168.178.3:2020) already:
Error messages while initializing FHEM:
statefile: Please define Mythz first



Since the above message appears every time after 'shutdown restart', I assume that I need to define Mythz every time after that, right?


After defining it (anew), 'list Mythz' gives me this output:

Internals:
   CFGFN
   DEF        192.168.178.3:2020
   DeviceName 192.168.178.3:2020
   FD         13
   NAME       Mythz
   NR         31
   PARTIAL
   STATE      opened
   TYPE       THZ
   VERSION    0.109
Attributes:


Should 'Attributes' above show something? As you see, it does not.

The IP is the one of my NSLU2 (a small and old NAS from Linksys) to which I have connected the THZ 303 SOL via 2 wires and RS232-USB adapter and ser2net (2020:telnet:600:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT) - proven to be working outside fhem.


Still, 'version' does only show the stuff I quoted above, i.e. no 00_THZ.pm among them.


The Log says that there is something wrong with my connection:

2014.10.02 17:25:30 0: Server shutdown
2014.10.02 17:25:30 1: Including fhem.cfg
2014.10.02 17:25:30 3: telnetPort: port 7072 opened
2014.10.02 17:25:30 3: WEB: port 8083 opened
2014.10.02 17:25:30 3: WEBphone: port 8084 opened
2014.10.02 17:25:30 3: WEBtablet: port 8085 opened
2014.10.02 17:25:30 2: eventTypes: loaded 2 events from ./log/eventTypes.txt
2014.10.02 17:25:30 1: Including ./log/fhem.save
2014.10.02 17:25:30 1: statefile: Please define Mythz first
2014.10.02 17:25:30 1: usb create starting
2014.10.02 17:25:31 1: usb create end
2014.10.02 17:25:31 2: Error messages while initializing FHEM: statefile: Please define Mythz first
2014.10.02 17:25:31 0: Server started with 9 defined entities (version $Id: fhem.pl 6633 2014-09-29 20:05:48Z rudolfkoenig $, os linux, user fhem, pid 9335)
2014.10.02 17:25:32 1: Including fhem.cfg
2014.10.02 17:25:32 1: telnetPort: Can't open server port at 7072: Address already in use. Exiting.
2014.10.02 17:37:06 3: Opening Mythz device 192.168.178.3:2020
2014.10.02 17:37:06 3: Mythz device opened
2014.10.02 17:37:06 2: Mythz/RAW: FFFB03FFFB01FFFE01FFFD00
2014.10.02 17:37:12 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2014.10.02 17:37:12 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
...


Since the baudrate is already set to only 9600 in ser2net.conf, I guess that there is not a speed but some other problem.

immi

2014.10.02 17:37:06 2: Mythz/RAW: FFFB03FFFB01FFFE01FFFD00
2014.10.02 17:37:12 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?

This is a typical timeout problem, Which can be due to the 9k/s or to a command which you old firmware does not understand.

let us start with some homework:
1) each time you modify something: stop fhem, modify start fhem

2) deactivate the autorefresh
comment out line 413 of thz
# $replyc = THZ_Get($hash, $hash->{NAME}, $command);

3) verbose to max in config file -- > 
attr global verbose 5

4) ask for firmwareversion
get Mythz sFirmware

5) post complete config file and log

immi

kabelsurfer

#864
Zitat von: immi am 02 Oktober 2014, 18:10:13
1) each time you modify something: stop fhem, modify start fhem

I assume that with "stop fhem" you mean 'shutdown' and with "start fhem" you mean 'restart'?

Zitat von: immi am 02 Oktober 2014, 18:10:13
2) deactivate the autorefresh
comment out line 413 of thz
# $replyc = THZ_Get($hash, $hash->{NAME}, $command);

I have done that.

Zitat von: immi am 02 Oktober 2014, 18:10:13
3) verbose to max in config file -- > 
attr global verbose 5

I have done that as well.

Zitat von: immi am 02 Oktober 2014, 18:10:13
4) ask for firmwareversion
get Mythz sFirmware

However, I cannot do 'get Mythz sFirmware' without again defining Mythz, which gets lost everytime I do a shutdown/restart. Is this normal?
A 'msg2 InterfaceNotRespondig' gives me this:
msg2 InterfaceNotRespondig




Zitat von: immi am 02 Oktober 2014, 18:10:13
5) post complete config file and log

Config and log are attached.


Edit:
Hm, I now realise that fhem.cfg shows a verbose mode of 3, despite I had set it to 5. Very strange... I now submitted another 'attr global verbose 5' with [enter], but when I check fhem.cfg via the menu (Edit files > config file > fhem.cfg) it again shows a verbosity level of 3, i.e. in one line 'attr global verbose 3'. So does manually entering 'attr global verbose 5' not get reflected in fhem.cfg? Am I missing a point here? -- Well, at least it stays 5 via the menu method, i.e. then clicking on "Save fhem.cfg". Since my USB adaptor does not change, I commented out the line 'define initialUsbCheck notify global:INITIALIZED usb create' in fhem.cfg. I have replaced the previously attached fhem.cfg and also fhem.log with the updated ones, i.e. verbosity now set to 5. When trying to get the FW version, the Log shows 'Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead'. I will recheck my cable tomorrow...

immi

for stopping fhem "shutdown" command is fine
for starting fhem you start it from command line: perl fhem.pl fhem.cfg

edit the config when fhem is not running

in your config file you have to define Mythz otherwise how can fhem know about it?

immi

micomat

by the way... some versions needs to be configured to 115200 or 57600 baud to work.
not sure if yours is one of that.
Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200

kabelsurfer

#867

Thanks to both of you. Most likely you have not yet seen my edit and updated cfg und log above?


When I do just 'shutdown', how comes that the web GUI of fhem is still available without issuing 'perl fhem.pl fhem.cfg'? (thanks for the hint to start it like that, I was not aware of it)


I had entered 'define Mythz THZ 192.168.178.3:2020' in the command field and had hit [enter] which does not seem to work for a permanent save. Sorry that I was under this wrong impression. I will also try increasing the baudrate, first to 19200.


Here is my again update fhem.cfg:

attr global autoload_undefined_devices 1
attr global logfile ./log/fhem-%Y-%m.log
attr global modpath /opt/fhem/
attr global motd none
attr global room Unsorted
attr global sendStatistics manually
attr global statefile ./log/fhem.save
attr global updateInBackground 1
attr global userattr devStateIcon devStateStyle icon sortby webCmd
attr global verbose 5


define telnetPort telnet 7072 global


define WEB FHEMWEB 8083 global


define WEBphone FHEMWEB 8084 global
attr WEBphone stylesheetPrefix smallscreen


define WEBtablet FHEMWEB 8085 global
attr WEBtablet stylesheetPrefix touchpad


# Fake FileLog entry, to access the fhem log from FHEMWEB
define Logfile FileLog ./log/fhem-%Y-%m.log fakelog


define autocreate autocreate
attr autocreate filelog ./log/%NAME-%Y.log


define eventTypes eventTypes ./log/eventTypes.txt


# Disable this to avoid looking for new USB devices on startup
#define initialUsbCheck notify global:INITIALIZED usb create


define Mythz THZ 192.168.178.3:2020
attr Mythz interval_sGlobal 300 # Internes Polling Intervall 5min
attr Mythz interval_sHistory 28800 # Internes Polling Intervall 8h
attr Mythz interval_sLast10errors 120 # Internes Polling Fehlerspeicher
define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz

micomat

could you please provide information about how the heating is connected to your computer. is it a raspberry? is it connected via USB-Serial-Converter or do you use a second computer via ser2net?
Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200

kabelsurfer

#869
The IP 192.168.178.3 in Mythz is the IP of my NSLU2 (a small and old NAS from Linksys) to which I have connected the THZ 303 SOL via 2 wires and RS232-USB adapter (pl2303 or ftdi - cannot remember right now) and ser2net (2020:telnet:600:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT) - proven to be working outside fhem with 9600 baud. As I wrote above, I will recheck my cable and also try increasing the baud rate to 19200 and higher - tomorrow, though, so please bear with me. My THZ (from 2008, i.e. before the "iPod" wheel was introduced) has a software (or you call it firmware) version 2.16, i.e. it is pretty "old". Thanks for your great help!

Edit: Fhem runs on a PC with Ubuntu 13.10 64bit.