mak-gitdev/HA_enoceanmqtt

D2-01-01 does not report switch, only states

albenoit opened this issue · 6 comments

The problem

Hi, thank you for the last update on this nice project.

You added support for D2-01-01 but on home assistant, the switch seems not available, one just sees the 'last_seen' state and cannot act on the switch nor see the switch state.

On HA, here is the description i get (with xxxxx on my ids):

state_topic: enoceanmqtt/light
value_template: '{{ value_json.RSSI }}'
unit_of_measurement: dBm
device_class: signal_strength
entity_category: diagnostic
unique_id: enocean_D20101_xxxxxxxxx_xxxxxxxxx_rssi
name: e2m_light_rssi
device:
name: e2m_light
identifiers: xxxxxxxxxx
model: D2-01-01 @XXXXXXXXXXX
manufacturer: EnOcean
configuration_url: http://tools.enocean-alliance.org/EEPViewer/profiles/D2/01/01/D2-01-01.pdf
platform: mqtt

I am open for testing, thanks.

What type of installation are you running?

Docker

What version of HA_enoceanmqtt has the issue?

ha_enoceanmqtt_dev-aarch64

What was the last working version of HA_enoceanmqtt?

none for D2-01-01, this is a new feature

What type of Home Assitant installation are you running?

Home Assistant Container

Anything in the logs that might be useful to solve the issue? (Strongly recommended if applicable)

Home assistant log actually only find the last_seen and rssi sensors:

2023-11-17 14:34:15.572 INFO (MainThread) [homeassistant.components.mqtt.discovery] Found new component: sensor enocean_D20101_xxxxxx_yyyyy_rssi
2023-11-17 14:34:15.608 INFO (MainThread) [homeassistant.components.mqtt.discovery] Found new component: sensor enocean_D20101_xxxxxx_yyyyy_last_seen

Additional information

No response

Hi @albenoit,

Oops ! 😅
Not an issue, just that the docker image has not been generated for version 0.1.27 which adds support for D2-01-01.
The current docker image is based on 0.1.26.

I will push the docker image for 0.1.27 tonight or this weekend.
I should set a Github workflow to handle that automatically.

Perfect, thanks, i will enjoy testing!

Hi @albenoit,

Docker images just pushed for amd64, aarch64 and armhf.

Please let me know if you have any issues with the new image.

Hi, just tested,
First, yes, the device now reports the switch behaviors and integration into HA is ok with 2 sets ofbuttons, one (activated with the storm lightning logo) avec the classical switch slider that is deactivated(gray).
However, this switch and the other one (nodeon in-wall switch) that worked before now do not respond to HA commands, no ON/OFF actions.
I am not familiar with this but, looing at:

  • mosquitto log (tail on the log file), i see connection to the gateway and HA, no other thing, i do not know if i should see the switch orders here
  • HA log reports devide registration, no more:
  • 2023-11-19 10:40:10.627 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.mqtt entity: sensor.e2m_corridor_switch_rssi
    2023-11-19 10:40:10.630 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.mqtt entity: sensor.e2m_corridor_switch_last_seen
    2023-11-19 10:40:10.674 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.mqtt entity: binary_sensor.e2m_corridor_switch_lc_2
    2023-11-19 10:40:10.683 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new switch.mqtt entity: switch.e2m_corridor_switch_switch_2
    2023-11-19 10:40:10.689 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new button.mqtt entity: button.e2m_corridor_switch_query_status_2

Tell me if i can report/test on something else.
Thanks for this work

Hi @albenoit,

You should only have one switch to control the output state of your module and you should not have entities ending with _2.
It seems something went wrong in the HA registry.

Try this:

  • Stop the container.
  • Remove the "faulty" devices from your configuration file
  • Restart the container
  • In HA, check that all your device entities have been removed
  • Stop the container
  • Re-add your faulty devices in your configuration file
  • Restart the container
  • Check everything is OK now

Hi again,
perfect recipe, it works like a charm !
thanks!