Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Unable to create or change satellite service commands 'Sleep' and 'Shutdown' #172

Open
2 of 4 tasks
andjo opened this issue Sep 28, 2024 · 8 comments
Open
2 of 4 tasks
Labels
bug Something isn't working

Comments

@andjo
Copy link

andjo commented Sep 28, 2024

Describe the bug
Can't create Shutdown or Sleep commands in the satellite service. It appears to be working, but after reopening the configuration they are gone and there is an indication of why in the log.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Satellite Service Configuration' -> 'Commands'
  2. Click on 'Add New'
  3. Select 'Sleep' or 'Shutdown'
  4. 'Store Command'
  5. 'Send & Activate Commands'
  6. After closing and reopening the configuration they are not there.
  7. Se error in log below

Expected behavior
Sleep and Shutdown command present and working.

Screenshots
image

Misc info (please complete the following information):

  • Windows build (ideally screenshot/info of winver.exe output):
    image

  • Windows' UI language: English

  • HASS.Agent version: 2.1.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
Modifying existing commands from previous version also did not work as expected, so I removed them and tried to recreate.
#162 might be related.

Logs

2024-09-28 16:47:00.383 +02:00 [INF] [MAIN] Version: 2.0.1.0
2024-09-28 16:47:00.403 +02:00 [INF] [MAIN] Service started, initializing ..
2024-09-28 16:47:00.504 +02:00 [INF] [MAIN] Running as a service, initializing lifetime manager
2024-09-28 16:47:00.540 +02:00 [INF] [LIFETIMEMANAGER] Initialized
2024-09-28 16:47:00.568 +02:00 [INF] [WORKER] Startup completed, commencing execution ..
2024-09-28 16:47:00.892 +02:00 [INF] [SETTINGS] Config storage path: C:\Program Files\HASS.Agent\Service\config
2024-09-28 16:47:00.963 +02:00 [INF] [SETTINGS] Configuration loaded
2024-09-28 16:47:00.967 +02:00 [INF] [SETTINGS] MQTT configuration loaded
2024-09-28 16:47:00.975 +02:00 [INF] Application started. Hosting environment: Production; Content root path: C:\Program Files\HASS.Agent\Service\
2024-09-28 16:47:00.977 +02:00 [INF] [SETTINGS_COMMANDS] Loaded 0 entities
2024-09-28 16:47:00.979 +02:00 [INF] [SETTINGS_SENSORS] Config not found, no entities loaded
2024-09-28 16:47:00.985 +02:00 [INF] [MQTT] Identifying as device: LEGION_7-satellite
2024-09-28 16:47:00.998 +02:00 [INF] [MQTT] Connecting ..
2024-09-28 16:47:01.025 +02:00 [INF] [RPCMANAGER] Listening
2024-09-28 16:47:01.045 +02:00 [INF] [MQTT] Connected
2024-09-28 16:47:03.010 +02:00 [INF] [MQTT] Initial registration completed
2024-09-28 16:47:16.787 +02:00 [INF] [COMMANDSMANAGER] Processing 2 received command(s), deleting 0 command(s) ..
2024-09-28 16:47:16.792 +02:00 [ERR] [SETTINGS_COMMANDS] [sleep] Unknown configured command type: RadioCommand
2024-09-28 16:47:16.792 +02:00 [ERR] [SETTINGS_COMMANDS] [shutdown] Unknown configured command type: WebViewCommand
2024-09-28 16:47:16.802 +02:00 [INF] [SETTINGS_COMMANDS] Stored 0 entities
@andjo andjo added the bug Something isn't working label Sep 28, 2024
@amadeo-alex
Copy link
Collaborator

2024-09-28 16:47:16.792 +02:00 [ERR] [SETTINGS_COMMANDS] [sleep] Unknown configured command type: RadioCommand
2024-09-28 16:47:16.792 +02:00 [ERR] [SETTINGS_COMMANDS] [shutdown] Unknown configured command type: WebViewCommand

That's interesting to say the least?
Investigating :)

@amadeo-alex
Copy link
Collaborator

I couldn't replicate this so I took a look at the logs again

2024-09-28 16:47:00.383 +02:00 [INF] [MAIN] Version: 2.0.1.0

What we should see is

2024-09-29 15:28:14.442 +02:00 [INF] [MAIN] Version: 2.1.0.0

That means the client and satellite version is not matching, did you install the satellite service while doing upgrade? (The second installer). I might have a clue of what happened but need to ask some questions to confirm it.

@andjo
Copy link
Author

andjo commented Sep 29, 2024

Yes.

image

Tried to update again, and it appears like the service is installed, but what I have in C:\Program Files\HASS.Agent\Service\ is still 2.0.1.
Is there an installation log somewhere?

@andjo
Copy link
Author

andjo commented Sep 29, 2024

Ah, I see it has changed location. The old service is still the one running though.

@amadeo-alex
Copy link
Collaborator

When you upgrade the old service should be replaced by a new one (old from the fork, the forked HASS.Agent won't touch the original one so if both of them will be there and only one should be running)
You went from 2.0.1 straight to 2.1.0 or from one of the original versions?

@andjo
Copy link
Author

andjo commented Sep 29, 2024

I have been using the fork for a while now, and upgraded from 2.0.1 to 2.1.0.

@andjo
Copy link
Author

andjo commented Sep 29, 2024

Resolved the issue by uninstalling both "HASS.Agent" and "HASS.Agent Satelite Service" via windows settings. Then downloading the 2.1.0 release manually and installing that from scratch.

After that I could again reproduce the issue by uninstalling everything, installing 2.0.1 from scratch, and running the update via "Check for update".

Funny observation after the upgrade:

  • "HASS.Agent - About" says it is 2.1.0.
  • The running service is the one from 2.0.1
  • Windows settings says "HASS.Agent 2.0.1" and "HASS.Agent Satelite Service 2.1.0" is installed, not the other way around.

image

🤷

@amadeo-alex
Copy link
Collaborator

Thank you for the information I'll try to replicate this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants