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: Can't remove commands from Satellite Service #162

Open
2 of 4 tasks
iamthekings5 opened this issue Sep 21, 2024 · 7 comments
Open
2 of 4 tasks

Bug: Can't remove commands from Satellite Service #162

iamthekings5 opened this issue Sep 21, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@iamthekings5
Copy link

iamthekings5 commented Sep 21, 2024

Describe the bug
I can't remove commands from satellie service, after saving and reopening the commands aren't saved.

Expected behavior
Commands should be saved.

Misc info

  • Windows' UI language: English
  • HASS.Agent version: 2.1.0 beta 4

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

  • Installed via installer
  • Installed manually
  • Problem occurs in HASS.Agent
  • Problem occurs in Satellite Service
@iamthekings5 iamthekings5 added the bug Something isn't working label Sep 21, 2024
@iamthekings5 iamthekings5 changed the title Bug: Bug: Can't remove commands from Satellite Service Sep 21, 2024
@amadeo-alex
Copy link
Collaborator

Hello, the title states that you cannot remove the commands but in the description you mention adding them. Could you please provide more details so I can understand it?

@iamthekings5
Copy link
Author

Hello, the title states that you cannot remove the commands but in the description you mention adding them. Could you please provide more details so I can understand it?

Hi,

Sorry for the conflicting information. I added 5 commands to the satellite service which was successful. I wanted to remove 2 of them, but am unable to do so. When I click save the commands appear to have been removed but reopening the commands window will show they are still there.

@amadeo-alex
Copy link
Collaborator

Could you please check the satellite logs for a line like this:

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

Default path for it is "C:\Program Files\HASS.Agent Satellite Service\Service", inside there should be "logs" folder and then the newest log file.

@iamthekings5
Copy link
Author

iamthekings5 commented Sep 29, 2024

Here is my log, I tried to remove 3 of 5 commands saved:

2024-09-29 09:01:45.847 +01:00 [INF] [MAIN] Version: 2.1.0.0

