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
Help us Help Others!
To help others find answers, you can mark your question as solved via
Right click solution message -> Apps -> ✅ Mark Solution
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.
@DrR0x
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?
Yes
I did it before i installed the 2.0.1 version but even after that it still only detected the old name
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?
After doing that, the media player shows up and the notifications start working
However i would like the name to be changed
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?
I do not have it installed, i have heard of it but haven't paid attention to it much
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
Alright, i've got mqtt explorer open now, how can i make the name work?
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
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?
do you see anything on the left? after connection to MQTT broker you should see something like this:
https://b.chihi.ro/RXH7C8.png
and portable shouldn't be an issue
All i see on the left side is the IP of home assistant
ok so from that I can deduce that you have mqtt/mosquitto as a HA addon correct?
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?
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
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
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)
It connects without any errors and there is no arrow next to the IP.
wtf
try connecting to test.mosquitto.org (public mqtt instance for tests)
ok so this works
why then it doesn't show anything with your broker
ohhhh
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.
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
That seems to be directed towards EMQX Cloud though
click on advanced and then add subscription for "hass.agent"
yeah but maybe the onprem one works similarly
guessing
Even after doing that, no topics seem to be showing up
🤨
Not even the test topic the guide said to add
test/1 wouldn't work but why even "hass.agent/devices" is not working
is the naming correct?
Could be case sensitive
looks to be ok https://b.chihi.ro/rV6s93.png
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
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...
should i tag this post as a bug?
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
already working on a fix
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
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)
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
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...