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

Enhance the KNX capabilities of Tasmota to offer more flexibility and features. #22071

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

pbrinette
Copy link
Contributor

Description: Enhance the KNX capabilities of Tasmota to offer more flexibility and features.

Summary of Changes

  • Added new KnxTx functions.
  • Extended the number of KNX user-defined slots from 5 to 9.
  • Added a compilation flag to let users decide if Temperature/Humidity sensors communicate on group addresses in 16-bit float (DPT 9.x) or 32-bit float (DPT 14.x).

1. Add New KnxTx Functions

KnxTx_Float : Sends float values in DPT 9 format (16 bits)
KnxTx_Double : Sends float values in DPT 14 format (32 bits), an alias of KnxTx_Val
KnxTx_Byte : Sends integer values in DPT 5 format (8 bits unsigned)

2. Extend the Number of KNX User-Defined Slots

By default, only 5 RX and TX slots are available to users. I’ve extended this to 9 slots.

Use Case Example:

I use an eWeLink Zigbee Gateway connected to 3 SNZB Temperature and Humidity sensors. I’ve configured Tasmota to send temperature/humidity KNX values on ZbReceived values using rules. Extending the number of slots allows me to use up to 4 such devices.

Rule Example Configuration:

Rule
  on ZbReceived#0x5E17#humidity do knxtx_Float1 %value% endon
  on ZbReceived#0x5E17#temperature do knxtx_Float2 %value% endon
  on ZbReceived#0xF658#humidity do knxtx_Float3 %value% endon
  on ZbReceived#0xF658#temperature do knxtx_Float4 %value% endon
  on ZbReceived#0x1371#humidity do knxtx_Float5 %value% endon
  on ZbReceived#0x1371#temperature do knxtx_Float6 %value% endon
Rule1 1 

Add Compilation Flag to Select DPT9 Instead of DPT14 for Temperature/Humidity Sensors

Most older KNX equipment uses DPT 9 (16-bit float) for communication objects for Temperature / Humidity instead of DPT 14 (32-bit float). The compilation flag KNX_USE_DPT9 allows users to select DPT 9 for sending and receiving temperature and humidity data.

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.7
  • The code change is tested and works with Tasmota core ESP32 V.3.0.4
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@arendst arendst merged commit 28bbf11 into arendst:development Sep 9, 2024
59 checks passed
hawa-lc4 pushed a commit to hawa-lc4/Tasmota-dev that referenced this pull request Sep 16, 2024
@miesi
Copy link

miesi commented Nov 30, 2024

@pbrinette

I really like opensource software and admire the volunteers doing the heavy lifting. Please be so kind and inform us that things will break.

The description does not list that "KNX_ SCENE_RX" changes in rules from EVENT#KNX_SCENE_RX to EVENT#KNX_SCENE.

The description does not list that there is no care taken of already stored config of KNX_RX_1 to KNX_RX_5 and KNX_ SCENE_RX (move KNX_RX_1 to KNX_RX_5 one up, move KNX_ SCENE_RX to last slot, zero out slot 1 (new Output 1 Toggle))

@pbrinette
Copy link
Contributor Author

Hello @miesi
Thanks for you report. I while check that.

@arendst
Copy link
Owner

arendst commented Dec 3, 2024

@pbrinette I agree with @miesi .

Pls change to add backward compatibility.

@arendst
Copy link
Owner

arendst commented Dec 4, 2024

As a quick fix I'll move the four new KNX_SLOTS to the end of the list. This should solve the issues observed.

@arendst
Copy link
Owner

arendst commented Dec 5, 2024

See #22405 for progress.

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

Successfully merging this pull request may close these issues.

3 participants