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

Home assistant complaints about MQTT entity names #1475

Open
lemppari opened this issue Aug 2, 2023 · 25 comments
Open

Home assistant complaints about MQTT entity names #1475

lemppari opened this issue Aug 2, 2023 · 25 comments
Labels

Comments

@lemppari
Copy link

lemppari commented Aug 2, 2023

With a new version of Home assistant 2023.8 there is a repair suggestion for entities from room-assistant MQTT integration: "Discovered entities with a name that starts with the device name". This stops working in version 2024.2.0. Please address before upgrading.

I guess this must be fixed from room-assistant.

@lemppari lemppari added the bug label Aug 2, 2023
@lemppari lemppari changed the title Home assistant complaint about MQTT entity names Home assistant complaints about MQTT entity names Aug 2, 2023
@shizmebob
Copy link

Hey @lemppari - I see this also. Given there has been no work done on this project for a while I took a look at the source code. I only use the xiaomi-mi integration and I think I just need to change one line to correct this. I will do this locally in my stack but if that will fix your usecase as well I can go to the trouble of a fork in github? Not going to bother if it wont help anyone.

@lemppari
Copy link
Author

lemppari commented Aug 8, 2023

@shizmebob, if your change fixes the problem, please release it. At least tell what to change and where. I will then have to try to find out how I can get my installations updated...

@mushuthecat
Copy link

Hello,

Same issue on my side im using room assistant for presence detection and i also get this warning ?

Any release soon ?

image

@shizmebob
Copy link

@lemppari / @mushuthecat my attempt at a fix worked for me. Its available at https://github.com/shizmebob/room-assistant

Pull request made: #1477

You can hack the change in locally pretty easily if you need to as well as its just deleting a few characters. After that I had to wait for my devices to send new information through then restart HA and my warnings cleared. Hopefully one of the maintainers will accept the simple change and publish.

@lemppari
Copy link
Author

lemppari commented Aug 8, 2023

@shizmebob @mushuthecat I made that fix locally, but still I get errors in Homeassistant log. Maybe the fix is only for xiaomi-mi integration. I can't find where the entity name is created for MQTT integration.

@shizmebob
Copy link

@lemppari - I cant see anything obvious either. What hardware do you use with room-assistant?

@lemppari
Copy link
Author

lemppari commented Aug 9, 2023

@shizmebob All my room-assistants are running on Raspberry Pi Zero W and talking to homeassistant through mqtt.

@mushuthecat
Copy link

Hi,

My Room-Assistant are running on docker container and everithing works perfectly im using them for room detection using BLE on my android devices.

I do not realy understand what we have to do to workaround this issue before the 2024 update...

Regards

@lemppari
Copy link
Author

It looks like I managed to fix my environment. I am running Raspberry Pis for room-assistants and they talk to Homeassistant via MQTT. I am using Bluetooth-classic integration for monitoring. I don't know how the deployment path goes from Github to npm for my devices, so I just updated the latest version of room-assistant to my clients and modified the code there. I dealed with the .js files on my devices, but here are the changes in the Github .ts versions.

For all the following lines I removed the ${baseName} and ${instanceName} (and following space) from the strings. The .ts files will be converted to .js files in the clients, so they look different but are obviously easily spotted there too.

src/integrations/bluetooth-classic/bluetooth-classic.service.ts
369: ${baseName} Room Presence,

src/integrations/bluetooth-classic/bluetooth-classic.service.ts
354: ${baseName} Tracker,

src/integrations/bluetooth-classic/bluetooth-classic.service.ts
317: ${instanceName} Bluetooth Inquiries

src/status/status.service.ts
97: new Sensor('status-cluster-leader', ${instanceName} Cluster Leader),

src/status/status.service.ts
74: new Sensor('status-cluster-size', ${instanceName} Cluster Size),

@shizmebob
Copy link

hey @lemppari - do you want me to give you access to my fork and you can add these fixes there?

@lemppari
Copy link
Author

@shizmebob Thanks, sure I can do that.

@shizmebob
Copy link

@lemppari - you should have an invite now

@lemppari
Copy link
Author

@shizmebob Thanks! I made changes to your fork. As I mentioned those changes fixed my installation, hopefully there are no unwanted side effects.

I had to remove some retain messages from my Homeassistant MQTT broker manually. I tried various methods for fixing before I found the correct places. Used MQTT Explorer for that.

@Duke-Box
Copy link

Hi,

I get the same warnings. I run room assistant on a pi zero w using classic bluetooth to detect my phones.
I have read this thread but don't understand what I need to do to correct this.

It seems that a local edit of the 'json files is all that is required
Where are the files that need editing on my pi zero located?
If you could point me there I could edit directly.

Or how do I use the fork on Github to upgrade my room-assistant installation?
A step by step instruction would be appreciated, but I would prefer to edit the files locally as I only have one room assistant instance.

Many thanks in advance.

@mushuthecat
Copy link

mushuthecat commented Aug 28, 2023 via email

@Duke-Box
Copy link

@shizmebob @lemppari

Ok I have tried to edit the local files but I cannot find them.

Please can you tell me where the "local" files are so I can edit them. You both say these files can be hacked locally on the device that is running Room Assistant, but where are they? What directory are they in?
I have run a find / *.js and come up with hundreds of files.
I have run a grep -l "$baseName Room Presence" and had no luck as it is taking forever.

ANY help would be appreciated.

@lemppari
Copy link
Author

@Duke-Box , local files are in the directories under /opt/nodejs/lib/node_modules/room-assistant/dist/:
/opt/nodejs/lib/node_modules/room-assistant/dist/integrations/bluetooth-classic/bluetooth-classic.service.js
/opt/nodejs/lib/node_modules/room-assistant/dist/status/status.service.js

@Duke-Box
Copy link

@lemppari
Thanks for the file locations.
I have edited the files as per your above post.

Your information is Very much appreciated!

@lemppari
Copy link
Author

And actually Home Assistant doesn't complain any more. See home-assistant/core#98768 But maybe this could still remain open just in case room-assistant folks wake up.

@Duke-Box
Copy link

Duke-Box commented Aug 31, 2023 via email

@Scott8586
Copy link

I tend to use room-assistant in a combination of natively on pi zeros, but also in docker containers on pi 3B+s. Will there be a way to get these changes incorporated into a public docker image?

@austwhite
Copy link

austwhite commented Nov 26, 2023

The issue is still present as far as naming, but Home Assistant stopped showing it as a repair iten.
Still have until release 2024.2 to fix this, but I have noticed Room Assistant development has slowed right down. I hope the developers are still maintaining it.....
There are a lot less BLE room presense options around now. I guess mm wave technology is slowly replacing them.

Copy link

There hasn't been any activity on this issue recently. In an effort to provide a better overview of current issues we automatically clean some of the old ones. Many of them may already be resolved in newer versions of room-assistant.
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 25, 2024
@TheQue42
Copy link

Since this component, unfortunately seems to be dead, it still an issue.

@austwhite
Copy link

Unfortunately this is the issue with custom components. They are only as good as the maintenance of the component. Once the maintainer steps back they are slow to be updated

@github-actions github-actions bot removed the stale label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants