Neuigkeiten:

Am Sonntag den 8.12.2024 kann es ab ca. 8:00 Uhr zu kurzzeitigen Einschränkungen / Ausfällen bei den Diensten des FHEM Vereines kommen.
Die Server müssen mal gewartet und dabei neu gestartet werden ;)

Hauptmenü

Modul 10_KNX.pm - support

Begonnen von erwin, 23 August 2021, 08:59:59

Vorheriges Thema - Nächstes Thema

erwin

Hi KNX_Community!
Neue Version ist am SVN, change-history (wie immer...) im 1.Beitrag in diesem Thread!

l.g. erwin
FHEM aktuell auf RaspberryPI Mdl 1-4
Maintainer: 00_KNXIO.pm 10_KNX.pm
User: CUNO2 (868 SLOWRF) - HMS100xx, FS20, FHT, 1-Wire  - 2401(iButton), 18x20, 2406, 2413 (AVR), 2450,..,MQTT2, KNX, SONOFF, mySENSORS,....
Hardware:  Busware ROT, Weinzierl IP731, 1-Wire GW,...

roelb

There are two bugs in the implementation for dpt1: dpt1.009 and dpt1.100 (added in the last commit):

Current code is:

    'dpt1.009' => {CODE=>'dpt1', UNIT=>q{}, PATTERN=>qr/($PAT_DPT1_PAT|close|open)/ixms, MIN=>'open', MAX=>'close'},
...
    'dpt1.100' => {CODE=>'dpt1', UNIT=>q{}, PATTERN=>qr/($PAT_DPT1_PAT|Heat|Cool)/ixms, MIN=>'Heat', MAX=>'Cool'},

For 1.009 MIN/MAX values are the wrong way around. Specifications for dpt1.009 are 0=close and 1=open.

For dpt1.100, it's completely the wrong way around. Sepcs are 0=cooling, 1=heating.

Please change to:

    'dpt1.009' => {CODE=>'dpt1', UNIT=>q{}, PATTERN=>qr/($PAT_DPT1_PAT|close|open)/ixms, MIN=>'close', MAX=>'open'},
...
    'dpt1.100' => {CODE=>'dpt1', UNIT=>q{}, PATTERN=>qr/($PAT_DPT1_PAT|cooling|heating)/ixms, MIN=>'cooling', MAX=>'heating'},

As all other dpt's use no capitalization and follow the terminolgy used in ETS, I would suggest to follow that standard for every dpt. So not "Cool" and "Heat", but "cooling" and "heating".

Also, dpt1.024 is an exception to this standard:

        'dpt1.024' => {CODE=>'dpt1', UNIT=>q{}, PATTERN=>qr/($PAT_DPT1_PAT|Day|Night)/ixms, MIN=>'Day', MAX=>'Night'},
I'd suggest changing this to:

        'dpt1.024' => {CODE=>'dpt1', UNIT=>q{}, PATTERN=>qr/($PAT_DPT1_PAT|Day|Night)/ixms, MIN=>'day', MAX=>'night'},

Finally, I think dpt18 needs a rework. It's currently used as a 1-based scene object, but that is not what dpt18 actually is. dpt18 should provide the option to either recall or store scenes. The problem with rewriting here is that folks might currently use this dpt as a 1-based dpt17. I don't have a good solution, but as I need the scene store functionality, I will think about it and propose a patch that breaks as few existing functionality as possible.

erwin

Hi,
thanks for pointing out bugs....
the KNX Systemspec 3.7.2 that i have available (V2.1) has the following spec:
1.009 DPT_OpenClose - 0 = Open, 1 = Close --> will be changed to lowercase
1.019 DPT_Window_Door - 0 = closed, 1 = open # !!!
1.024 --> will be changed to lowercase
1.100 DPT_Heat/Cool - 0 = cooling, 1 = heating --> will be changed in nxt update

and thats what i have implemented. Funny enough, Open/Close is captalized, almost all other spec use no-capitalization...
The cmd verbs are checked case-insensitive, e.g: 'set <dev> hEaT' will work, the readings are as defined in MIN/MAX- def.

