HASS.Agent
HASS.Agent copied to clipboard
Bug: LoggedUser does not save or work
Please make sure your bug isn't already listed on HASS.Agent's issue tracker:
https://lab02research.youtrack.cloud/
There's a list of open bugs & features on the right. On the left you can see what's being worked on, what's planned and what's ready for the next release.
If you're not sure, don't worry, just go ahead and we'll discuss :)
Describe the bug Adding the sensor "LoggedUser" in the satellite service doesn't seem to work, when I add it it generates an error in the log, and although it appears added nothing is sent via MQTT and when you exit and return to the Satellite Service Config page, the sensor is gone. Readding it results in the same.
To Reproduce Steps to reproduce the behavior:
- Go to Satellite Service Config, Sensors.
- Add new sensor "LoggedUser"
- Send and Activate Sensors
- Exit back to desktop
- Repeat step one
- Sensor is missing.
Expected behavior Expect the sensor to return the value of the current logged in user, if no user is logged in "SYSTEM" If the same sensor is added in hass agent, it saves but the output is meaningless, because the sensor does not work when a user is not logged in, and also it does not change when the user is changed.
Screenshots
If applicable, add screenshots to help explain your problem.
Misc info (please complete the following information):
-
- Windows' UI language: English International
- HASS.Agent version: 2022.12.0
Please check what's applicable (multiple answers possible):
- [x] Installed via installer
- [ ] Installed manually
- [x] Problem occurs in HASS.Agent
- [x] Problem occurs in Satellite Service
Additional context Add any other context about the problem here. log.txt
Logs
If possible, please provide the logs of HASS.Agent and - if applicable - the Satellite Service. You can find HASS.Agent's logs by going to the main window, then Configuration
-> Logging
-> open logs folder
. The Satellite Service's logs are in the same window, but the Satellite Service
tab -> open service logs folder
. If you want, you can mail them to [email protected]
Please hold... I just found the latest Beta and I am testing, it may be fixed!
Did it work, problem solved?
Thanks for coming back to me!
I'm not sure, at the moment, only because I'm not certain that the "loggeduser" returns the user thats logged in. I'm looking to use HASSagent as a replacement for IOT Link, and the features that I use are not exactly replicated in HASSagent.
Namely, I want to know what user is signed on, I have automations based on the user logged in, and SYSTEM which appears in IOT Link when the log on screen is displayed, and also IOT link has immediate shutdown, hibernate and restart scripts with when run immediately perform the action requested. I've done the immediate shutdown with a custom command shutdown /p /f the others I cannot replicate.
Logged user just shows this:
Just the name of the machine.
and not the user, and loggedusers shows this:
If someone else logs on then it adds them to the list.
I explictly want to know the user, that is logged in and using the machine, so I don't know if thats possible.
It seems to work better on the beta though, although I'm getting a few exception errors and its crashed a couple of times.
Thanks!
Can you send me the exceptions?
I agree that it's useful to know who's actually using the machine, might need to make a seperate sensor for that.
Its only done it a couple of times after I installed the beta, I will try and find them and send them along.
Hey @shuntfield, is this still an issue with the latest release?
@LAB02-Admin I haven't had chance to check yet, I don't know if I am configuring the satellite sensor right. I want it to show the current user, it shows all users that are logged on but not the current user, is that correct?
I'm not sure that I am configuring the sensor correctly or if HASS Agent does what I want it to do:
The Top one is the Satellite service, it shows what users are actually logged into the machine, the bottom one is IOT Link.
What IOT Link shows is the user that is currently using the machine, if its on the login screen then it shows "system" so if you look at the coloured bands, you see on IOT link Purple which is "system" and Magenta which is "Home User" and "graha" when I am logged in on HASS satellite as I am logged in and also home user I get both, not just one.
It might be useful in another context but I only want to see what actual user is using the computer.
If that makes sense!
The Exception error hasn't appeared since the first time I got one.
Hope this helps!
Yea I'm getting same behaviour shows pc name not the user when used at satellite sensor.
The local sensor works OK but only works for who installed hassagent
If another user logs in the locals show nothing.
You're right @shuntfield, I forgot the actual-logged-on part, created a ticket so I won't forget: hassagent-166
Thanks @blair287, I'll look into that as well
You're right @shuntfield, I forgot the actual-logged-on part, created a ticket so I won't forget: hassagent-166
Thanks @blair287, I'll look into that as well
Great stuff 👍🏻
Should be fixed in the latest beta if you want to test: https://github.com/LAB02-Research/HASS.Agent/releases/tag/2022.14.0-beta1
@LAB02-Admin yup just tested it, "LoggedUser" and it works fine, it swaps to "None" when no user is logged in, but that is fine, I can use that - great stuff!