Auto Discovery fails at second device
Hi Guys, I Installed hass.agent at my windows PC and AutoDiscovery in HA worked fine. I can use motifications etc. Now I installed HASS:agent on a second device to use it there too. Installation worked fine, I use the same configuration as on the first PC (besides ClientID) but the new device doesn't show up in HA. Is there anything I may have missed in the process? Thanks for your help.
Solution:Jump to solution
@DrR0x we have a lot of work with the integration xD
@Wankster could you please try this:
remove all devices from the integration (so that none are "added"), make sure the HASS.Agents on both/all devices are running, restart HA (full restart, not only yaml reload)
https://b.chihi.ro/FLhxAu.png
https://b.chihi.ro/MWgXJK.png...
36 Replies
You haven't missed anything, unfortunately this is a very hard to identify bug at the moment. What seems to work is restarting the pc and HA
-
Do you have mqtt explorer?
Hi, thx for the reply. I tried restart several times. Thanks for the hint with the MQTT-Explorer. I looked into it and found, that Hass.agent is sending correct information to mqtt. So it seems HA just doesn't discover the new device. Is there a hidden switch to disable/enable AutoDiscovery?
no it should always be on
could you send a screenshot of the pc in mqtt explorer
I wonder, should I reinstall the Integration?
not yet
that will most likely fix it, but i'm interested in fixing the issue, so want to collect as much data as i can first
so let me just check:
- You tried restarting both HA and the new machine
- You had the first machine working fine, then installed on new machine and it hasn't been discovered?
- Does the new machine have any entities? (Sensors, commands etc.)
- restart: yes. I restarted both several times including HA full reset (not just yaml)
- yes, first machine works fine, second hasn't been discovered
- no entities in HA, as it isn't found, not even in the mqtt-integration
Have you added a sensor or command to the new machine?
no, I didn't
That could possibly cause it to re discover
okay, I will try
I added two sensors, it did half of the trick. The device is listet in the MQTT-Integration, but not in the HASS-Integration . Having a look in the mqtt-explorer I realized that the local Sensors of Device No. 1 and No. 2 don't show up there
is the device name also the same?
https://b.chihi.ro/HnREWT.png
No , as it is a different device, I named it another Name.
k, just wanted to be sure 😄
I'll ask some more "kinda stupid" questions but those come from experience so please bear with me 😄
does the serial number between the first and second device differ in MQTT Explorer?
in hass.agent/devices topic
Yes, there are two different serial numbers. In mqtt Integration both Devices Show up with their sensors but the Hass Integration doesn't recognize device no 2.
the integration also takes "info" from mqtt to recognize the device, is there in the home assistant logs maybe?
Logs do not show any hass.agent related topics.
damnnit
I have two devices added although I think I also had to do some flips to get it working
I'll try to get another device and install hass.agent there for the tests
@Wankster could you put in here screenshots and contents of the discovery messages?
like this:
https://b.chihi.ro/RQ7sn6.png
https://b.chihi.ro/sj1jNx.png
There you go
looks correct
I need to look for a way to enable some additional logs on HA side if the messages are there in mqtt
so, looks like at least I've reproduced it somehow (I removed my tablet, cleared the mqtt messages from it and it doesn't reappear as discovered)
even after full HA restart
oh ffs
Solution
@DrR0x we have a lot of work with the integration xD
@Wankster could you please try this:
remove all devices from the integration (so that none are "added"), make sure the HASS.Agents on both/all devices are running, restart HA (full restart, not only yaml reload)
https://b.chihi.ro/FLhxAu.png
https://b.chihi.ro/MWgXJK.png
Hey, that did the trick for me. Thank you very much.
In my MQTT-Explorer there are shown 3 devices atm. Device 1, Device 2 and Device 2 with the old name, before I renamed it. I Think I will reinstall the windows CLient
you can remove the entry with old name
"del" key when it's selected or the trashcan icon in the MQTT Explorer (also while topic is selected)
alright thanks a lot!
shall I close this Thread or do you want to leave it open for further Inquiry?
let's leave it open until we fix it proper way please, will be a good reference point for other ppl 😄
#Welcome to discussions! 💬 Please follow the guidelines 🙌
We just use mark as solved that way people can view solutions online and find fixes here as well
Hi all, just confirming the above workaround (remove all HASS.Agent devices in HA, then restart) works when adding additional (3+) new computers as well. Would be happy to see this go away in the future 🙂
Not tested myself unfortunately, I would assume so, I would also love to have it fixed but it's pretty complicated
I'm having a problem with ANY hass agent being discovered. I recently removed the original integration and installed windows clients and added the new forked versions of both. The clients seem to happily talk to HA, and I've added a satellite sensor but despite doing this on 2 different PCs, HA won't detect either.
Have restarted both PC and HA multiple times.
clients seem to happily talk to HAwhat do you mean by that? are we still talking about the media player & notifications?
I'm not getting ANY entities discovered.
I can see entries in MQTT explorer that match what I am expecting, but nothing coming through to HASS
{
"serial_number": "xxxxxxxx-5a76-4cb6-a0c8-6e8aa60e503a",
"device": {
"identifiers": "hass.agent-TV-GAMING-PC",
"manufacturer": "HASS.Agent Team",
"model": "Microsoft Windows NT 10.0.22631.0",
"name": "TV-GAMING-PC",
"sw_version": "2.0.1"
},
"apis": {
"notifications": true,
"media_player": true
}
}
scrap the above., after FIVE restarts, all the devices have magically appeared.
I need to sit down
and redo the whole HA Integration
because those kind of issues are starting to get annoying
FYI, the work around of deleting all the devices then rebooting HA seems to work.