If you have a more recent dpt-spec, pls. let me know....
Re: dpt18 implementation: i need to look into that. Currently, just writing scenes is supported and the encode/decode is based on dpt5 logic. The real probl. is, i dont have a HW to test this stuff...
kind regards erwin
FHEM aktuell auf RaspberryPI Mdl 1-4
Maintainer: 00_KNXIO.pm 10_KNX.pm
User: CUNO2 (868 SLOWRF) - HMS100xx, FS20, FHT, 1-Wire  - 2401(iButton), 18x20, 2406, 2413 (AVR), 2450,..,MQTT2, KNX, SONOFF, mySENSORS,....
Hardware:  Busware ROT, Weinzierl IP731, 1-Wire GW,...

erwin

Hi Roelb,
just to inform you, I'm working on the dpt18 - activate/learn  - function, Tests look ok so far,
still some headache about the GUI...
I hope to release updated version by next week.
regards erwin
FHEM aktuell auf RaspberryPI Mdl 1-4
Maintainer: 00_KNXIO.pm 10_KNX.pm
User: CUNO2 (868 SLOWRF) - HMS100xx, FS20, FHT, 1-Wire  - 2401(iButton), 18x20, 2406, 2413 (AVR), 2450,..,MQTT2, KNX, SONOFF, mySENSORS,....
Hardware:  Busware ROT, Weinzierl IP731, 1-Wire GW,...

roelb

You were right on 1.009. When looking through the code, I noticed that the ordering in the pattern match was exactly the other way around as MIN/MAX in the code, so that's why it caught my attention. But since the order in the pattern match doesn't really matter, nothing was actually wrong here, just confusing.

Thank you for fixing dtp1.019 heating/cooling! And I'll hold off on the scene learning and wait for your implementation..

erwin

Hi KNX_Community!
Neue Version ist am SVN, change-history (wie immer...) im 1.Beitrag in diesem Thread!
Diesmal eine beträchtliche Anzahl an (internen) changes/optimierungen, bitte um Test & Feedback!

@roelb:
The new fhem-cmdline syntax for dpt18 is still a little bit strange, not sure if i will keep this solution, the format is based on the widgetlist widget i use for the set-GUI
set <device> 34            # ativate scene 34 - as before
set <device> <gadName> 34  # ativate scene 34 - as before
set <device> <gadName> activate,34  # ativate scene 34 -  new syntax - comma is separator!
set <device> <gadName> learn,34  # learn scene 34
I have implemented a dpt18.099 (for testing the widget), pls give a try - feedback very welcome!!!
I'm still thinking of changing that, but that will take more time - because of possible global impact to set cmds...
The statistic says, we have 2 installation with 3 defs, one is myself, with 2 defs, so not much users of this dpt.... 

l.g. erwin
FHEM aktuell auf RaspberryPI Mdl 1-4
Maintainer: 00_KNXIO.pm 10_KNX.pm
User: CUNO2 (868 SLOWRF) - HMS100xx, FS20, FHT, 1-Wire  - 2401(iButton), 18x20, 2406, 2413 (AVR), 2450,..,MQTT2, KNX, SONOFF, mySENSORS,....
Hardware:  Busware ROT, Weinzierl IP731, 1-Wire GW,...

erwin

Hi KNX_Community!
Neue Version ist am SVN, change-history (wie immer...) im 1.Beitrag in diesem Thread!

@roelb:
The widget for learn/activate is now available for dpt18.001, experimental dpt18.099 has been removed !
l.g. erwin
FHEM aktuell auf RaspberryPI Mdl 1-4
Maintainer: 00_KNXIO.pm 10_KNX.pm
User: CUNO2 (868 SLOWRF) - HMS100xx, FS20, FHT, 1-Wire  - 2401(iButton), 18x20, 2406, 2413 (AVR), 2450,..,MQTT2, KNX, SONOFF, mySENSORS,....
Hardware:  Busware ROT, Weinzierl IP731, 1-Wire GW,...