Closed maximiliani closed 3 years ago
Ports are saved in ports.txt as JSON: "{"ports":[{"port":port, "function":function, "topic":topic},{ ...}]}" Port is either "D4","D5",... or "16","18",... Function is a struct, because of the upgradeability --> #5 topic is the decrypted MQTT-topic e.g. "/1", "/2", ...
As mentioned in the comment in the WebGUI issue #3, we only want to implement three necessary configuration options. The other ones are going to be configured via encrypted MQTT.
Ports are saved in ports.txt as JSON: "{"ports":[{"port":port, "function":function},{ ...}]}" Port is either "D4","D5",... or "16","18",... Function is a struct, because of the upgradeability --> #5
Function struct is identified in JSON by the IDs:
Ports are saved in ports.txt as JSON: "{"ports":[{"port":port, "function":function},{ ...}]}" Port is either "D4","D5",... or "16","18",... Function is a struct, because of the upgradeability --> #5
The maximum length of the JSON is 32 ports.
The maximum amount of ports, which can be configured is 64. This is due to the length of the array configured ports, which is defined in jsonHandler.cpp and jsonHandler.h.
The new configuration JSON has to be published in /home/config/<ID of the main device (5 chars)><Port-SubID(1 char)>/
and has to look like: {"port":<Number` of the hardware Port as uint8_t>, "analog":<analog port? 1 or 0>, "output":<output port? 1 or 0>}