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:
@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...
Jump to solution
36 Replies
DrR0x
DrR0x•8mo ago
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?
sidewinder0378
sidewinder0378OP•8mo ago
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?
DrR0x
DrR0x•8mo ago
no it should always be on could you send a screenshot of the pc in mqtt explorer
sidewinder0378
sidewinder0378OP•8mo ago
No description
sidewinder0378
sidewinder0378OP•8mo ago
I wonder, should I reinstall the Integration?
DrR0x
DrR0x•8mo ago
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.)
sidewinder0378
sidewinder0378OP•8mo ago
- 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
DrR0x
DrR0x•8mo ago
Have you added a sensor or command to the new machine?
sidewinder0378
sidewinder0378OP•8mo ago
no, I didn't
DrR0x
DrR0x•8mo ago
That could possibly cause it to re discover
sidewinder0378
sidewinder0378OP•8mo ago
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
Amadeo
Amadeo•8mo ago
is the device name also the same? https://b.chihi.ro/HnREWT.png
sidewinder0378
sidewinder0378OP•8mo ago
No , as it is a different device, I named it another Name.
Amadeo
Amadeo•8mo ago
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
sidewinder0378
sidewinder0378OP•8mo ago
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.
Amadeo
Amadeo•8mo ago
the integration also takes "info" from mqtt to recognize the device, is there in the home assistant logs maybe?
Wankster
Wankster•8mo ago
Logs do not show any hass.agent related topics.
Amadeo
Amadeo•8mo ago
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
Amadeo
Amadeo•8mo ago
@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
Wankster
Wankster•8mo ago
There you go
No description
No description
Amadeo
Amadeo•8mo ago
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
Amadeo
Amadeo•8mo ago
@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
sidewinder0378
sidewinder0378OP•8mo ago
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
Amadeo
Amadeo•8mo ago
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)
sidewinder0378
sidewinder0378OP•8mo ago
alright thanks a lot! shall I close this Thread or do you want to leave it open for further Inquiry?
Amadeo
Amadeo•8mo ago
let's leave it open until we fix it proper way please, will be a good reference point for other ppl 😄
DrR0x
DrR0x•8mo ago
#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
MaxVonEvil
MaxVonEvil•5mo ago
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 🙂
DrR0x
DrR0x•5mo ago
Not tested myself unfortunately, I would assume so, I would also love to have it fixed but it's pretty complicated
Rofo
Rofo•5mo ago
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.
Amadeo
Amadeo•5mo ago
clients seem to happily talk to HA
what do you mean by that? are we still talking about the media player & notifications?
Rofo
Rofo•5mo ago
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
Rofo
Rofo•5mo ago
No description
Rofo
Rofo•5mo ago
{ "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.
Amadeo
Amadeo•5mo ago
I need to sit down and redo the whole HA Integration because those kind of issues are starting to get annoying
Rofo
Rofo•5mo ago
FYI, the work around of deleting all the devices then rebooting HA seems to work.
Want results from more Discord servers?
Add your server