alexander-vitishchenko / hc3-to-mqtt

Fibaro HC3 integration with Home Assistant & NodeRed
MIT License
31 stars 13 forks source link

Discovered entities with a name that starts with the device name #56

Closed xp1ratex closed 6 months ago

xp1ratex commented 1 year ago

Describe the bug As of Home Assistant 2023.8.0 u get a varning about the naming of MQTT entities

Some MQTT entities have an entity name that starts with the device name. This is not expected. To avoid a duplicate name the device name prefix is stripped of the entity name as a work-a-round. Please inform the maintainer of the software application that supplies the affected entities to fix this issue.

List of affected entities:

sensor.52_batterylevel sensor.53_batterylevel light.44 binary_sensor.51 sensor.49_energy sensor.39_energy sensor.49_power sensor.34_power sensor.23_energy sensor.63_power sensor.66 light.76 sensor.57_batterylevel binary_sensor.57 sensor.58_batterylevel sensor.39_power sensor.72 sensor.37_energy sensor.35_power sensor.44_power sensor.59 sensor.47_energy light.35 sensor.28_power sensor.28_energy sensor.59_batterylevel light.34 sensor.34_energy sensor.58 light.39 sensor.47_power light.49 sensor.52 light.37 sensor.23_power light.47 sensor.37_power light.63 light.23 sensor.53 light.28 sensor.51_batterylevel sensor.63_energy

Dont know if theres a user error from me or do we need to take some sort of action to get the MQTT naming correct?

How to reproduce? Steps to reproduce the behavior like:

  1. Upgrade Home Assistant to 2023.8.0 or later
  2. Click on settings
  3. Open repair message about mqqt
  4. See error

Expected behavior

Environment:

Attach QuickApp logs

Attach Home Assistant logs Attach Home Assistant Core and MQTT integration logs.

alexander-vitishchenko commented 1 year ago

Hi @xp1ratex, I see and this might be important, can you please share Home Assistant logs with the warning messages that you mentioned above?

Fibaro often sets the device name equal to device id, so maybe I need to come up with a workaround to help users. By the way, you set the device names at Fibaro Home Page => Settings => Devices => find your device in the list and set a new name

xp1ratex commented 1 year ago

Yeah i have set my devices with names in Fibaro HC3L, i add the complete log here and a screenshot of my devices in HCL3. Hope it helps. home-assistant_2023-08-13T20-04-43.878Z.log Skärmbild 2023-08-13 220819

MomosX commented 1 year ago

I can confirm the issue. But it only seems to hapen with QuickApps or devices which have not been renamed after inclusion. For me it's the QA's. they have different name then their ID, but the error still pops up.

alexander-vitishchenko commented 1 year ago

@xp1ratex I see the warning messages in logs, it looks like there is no problem with device and entity having the same name, as they are separated by separate Device and Entity screens.

Can you please send me full QuickApp logs from Fibaro HC3? i.e. enable logging, restart QuickApp, share logs with me.

fyi - I was thinking about automating unique names generation by the newer version of the QuickApp, but it may cause more harm to meaningful naming then helping. The best way would be to name Fibaro device/entities in a way there is no duplication.

xp1ratex commented 1 year ago

@xp1ratex I see the warning messages in logs, it looks like there is no problem with device and entity having the same name, as they are separated by separate Device and Entity screens.

Can you please send me full QuickApp logs from Fibaro HC3? i.e. enable logging, restart QuickApp, share logs with me.

fyi - I was thinking about automating unique names generation by the newer version of the QuickApp, but it may cause more harm to meaningful naming then helping. The best way would be to name Fibaro device/entities in a way there is no duplication.

quickapp debug.txt

Is this what u need?

alexander-vitishchenko commented 1 year ago

@xp1ratex Yes it helps. I've just released the new version of the QuickApp, please let me know if it works for you?

xp1ratex commented 1 year ago

Ill try it later today, a quick question is there any way to update or do i need to remove and install?Den 4 sep. 2023 12:44 skrev Alexander Vitishchenko @.***>: Yes it helps. I've just released the new version of the QuickApp, please let me know if it works for you?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

alexander-vitishchenko commented 1 year ago

There are two ways to install a newer version of the QuickApp:

  1. Copy src/*.lua files content to the existing instance of the QuickApp in Fibaro HC3
  2. Remove the existing instance

Option 1 takes more copy-paste actions, but saves time on reconfiguring the QuickApp for MQTT connectivity, etc Option 2 is the opposite.

The ideal would be to have some sort of QuickApp auto-update functionality, similar to how it is done for Home Assistant, but this is something I don't see at the moment.

xp1ratex commented 1 year ago

There are two ways to install a newer version of the QuickApp:

  1. Copy src/*.lua files content to the existing instance of the QuickApp in Fibaro HC3
  2. Remove the existing instance

Option 1 takes more copy-paste actions, but saves time on reconfiguring the QuickApp for MQTT connectivity, etc Option 2 is the opposite.

The ideal would be to have some sort of QuickApp auto-update functionality, similar to how it is done for Home Assistant, but this is something I don't see at the moment.

Sorry for the delay, maybe its my naming that makes a mess but heres the homeassistant logs after clearing mqtt and updated quickapp.

quickapp 1.0.235 Homeassistant logs.txt

alexander-vitishchenko commented 6 months ago

Hi @xp1ratex, can you please advise if this is still relevant for you, and did you try using https://www.home-assistant.io/integrations/fibaro/? Curious to see how many devices are supported, besides it might be simpler to configure without MQTT

xp1ratex commented 6 months ago

Hi @xp1ratex, can you please advise if this is still relevant for you, and did you try using https://www.home-assistant.io/integrations/fibaro/? Curious to see how many devices are supported, besides it might be simpler to configure without MQTT

Iirc homeassistant turned of that logging thus not showing the error anymore, i tried to search my logs for it but i didnt get any matches, so i guess its working (or is hidden) but i think there will be some problem with it in 2025.1 cause thats where this namings will change. But as for now i dont see the error, i havent tried any other integration but as for now the mqtt version works fine.

alexander-vitishchenko commented 6 months ago

Great! And so we should be good to go with the ticket closure