Skip to content

Conversation

@jenshorn
Copy link
Collaborator

There appears to have been some changes in the logbook over time and this regex should improve fetching the data.

The existing regex supports the old format
[ FCR-D ACTIVATED ] example@example.com --12345-- 97,7/0,5/99,3 % (7 kW) 2024-07-07 00:08:19 API-BACKEND
In recent logs the power is defined as (7,0/7,0 kW). There also appears to be an intermediate definition of (7/7 kW) but this regex does not handle those cases.

This new regex also handles both the failed activation logs as well as deactivation in the format of:
[ FCR-D FAIL ACTIVATION ] 54x example@example.com --12345-- 85,9/0,6/97,0 % (10,0/10,0 kW) 2025-04-24 00:02:57 API-BACKEND
[ FCR-D DEACTIVATE ] UP 49,83 Hz 0,0 % (6 kW) 2025-01-31 00:16:00 API-BACKEND

On some occasions the power is identified as INF but that is not handled by this regex.

Otherwise the changes should be backwards compatible with the note that group 8 changes from 7 to 7,0/7,0.

@jenshorn jenshorn merged commit a8711c6 into faanskit:master Aug 26, 2025
1 check failed
@jenshorn jenshorn deleted the logbook-parser branch August 26, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant