EnigmaIOT  0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
Macros | Variables
EnigmaIoTconfigAdvanced.h File Reference

Parameter configuration. More...

#include "Arduino.h"

Go to the source code of this file.

Macros

#define ENABLE_REST_API   1
 Set to 1 to enable REST API. More...
 
#define SUPPORT_HA_DISCOVERY   1
 Set to 1 to enable HomeAssistant autodiscovery support. More...
 
#define USE_FLASH_INSTEAD_RTC   0
 Use flash instead RTC for temporary context data. ATTENTION: This allows connection to survive power off cycles but may damage flash memory persistently. More...
 
#define HA_FIRST_DISCOVERY_DELAY   5000
 
#define HA_NEXT_DISCOVERY_DELAY   500
 
#define HA_FIRST_DISCOVERY_DELAY_SLEEPY   10
 
#define HA_NEXT_DISCOVERY_DELAY_SLEEPY   10
 
#define CYPHER_TYPE   ChaChaPoly
 

Variables

static const uint8_t MAX_MESSAGE_LENGTH = 250
 Maximum payload size on ESP-NOW. More...
 
static const uint8_t MAX_DATA_PAYLOAD_LENGTH = 214
 Maximum EnigmaIOT user data payload size. More...
 
static const size_t ENIGMAIOT_ADDR_LEN = 6
 Address size. Mac address = 6 bytes. More...
 
static const uint8_t NETWORK_NAME_LENGTH = 21
 Maximum number of characters of network name. More...
 
static const uint8_t NODE_NAME_LENGTH = 33
 Maximum number of characters of node name. More...
 
static const uint8_t BROADCAST_ADDRESS [] = { 0xff,0xff,0xff,0xff,0xff,0xff }
 Broadcast address. More...
 
static const char BROADCAST_NONE_NAME [] = "broadcast"
 Name to reference broadcast node. More...
 
static const uint8_t COMMS_QUEUE_SIZE = 5
 
static const int OTA_GW_TIMEOUT = 11000
 OTA mode timeout. In OTA mode all data messages are ignored. More...
 
static const bool DISCONNECT_ON_DATA_ERROR = true
 Activates node invalidation in case of data error. More...
 
static const char HA_DISCOVERY_PREFIX [] = "homeassistant"
 Used to build HomeAssistant discovery message topic. More...
 
static const uint32_t OTA_TIMEOUT_TIME = 10000
 Timeout between OTA messages. In milliseconds. More...
 
static const int MIN_SYNC_ACCURACY = 5000
 If calculated offset absolute value is higher than this value resync is done more often. us units. More...
 
static const int MAX_DATA_PAYLOAD_SIZE = 214
 Maximun payload size for data packets. More...
 
static const bool CHECK_COMM_ERRORS = true
 Try to reconnect in case of communication errors. More...
 
static const uint32_t RTC_ADDRESS = 8
 RTC memory address where to store context. Modify it if you need place to store your own data during deep sleep. Take care not to overwrite above that address. It is 8 to give space for FailSafeMode library. More...
 
const uint8_t KEY_LENGTH = 32
 Key length used by selected crypto algorythm. The only tested value is 32. Change it only if you know what you are doing. More...
 
const uint8_t IV_LENGTH = 12
 Initalization vector length used by selected crypto algorythm. More...
 
const uint8_t TAG_LENGTH = 16
 Authentication tag length. For Poly1305 it is always 16. More...
 
const uint8_t AAD_LENGTH = 8
 Number of bytes from last part of key that will be used for additional authenticated data. More...
 
const int WEB_API_PORT = 80
 TCP port where Web API will listen through. More...
 

Detailed Description

Parameter configuration.

Version
0.9.8
Date
15/07/2021
Author
German Martin

Definition in file EnigmaIoTconfigAdvanced.h.

Macro Definition Documentation

◆ CYPHER_TYPE

#define CYPHER_TYPE   ChaChaPoly

Definition at line 74 of file EnigmaIoTconfigAdvanced.h.

◆ ENABLE_REST_API

#define ENABLE_REST_API   1

Set to 1 to enable REST API.

Definition at line 36 of file EnigmaIoTconfigAdvanced.h.

◆ HA_FIRST_DISCOVERY_DELAY

#define HA_FIRST_DISCOVERY_DELAY   5000

Definition at line 57 of file EnigmaIoTconfigAdvanced.h.

◆ HA_FIRST_DISCOVERY_DELAY_SLEEPY

#define HA_FIRST_DISCOVERY_DELAY_SLEEPY   10

Definition at line 63 of file EnigmaIoTconfigAdvanced.h.

◆ HA_NEXT_DISCOVERY_DELAY

#define HA_NEXT_DISCOVERY_DELAY   500

Definition at line 60 of file EnigmaIoTconfigAdvanced.h.

◆ HA_NEXT_DISCOVERY_DELAY_SLEEPY

#define HA_NEXT_DISCOVERY_DELAY_SLEEPY   10

Definition at line 66 of file EnigmaIoTconfigAdvanced.h.

◆ SUPPORT_HA_DISCOVERY

#define SUPPORT_HA_DISCOVERY   1

Set to 1 to enable HomeAssistant autodiscovery support.

Definition at line 39 of file EnigmaIoTconfigAdvanced.h.