2024-09-29 09:01:45.888 +01:00 [INF] [MAIN] Service started, initializing ..
2024-09-29 09:01:46.000 +01:00 [INF] [MAIN] Running as a service, initializing lifetime manager
2024-09-29 09:01:46.045 +01:00 [INF] [LIFETIMEMANAGER] Initialized
2024-09-29 09:01:46.116 +01:00 [INF] [WORKER] Startup completed, commencing execution ..
2024-09-29 09:01:49.028 +01:00 [INF] [SETTINGS] Config storage path: C:\Program Files\HASS.Agent Satellite Service\Service\config
2024-09-29 09:01:49.148 +01:00 [INF] [SETTINGS] Configuration loaded
2024-09-29 09:01:49.154 +01:00 [INF] [SETTINGS] MQTT configuration loaded
2024-09-29 09:01:49.160 +01:00 [INF] Application started. Hosting environment: Production; Content root path: C:\Program Files\HASS.Agent Satellite Service\Service
2024-09-29 09:01:49.173 +01:00 [INF] [SETTINGS_COMMANDS] Loaded 5 entities
2024-09-29 09:01:49.175 +01:00 [INF] [SETTINGS_SENSORS] Config not found, no entities loaded
2024-09-29 09:01:49.178 +01:00 [INF] [MQTT] Identifying as device: Laptop-Satellite
2024-09-29 09:01:49.197 +01:00 [INF] [MQTT] Connecting ..
2024-09-29 09:01:49.204 +01:00 [INF] [RPCMANAGER] Listening
2024-09-29 09:01:49.250 +01:00 [INF] [MQTT] Connected
2024-09-29 09:01:51.194 +01:00 [INF] [MQTT] Initial registration completed
2024-09-29 15:14:55.831 +01:00 [INF] [SYSTEMSTATE] Session ending: system shutting down
2024-09-29 15:14:55.834 +01:00 [INF] [SYSTEM] Service shutting down
2024-09-29 15:14:55.848 +01:00 [INF] [MQTT] Disconnected
2024-09-29 15:14:55.851 +01:00 [INF] [SYSTEM] Service shutdown complete
2024-09-29 15:14:56.330 +01:00 [INF] [WORKER] Halting ..
2024-09-29 15:14:56.352 +01:00 [INF] Application is shutting down...
2024-09-29 15:15:40.532 +01:00 [INF] [MAIN] Version: 2.1.0.0
2024-09-29 15:15:40.559 +01:00 [INF] [MAIN] Service started, initializing ..
2024-09-29 15:15:40.672 +01:00 [INF] [MAIN] Running as a service, initializing lifetime manager
2024-09-29 15:15:40.709 +01:00 [INF] [LIFETIMEMANAGER] Initialized
2024-09-29 15:15:40.756 +01:00 [INF] [WORKER] Startup completed, commencing execution ..
2024-09-29 15:15:43.754 +01:00 [INF] [SETTINGS] Config storage path: C:\Program Files\HASS.Agent Satellite Service\Service\config
2024-09-29 15:15:43.875 +01:00 [INF] [SETTINGS] Configuration loaded
2024-09-29 15:15:43.881 +01:00 [INF] [SETTINGS] MQTT configuration loaded
2024-09-29 15:15:43.891 +01:00 [INF] Application started. Hosting environment: Production; Content root path: C:\Program Files\HASS.Agent Satellite Service\Service
2024-09-29 15:15:43.903 +01:00 [INF] [SETTINGS_COMMANDS] Loaded 5 entities
2024-09-29 15:15:43.905 +01:00 [INF] [SETTINGS_SENSORS] Config not found, no entities loaded
2024-09-29 15:15:43.909 +01:00 [INF] [MQTT] Identifying as device: Laptop-Satellite
2024-09-29 15:15:43.929 +01:00 [INF] [MQTT] Connecting ..
2024-09-29 15:15:43.941 +01:00 [INF] [RPCMANAGER] Listening
2024-09-29 15:15:43.995 +01:00 [INF] [MQTT] Connected
2024-09-29 15:15:45.933 +01:00 [INF] [MQTT] Initial registration completed
2024-09-29 15:18:26.433 +01:00 [INF] [COMMANDSMANAGER] Processing 2 received command(s), deleting 5 command(s) ..
2024-09-29 15:18:26.450 +01:00 [INF] [COMMANDS] Command not removed, not activated: Shutdown
2024-09-29 15:18:26.450 +01:00 [INF] [COMMANDS] Command not removed, not activated: Restart
2024-09-29 15:18:26.450 +01:00 [INF] [COMMANDS] Command not removed, not activated: Sleep
2024-09-29 15:18:26.450 +01:00 [INF] [COMMANDS] Command not removed, not activated: Lock
2024-09-29 15:18:26.450 +01:00 [INF] [COMMANDS] Command not removed, not activated: hibernate
2024-09-29 15:18:26.468 +01:00 [INF] [COMMANDS] Modified command: Shutdown
2024-09-29 15:18:26.472 +01:00 [INF] [COMMANDS] Modified command: Restart
2024-09-29 15:18:26.528 +01:00 [INF] [SETTINGS_COMMANDS] Stored 5 entities

@boydfields
Copy link

boydfields commented Sep 29, 2024

I too am unable to remove commands. They reappear on closing/reopening window. I get around the issue by editing the json directly.

@amadeo-alex
Copy link
Collaborator

@iamthekings5 could you please test if editing the json works for you also like @boydfields mentioned?
@boydfields after editing the file manually, is it still not possible to make any changes via the UI?

Of course manual editing is not a solution, I'm trying to wrap my head around of what could be causing it.
Could you both please provide me with the sensors/commands config that you're working with?

@iamthekings5
Copy link
Author

iamthekings5 commented Oct 2, 2024

@iamthekings5 could you please test if editing the json works for you also like @boydfields mentioned? @boydfields after editing the file manually, is it still not possible to make any changes via the UI?

Of course manual editing is not a solution, I'm trying to wrap my head around of what could be causing it. Could you both please provide me with the sensors/commands config that you're working with?

Hi,

After editing the json, stopping then starting the satellite service the commands were saved successfully.

These are the commands I am running in the satellite service, I do not have any sensors for now.

[
{
"Id": "5d609822-97d6-4298-b41d-4d3206005e8c",
"Name": "Shutdown",
"EntityName": "Shutdown",
"Type": "CustomCommand",
"EntityType": "button",
"Command": "shutdown /s /t 0",
"KeyCode": 0,
"RunAsLowIntegrity": false,
"Keys": []
},
{
"Id": "013b1d32-53a9-4843-957a-b7eeb643d282",
"Name": "Restart",
"EntityName": "Restart",
"Type": "CustomCommand",
"EntityType": "button",
"Command": "shutdown /r /t 0",
"KeyCode": 0,
"RunAsLowIntegrity": false,
"Keys": []
}
]

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

3 participants