vcs.slashdirt.org Git - sw/tic2json.git/log
Version 2.6
tic2json: ensure dot decimal separator in JSON output
PME-PMI: support TGPHI
NB: sole (lazy) use of "float" conversion (in printf).
PME-PMI have a fixed 7-digit maximum precision which the float print
conversion restricted to 2 digits after separator should still match.
update '-V' copyright years
tools/ticprocess.py: fix RTE API check start time
Improve doc
tools/ticprocess.py: ensure RTE start date is future
Just in case the API suddenly decides to serve old data by default
tools/ticprocess.py: quick hack to use RTE API
Provide RTE_CLIENT_ID and RTE_CLIENT_SECRET to enable the use of the RTE
Tempo API[1] to provide early access to next day color, to be published
via MQTT.
When next day color is provided by the output of tic2json, it takes
precedence.
[1] https://data.rte-france.com/catalog/-/api/consumption/Tempo-Like-Supply-Contract/v1.1
tools/ticprocess.py: process only when needed
tools/ticprocess.py: publish power
Version 2.5
fix STGE output & processing
Version 2.4
tools/ticprocess: parse TEMPO
tools/ticprocess: improve delest signal, reorder code
Use an exponential moving average for tracking max load, used to
implement a "cooldown" before the MQTT "delest" signal is reset.
tic2json: TIC v02: PJOURF+1/PPOINTE decoder
tic.h: remove unused T_DATE
ticprocess.py: add support for MSG1
Document ISO 8601 horodates
Version 2.3
flex: use --never-interactive
Ensures flex does not try to call isatty() which is no longer defined
since we use nounistd.
tic2json: parse PME-PMI horodates
tic: disambiguate PME-PMI kVA/kW units
tic2json: support PME-PMI
PME-PMI: working parser
PME-PMI: working lexer
Version 2.2
tic2json: add extra closing space
Update README/ChangeLog, tag version 2.2
embedded: remove non-functional ARM-Mbed stub
embedded: esptic: carve out to separate repository
http://vcs.slashdirt.org/git/sw/ESP/esptic2udp.git
Add tools/ticprocess.py
A simple script matching my current needs :)
Add gitignore
README: add note
embedded: esptic: correctly support IPV6
Fixes: c88d2e3a
Move source to `src`
Avoid infinite recursion in `embedded`
tic2json: tic2json_main(): fix dictionary frame delimiter
Fixes: 3099940
update README
embedded: esptic: update README
embedded: esptic: support LED blinking on ESP*
ESP32 requires gpio direction to be set to INPUT_OUTPUT for reading
output GPIO value. This is not available / needed for ESP8266
embedded: esptic: Kconfig reorder/improvements
embedded: esptic: blink only when receiving frames
Don't use a task just to blink an LED.
Improve status reporting:
- LED on static when boot complete
- LED blinks after each received frame
This contradicts Enedis-NOI-CPT_02E / 3.3 but is IMO clearer (blink, i.e.
heartbeat when data is received).
tic2json: ticframecb: add "valid" argument.
Enables to only process valid frames.
Used in embedded / esptic to only send valid frames on the wire.
tic2json_main(): add optflags param
tic2json: move optflags enum and ticframecb_t to header
Rename OPT_* to TIC2JSON_OPT_* to avoid namespace collisions.
Pave the way for easier use of tic2json_main() within embedded apps.
embedded: esptic: add LED heartbeat task
embedded: esptic: move TIC parsing to separate task
app_main() runs from uiT with prio 14: way too high
embedded: esptic: implement an UDP client
This implements a barebone UDP client: it reads TIC frames from the UART
and pushes JSON-formatted UDP packets to a remote party.
tic2json_main(): add `yyin` argument
Allows specifying the input FILE for the parsers.
tic2json: introduce PRINT2BUF
This commit implements a wrapper around print routines that will output
JSON to a buffer provided to tic2json_main(). If the `cb` parameter is
not NULL, this callback will be called before the content of the buffer
are overwritten, after each frame that would normally be printed by the
program.
s/printf/ticprintf/ and define ticprintf -> printf
Update README/ChangeLog, mark version 2.1
Improve code documentation
tic2json_main(): print error message to stderr
Make etiq_en an array of bool
tic2json: implement '-V' to show version
embedded: add ARM Mbed stub
lexers: %option nounistd
We don't need it, it's not always available on embedded platforms
tic2json: unistd.h is not needed for BAREBUILD
Add missing semicolon in parsers' start rule
Purely for the sake of consistency, the generated code is unchanged.
README: add note about embedded stubs
embedded/ESP: fix component CMakeLists
Add build recipes for Raspberry Pi Pico SDK
This commit adds recipes for a quick implementation of tic2json on
Raspberry Pi Pico SDK.
The included main() stub sets up a serial conversion with raw TIC on
input (RX) and JSON on output (TX).
The build recipe is hackish, but it get things done.
README: add snapshot, explicit GPLv2-only
BAREBUILD: s/ticmain/tic2json_main/
Add build recipes for ESP8266/ESP32 FreeRTOS IDF
This commit adds recipes for a quick implementation of tic2json on
Espressif FreeRTOS IDF SDK. It builds identically for ESP8266 and ESP32
(tested only on ESP8266).
The included main_app() stub sets up a serial conversion with raw TIC
on input (RX) and JSON on output (TX).
The build recipe is hackish, but it get things done.
Makefile: add 'csources' target
Enables an easy way to generate C sources from .l/.y files
README: switch to markdown
add LICENSE.md
Simplify building BAREBUILD
This simplifies building for a barebone MCU: a separate 'ticmain()' is
provided instead of main(), all unnecessary bits are disabled and only
one TIC version is supported at a time.
don't report errors in lexers by default
The parser will take care of that anyway. This reduces chatter during
initial sync.
Errors will still be reported in debug mode.
ticv02.l: separate etiquettes from data processing
Following the previous commit and to avoid a similar issue in standard
mode, apply the same recipe:
Use an exclusive start condition to process data.
Logic: when we encounter the first SEP in INITIAL condition, everything
that comes after is DATA and not etiquette until we start a new dataset.
Only change states at delimiters and use condition catchalls for them to
ensure resync in case of data errors.
This makes initial frame sync a little more error-verbose.
ticv01.l: separate etiquettes from data processing
Rationale: data can contain etiquettes patterns, for instance:
{ "label": "OPTARIF", "data": "BASE"}
{ "label": "BASE", "data":
13205849}
Use an exclusive start condition to process data.
Logic: when we encounter the first SEP in INITIAL condition, everything
that comes after is DATA and not etiquette until we start a new dataset.
Only change states at delimiters and use condition catchalls for them to
ensure resync in case of data errors.
This makes initial frame sync a little more error-verbose.
tic2json: correct spelling for mandatory options
ticv01 lexer: fix desc typo
tic2json: remove useless variable
Bump version, update ChangeLog
update README
parser TICv01: specify which meters are supported
TICv01: support des étiquettes propres au concentrateur téléreport
doc
print_field(): const arg
parser v02: move etiquette error to recursive rule
matches v01
Further split out parser from output producer
rename tic2json.h -> tic.h
minor cleanup no code change
make filter_mode a bool
hook both versions
Makefile: prepare to support multiple versions
parser v02: disambiguate parse_config
Add lexer/parser for v01
ticv02: add prefixes to lexer/parser
rename tic2json.y to ticv02.y
carve out output formatting from the parser
rename tic2json.l to ticv02.l
Update ChangeLog
bump version number
parser: add option to decode STGE
parser: static local functions
parser: report frame status in dictionary mode
add ChangeLog
tic2json TIC parser/converter
RSS
Atom