Orvibo的红外遥控是8266的芯片。然后各种找资料代码如下:顺便说下。我主要是玩悟空的时候电视机少了遥控器属于整了这
substitutions:
device_name: "ESP8266IR"
run_time: 15s # 运行时间
sleep_time: 44s # 休眠时间
esphome:
name: esp8266
friendly_name: ESP8266
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "kWLEm1CRtH1ikbQDKedCshqelOhhhwzfgVGUDtVoPZo="
ota:
- platform: esphome
password: "580f85d3239973eb61506976578f0a09"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# fast_connect: True
reboot_timeout: 300s
manual_ip:
static_ip: 192.168.1.188
gateway: 192.168.1.1
subnet: 255.255.255.0
dns1: 183.221.253.100
web_server:
port: 80
captive_portal:
script:
- id: opne_changhong_hdmi
then:
- button.press: but_chpower
- delay: 60s
- button.press: but_chsource
- delay: 1s
- button.press: but_menu
- id: close_changhong_hdmi
then:
- button.press: but_chpower
remote_transmitter:
- id: IR_transmitter
pin: GPIO14 #红外引脚
carrier_duty_percent: 50%
remote_receiver:
- id: IR_receiver
pin:
number: GPIO5 #红外接收引脚
inverted: True
dump:
- raw
- nec
status_led:
pin: GPIO15
binary_sensor:
- platform: gpio
pin:
number: GPIO4
inverted: true
name: "Button"
id: button_input
button:
- platform: template
name: But_PowerOpen
id: but_poweropen
icon: mdi:power
on_press:
- script.execute: opne_changhong_hdmi
# Received NEC: address=0x3000, command=0xFD02 command_repeats=1
- platform: template
name: BQ_Power
id: but_bqpower
icon: mdi:power
on_press:
- remote_transmitter.transmit_nec:
address: 0x3000
command: 0xFD02
command_repeats: 1
# ' '
- platform: template
name: BQ_menu
id: but_bqmenu
icon: mdi:menu
on_press:
- remote_transmitter.transmit_nec:
address: 0x3000
command: 0xEA15
command_repeats: 1
- platform: template
name: CH_Power
id: but_chpower
icon: mdi:power
on_press:
- remote_transmitter.transmit_nec:
address: 0xBF40
command: 0xED12
command_repeats: 1
- platform: template
name: CH_Source
id: but_chsource
icon: mdi:source-branch
on_press:
- remote_transmitter.transmit_nec:
address: 0xBF40
command: 0xEB14
command_repeats: 1
- platform: template
name: CH_Volumeplus
id: but_chvolumeplus
icon: mdi:volume-plus
on_press:
- remote_transmitter.transmit_nec:
address: 0xBF40
command: 0xE51A
command_repeats: 1
- platform: template
name: CH_Volumeminus
id: but_chvolumeminus
icon: mdi:volume-minus
on_press:
- remote_transmitter.transmit_nec:
address: 0xBF40
command: 0xE11E
command_repeats: 1
- platform: template
name: CH_volumemute
id: but_volumemute
icon: mdi:volume-mute
on_press:
- remote_transmitter.transmit_nec:
address: 0xBF40
command: 0xEF10
command_repeats: 1
- platform: template
name: CH_menuleft
id: but_menuleft
icon: mdi:menu-left
on_press:
- remote_transmitter.transmit_nec:
address: 0xBF40
command: 0xB946
command_repeats: 1
- platform: template
name: CH_menuright
id: but_menuright
icon: mdi:menu-right
on_press:
- remote_transmitter.transmit_nec:
address: 0xBF40
command: 0xB847
command_repeats: 1
- platform: template
name: CH_menuup
id: but_menuup
icon: mdi:menu-up
on_press:
- remote_transmitter.transmit_nec:
address: 0xBF40
command: 0xE619
command_repeats: 1
- platform: template
name: CH_menudown
id: but_menudown
icon: mdi:menu-down
on_press:
- remote_transmitter.transmit_nec:
address: 0xBF40
command: 0xE21D
command_repeats: 1
- platform: template
name: CH_menu
id: but_menu
icon: mdi:menu
on_press:
- remote_transmitter.transmit_nec:
address: 0xBF40
command: 0xF50A
command_repeats: 1
# Received NEC: address=0xBF40, command=0xED12 command_repeats=1
# Received NEC: address=0xBF40, command=0xEB14 command_repeats=1
# Received NEC: address=0xBF40, command=0xB847 command_repeats=1
# Received NEC: address=0xBF40, command=0xB946 command_repeats=1
# Received NEC: address=0xBF40, command=0xE619 command_repeats=1
# Received NEC: address=0xBF40, command=0xE21D command_repeats=1
# Received NEC: address=0xBF40, command=0xF50A command_repeats=1
# Received NEC: address=0xBF40, command=0xEF10 command_repeats=1
|