I've just today switched from IoTLink to HASS Agent to give it a go. I'm having issues getting the Satellite service to remain running as it seems to randomly stop.
I want to use the service to read CPU & GPU load & system state change to HA and to suspend the PC and start an application on command.
I've tried various methods of starting the service, from using the agent interface, the services app, and manually starting from the executable in program files. All seem to eventually fail on their own. Have also tried reinstalling the service & rebooting the PC.
The service logs don't seem to be much help as it appears to start without issue; then stops without log and restarts (i noticed the service is set to restart 2 times before doing nothing after the third crash).
2022-04-15 22:34:39.467 +12:00 [INF] [MAIN] Version: 2022.3.27.0
2022-04-15 22:34:39.490 +12:00 [INF] [MAIN] Service started, initializing ..
2022-04-15 22:34:39.576 +12:00 [INF] [WORKER] Startup completed, commencing execution ..
2022-04-15 22:34:39.578 +12:00 [INF] [SETTINGS] Config storage path: C:\Program Files (x86)\LAB02 Research\HASS.Agent Satellite Service\config
2022-04-15 22:34:39.639 +12:00 [INF] [SETTINGS] Configuration loaded
2022-04-15 22:34:39.642 +12:00 [INF] [SETTINGS] MQTT configuration loaded
2022-04-15 22:34:39.649 +12:00 [INF] Application started. Hosting environment: Production; Content root path: C:\Program Files (x86)\LAB02 Research\HASS.Agent Satellite Service\
2022-04-15 22:34:39.660 +12:00 [INF] [SETTINGS_COMMANDS] Loaded 2 entities
2022-04-15 22:34:44.304 +12:00 [INF] [SETTINGS_SENSORS] Loaded 3 entities
2022-04-15 22:34:44.305 +12:00 [INF] [MQTT] Identifying as device: AIDAN-PC-satellite
2022-04-15 22:34:44.311 +12:00 [INF] [RPCMANAGER] Listening
2022-04-15 22:34:44.312 +12:00 [INF] [MQTT] Connecting ..
2022-04-15 22:34:44.355 +12:00 [INF] [MQTT] Connected
2022-04-15 22:34:46.330 +12:00 [INF] [MQTT] Initial registration completed
2022-04-15 22:38:28.147 +12:00 [INF] [MAIN] Version: 2022.3.27.0
2022-04-15 22:38:28.169 +12:00 [INF] [MAIN] Service started, initializing ..
2022-04-15 22:38:28.257 +12:00 [INF] [WORKER] Startup completed, commencing execution ..
2022-04-15 22:38:28.258 +12:00 [INF] [SETTINGS] Config storage path: C:\Program Files (x86)\LAB02 Research\HASS.Agent Satellite Service\config
2022-04-15 22:38:28.319 +12:00 [INF] [SETTINGS] Configuration loaded
2022-04-15 22:38:28.323 +12:00 [INF] [SETTINGS] MQTT configuration loaded
2022-04-15 22:38:28.330 +12:00 [INF] Application started. Hosting environment: Production; Content root path: C:\Program Files (x86)\LAB02 Research\HASS.Agent Satellite Service\
2022-04-15 22:38:28.340 +12:00 [INF] [SETTINGS_COMMANDS] Loaded 2 entities
2022-04-15 22:38:32.994 +12:00 [INF] [SETTINGS_SENSORS] Loaded 3 entities
2022-04-15 22:38:32.996 +12:00 [INF] [MQTT] Identifying as device: AIDAN-PC-satellite
2022-04-15 22:38:33.001 +12:00 [INF] [MQTT] Connecting ..
2022-04-15 22:38:33.001 +12:00 [INF] [RPCMANAGER] Listening
2022-04-15 22:38:33.046 +12:00 [INF] [MQTT] Connected
2022-04-15 22:38:35.016 +12:00 [INF] [MQTT] Initial registration completed
2022-04-15 22:38:58.269 +12:00 [INF] [SETTINGS] Configuration stored
2022-04-15 22:38:58.270 +12:00 [INF] [SETTINGS] Received MQTT settings stored
2022-04-15 22:38:58.270 +12:00 [INF] [MQTT] Reloading configuration ..
2022-04-15 22:38:58.276 +12:00 [INF] [MQTT] Initializing ..
2022-04-15 22:38:58.276 +12:00 [INF] [MQTT] Identifying as device: AIDAN-PC-satellite
2022-04-15 22:38:58.276 +12:00 [INF] [MQTT] Connecting ..
2022-04-15 22:38:58.312 +12:00 [INF] [MQTT] Connected
2022-04-15 22:39:00.283 +12:00 [INF] [MQTT] Initial registration completed
I have also looked into the agent logs but the errors in there seem rather mundane from log write errors
2022-04-15 21:28:46.329 +12:00 [FTL] [PROGRAM] FirstChanceException: The process cannot access the file 'C:\Users\aidan\AppData\Roaming\HASS.Agent\logs\[2022-04-15] HASS.Agent_20220415_019.log' because it is being used by another process.
System.IO.IOException: The process cannot access the file 'C:\Users\aidan\AppData\Roaming\HASS.Agent\logs\[2022-04-15] HASS.Agent_20220415_019.log' because it is being used by another process.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.File.Open(String path, FileMode mode, FileAccess access, FileShare share)
at Serilog.Sinks.File.FileSink..ctor(String path, ITextFormatter textFormatter, Nullable`1 fileSizeLimitBytes, Encoding encoding, Boolean buffered, FileLifecycleHooks hooks)
at Serilog.Sinks.File.RollingFileSink.OpenFile(DateTime now, Nullable`1 minSequence)
To IO operation aborts, likely because I was restarting the agent (there are quite a few variations of these)
2022-04-15 23:18:43.494 +12:00 [FTL] [PROGRAM] FirstChanceException: The I/O operation has been aborted because of either a thread exit or an application request.
System.Net.HttpListenerException (995): The I/O operation has been aborted because of either a thread exit or an application request.
at System.Net.HttpListener.EndGetContext(IAsyncResult asyncResult)
Upgraded to WIndows 11 before the install if that helps at all.
Any advice on how to further debug this would be appreciated. If you need more info about the setup I should be able to get you what you want.