Skip to content

Comments

Fix F6-02-01 RPS telegram decoding failure in HA overlay#173

Open
Hugo-HoB wants to merge 1 commit intomak-gitdev:developfrom
Hugo-HoB:fix-f6-empty-string-bug
Open

Fix F6-02-01 RPS telegram decoding failure in HA overlay#173
Hugo-HoB wants to merge 1 commit intomak-gitdev:developfrom
Hugo-HoB:fix-f6-empty-string-bug

Conversation

@Hugo-HoB
Copy link

@Hugo-HoB Hugo-HoB commented Nov 1, 2025

Summary

Fixes F6-02-01 RPS wall switches that fail to decode when HA overlay is enabled

Problem

When the HA overlay is enabled, F6 (RPS) devices like the PTM210 wall switch produce "message not interpretable" errors and fail to publish MQTT messages, despite having correct mappings in mapping.yaml.

Root Cause

The HA overlay unconditionally sets device configuration fields from mapping.yaml, even when those fields contain empty strings. For F6-02-01, all fields (command, channel, direction, etc.) are set to "".

The EnOcean library's parse_eep() method treats direction="" as an invalid parameter and fails to parse, while direction=None correctly means "no direction specified."

Solution

Modified ha_communicator.py lines 46-58 to only set configuration fields if they have non-empty values. This ensures the EnOcean library receives None for unset parameters instead of empty strings.

Testing

  • ✅ PTM210 DB (F6-02-01) wall switch now decodes and publishes to MQTT
  • ✅ ubiwizz relay (D2-01-01) still works correctly (backwards compatible)
  • ✅ No "message not interpretable" errors
  • ✅ MQTT messages include all expected fields (R1, EB, R2, SA, T21, NU)

Files Changed

  • enoceanmqtt/overlays/homeassistant/ha_communicator.py

When the HA overlay is enabled, F6 (RPS) devices like the PTM210
wall switch fail to decode with 'message not interpretable' errors,
despite having correct mappings in mapping.yaml.

Root cause: The overlay unconditionally sets device configuration
fields (command, channel, direction, etc.) from mapping.yaml, even
when those fields contain empty strings. For F6-02-01, all these
fields are set to empty string "".

The EnOcean library's parse_eep() method treats direction="" as
an invalid parameter and fails to parse the telegram, returning no
properties. This differs from direction=None, which correctly means
'no direction specified'.

Fix: Only set configuration fields if they have non-empty values.
This ensures the EnOcean library receives None for unset parameters
instead of empty strings.

Tested with:
- PTM210 DB (F6-02-01) wall switch: Messages now decode and publish
- ubiwizz relay (D2-01-01): Still works correctly (backwards compatible)

Fixes issue where F6-02-01 and similar RPS devices cannot be used
with the HA overlay despite being listed as supported.
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.

2 participants