LAB02-Research / HASS.Agent

Windows-based client for Home Assistant. Provides notifications, quick actions, commands, sensors and more.
https://hassagent.lab02-research.org
MIT License
1.5k stars 66 forks source link

Sensors not adding #254

Open Sjorsa opened 1 year ago

Sjorsa commented 1 year ago

I have added a couple sensors but I'm only seeing a media_player in HA.

image image

thiagobruch commented 1 year ago

Hi Sjorsa,

I'll try to help you on this issue.

1 - After you added the sensors, did you restart the service? (Not required, but just in case, I sometimes do)

2 - Are you using MQTT to publish the sensors info? If so, do you have the logs from your HA?

Sjorsa commented 1 year ago

I think I'm running into several problems at once. I think I was using the local API and MQTT at the same time. Plus the HASS.Agent is also not running as admin, so I cannot save configuration changes until I close it and reopen it as admin. Could it be that if I start up my PC, HASS.Agent starts up as non-admin so it does not have enough privileges to read certain sensors?

thiagobruch commented 1 year ago

" I think I'm running into several problems at once. I think I was using the local API and MQTT at the same time." From my understand, the API is the legacy method and you don't have to use if you have the MQTT enabled.

" Plus the HASS.Agent is also not running as admin, so I cannot save configuration changes until I close it and reopen it as admin." Did you install inside the " Program Files" folder? If so, the issue is that you (as the user) do not have permission to save something inside the " Program Files" folder without elevation. You can either reinstall inside the %appdata% folder (default) or give Full Permissions to your user inside the Program Files Folder.

On Fri, Jan 13, 2023 at 5:28 AM Sjors @.***> wrote:

I think I'm running into several problems at once. I think I was using the local API and MQTT at the same time. Plus the HASS.Agent is also not running as admin, so I cannot save configuration changes until I close it and reopen it as admin. Could it be that if I start up my PC, HASS.Agent starts up as non-admin so it does not have enough privileges to read certain sensors?

— Reply to this email directly, view it on GitHub https://github.com/LAB02-Research/HASS.Agent/issues/254, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR6WIQBQD2ASCDDHJT6IAITWSEU4BANCNFSM6AAAAAATWPXJMU . You are receiving this because you commented.Message ID: @.***>

LAB02-Admin commented 1 year ago

@thiagobruch, thanks for helping ❤️

He's correct, the API is legacy and can be ignored. And HASS.Agent launches without elevated privileges by default (as a safety measure), if you need elevated privileges you can use the satellite service:

https://hassagent.readthedocs.io/en/latest/introduction/#satellite-service

Lastly, this is the integration's repo and not hass.agent, so I'm moving this ticket there 😁

thiagobruch commented 1 year ago

Hi Sjors,

That integration in the screenshot is only for the media player.

Go back to Settings => Devices & Services => MQTT.

If you click on Devices, you should see the entry with your COMPUTER_NAME.

By clicking on it, you’ll see all the sensors configured.

From: Sjors @.> Sent: Saturday, January 14, 2023 4:13 AM To: LAB02-Research/HASS.Agent @.> Cc: thiagobruch @.>; Mention @.> Subject: [LAB02-Research/HASS.Agent] Sensors not adding (Issue #254)

I have added a couple sensors but I'm only seeing a media_player in HA.

https://user-images.githubusercontent.com/40437966/211516015-d15aca16-890b-467c-a763-93a898a407cd.png https://user-images.githubusercontent.com/40437966/211516147-30986ae6-69d5-40b4-850c-8b997b0628e6.png

— Reply to this email directly, view it on GitHub https://github.com/LAB02-Research/HASS.Agent/issues/254 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AR6WIQFHK54BJYTFT5ASRILWSJUZZANCNFSM6AAAAAAT3FNLRE . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AR6WIQA4UEBUGYTR5EO6HCDWSJUZZA5CNFSM6AAAAAAT3FNLRGWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHFWYVHDQ.gif Message ID: @. @.> >

thiagobruch commented 1 year ago

Sjors

In addition to the MQTT enabled in Home Assistant, make sure the HASS.Agent has the following enabled as well.

image

Sjorsa commented 1 year ago

Thanks for the responses everyone! I indeed installed HASS.Agent under Program Files, I have reinstalled to Appdata now to see if that improves anything.

Also, I didn't realize the entities would be added under the MQTT integratoin, but that makes sense of course :P