openhab-addons icon indicating copy to clipboard operation
openhab-addons copied to clipboard

[enocean] D2-50 EEP remove extra channels and fix warnings

Open lovery opened this issue 4 months ago • 2 comments

Description

Improvement: Fix 7 warnings on building a jar:

  • Null comparison always yields false... - EEPFactory.java:[54,17], EEPFactory.java:[67,17], EnOceanBaseSensorHandler.java:[158,13]
  • Dead code (caused by the above warinings) - EEPFactory.java:[54,29], EEPFactory.java:[67,29], EnOceanBaseSensorHandler.java:[158,41]
  • Potential null pointer access - EnOceanTransceiver.java:[451,13]

Improvement: remove channels which are not supported by device using EEP D2-50-00, D2-50-01, D2-50-10, D2-50-11. Before this PR choosing either of the above EEP doesn't change anything in the channels list, it looked like all the devices support all channels, but according to the specification they don't. For reference check EnOcean specification on page 236

Screenshot from 2024-10-09 10-51-00

Test jar file

lovery avatar Oct 09 '24 10:10 lovery