Controlling Max! radiator thermostats with arduino or ESP

Begonnen von kennybl, 26 September 2020, 16:04:22

Vorheriges Thema - Nächstes Thema

kennybl

I'm sorry, all of this is really new to me.

Here are the lines from the log from the moment i press the "saveConfig" set

Undefined subroutine &main::Logdir called at ./FHEM/10_MAX.pm line 896.
2020.10.17 16:08:40 1: Including fhem.cfg
2020.10.17 16:08:40 3: WEB: port 8083 opened
2020.10.17 16:08:40 2: eventTypes: loaded 138 events from ./log/eventTypes.txt
2020.10.17 16:08:41 1: Including ./log/fhem.save
2020.10.17 16:08:41 1: usb create starting
2020.10.17 16:08:41 3: Probing ZWDongle device /dev/serial1
2020.10.17 16:08:41 3: Probing CUL device /dev/ttyAMA0
2020.10.17 16:08:41 3: Probing TCM_ESP3 device /dev/ttyAMA0
2020.10.17 16:08:41 3: Probing ZWDongle device /dev/ttyAMA0
2020.10.17 16:08:41 3: Probing SIGNALDuino device /dev/ttyAMA0
2020.10.17 16:08:42 3: Probing MYSENSORS device /dev/ttyAMA0
2020.10.17 16:08:42 3: Probing ArduCounter device /dev/ttyAMA0
2020.10.17 16:08:42 3: Probing ElsnerWS device /dev/ttyAMA0
2020.10.17 16:08:43 3: Probing FRM device /dev/ttyAMA0
2020.10.17 16:08:48 3: Probing TCM_ESP3 device /dev/ttyUSB0
2020.10.17 16:08:48 3: Probing TCM_ESP2 device /dev/ttyUSB0
2020.10.17 16:08:48 3: Probing FHZ device /dev/ttyUSB0
2020.10.17 16:08:48 3: Probing TRX device /dev/ttyUSB0
2020.10.17 16:08:49 3: Probing ZWDongle device /dev/ttyUSB0
2020.10.17 16:08:49 3: Probing SIGNALDuino device /dev/ttyUSB0
2020.10.17 16:08:49 3: Probing MYSENSORS device /dev/ttyUSB0
2020.10.17 16:08:50 3: Probing ArduCounter device /dev/ttyUSB0
2020.10.17 16:08:50 3: Probing ElsnerWS device /dev/ttyUSB0
2020.10.17 16:08:51 3: Probing FRM device /dev/ttyUSB0
2020.10.17 16:08:56 1: usb create end
2020.10.17 16:08:56 3: Opening ml device 192.168.1.16:62910
2020.10.17 16:08:56 3: ml device opened
2020.10.17 16:08:56 2: ml, Cube thinks it is 17.10.2020 17:8
2020.10.17 16:08:56 2: ml, Time difference is 60 minutes
2020.10.17 16:08:57 0: Featurelevel: 6
2020.10.17 16:08:57 0: Server started with 24 defined entities (fhem.pl:21056/2020-01-26 perl:5.028001 os:linux user:fhem pid:8944)

Wzut

OK, there is a problem with your 10_MAX.pm. , sorry -> Undefined subroutine &main::Logdir

Please try my newest beta version from here -> https://forum.fhem.de/index.php/topic,115018.0.html
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

kennybl

Thank you, i updated the 3 files in the /opt/fhem/FHEM folder but still the same problem (i stopped Fhem and started Fhem after updating the files)

Wzut

exact the same error text in the log ?
What value shows the Internal SVN on a MAX device ?
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

kennybl

no, now it is

2020.10.17 18:34:12 2: AttrTemplates: got 127 entries
Undefined subroutine &main::Logdir called at ./FHEM/10_MAX.pm line 903.


SVN: BETA

Wzut

Thats very, very strange ... Logdir() is a simple function in fhem.pl
Ok, I made now a version for you where Logdir is defined in 10_MAX.pm , but I dont understand why the normal version is not working in your installation
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

kennybl

Thanks, I could save the .max file and I see it is created in /opt/fhem/log, but then I try to get show_savedConfig, I get no value in the select dropdown and the message I get is:

Can't open ./log/ .max: No such file or directory


Wzut

Do you realy have a file  .max ? There is the devicename missing and the get dropdown cant show that.
How did you make this ? A normal set saveConfig with a empty text field creates a file with the device name and .max
e.g. MAX_0f0a0b.max If you type in a text this text will be used as name for the file  -> test  creates test.max
A full backup of all devices can be done in the FHEMWEB textfield with the command
{ FHEM::MAX::MAX_Save() }
after this look in the log file which devices are backuped
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

kennybl

Yes, I saved all 8 thermostats and I have 8 files (MAX_1b____.max)

I made the file via opening the thermostat, select "set MAX_1b____ [saveConfig] [    ]".
I first tried to set a name as "backup" but since that didn't seem to work I left it empty. After that I saw there where 2 files, backup.max and MAX_1b____.max) but when I try to get the saved config it gives that message.


I also did
{ FHEM::MAX::MAX_Save() }, the log shows:


2020.10.18 13:32:29 3: MAX_1bccc6, configSaved to ./log/MAX_1bccc6.max
2020.10.18 13:32:29 3: MAX_1be048, configSaved to ./log/MAX_1be048.max
2020.10.18 13:32:29 3: MAX_1bdd5d, configSaved to ./log/MAX_1bdd5d.max
2020.10.18 13:32:29 3: MAX_1bdb83, configSaved to ./log/MAX_1bdb83.max
2020.10.18 13:32:29 3: MAX_1bccc1, configSaved to ./log/MAX_1bccc1.max
2020.10.18 13:32:29 3: MAX_1bdd75, configSaved to ./log/MAX_1bdd75.max
2020.10.18 13:32:29 3: MAX_1bd434, configSaved to ./log/MAX_1bd434.max
2020.10.18 13:32:29 3: MAX_1be7d4, configSaved to ./log/MAX_1be7d4.max


But still no value in the dropdown after "show_savedConfig"

Wzut

The list for the dropdown is created by a function from 01_FHEMWEB and this is working with %L
%L points normal to your current logdir. Logdir() is not find in your installation so I think something is wrong but I dont know what yet.

Did you change or set the attributes global logdir or global modpath ?
normaly logdir is not set and modpath points to .

Did you look in one of your .max files ? are lines in ?


Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

kennybl

I didn't change any attributes for lodger or global mod path, at least nog on purpose.

I checked the .max files and they have all the values from the thermostat, can I continue with doing the next steps for removing the MAX Cube?

Wzut

Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

betateilchen

#42
@kennybl

Zitat2020.10.11 16:30:28 0: Server started with 6 defined entities (fhem.pl:21056/2020-01-26 perl:5.028001 os:linux user:fhem pid:24150)

Your FHEM installation is in an age of 9 months, current version is #22987
You should do an update as soon as possible, before going on and to prevent further waste of time.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

kennybl

#43
Thank you, strange, I can't remember what tutorial I used to install FHEM but I thought I used the FHEM wiki.

How can I upgrade to version 22987?

edit:
I did use the "update" command and now I am at 22935.
I do get the list of savedconfigs but I am not sure if the version still needs to be updated

kennybl

I think I got everything working, I removed the maxlan and did all the steps.

I can change the radiator thermostat a few times, after the 4th or 5th time within 30 seconds I still got this message:
cm, CUL not enough credit! credit10ms is 15, but we need 110. Waiting 95 seconds. Currently 1 messages are waiting to be sent
is this normal?