October 1

Температуры и влажности WB Modbus

Фотографии устройства

Описание

Больше инфы тут https://wirenboard.com/ru/product/WB-MSW4-TH/

Передает много данных, некоторые из них:

Особенности подключения

Подключается к modbus, в HA вот такие данные есть - ссылка на гист https://gist.github.com/smirnowegor/6f6fa8f1c5a3f1a728b3bf5287ec88d9

modbus:
  # Модуль на USB1 для датчика WB‑MSW v.4 (Modbus-адрес 191)
  - type: serial
    method: rtu
    name: "modbus_msw_sensor_hub"
    port: /dev/ttyUSB0  # Укажите корректный порт для WB-MSW v.4
    baudrate: 9600
    stopbits: 1
    bytesize: 8
    parity: N
    # timeout: 5   # При необходимости
    # delay: 1     # При необходимости

    # Переключатели (Coils)
    switches:
      - name: "Пищалка"         # Включение пищалки (коил, адрес 0x0000)
        slave: 191
        address: 0
        write_type: coil
      - name: "Подогрев Сенсора"  # Включение подогрева (адрес 0x0002)
        slave: 191
        address: 2
        write_type: coil
      - name: "Красный LED"       # Включение красного светодиода (адрес 0x000A)
        slave: 191
        address: 10
        write_type: coil
      - name: "Зеленый LED"       # Включение зеленого светодиода (адрес 0x000B)
        slave: 191
        address: 11
        write_type: coil

    sensors:
      - name: "Темп. Компенсация Самонагрева T/H"
        slave: 191
        address: 245
        input_type: holding
        data_type: int16
        scale: 0.01
        unit_of_measurement: "°C"
        unique_id: "msw_selfheat_comp_191"

      - name: "Время Ответа Modbus"
        slave: 191
        address: 113
        input_type: holding
        data_type: uint16
        unit_of_measurement: "ms"
        unique_id: "msw_modbus_response_191"

      # Значения с Input-регистров (основные измерения)
      - name: "Температура (0.1)"
        slave: 191
        address: 0
        input_type: input
        data_type: int16
        scale: 0.1
        precision: 2
        unit_of_measurement: "°C"
        device_class: temperature
        unique_id: "msw_temp_0_1_191"

      - name: "Влажность (0.1)"
        slave: 191
        address: 1
        input_type: input
        data_type: int16
        precision: 2
        scale: 0.1
        unit_of_measurement: "%"
        device_class: humidity
        unique_id: "msw_hum_0_1_191"

      - name: "Температура (0.01)"
        slave: 191
        address: 4
        input_type: input
        data_type: int16
        scale: 0.01
        precision: 2
        unit_of_measurement: "°C"
        device_class: temperature
        unique_id: "msw_temp_0_01_191"

      - name: "Влажность (0.01)"
        slave: 191
        address: 5
        input_type: input
        data_type: int16
        precision: 2
        scale: 0.01
        unit_of_measurement: "%"
        device_class: humidity
        unique_id: "msw_hum_0_01_191"

      - name: "Успешные считывания T/H"
        slave: 191
        address: 101
        input_type: input
        data_type: uint16
        unique_id: "msw_success_reads_191"

      - name: "Ошибки считывания T/H"
        slave: 191
        address: 102
        input_type: input
        data_type: uint16
        unique_id: "msw_error_reads_191"

      - name: "Температура Сырая"
        slave: 191
        address: 284
        input_type: input
        data_type: int16
        precision: 2
        scale: 0.01
        unit_of_measurement: "°C"
        device_class: temperature
        unique_id: "msw_raw_temp_191"

      - name: "Влажность Сырая"
        slave: 191
        address: 285
        input_type: input
        data_type: int16
        precision: 2
        scale: 0.01
        unit_of_measurement: "%"
        device_class: humidity
        unique_id: "msw_raw_hum_191"

      - name: "Наличие датчика температуры"
        slave: 191
        address: 368
        input_type: input
        data_type: uint16
        unique_id: "msw_sensor_presence_temp_191"

      - name: "Наличие датчика влажности"
        slave: 191
        address: 369
        input_type: input
        data_type: uint16
        unique_id: "msw_sensor_presence_hum_191"

      - name: "Время работы"
        slave: 191
        address: 104
        input_type: input
        data_type: uint32
        unit_of_measurement: "s"
        device_class: duration
        unique_id: "msw_work_time_191"

      - name: "Текущее Напряжение Питания"
        slave: 191
        address: 121
        input_type: input
        data_type: uint16
        unit_of_measurement: "mV"
        device_class: voltage
        unique_id: "msw_supply_voltage_191"

      - name: "Мин. Напряжение Питания (Загрузка)"
        slave: 191
        address: 122
        input_type: input
        data_type: uint16
        unit_of_measurement: "mV"
        device_class: voltage
        unique_id: "msw_min_voltage_load_191"

      - name: "Текущее Напряжение Питания (до усреднения)"
        slave: 191
        address: 125
        input_type: input
        data_type: uint16
        unit_of_measurement: "mV"
        device_class: voltage
        unique_id: "msw_supply_voltage_raw_191"

      - name: "Мин. Напряжение Питания МК"
        slave: 191
        address: 119
        input_type: input
        data_type: uint16
        unit_of_measurement: "mV"
        device_class: voltage
        unique_id: "msw_min_voltage_mcu_191"

      - name: "Напряжение Питания МК"
        slave: 191
        address: 123
        input_type: input
        data_type: uint16
        unit_of_measurement: "mV"
        device_class: voltage
        unique_id: "msw_voltage_mcu_191"

      - name: "Внутренняя Температура МК"
        slave: 191
        address: 124
        input_type: input
        data_type: int16
        precision: 2
        scale: 0.1
        unit_of_measurement: "°C"
        device_class: temperature
        unique_id: "msw_internal_temp_mcu_191"

      # Идентификационные и служебные параметры:
      - name: "Модель Устройства"
        slave: 191
        address: 200
        input_type: input
        data_type: string
        count: 20
        unique_id: "msw_device_model_191"

      - name: "Хэш Коммита"
        slave: 191
        address: 220
        input_type: input
        data_type: string
        count: 29
        unique_id: "msw_commit_hash_191"

      - name: "Версия Прошивки (строка)"
        slave: 191
        address: 250
        input_type: input
        data_type: string
        count: 16
        unique_id: "msw_fw_string_191"

      - name: "Расширение Серийного Номера"
        slave: 191
        address: 266
        input_type: input
        data_type: custom
        count: 4             # 4 регистра (4×2 = 8 байт) для структуры >Q
        structure: ">Q"
        unique_id: "msw_ext_serial_191"

      - name: "Серийный Номер"
        slave: 191
        address: 270
        input_type: input
        data_type: uint32
        unique_id: "msw_serial_191"

      - name: "Версия Прошивки MAJOR"
        slave: 191
        address: 320
        input_type: input
        data_type: uint16
        unique_id: "msw_fw_major_191"

      - name: "Версия Прошивки MINOR"
        slave: 191
        address: 321
        input_type: input
        data_type: uint16
        unique_id: "msw_fw_minor_191"

      - name: "Версия Прошивки PATCH"
        slave: 191
        address: 322
        input_type: input
        data_type: uint16
        unique_id: "msw_fw_patch_191"

      - name: "Версия Прошивки SUFFIX"
        slave: 191
        address: 323
        input_type: input
        data_type: int16
        unique_id: "msw_fw_suffix_191"

      - name: "Версия Прошивки (числовая)"
        slave: 191
        address: 324
        input_type: input
        data_type: uint32
        unique_id: "msw_fw_numeric_191"

      - name: "Версия Прошивки (Big Endian)"
        slave: 191
        address: 326
        input_type: input
        data_type: uint32
        unique_id: "msw_fw_big_endian_191"

      # Параметры подключения RS-485:
      - name: "Скорость RS-485"
        slave: 191
        address: 110
        input_type: holding
        data_type: uint16
        unique_id: "msw_rs485_speed_191"

      - name: "Бит Четности RS-485"
        slave: 191
        address: 111
        input_type: holding
        data_type: uint16
        unique_id: "msw_rs485_parity_191"

      - name: "Стоп-биты RS-485"
        slave: 191
        address: 112
        input_type: holding
        data_type: uint16
        unique_id: "msw_rs485_stopbits_191"

      - name: "Modbus Адрес"
        slave: 191
        address: 128
        input_type: holding
        data_type: uint16
        unique_id: "msw_modbus_address_191"

      - name: "Сигнатура Прошивки"
        slave: 191
        address: 290
        input_type: holding
        data_type: string
        count: 12
        unique_id: "msw_fw_signature_191"

      - name: "Версия Загрузчика"
        slave: 191
        address: 330
        input_type: holding
        data_type: string
        count: 7
        unique_id: "msw_bootloader_version_191"

      - name: "Отключение Status LED"
        slave: 191
        address: 130
        input_type: holding
        data_type: uint16
        unique_id: "msw_status_led_disable_191"

      - name: "Режим Непрерывного Чтения"
        slave: 191
        address: 114
        input_type: holding
        data_type: uint16
        unique_id: "msw_continuous_read_mode_191"

