『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 954|回复: 1

[硬件DIY] 欧瑞博精灵外挂espc3接入hass

[复制链接]

3

主题

185

帖子

3351

积分

论坛元老

Rank: 8Rank: 8

积分
3351
金钱
3166
HASS币
0
发表于 2024-5-19 14:40:53 | 显示全部楼层 |阅读模式
参考以下帖子欧瑞博精灵接入hass,PCB原理图参考了罗总、宝子、Kevin
https://bbs.hassbian.com/thread-18356-1-1.html




25ff4efe81d9e7da1de9aa03647a233.jpg
ed12b8b7e7b03f6f3417dee0a61e2f6.jpg 微信图片_20240519143548.png 微信截图_20240519144004.png 微信截图_20240519143948.png
欧瑞博精灵外挂espc3_5bb8da5f2f1e414da467c1395c35a92c.zip (76.41 KB, 下载次数: 1)
substitutions:
  device_name: orvibo-mixpad-df5ec0

esphome:
  name: ${device_name}

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: arduino

wifi: {ssid: "iot",password: "66666666"}
api: {reboot_timeout: 0s}
web_server: {port: 80}
ota: {safe_mode: true}
logger:






binary_sensor:
  - platform: gpio
    id: i1
    pin: {number: "GPIO5", mode: INPUT_PULLUP, inverted: true}
  - platform: gpio
    id: i2
    pin: {number: "GPIO6", mode: INPUT_PULLUP, inverted: true}

  - platform: gpio
    id: button1
    pin: {number: "GPIO10", mode: INPUT_PULLUP, inverted: true}
    filters:
      - delayed_on: 10ms
    on_release: 
      if:
        condition:
          or:
            - binary_sensor.is_on: i1
            - binary_sensor.is_on: i2
        then:
          - switch.turn_off: trelay1
          - switch.turn_off: trelay2
        else:
          - switch.turn_on: trelay1

switch:
  - platform: gpio
    pin: 3
    id: relay1
    internal: true
    on_turn_on:
    - delay: 300ms
    - switch.turn_off: relay1
  - platform: gpio
    pin: 1
    id: relay2
    internal: true
    on_turn_on:
    - delay: 300ms
    - switch.turn_off: relay2

  - platform: template
    name: "lamp 1"
    id: trelay1
    lambda: |-
      if (id(i1).state) {
        return true;
      } else {
        return false;
      }
    turn_on_action:
      if:
        condition:
          binary_sensor.is_off: i1
        then:
          switch.turn_on: relay1
    turn_off_action:
      if:
        condition:
          binary_sensor.is_on: i1
        then:
          switch.turn_on: relay1
  - platform: template
    name: "lamp 2"
    id: trelay2
    lambda: |-
      if (id(i2).state) {
        return true;
      } else {
        return false;
      }
    turn_on_action:
      if:
        condition:
          binary_sensor.is_off: i2
        then:
          switch.turn_on: relay2
    turn_off_action:
      if:
        condition:
          binary_sensor.is_on: i2
        then:
          switch.turn_on: relay2






回复

使用道具 举报

3

主题

69

帖子

981

积分

高级会员

Rank: 4

积分
981
金钱
912
HASS币
0
发表于 2024-5-19 23:26:51 来自手机 | 显示全部楼层
家里用的欧瑞博,说实话挺操蛋的,只要是wifi类的都没法接入ha或者homekit ,目前WiFi 窗帘及精灵开关没接入
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-25 01:00 , Processed in 0.212311 second(s), 27 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表