/
NovAl
/
rust_rules
Обзор
Документация
Войти
/
NovAl
/
rust_rules
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
rust_rules_config.toml
47 строк
2 KB
Novikov Aleksandr
Первый коммит: проект без target и бинарников
21 июл 2026, 22:09
21 июл 2026, 22:09
f6008f1
Код
Авторство
О чём код?
[broker] host = "localhost" port = 1883 command_suffix = "/on" # для Wiren Board # command_suffix = "" # для обычного MQTT [scripts] directory = "D:\\Rust\\projects\\rust_rules\\rune_scripts" # ← путь к папке со скриптами #directory = "/d/Rust/projects/rune_scripts" # ← путь к папке со скриптами # или абсолютный путь # directory = "/home/user/smart-home/scripts" # датчик на кухне [devices.sensor_kitchen] motion = {topic = "/devices/wb-msw-v4_139/controls/Current Motion", type = "u16"} Illuminance = {topic = "/devices/wb-msw-v4_139/controls/Illuminance", type = "u16"} temperature = {topic = "/devices/wb-msw-v4_139/controls/Temperature", type = "f32"} [devices.sensor_hallway] motion = {topic = "/devices/wb-msw-v4_200/controls/Current Motion", type = "u16"} Illuminance = {topic = "/devices/wb-msw-v4_200/controls/Illuminance", type = "u16"} temperature = {topic = "/devices/wb-msw-v4_200/controls/Temperature", type = "f32"} # люстра на кухне [devices.light_kitchen] lamp= {topic = "/devices/wb-mr6cv3_187/controls/K1", type = "bool"} # люстра в зале [devices.light_living_room] lamp = {topic = "/devices/wb-mr6cv3_189/controls/K1", type = "bool"} brightness = {topic = "/devices/wb-mr6cv3_189/controls/Brightness", type = "u8"} color_temperature = {topic = "/devices/wb-mr6cv3_189/controls/color_temperature", type = "u16"} # виртуальное устройство режимов [virtual.house_mode] night_mode = {topic_type = "switch", value = false, type = "bool", retain = true} another_mode = {topic_type = "switch", value = false, type = "bool", retain = true} # виртуальное устройство термостат [virtual.house_thermostat] target = {topic_type = "range", value = 22.5, type = "f64", retain = true} #min = 10, max = 30, current_temp = {topic_type = "range", value = 22.5, type = "f64", retain = true} activaited = {topic_type = "switch", value = false, type = "bool", retain = true}