Skip to content

Bug: LoggedUser does not save or workΒ #168

Closed

Description

@shuntfield

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:

  1. Go to Satellite Service Config, Sensors.
  2. Add new sensor "LoggedUser"
  3. Send and Activate Sensors
  4. Exit back to desktop
  5. Repeat step one
  6. 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.
image
image

Misc info (please complete the following information):

  • image
  • Windows' UI language: English International
  • HASS.Agent version: 2022.12.0

Please check what's applicable (multiple answers possible):

  • Installed via installer
  • Installed manually
  • Problem occurs in HASS.Agent
  • 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 lab02research@outlook.com

Activity

  1. shuntfield commented on Sep 20, 2022

    @shuntfield
    Author

    Please hold...
    I just found the latest Beta and I am testing, it may be fixed!

  2. LAB02-Admin commented on Sep 22, 2022

    @LAB02-Admin
    Member

    Did it work, problem solved?

  3. shuntfield commented on Sep 22, 2022

    @shuntfield
    Author

    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.
    image

    and not the user, and loggedusers shows this:
    image

    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!

  4. LAB02-Admin commented on Sep 29, 2022

    @LAB02-Admin
    Member

    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.

  5. shuntfield commented on Sep 29, 2022

    @shuntfield
    Author

    Its only done it a couple of times after I installed the beta, I will try and find them and send them along.

  6. LAB02-Admin commented on Oct 27, 2022

    @LAB02-Admin
    Member

    Hey @shuntfield, is this still an issue with the latest release?

  7. shuntfield commented on Oct 27, 2022

    @shuntfield
    Author

    @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?

  8. shuntfield commented on Oct 27, 2022

    @shuntfield
    Author

    I'm not sure that I am configuring the sensor correctly or if HASS Agent does what I want it to do:

    image

    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!

  9. blair287 commented on Oct 30, 2022

    @blair287

    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.

  10. LAB02-Admin commented on Nov 1, 2022

    @LAB02-Admin
    Member

    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

  11. shuntfield commented on Nov 1, 2022

    @shuntfield
    Author

    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 πŸ‘πŸ»

  12. LAB02-Admin commented on Nov 9, 2022

    @LAB02-Admin
    Member

    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

  13. shuntfield commented on Nov 9, 2022

    @shuntfield
    Author

    @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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions