changed Proprietary Protocol; sent message 0 and 1 to topics proprietaryProtocol/<ID>/<COLOR> authored by Manfred Benesch's avatar Manfred Benesch
The [ESP32 Controller](What-am-I-looking-at-here#esp32-controller) acts as a gateway, integrating ESP32 #0, #1 and #2 (["ProprietaryLight0" through 2](What-am-I-looking-at-here#proprietarylight0-2)) into the BaSyx environment. The [ESP32 Controller](What-am-I-looking-at-here#esp32-controller) acts as a gateway, integrating ESP32 #0, #1 until #7 (["ProprietaryLight0" through 7](What-am-I-looking-at-here#proprietarylight0-7)) into the BaSyx environment.
Each one of these ESP32 is connected to one Red/Green LED. The ESP32 Controller creates and uploads two AAS per ESP32, one for each light color. It also hosts the active Submodels used to talk to the ESP32 over the proprietary protocol outlined below. The implementation of the ESP32 Controller is documented [here](implementation/ESP32-Controller-walkthrough), the implementation of the Proprietary lights themself [here](implementation/Proprietary-Light-code-walkthrough). Each one of these ESP32 is connected to one Red/Green LED. The ESP32 Controller creates and uploads two AAS per ESP32, one for each light color. It also hosts the active Submodels used to talk to the ESP32 over the proprietary protocol outlined below. The implementation of the ESP32 Controller is documented [here](implementation/ESP32-Controller-walkthrough), the implementation of the Proprietary lights themself [here](implementation/Proprietary-Light-code-walkthrough).
Please also note the instructions on [how to setup a Proprietary light](setup/Setting-up-an-ESP32). Please also note the instructions on [how to setup a Proprietary light](setup/Setting-up-an-ESP32).
...@@ -13,14 +13,14 @@ The above graphic shows the components involved with the proprietary protocol. T ...@@ -13,14 +13,14 @@ The above graphic shows the components involved with the proprietary protocol. T
The Protocol defines two MQTT topics for each light: The Protocol defines two MQTT topics for each light:
``` ```
proprietaryProtocol/<ID>/<COLOR>/on proprietaryProtocol/<ID>/<COLOR>
``` ```
and and
``` ```
proprietaryProtocol/<ID>/<COLOR>/off proprietaryProtocol/<ID>/<COLOR>
``` ```
A message to either of the topics (regardless of content) will either switch the light in question on or off. Ie. in order to switch the red LED on ProprietaryLight0 (ESP32 #0) on, one would need to send a message to Switching a ligth "on" or "off" can be archived by sending a "1" or a "0" to the corresponding topic. Ie. in order to switch the red LED on ProprietaryLight0 (ESP32 #0) on, one would need to send the message "1" to
``` ```
proprietaryProtocol/ProprietaryLight0/red/on proprietaryProtocol/ProprietaryLight0/red
``` ```
Per default configuration, valid values for `<ID>` are `ProprietaryLight0`, `ProprietaryLight0`, and `ProprietaryLight0`, valid values for `<COLOR>` are `red` and `green`. Per default configuration, valid values for `<ID>` are `ProprietaryLight0`, `ProprietaryLight1` up to and `ProprietaryLight7`, valid values for `<COLOR>` are `red` and `green`.