mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 09:19:51 +03:00
updated README, removed docs
This commit is contained in:
55
doc/MQTT.md
55
doc/MQTT.md
@@ -1,55 +0,0 @@
|
||||
# **MQTT commands**
|
||||
|
||||
All commands must be written as `{"cmd":<cmd> ,"data":<data>, "id":<n>}`.
|
||||
|
||||
The `id` can be replaced with `hc` for some devices that use heating circuits, and represented either as a string or a number. `cmd` is a string, `data` can be a string or number.
|
||||
|
||||
topic = *boiler_cmd*
|
||||
```
|
||||
comfort <hot, eco, intelligent>
|
||||
flowtemp <degrees>
|
||||
wwtemp <degrees>
|
||||
boilhyston <degrees> (negative value)
|
||||
boilhystoff <degrees> (positive value)
|
||||
burnperiod <minutes>
|
||||
burnminpower <%>
|
||||
burnmaxpower <%>
|
||||
pumpdelay <minutes>
|
||||
```
|
||||
|
||||
topic = *thermostat_cmd*
|
||||
```
|
||||
--- without hc ---
|
||||
wwmode <off | on | auto>
|
||||
calinttemp <degrees>
|
||||
minexttemp <degrees>
|
||||
building <light | medium | heavy>
|
||||
language <n> (0=de, 1=nl, 2=fr, 3=it) only RC30
|
||||
display <n> (0=int temp, 1= int set, 2=ext. temp, 3=burner, 4=ww, 5=mode, 6=time, 7=date, 8=smoke) only RC30
|
||||
clockoffset <seconds> (only RC30)
|
||||
|
||||
--- with hc ---
|
||||
mode <auto | night | day | nofrost | heat | eco>
|
||||
temp <degrees>
|
||||
nighttemp <degrees>
|
||||
daytemp <degrees>
|
||||
nofrosttemp <degrees>
|
||||
ecotemp <degrees>
|
||||
heattemp <degrees>
|
||||
summertemp <degrees>
|
||||
designtemp <degrees>
|
||||
offsettemp <degrees>
|
||||
holidaytemp <degrees>
|
||||
remotetemp <degrees>
|
||||
control <0 | 1 | 2>
|
||||
pause <hours>
|
||||
party <hours>
|
||||
holiday <dd.mm.yyyy-dd.mm.yyyy>
|
||||
date <NTP | hh:mm:ss-dd.mm.yyyy-dw-dst>
|
||||
```
|
||||
|
||||
topic = *system_cmd*
|
||||
```
|
||||
send <"0B XX XX ..">
|
||||
pin <gpio> <on|off|1|0|true|false>
|
||||
```
|
||||
@@ -1,80 +0,0 @@
|
||||
# Notes on customizing the code
|
||||
|
||||
## **Basic Design Principles**
|
||||
|
||||
- The core services like telnet, logging and shell are based off the libraries from @nomis. I also adopted his general design pattens such as making everything as asynchronous as possible so that no one operation should starve another operation of it's time to execute (https://isocpp.org/wiki/faq/ctors#static-init-order).
|
||||
- All EMS devices (e.g. boiler, thermostat, solar modules, mixing units etc) are derived from a factory base class and each class handles its own registering of telegram and mqtt handlers. This makes the EMS device code easier to manage and we can extend with new telegrams types and features.
|
||||
- For debugging there is an offline mode where the code can be compiled and executed standalone without uploading to an ESP controller. Use `make` (based off GNUMakefile).
|
||||
|
||||
## **Customizing the Web UI**
|
||||
|
||||
The Web is based off Rick's awesome [esp8266-react](https://github.com/rjwats/esp8266-react/) framework. These are the files that are modified:
|
||||
|
||||
**`interface:`**
|
||||
* `.env` project name and project path to ems-esp
|
||||
* `.env.development` CORS URL
|
||||
|
||||
**`interface/public:`**
|
||||
* `app/manifest.json` ems-esp name
|
||||
* `index.html` ems-esp name
|
||||
* `app/icon.png` 256x256 PNG
|
||||
* `favicon.ico` replaced
|
||||
|
||||
**`interface/src:`**
|
||||
* `CustomMuiTheme.tsx` colors for dark mode
|
||||
* `interface/src/wifi/WifiSettingsController.tsx` rename esp8266-react
|
||||
|
||||
**`interface/src/project:`**
|
||||
* `ProjectRouting.tsx` removed demo, added paths to ems-esp/status, ems-esp/settings and *
|
||||
* `DemoProject.tsx` remove /demo/ and changed title, renamed to EMSESP.tsx
|
||||
* `ProjectMenu.tsx` title change, added /ems-esp/settings
|
||||
* `DemoInformation.tsx` removed file
|
||||
* `types.ts` add variables
|
||||
* added all custom files starting with EMSESP*
|
||||
|
||||
**`interface/src/mqtt:`**
|
||||
* `types.ts` added mqtt_fails
|
||||
* `MqttStatusForm.tsx` added MQTT Publish Errors
|
||||
* `MqttStatus.ts` added function mqttPublishHighlight
|
||||
* `MqttSettingsForm.tsx` added publish time, qos, format
|
||||
|
||||
**`interface/src/authentication:`**
|
||||
* `AuthenticationWrapper.tsx` commented out features.security because we added version
|
||||
* `AuthenticationContext.tsx` added version
|
||||
* `MqttSettingsForm.tsx` added publish time, qos, format
|
||||
|
||||
**`interface/src/components:`**
|
||||
* `MenuAppBar.tsx` added version to toolbar
|
||||
|
||||
**`interface/src/system:`**
|
||||
* `types.ts` added uptime and free_mem
|
||||
* `SystemStatusForm.tsx` added system uptime, % free mem
|
||||
|
||||
**`lib/framework`:**
|
||||
* `SystemStatus.h` added #include <LittleFS.h>, #include <uuid/log.h>, #include "../../src/system.h"
|
||||
* `SystemStatus.cpp` added LittleFS.info(fs_info); root["uptime"], root["free_mem"]
|
||||
* Commented out all `Serial.print`'s in all files
|
||||
* `MqttStatus.h` added #include "../../src/mqtt.h"
|
||||
* `MqttStatus.cpp` added root["mqtt_fails"]
|
||||
* `SecuritySettingsService.cpp` added version to the JWT payload
|
||||
* `SecuritySettingsService.h` #include "../../src/version.h"
|
||||
* `WiFiSettingsService.cpp` added WiFi.setOutputPower(20.0f), moved setHostname
|
||||
* `OTASettingsService.h` added #include "../../src/system.h"
|
||||
* `OTASettingsService.cpp` added call to emsesp::System::upload_status(true)
|
||||
* `features.ini`: -D FT_NTP=0
|
||||
* `platformio.ini` using our own version
|
||||
* `factory_settings.ini` modified with `ems-esp-neo` as password and `ems-esp` everywhere else
|
||||
|
||||
|
||||
## To develop and test the Web UI
|
||||
- uncomment the `-D ENABLE_CORS` in `platformio.ini`
|
||||
```sh
|
||||
cd interface
|
||||
npm start
|
||||
```
|
||||
|
||||
## To test the core, standalone with an ESP
|
||||
|
||||
```sh
|
||||
make run
|
||||
```
|
||||
@@ -1,72 +0,0 @@
|
||||
# **Console commands**
|
||||
|
||||
|
||||
Connecting to the console will give you more insight into the EMS bus traffic, MQTT queues and the full device information.
|
||||
|
||||
The console is reachable via Telnet (port 22) or via the Serial port if using an USB (on baud 115200). To change any settings in the console you must be admin (use `su` with the default password `ems-esp-neo`).
|
||||
|
||||
Some of the most common commands are:
|
||||
* `help` lists the commands and keywords. This works in each context.
|
||||
* `exit` will exit the console or exit the current context. `CTRL-D` does the same.
|
||||
* `CTRL-U` for Undo
|
||||
* `<TAB>` for auto-complete
|
||||
* Some specific commands are behind contexts. Think of this as a sub-menu. e.g. `system`, `thermostat`. The path will always show you which context you are in. `$` is the root.
|
||||
* `su` will switch to the Admin super-user. The default password is `ems-esp-neo` and can be changed with `passwd` from the system menu or via the Web interface (called secret password). When in Admin mode the command prompt switches from `$` to `#`.
|
||||
* Some settings can be changed in the console. The `set` command will list them.
|
||||
* `show` shows the data specific to the which context you're in. From the root it will show you all the EMS device information and any external temperature sensors.
|
||||
* `log` sets the logging level. `log off` disables logging. Use `log debug` for debugging commands and actions. This will be reset next time the console is opened.
|
||||
* `watch` will output the incoming Rx telegrams directly to the console. You can also put on a watch on a specific EMS device ID or telegram ID. Also choose to output as verbose text as raw data bytes.
|
||||
|
||||
The `call` command is to execute a command. The command names (`[cmd]`) are the same as the MQTT commands used in MQTT.
|
||||
|
||||
```
|
||||
(* = available in su/Admin mode)
|
||||
|
||||
common commands available in all contexts:
|
||||
exit
|
||||
help
|
||||
log [level]
|
||||
watch <on | off | raw> [ID]
|
||||
su
|
||||
|
||||
(from the root)
|
||||
system (enters a context)
|
||||
boiler (enters a context)
|
||||
thermostat (enters a context)
|
||||
set
|
||||
fetch
|
||||
scan devices [deep] *
|
||||
send telegram <"XX XX ..."> *
|
||||
set bus_id <device ID> *
|
||||
set tx_mode <n> *
|
||||
show
|
||||
show devices
|
||||
show ems
|
||||
show values
|
||||
show mqtt
|
||||
read <device ID> <type ID> *
|
||||
|
||||
system
|
||||
set
|
||||
show
|
||||
format *
|
||||
show users *
|
||||
passwd *
|
||||
restart *
|
||||
set wifi hostname <name> *
|
||||
set wifi password *
|
||||
set wifi ssid <name> *
|
||||
wifi reconnect *
|
||||
pin <gpio> [data] *
|
||||
|
||||
boiler
|
||||
read <type ID> *
|
||||
call [cmd] [data] *
|
||||
|
||||
thermostat
|
||||
set
|
||||
set master [device ID] *
|
||||
read <type ID> *
|
||||
call [cmd] [data] [heating circuit] *
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user