Notifications from HA don't work

Hi, ive recently just migrated from 2022.14.0 to 2.0.1 and everything seems to be working fine, the integration detects my device and MQTT does too. If i click "Show Test Notification", the notification appears. However, if i tell HA to send me a notification, nothing happens. I've tried restarting HA, removing and adding the integration again, restarting my computer, even completely deleting hass.agent and installing it from scratch again. Nothing has worked. There are no errors that show up in the logs when i send the service request. Two other things ive noticed though are. 1. the new name i set in HASS.Agent does not show up in HA, it just uses the old one. MQTT uses the new one. 2. even though the media player is enabled in HASS.agent, it also does not show up as an entity in HA.
46 Replies
HASS.Agent Helper
HASS.Agent Helper•8mo ago
Help us Help Others!
To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution
From An unknown user
HASS.Agent Helper
HASS.Agent Helper•8mo ago
Help us Help You!
Please don't delete messages or posts because it makes it impossible to understand what happened. If you don't want your messages to be seen then don't post here. Please provide us with your integration version number.
You can find it in HACS -> HASS.Agent -> Top left for installed version number.
HASS.Agent Helper
HASS.Agent Helper•8mo ago
@DrR0x
Amadeo
Amadeo•8mo ago
Two other things ive noticed though are. the new name i set in HASS.Agent does not show up in HA, it just uses the old one. MQTT uses the new one. even though the media player is enabled in HASS.agent, it also does not show up as an entity in HA.
hm, those two suggest that the integration might not be working as expected (that would also explain the notifications not working) you've mentioned changing the name, when did you do that? did it work before changing the name?
crawmartino
crawmartinoOP•8mo ago
Yes I did it before i installed the 2.0.1 version but even after that it still only detected the old name
Amadeo
Amadeo•8mo ago
could you please do a test - change name in HASS.Agent back to the old one, restart HASS.Agent and then check if it shows up in HA as a media player & if notification works?
crawmartino
crawmartinoOP•8mo ago
After doing that, the media player shows up and the notifications start working However i would like the name to be changed
Amadeo
Amadeo•8mo ago
ok, let me retest that on my side ok, I think you've just reported a nice bug 😄 do you know/have MQTT Explorer by any chance?
crawmartino
crawmartinoOP•8mo ago
I do not have it installed, i have heard of it but haven't paid attention to it much
Amadeo
Amadeo•8mo ago
I'll need to fix this obviously in code but I can tell you steps that need to be done so that you can have the new name working as expected - requires MQTT Explorer though or other MQTT tool
crawmartino
crawmartinoOP•8mo ago
Alright, i've got mqtt explorer open now, how can i make the name work?
Amadeo
Amadeo•8mo ago
sooo, assuming you have "OLD" and "NEW" as names: - remove OLD device from HA in HASS.Agent integration screen - rename device in HASS.Agent to "NEW" (can be skipped if already done) - close HASS.Agent - go to MQTT Explorer (connect to your MQTT broker) and expand topics in "hass.agent/devices/", there should be "OLD", remove it - launch HASS.Agent - restart HA after those steps and restarting HA "NEW" should be discovered as a new device
crawmartino
crawmartinoOP•8mo ago
it looks like as the topic tab is grayed out and there is nothing in it. I have the portable version of MQTT explorer is that an issue?
No description
Amadeo
Amadeo•8mo ago
do you see anything on the left? after connection to MQTT broker you should see something like this: https://b.chihi.ro/RXH7C8.png
Amadeo
Amadeo•8mo ago
and portable shouldn't be an issue
crawmartino
crawmartinoOP•8mo ago
All i see on the left side is the IP of home assistant
No description
Amadeo
Amadeo•8mo ago
ok so from that I can deduce that you have mqtt/mosquitto as a HA addon correct?
crawmartino
crawmartinoOP•8mo ago
I am not entirely sure how I have the whole mqtt system set up but the broker integration seems to be going through the EMQX addon should i set the host name of that instead?
Amadeo
Amadeo•8mo ago
oh, it's EMQX and not mosquitto, things got more complicated now as I haven't used that try connecting with the same settings as you have in HASS.Agent
crawmartino
crawmartinoOP•8mo ago
That is what i have done beforehand, which did not seem to work I could try getting mosquitto but if MQTT works through HASS.Agent then i don't see a reason why it wouldn't work here
Amadeo
Amadeo•8mo ago
ya, correct when you click connect it doesn't show any arrors just goes to the main window and then the IP? is there an arrow next to the IP? (to the left)
crawmartino
crawmartinoOP•8mo ago
It connects without any errors and there is no arrow next to the IP.
Amadeo
Amadeo•8mo ago
wtf
crawmartino
crawmartinoOP•8mo ago
No description
Amadeo
Amadeo•8mo ago
try connecting to test.mosquitto.org (public mqtt instance for tests)
crawmartino
crawmartinoOP•8mo ago
No description
Amadeo
Amadeo•8mo ago
ok so this works why then it doesn't show anything with your broker ohhhh
Amadeo
Amadeo•8mo ago
www.emqx.com
MQTT Explorer Guide: Features, Demos, and Using Tips
This article will give you a quick overview of the basic usage of the MQTT Explorer, as well as the basic concepts and usage of the MQTT protocol.
Amadeo
Amadeo•8mo ago
Then, click Advanced. Because EMQX Cloud prohibits the $SYS topic and the # topic by default, we delete them and enter a test subscription topic with the name test/1, and the result is shown in the figure below.
that would explain some things EMQX local might work the same
crawmartino
crawmartinoOP•8mo ago
That seems to be directed towards EMQX Cloud though
Amadeo
Amadeo•8mo ago
click on advanced and then add subscription for "hass.agent" yeah but maybe the onprem one works similarly guessing
crawmartino
crawmartinoOP•8mo ago
Even after doing that, no topics seem to be showing up
Amadeo
Amadeo•8mo ago
🤨
crawmartino
crawmartinoOP•8mo ago
Not even the test topic the guide said to add
No description
Amadeo
Amadeo•8mo ago
test/1 wouldn't work but why even "hass.agent/devices" is not working
crawmartino
crawmartinoOP•8mo ago
is the naming correct? Could be case sensitive
Amadeo
Amadeo•8mo ago
crawmartino
crawmartinoOP•8mo ago
well, i don't know what else to do. The name change isnt something critical, it's just the naming scheme is off from the rest right now, however i can wait until the bug is fixed
Amadeo
Amadeo•8mo ago
found this but the fix seems a bit complicated - https://github.com/emqx/emqx/issues/9383
GitHub
MQTT Explorer not get topics · Issue #9383 · emqx/emqx
What happened? I can connect to emqx (running in docker on a Home Assistant OS) Everything is working. ESP modules connected. Lights connected etc When I connect MQTT Explorer (v0.3.5 osx) its conn...
crawmartino
crawmartinoOP•8mo ago
should i tag this post as a bug?
Amadeo
Amadeo•8mo ago
if you have some spare time you can create an issue here - https://github.com/hass-agent/HASS.Agent/issues (there is a bug template) no need to be very diligent with filling in the information just the general overview, I'll respond in comment with details that I've already researched while we talked
GitHub
Issues · hass-agent/HASS.Agent
Unofficial development project for the HASS.Agent platform. - Issues · hass-agent/HASS.Agent
Amadeo
Amadeo•8mo ago
already working on a fix
crawmartino
crawmartinoOP•8mo ago
update: i've gotten the mqtt explorer to work. In hass.agent/devices there are two names, the old one and the new one. i'll remove the old one and that should hopefully work. alright
Amadeo
Amadeo•8mo ago
ya, the next steps (like HA restart are also needed for HA to pick it up - something we need to address on an integration level @DrR0x :D)
crawmartino
crawmartinoOP•8mo ago
great! the integration discovered the device under a new name and everything works! Thanks for the help, i'll make an issue about the bug sometime today
Amadeo
Amadeo•8mo ago
GitHub
Fix: device rename MQTT messages cleanup by amadeo-alex · Pull Requ...
This PR adds additional cleanup for device and media player MQTT discovery messages than can cause HASS.Agent not to be rediscovered after changing device name - #68 Current proper way to rename HA...
Want results from more Discord servers?
Add your server