Replies: 2 comments 2 replies
-
S0001: It bugs me a bit to use the main component since signal group status is not really related to the main component. Would it be cleaner to have a way to address all components of a particular type? Either to get status updates from them all, or to send a command to them all. |
Beta Was this translation helpful? Give feedback.
-
I think we should use a single topic path for each status, with all attributes send in the payload:
You typically send several attributes together, and having a topic path for each attribute feels bloated and you would need to send multiple messages:
I also suspect there could be issues related ordering if you split it into several messages. For example, which value does the
|
Beta Was this translation helpful? Give feedback.
-
What is the best practice to implement the SXL in MQTT?
S0001 (signalgroupstatus):
status/<id>/main/signalgroupstatus
as a text field, just like todaystatus/<id>/main/signalgroupstatus/sg1
as separate characters, one for each signal group. The benefit is that we can handle gaps in the numbering, but it requires many separate updates - one for each signal group.I believe that the first approach is better, for efficiency.
S0007 (controller switched on)
status/<controller_id>/<intersection_id>/dark_mode/status
as booleanstatus/<controller_id>/<intersection_id>/dark_mode/source
as enum - reason for dark mode.or is it better to have JSON payload?
status/<controller_id>/<intersection_id>/dark_mode
with payload:status
asenabled
instead? I might make it easier to understand.Beta Was this translation helpful? Give feedback.
All reactions