Closed PBrunot closed 1 month ago
Question: I know this is not the intended purpose of the Satellite service, but have you tried configurating LastActive and Hibernate via the Satellite service?
Satellite service explicitly does not require user login, so I (personally) assume it would bypass these user account restrictions. At least hopefully that can serve as a temporary solution.
Good idea, but lastactive sensor is only available for hass.agent and not the satellite service. I guess it needs to monitor the active session. Not sure if there is a good way for a Service to monitor user activity inside multiple sessions.
Interesting, this is a note for the lead developer.
Currently the installer assume admin priviledge by default because it wants to install satellite service, by default.
Is it possible for the installer to make the satellite service optional, and then prompt for admin when satellite service installation is necessary?
Meanwhile, you can grab the non-installer version and launch it that way. I verified you don't need admin priviledge for it.
Definitely something that we need to look at, first and foremost "When I elevate the installer, it tries to write into priviledged_user\AppData\Local\HASS.Agent folder and fails" is not acceptable with the current idea that multiple users can have different HASS.Agent instances.
Is it possible for the installer to make the satellite service optional, and then prompt for admin when satellite service installation is necessary? Good idea, I'll take a look what kind of wiggle room Inno provides to us.
@PBrunot if you'd be willing to, I've created a test branch that separates the client/service installation - https://github.com/amadeo-alex/HASS.Agent/releases/tag/2.1.0-beta2-installer-redesign (Note: it's based on 2.1.0-beta2 branch so it also includes additional features/fixes) In theory this should be all to fix the mentioned use-cases - if not I'll work further on that.
Sorry that it took so long but there were other bugs like memory leak that we had to take care first.
Ok I will test it by end of the week, thank you.
Let me report by positive experience so far.
1) install
2) I switch to a non-admin account on same PC :
3) I switch back to the main account (without logging off)
4) I switch back to the non-admin account (without logging off)
5) I switch back to admin account (without logging off)
So in summary with 2 accounts (1 admin, 1 non-admin) on same Windows 11 machine I am able to run HASS agent with LastActive sensor in both accounts. The only minor inconvenience is that I have to generate differents HA token and Mosquitto usernames/passwords for each account on each computer.
I will test on another PC with 2 non-admin accounts + 1 admin account during the weekend.
i noticed that the service "HASS.Agent Satellite Service" was still present after uninstall
yeah, that's one of the bugs of original repo https://github.com/LAB02-Research/HASS.Agent/issues/366 you can use this to remove it manually (in administrative CMD):
sc delete "HASS.Agent Satellite Service"
to give another 2cents:
Running on user account. Windows 10.
with 2.1.0 Beta4: Installation as user worked, currently testing the pplication. On first sight, seems to work as expected with the satelite running as admin.
with 2.0: opening the installer => elevation prompt installation directory: in admin account / appdata ... (changed it to c/programs)
after installation it didn't open automatically
opened it as admin going through configuration "will restart" => did not reopen
running as admin now => nothing happens
Describe the bug Impossible to install the software as an unpriviledged (child) account. Installation and configuration on PC with multiple users is difficult. The reason I need that is that I have automation in HA to hibernate the PC if unused after a while, using last_active sensor. But this sensor stops being updated if the PC active user is not the installing user of HASS.Agent.
To Reproduce
Expected behavior Program should be installable with non-admin users.
Misc info (please complete the following information):
Please check what's applicable (multiple answers possible):
Additional context A workaround I found was to add full control priviledges on priviledged_user\AppData\Local\HASS.Agent for the other computer users. But the agents process seems to fight on MQTT server login. So I had to change MQTT user / clientid in the other user.