flexiblepower / s2-ws-json

A WebSockets and JSON based protocol specification implementing the EN50491-12-2 "S2" standard for home and building energy management
Apache License 2.0
25 stars 2 forks source link

Should't Duration be in seconds? #4

Closed lfse-slafleur closed 1 year ago

lfse-slafleur commented 1 year ago

https://github.com/flexiblepower/s2-ws-json/blob/62654ecf429ba5b8acaf4ea6adab0334c2047d09/s2-asyncapi/s2-cem.yaml#L66

In S2 specification Duration is measured in seconds, not milliseconds.

lfse-slafleur commented 1 year ago

What do you think? @wilcowijbrandi

wilcowijbrandi commented 1 year ago

The S2 specification indeed states it should be seconds (but it doesn't say it should be an integer, so you could have sub-second durations), but we decided to use milliseconds in our s2-ws-json implementation since this is more natural to most programmers.

So for s2-ws-json it should be milliseconds.