Подключение через WB контроллер

Через контроллер по дефолту мне насыпал параметров которые не установлены на модуле:

Можно лишнее скрыть, что бы потом при экспорте в Home Assistant не мешались. Видно что вот этих точно нет в самом датчике

Через Настройки - Конфигурационные файлы - Настройка драйвера Serial-устройств убираем лишние параметры, ставим Не опрашивать.

Вот так куда аккуратнее и правдивее

Способ 1 Поддержать автора

Способ 2 https://donate.stream/yoomoney410013774736621

Способ 3 телеграм https://t.me/tribute/app?startapp=dvHM

или через криптокошелёк (Только USDT) TCHekdJZFndXpDrHZGuTmqFNcqhWBTTzPr


Связаться со мной. (Консультации, проектирование и обучение)

Новый подход к электрике и дизайну помещений. Некоторые провода уже не нужно тянуть, какие-то решения можно принять после ремонта. Перенести выключатель, запустить кондиционер с телефона - возможно автоматизировать любую рутину.

Мой телеграм канал, там все быстрее обновляется телеграм.

Сайт smart4home.ru и альтернативный Умный дом на любом этапе

Соц сети: RuTube канал Удобный дом / You Tube канал Удобный дом Яндекс Дзен: Удобный дом / InGram

Платформы специалистов: Авито / Профи.ру / Яндекс Услуги https://uslugi.yandex.ru/profile/EgorSmirnov-2294380?from=telek