◆ USE_FLASH_INSTEAD_RTC

#define USE_FLASH_INSTEAD_RTC   0

Use flash instead RTC for temporary context data. ATTENTION: This allows connection to survive power off cycles but may damage flash memory persistently.

Definition at line 54 of file EnigmaIoTconfigAdvanced.h.

Variable Documentation

◆ AAD_LENGTH

const uint8_t AAD_LENGTH = 8

Number of bytes from last part of key that will be used for additional authenticated data.

Definition at line 73 of file EnigmaIoTconfigAdvanced.h.

◆ BROADCAST_ADDRESS

const uint8_t BROADCAST_ADDRESS[] = { 0xff,0xff,0xff,0xff,0xff,0xff }
static

Broadcast address.

Definition at line 26 of file EnigmaIoTconfigAdvanced.h.

◆ BROADCAST_NONE_NAME

const char BROADCAST_NONE_NAME[] = "broadcast"
static

Name to reference broadcast node.

Definition at line 27 of file EnigmaIoTconfigAdvanced.h.

◆ CHECK_COMM_ERRORS

const bool CHECK_COMM_ERRORS = true
static

Try to reconnect in case of communication errors.

Definition at line 50 of file EnigmaIoTconfigAdvanced.h.

◆ COMMS_QUEUE_SIZE

const uint8_t COMMS_QUEUE_SIZE = 5
static

Definition at line 28 of file EnigmaIoTconfigAdvanced.h.

◆ DISCONNECT_ON_DATA_ERROR

const bool DISCONNECT_ON_DATA_ERROR = true
static

Activates node invalidation in case of data error.

Definition at line 33 of file EnigmaIoTconfigAdvanced.h.

◆ ENIGMAIOT_ADDR_LEN

const size_t ENIGMAIOT_ADDR_LEN = 6
static

Address size. Mac address = 6 bytes.

Definition at line 23 of file EnigmaIoTconfigAdvanced.h.

◆ HA_DISCOVERY_PREFIX

const char HA_DISCOVERY_PREFIX[] = "homeassistant"
static

Used to build HomeAssistant discovery message topic.

Definition at line 41 of file EnigmaIoTconfigAdvanced.h.

◆ IV_LENGTH

const uint8_t IV_LENGTH = 12

Initalization vector length used by selected crypto algorythm.

Definition at line 71 of file EnigmaIoTconfigAdvanced.h.

◆ KEY_LENGTH

const uint8_t KEY_LENGTH = 32

Key length used by selected crypto algorythm. The only tested value is 32. Change it only if you know what you are doing.

Definition at line 70 of file EnigmaIoTconfigAdvanced.h.

◆ MAX_DATA_PAYLOAD_LENGTH

const uint8_t MAX_DATA_PAYLOAD_LENGTH = 214
static

Maximum EnigmaIOT user data payload size.

Definition at line 22 of file EnigmaIoTconfigAdvanced.h.

◆ MAX_DATA_PAYLOAD_SIZE

const int MAX_DATA_PAYLOAD_SIZE = 214
static

Maximun payload size for data packets.

Definition at line 48 of file EnigmaIoTconfigAdvanced.h.

◆ MAX_MESSAGE_LENGTH

const uint8_t MAX_MESSAGE_LENGTH = 250
static

Maximum payload size on ESP-NOW.

Definition at line 21 of file EnigmaIoTconfigAdvanced.h.

◆ MIN_SYNC_ACCURACY

const int MIN_SYNC_ACCURACY = 5000
static

If calculated offset absolute value is higher than this value resync is done more often. us units.

Definition at line 47 of file EnigmaIoTconfigAdvanced.h.

◆ NETWORK_NAME_LENGTH

const uint8_t NETWORK_NAME_LENGTH = 21
static

Maximum number of characters of network name.

Definition at line 24 of file EnigmaIoTconfigAdvanced.h.

◆ NODE_NAME_LENGTH

const uint8_t NODE_NAME_LENGTH = 33
static

Maximum number of characters of node name.

Definition at line 25 of file EnigmaIoTconfigAdvanced.h.

◆ OTA_GW_TIMEOUT

const int OTA_GW_TIMEOUT = 11000
static

OTA mode timeout. In OTA mode all data messages are ignored.

Definition at line 31 of file EnigmaIoTconfigAdvanced.h.

◆ OTA_TIMEOUT_TIME

const uint32_t OTA_TIMEOUT_TIME = 10000
static

Timeout between OTA messages. In milliseconds.

Definition at line 46 of file EnigmaIoTconfigAdvanced.h.

◆ RTC_ADDRESS

const uint32_t RTC_ADDRESS = 8
static

RTC memory address where to store context. Modify it if you need place to store your own data during deep sleep. Take care not to overwrite above that address. It is 8 to give space for FailSafeMode library.

Definition at line 52 of file EnigmaIoTconfigAdvanced.h.

◆ TAG_LENGTH

const uint8_t TAG_LENGTH = 16

Authentication tag length. For Poly1305 it is always 16.

Definition at line 72 of file EnigmaIoTconfigAdvanced.h.

◆ WEB_API_PORT

const int WEB_API_PORT = 80

TCP port where Web API will listen through.

Definition at line 77 of file EnigmaIoTconfigAdvanced.h.