| LightHub v4.0.0 Smarthome controller firmware

Classes | Enumerations | Functions | Variables
main.h File Reference
`#include "options.h"`
`#include "streamlog.h"`
`#include "DallasTemperature.h"`
`#include <ModbusMaster.h>`
`#include "owTerm.h"`
`#include "dmx.h"`
`#include <Ethernet.h>`
`#include "Arduino.h"`
`#include "utils.h"`
`#include "textconst.h"`
`#include <PubSubClient.h>`
`#include <SPI.h>`
`#include <string.h>`
`#include "aJSON.h"`
`#include <Cmd.h>`
`#include "stdarg.h"`
`#include "item.h"`
`#include "inputs.h"`

Go to the source code of this file.

## Classes
union | UID

## Enumerations
enum | lan_status { INITIAL_STATE = 0, AWAITING_ADDRESS = 1, HAVE_IP_ADDRESS = 2, LIBS_INITIALIZED = 3, IP_READY_CONFIG_LOADED_CONNECTING_TO_BROKER = 4, RETAINING_COLLECTING = 5, OPERATION = 6, OPERATION_NO_MQTT = 7, DO_REINIT = -10, REINIT = - 11, DO_RECONNECT = 12, RECONNECT = 13, READ_RE_CONFIG = 14, DO_READ_RE_CONFIG = 15, DO_NOTHING = -15 }

## Functions
bool | isNotRetainingStatus ()
void | mqttCallback (char *topic, byte *payload, unsigned int length)
void | printMACAddress ()
lan_status | lanLoop ()
void | Changed (int i, DeviceAddress addr, float currentTemp)
void | modbusIdle (void)
int | cmdFunctionHelp (int arg_cnt, char **args)
int | cmdFunctionKill (int arg_cnt, char **args)
void | applyConfig ()
int | cmdFunctionLoad (int arg_cnt, char **args)
int | loadConfigFromEEPROM ()
int | cmdFunctionSave (int arg_cnt, char **args)
int | cmdFunctionSetMac (int arg_cnt, char **args)
int | cmdFunctionGet (int arg_cnt, char **args)
int | cmdFunctionLoglevel (int arg_cnt, char **args)
void | printBool (bool arg)
int | loadConfigFromHttp ()
void | preTransmission ()
void | postTransmission ()
void | setup_main ()
void | loop_main ()
void | owIdle (void)
void | inputLoop (short)
void | inputSetup (void)
void | pollingLoop (void)
void | thermoLoop (void)
short | thermoSetCurTemp (char *name, float t)
void | printConfigSummary ()
void | setupCmdArduino ()
void | setupMacAddress ()
void | printFirmwareVersionAndBuildOptions ()
bool | IsThermostat (const aJsonObject *item)
bool | disabledDisconnected (const aJsonObject *thermoExtensionArray, int thermoLatestCommand)
void | resetHard ()
void | onInitialStateInitLAN ()
void | ip_ready_config_loaded_connecting_to_broker ()
void | printCurentLanConfig ()

## Variables
Streamlog | debugSerial
Streamlog | infoSerial
Streamlog | errorSerial
lan_status | lanStatus

## Enumeration Type Documentation

## ◆ lan_status

enum lan_status

Enumerator
INITIAL_STATE |
AWAITING_ADDRESS |
HAVE_IP_ADDRESS |
LIBS_INITIALIZED |
IP_READY_CONFIG_LOADED_CONNECTING_TO_BROKER |
RETAINING_COLLECTING |
OPERATION |
OPERATION_NO_MQTT |
DO_REINIT |
REINIT |
DO_RECONNECT |
RECONNECT |
READ_RE_CONFIG |
DO_READ_RE_CONFIG |
DO_NOTHING |

## Function Documentation

## ◆ applyConfig()

void applyConfig | ( |  | ) |

## ◆ Changed()

void Changed | ( | int | i,
|  | DeviceAddress | addr,
|  | float | currentTemp
| ) |  |

