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

Missing ActivateControlType message #7

Closed tonsmets closed 1 year ago

tonsmets commented 1 year ago

Although it is not listed in the S2 spec as a separate message, we need a mechanism to send/receive an ActivateControlType sequence. I see two options:

  1. Create a new message named ActivateControlType that simply has a message_id and control_type field. This way we also adhere to the S2 standard where a null ControlType can be sent to deactivate any selected ControlType.
  2. Extend the ControlType enum list to include a null entry that can be sent. We then do not need any parent message.

My preference goes to the first option since we then also have a message_id for this message that we can track and reply to. There is a chance we will encounter a few more of these specialty use cases so creating a set of helper messages might be needed anyway. My only concern is how we are going to communicate this or add this to the S2 spec.

Scherm­afbeelding 2023-05-24 om 07 02 03

wilcowijbrandi commented 1 year ago

Hi Tom,

I think the SelectControlType message already covers it. The ControlType enum already contains an item for explicitly selecting no control type.

Please close the issue if this solved your problem.

Cheers, Wilco

tonsmets commented 1 year ago

Wow how did I miss that. You are right! Let's use the SelectControlType for this case!