Skip to content

alexxx113/Tuya-switch-WB3S

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tuya switch WB3S

Configure tuya switch OpenBK7231T

альтернативный текст

Flashing for BK7231T

remove smd components

альтернативный текст

Go to pages firmware instruction

OpenBK7231T_App

connect uart 3.3v !!!!

альтернативный текст

conect new WIFI "openbk..."

go "192.168.4.1"

configure WIFI

configure module:

P1 wifi_led_n 0

P9 rel 1

P10 btn 1

configure MQTT

home assistant config:

"name" = name switch

  
light:
  - platform: mqtt
    unique_id: "name"
    name: "name"
    state_topic: ""name"/1/get"
    command_topic: ""name"/1/set"
    qos: 1
    payload_on: 1
    payload_off: 0
    retain: true
    availability_topic: ""name"/connected"
  
  

if you want add temp sensor:

P23 adc 2

NTC thermistor a B value of 3950 100k

resistor 20k

home assistant config:

"name" = name switch

    
sensor:
  - platform: mqtt
    state_topic: ""name"/2/get"
    name: "mqtt temp sens"
    qos: 1
    device_class: power
    availability_topic: ""name"/connected"
  
  
"name" = name switch

  
template:
  sensor:
   - name: Temperatura NTC kabinet
      unique_id: temperature_kabinet
      device_class: temperature 
      state: >
        {% set Vo = states('sensor.mqtt_temp_sens')|float %}
        {% set res = 200000 %}
        {% set term  = 100000 %}
        {% set nom_t  = 27 %}
        {% set adc  = 3584 %}
        {% set B = 3950 %}
    {% set tr  =  res / ((adc / Vo) - 1)  %}
    {% set steinhart = term /  tr%}
    {% set steinhart1 = log(steinhart) %}
    {% set steinhart2 = steinhart1 / B %}
    {% set steinhart3 = steinhart2 + (1.0 / (nom_t + 273.15))%}
    {% set steinhart4 = 1.0 / steinhart3  %}
    {% set steinhart5 = steinhart4 - 273.15%}

    {{ steinhart5  |round(2) }}
  unit_of_measurement: '°C'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published