## ◆ cmdFunctionGet()

int cmdFunctionGet | ( | int | arg_cnt,
|  | char ** | args
| ) |  |

## ◆ cmdFunctionHelp()

int cmdFunctionHelp | ( | int | arg_cnt,
|  | char ** | args
| ) |  |

## ◆ cmdFunctionKill()

int cmdFunctionKill | ( | int | arg_cnt,
|  | char ** | args
| ) |  |

## ◆ cmdFunctionLoad()

int cmdFunctionLoad | ( | int | arg_cnt,
|  | char ** | args
| ) |  |

## ◆ cmdFunctionLoglevel()

int cmdFunctionLoglevel | ( | int | arg_cnt,
|  | char ** | args
| ) |  |

## ◆ cmdFunctionSave()

int cmdFunctionSave | ( | int | arg_cnt,
|  | char ** | args
| ) |  |

## ◆ cmdFunctionSetMac()

int cmdFunctionSetMac | ( | int | arg_cnt,
|  | char ** | args
| ) |  |

## ◆ disabledDisconnected()

bool disabledDisconnected | ( | const aJsonObject * | thermoExtensionArray,
|  | int | thermoLatestCommand
| ) |  |

## ◆ inputLoop()

void inputLoop | ( | short |  | ) |

## ◆ inputSetup()

void inputSetup | ( | void |  | ) |

## ◆ ip_ready_config_loaded_connecting_to_broker()

void ip_ready_config_loaded_connecting_to_broker | ( |  | ) |

## ◆ isNotRetainingStatus()

bool isNotRetainingStatus | ( |  | ) |

## ◆ IsThermostat()

bool IsThermostat | ( | const aJsonObject * | item | ) |

## ◆ lanLoop()

lan_status lanLoop | ( |  | ) |

## ◆ loadConfigFromEEPROM()

int loadConfigFromEEPROM | ( |  | ) |

## ◆ loadConfigFromHttp()

int loadConfigFromHttp | ( |  | ) |

## ◆ loop_main()

void loop_main | ( |  | ) |

## ◆ modbusIdle()

void modbusIdle | ( | void |  | ) |

## ◆ mqttCallback()

void mqttCallback | ( | char * | topic,
|  | byte * | payload,
|  | unsigned int | length
| ) |  |

## ◆ onInitialStateInitLAN()

void onInitialStateInitLAN | ( |  | ) |

## ◆ owIdle()

void owIdle | ( | void |  | ) |

## ◆ pollingLoop()

void pollingLoop | ( | void |  | ) |

## ◆ postTransmission()

void postTransmission | ( |  | ) |

## ◆ preTransmission()

void preTransmission | ( |  | ) |

## ◆ printBool()

void printBool | ( | bool | arg | ) |

## ◆ printConfigSummary()

void printConfigSummary | ( |  | ) |

## ◆ printCurentLanConfig()

void printCurentLanConfig | ( |  | ) |

## ◆ printFirmwareVersionAndBuildOptions()

void printFirmwareVersionAndBuildOptions | ( |  | ) |

## ◆ printMACAddress()

void printMACAddress | ( |  | ) |

## ◆ resetHard()

void resetHard | ( |  | ) |

## ◆ setup_main()

void setup_main | ( |  | ) |

## ◆ setupCmdArduino()

void setupCmdArduino | ( |  | ) |

## ◆ setupMacAddress()

void setupMacAddress | ( |  | ) |

## ◆ thermoLoop()

void thermoLoop | ( | void |  | ) |

## ◆ thermoSetCurTemp()

short thermoSetCurTemp | ( | char * | name,
|  | float | t
| ) |  |

## Variable Documentation

## ◆ debugSerial

Streamlog debugSerial
| extern

## ◆ errorSerial

Streamlog errorSerial
| extern

## ◆ infoSerial

Streamlog infoSerial
| extern

## ◆ lanStatus

lan_status lanStatus
| extern