PrivateHomeIoT / ESPFirmware

This is the repo for the ESP firmware we are using in our system.
GNU General Public License v3.0
2 stars 1 forks source link

#1 - basic functionality #1

Closed maximiliani closed 3 years ago

maximiliani commented 4 years ago
maximiliani commented 4 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", ...

maximiliani commented 4 years ago

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.

maximiliani commented 4 years ago

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:

maximiliani commented 4 years ago

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.

maximiliani commented 3 years ago

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.

maximiliani commented 3 years ago

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>}