Closed jsiegenthaler closed 3 years ago
Are you talking about an independent log file, right?
Yeah. Write a log to a file on the raspberry pi. Then users can view it on their devices using Shortcuts. I do that to log people arriving and leaving.
Custom path? Or the log file can be written in the plugin installation directory for example?
Good question. I write my person logs to pi/Public and share the folder with all pi users. I think for flexibility I would suggest a logFolder config item, where the user can specify his own log folder. Then it would be up to the user to decide where, and what permissions.
PS: I'm now loving the Security System, now that I understand it. I now have it configured for automatic Home, Night and Away modes, and it broadcasts a voice message to the whole house when the alarm is triggered (I have 3 x Sonos speakers in 3 corners of the house).
Thank you for the additional details, appreciate the feedback. A beta update will be released at the weekend with the feature and its own option to configure the log path.
Thanks!
It's now available in the beta channel for testing:
npm install -g homebridge-securitysystem@beta
It will rename the log if the day changes to keep it current.
Thanks!
Thanks. i installed 4.3.0-beta.1 and will monitor it over the weekend
OK, I observed the following
I configured a path. and it was inaccessible. So I deleted the configured path, and the relevant section of the config looks like this:
"test_mode": false,
"log_directory": "",
"override_off": false,
Now the plugin throws the following error on startup:
[17/04/2021, 15:09:07] [Security System] File logger (Error)
[17/04/2021, 15:09:07] [Security System] [Error: EACCES: permission denied, open '/securitysystem.log'] {
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/securitysystem.log'
}
I think you may be only checking for a null log_directory. I then removed the config item completely Now the plugin starts without error
it looks like deleting the configured path using the config schema is insufficient to remove the config item from the config
Thanks for testing! Fixed in beta 2.
Is the implementation right? It will be released to the general public shortly.
I haven't got it working yet. Ive been busy with other stuff
Feature is now in the stable channel, feel free to reopen if there's anything you would like to change.
Thanks!
I'd like to see a separate Alarm Log
It should record:
Yes, I know it is logged to Homebridge logs
But if I come back from a few days away and the neighbors tell me my alarm was triggered, then I want to know when and why, and going through thousands of lines of Homebridge logs is slow and cumbersome.