Инструменты пользователя

Инструменты сайта


конфигурирование

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Следующая версия
Предыдущая версия
Следующая версия Следующая версия справа и слева
конфигурирование [2019/01/09 02:37]
farlake создано
конфигурирование [2021/05/06 22:14]
95.221.162.48
Строка 1: Строка 1:
 # Boot sequence: # Boot sequence:
 +
 * Trying to load JSON config from NVRAM. If config is valid JSON structure - start to operating (to avoid dependance from network and allow local control) * Trying to load JSON config from NVRAM. If config is valid JSON structure - start to operating (to avoid dependance from network and allow local control)
 * Trying to retrieve MAC address, stored in NVRAM. If ok - using retrieved MAC. If not - using CUSTOM_FIRMWARE_MAC (see compilers directives). If not configured - using hardcoded DEFAULT_FIRMWARE_MAC = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0} * Trying to retrieve MAC address, stored in NVRAM. If ok - using retrieved MAC. If not - using CUSTOM_FIRMWARE_MAC (see compilers directives). If not configured - using hardcoded DEFAULT_FIRMWARE_MAC = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0}
Строка 11: Строка 12:
 # Operation # Operation
 During normal operation, controller: During normal operation, controller:
 +
 * Accepting incoming MQTT message flow and retrieving item name from topic name. For example, /myhome/in/item1 will control "item1" * Accepting incoming MQTT message flow and retrieving item name from topic name. For example, /myhome/in/item1 will control "item1"
 * Controlling items. * Controlling items.
Строка 17: Строка 19:
  
 # Useful CLI commands: # Useful CLI commands:
 +
 * mac 11:22:33:44:55:66  - writing custom MAC address to NVRAM * mac 11:22:33:44:55:66  - writing custom MAC address to NVRAM
 * save - writing currently loaded config from RAM to NVRAM * save - writing currently loaded config from RAM to NVRAM
Строка 23: Строка 26:
 * load - load config from NVRAM * load - load config from NVRAM
 * kill - test watchdog timer (normally, causes reboot) * kill - test watchdog timer (normally, causes reboot)
 +
 +CLI commands must be send via serial port with 115200 baud rate / 8N1 params: 8 data bits, no parity bit, 1 stop bit.
 +
 +Example via shell:
 +```
 +> stty -f /dev/cu.usbmodem146101 ispeed 115200 ospeed 115200 -parenb cs8 cstopb
 +> echo "ip" > /dev/cu.usbmodem146101
 +> cat /dev/cu.usbmodem146101
 +```
 +
 +Same can be done via GUI e.g. from Arduino IDE (serial monitor). Serial port must be configured (MacOSX config file ~/Library/Arduino15/preferences.txt)
 +```
 +serial.databits=8
 +serial.stopbits=1
 +serial.parity=N
 +serial.debug_rate=115200
 +serial.line_ending=1
 +```
  
 The example of config files you can find in config folder The example of config files you can find in config folder
Строка 55: Строка 76:
 # Item types: # Item types:
 ``` ```
-#define CH_DIMMER 0    //DMX out 1 ch + CH_DIMMER 0    //DMX out 1 ch 
-#define CH_RGBW    1   //DMX out 4 ch + CH_RGBW    1   //DMX out 4 ch 
-#define CH_RGB       //DMX out 3 ch + CH_RGB       //DMX out 3 ch 
-#define CH_PWM       //PWM output directly to PIN + CH_PWM       //PWM output directly to PIN 
-#define CH_MODBUS  4   //Modbus AC Dimmer + CH_MODBUS  4   //Modbus AC Dimmer 
-#define CH_THERMO  5   //Simple ON/OFF thermostat + CH_THERMO  5   //Simple ON/OFF thermostat 
-#define CH_RELAY     //ON_OFF relay output + CH_RELAY     //ON_OFF relay output 
-#define CH_GROUP    //Group pseudochannel + CH_GROUP    //Group pseudochannel 
-#define CH_VCTEMP  8  //Vacom PID thermo - regulator (Ventilation set) + CH_VCTEMP  8  //Vacom PID thermo - regulator (Ventilation set) 
-#define CH_VC      9  //Vacom modbus motor regulator+ CH_VC      9  //Vacom modbus motor regulator 
 + CH_AC 10      //Air Conditioner Haier 
 + CH_SPILED 11  //  
 + CH_MOTOR  12 
 + CH_PID   13 
 + CH_MBUS  14 
 + CH_MULTIVENT 18 
 ``` ```
    
конфигурирование.txt · Последнее изменение: 2023/10/22 01:27 — Admin