mirror of
https://github.com/ale1800/ESP-360-REMOTE.git
synced 2025-06-16 04:44:13 -03:00
Compare commits
35 Commits
e90b700d8a
...
main
Author | SHA1 | Date | |
---|---|---|---|
084cf61b26 | |||
c94e8de9d9 | |||
8ce77c5f31 | |||
cb9910c4b9 | |||
d19900bc7f | |||
afd14e6f67 | |||
51f84e40f3 | |||
7f8c38b0e9 | |||
91ca5e2c09 | |||
ae42342565 | |||
ca51817da5 | |||
015225182e | |||
dbe125c277 | |||
02c5edf95f | |||
e3c1028a1e | |||
b9cbd22a0a | |||
70c6994569 | |||
2d2fe8c0f5 | |||
a9886f3d5a | |||
01e5bc6b03 | |||
00e459e42a | |||
66c538c1c0 | |||
4e51e8b918 | |||
0aa1021ccc | |||
35bf068d36 | |||
9bd6169ff4 | |||
c6ca3479dc | |||
0a0f544ffb | |||
3d43002926 | |||
d101c1791d | |||
6ca4f20a08 | |||
9a275721c8 | |||
1ef2bffa69 | |||
a1fec7b3df | |||
e76f34f7c1 |
188
ESPHome Configuration/esp360remote.yaml
Normal file
188
ESPHome Configuration/esp360remote.yaml
Normal file
@ -0,0 +1,188 @@
|
||||
substitutions:
|
||||
name: "esp360remote"
|
||||
friendly_name: "ESP360Remote"
|
||||
project_name: "ale1800.ESP360Remote"
|
||||
project_version: "2.0"
|
||||
|
||||
esphome:
|
||||
name: "${name}"
|
||||
name_add_mac_suffix: true
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
framework:
|
||||
type: arduino
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
services:
|
||||
- service: send_ir_raw
|
||||
variables:
|
||||
command: int[]
|
||||
then:
|
||||
- remote_transmitter.transmit_raw:
|
||||
transmitter_id: IR_TX
|
||||
code: !lambda 'return command;'
|
||||
- service: send_rf_raw
|
||||
variables:
|
||||
protocol_number: int
|
||||
raw_data: string
|
||||
repeat_times: int
|
||||
wait_time: int
|
||||
then:
|
||||
- remote_transmitter.transmit_rc_switch_raw:
|
||||
transmitter_id: RF_TX
|
||||
protocol: !lambda 'return esphome::remote_base::RC_SWITCH_PROTOCOLS[protocol_number];'
|
||||
code: !lambda 'return raw_data;'
|
||||
repeat:
|
||||
times: !lambda 'return repeat_times;'
|
||||
wait_time: !lambda 'return wait_time;'
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
|
||||
wifi:
|
||||
on_connect:
|
||||
- delay: 5s # Gives time for improv results to be transmitted
|
||||
- ble.disable:
|
||||
on_disconnect:
|
||||
- ble.enable:
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "${name}"
|
||||
password: ""
|
||||
|
||||
|
||||
esp32_improv:
|
||||
authorizer: none
|
||||
|
||||
|
||||
# Sets up the improv via serial client for Wi-Fi provisioning
|
||||
improv_serial:
|
||||
|
||||
|
||||
dashboard_import:
|
||||
package_import_url: github://ale1800/ESP-360-REMOTE/ESPHome/esp360remote.yaml@main
|
||||
import_full_config: true # or true
|
||||
|
||||
|
||||
#captive_portal:
|
||||
|
||||
#i2c bus definition
|
||||
i2c:
|
||||
sda: 21
|
||||
scl: 22
|
||||
scan: true
|
||||
id: bus_a
|
||||
|
||||
#Offsets have been added to the measurements taken.
|
||||
#These are necessary due to the heat generated by the PCB, the second layer of the board, and the case.
|
||||
#This way, sufficiently accurate values are obtained for automations
|
||||
sensor:
|
||||
- platform: shtcx
|
||||
temperature:
|
||||
name: "ESP360Remote Temperature"
|
||||
filters:
|
||||
- median:
|
||||
window_size: 5
|
||||
send_every: 1
|
||||
- offset: -3.7
|
||||
humidity:
|
||||
name: "ESP360Remote Humidity"
|
||||
filters:
|
||||
- median:
|
||||
window_size: 5
|
||||
send_every: 1
|
||||
- offset: +19.1
|
||||
address: 0x70
|
||||
update_interval: 300s
|
||||
- platform: bh1750
|
||||
name: "BH1750 Illuminance"
|
||||
filters:
|
||||
- multiply: 5
|
||||
address: 0x23
|
||||
update_interval: 1s
|
||||
|
||||
#Setting up IR and RF receivers
|
||||
remote_receiver:
|
||||
- id: RF_RX
|
||||
pin:
|
||||
number: GPIO5
|
||||
inverted: True
|
||||
dump:
|
||||
# - raw #(delete # for raw data)
|
||||
- rc_switch
|
||||
tolerance: 35%
|
||||
filter: 200us
|
||||
idle: 4ms
|
||||
buffer_size: 10kb
|
||||
on_rc_switch:
|
||||
- homeassistant.event:
|
||||
event: esphome.rf_code_received_test
|
||||
data:
|
||||
protocol: !lambda 'return x.protocol;'
|
||||
code: !lambda 'return x.code;'
|
||||
- id: IR_RX
|
||||
pin:
|
||||
number: GPIO19
|
||||
inverted: true
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
dump: all
|
||||
|
||||
|
||||
on_raw:
|
||||
- homeassistant.event:
|
||||
event: esphome.ir_raw_code_received
|
||||
data:
|
||||
code: !lambda '
|
||||
reverse(x.begin(), x.end());
|
||||
std::string str = "";
|
||||
for (auto it = x.begin(); it != x.end(); ++it)
|
||||
{
|
||||
str += to_string(*it);
|
||||
str += ",";
|
||||
if (it != x.end() - 1) str += " ";
|
||||
}
|
||||
if (str.size() > 0) str.erase( str.end() - 2);
|
||||
return esphome::to_string("[" + str + "]");'
|
||||
on_pronto:
|
||||
- homeassistant.event:
|
||||
event: esphome.ir_pronto_code_received
|
||||
data:
|
||||
code: !lambda 'return x.data;'
|
||||
on_lg:
|
||||
- homeassistant.event:
|
||||
event: esphome.ir_lg_code_received
|
||||
data:
|
||||
data: !lambda 'return x.data;'
|
||||
nbits: !lambda 'return x.nbits;'
|
||||
on_panasonic:
|
||||
- homeassistant.event:
|
||||
event: esphome.ir_panasonic_code_received
|
||||
data:
|
||||
address: !lambda 'return x.address;'
|
||||
command: !lambda 'return x.command;'
|
||||
|
||||
#Setting up IR and RF transmitters
|
||||
remote_transmitter:
|
||||
- id: RF_TX
|
||||
pin: GPIO18
|
||||
carrier_duty_percent: 100%
|
||||
- id: IR_TX
|
||||
pin: GPIO13
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
#Status LED
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 12
|
||||
name: "Status Led"
|
||||
restore_mode: ALWAYS_ON
|
181
ESPHome/esp360remote.yaml
Normal file
181
ESPHome/esp360remote.yaml
Normal file
@ -0,0 +1,181 @@
|
||||
substitutions:
|
||||
name: "esp360remote"
|
||||
friendly_name: "ESP360Remote"
|
||||
project_name: "ale1800.ESP360Remote"
|
||||
project_version: "2.0"
|
||||
|
||||
esphome:
|
||||
name: "${name}"
|
||||
name_add_mac_suffix: true
|
||||
project:
|
||||
name: "${project_name}"
|
||||
version: "${project_version}"
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
framework:
|
||||
type: arduino
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
services:
|
||||
- service: send_ir_raw
|
||||
variables:
|
||||
command: int[]
|
||||
then:
|
||||
- remote_transmitter.transmit_raw:
|
||||
transmitter_id: IR_TX
|
||||
code: !lambda 'return command;'
|
||||
- service: send_rf_raw
|
||||
variables:
|
||||
protocol_number: int
|
||||
raw_data: string
|
||||
repeat_times: int
|
||||
wait_time: int
|
||||
then:
|
||||
- remote_transmitter.transmit_rc_switch_raw:
|
||||
transmitter_id: RF_TX
|
||||
protocol: !lambda 'return esphome::remote_base::RC_SWITCH_PROTOCOLS[protocol_number];'
|
||||
code: !lambda 'return raw_data;'
|
||||
repeat:
|
||||
times: !lambda 'return repeat_times;'
|
||||
wait_time: !lambda 'return wait_time;'
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
|
||||
wifi:
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
password: ""
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
# Sets up the improv via serial client for Wi-Fi provisioning
|
||||
improv_serial:
|
||||
|
||||
|
||||
dashboard_import:
|
||||
package_import_url: github://ale1800/ESP-360-REMOTE/ESPHome/esp360remote.yaml@main
|
||||
import_full_config: true
|
||||
|
||||
|
||||
captive_portal:
|
||||
|
||||
#i2c bus definition
|
||||
i2c:
|
||||
sda: 21
|
||||
scl: 22
|
||||
scan: true
|
||||
id: bus_a
|
||||
|
||||
#Offsets have been added to the measurements taken.
|
||||
#These are necessary due to the heat generated by the PCB, the second layer of the board, and the case.
|
||||
#This way, sufficiently accurate values are obtained for automations
|
||||
sensor:
|
||||
- platform: shtcx
|
||||
temperature:
|
||||
name: "ESP360Remote Temperature"
|
||||
filters:
|
||||
- median:
|
||||
window_size: 5
|
||||
send_every: 1
|
||||
- offset: -3.7
|
||||
humidity:
|
||||
name: "ESP360Remote Humidity"
|
||||
filters:
|
||||
- median:
|
||||
window_size: 5
|
||||
send_every: 1
|
||||
- offset: +19.1
|
||||
address: 0x70
|
||||
update_interval: 300s
|
||||
- platform: bh1750
|
||||
name: "BH1750 Illuminance"
|
||||
filters:
|
||||
- multiply: 5
|
||||
address: 0x23
|
||||
update_interval: 1s
|
||||
|
||||
#Setting up IR and RF receivers
|
||||
remote_receiver:
|
||||
- id: RF_RX
|
||||
pin:
|
||||
number: GPIO5
|
||||
inverted: True
|
||||
dump:
|
||||
# - raw #(delete # for raw data)
|
||||
- rc_switch
|
||||
tolerance: 35%
|
||||
filter: 200us
|
||||
idle: 4ms
|
||||
buffer_size: 10kb
|
||||
on_rc_switch:
|
||||
- homeassistant.event:
|
||||
event: esphome.rf_code_received_test
|
||||
data:
|
||||
protocol: !lambda 'return x.protocol;'
|
||||
code: !lambda 'return x.code;'
|
||||
- id: IR_RX
|
||||
pin:
|
||||
number: GPIO19
|
||||
inverted: true
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
dump: all
|
||||
|
||||
|
||||
on_raw:
|
||||
- homeassistant.event:
|
||||
event: esphome.ir_raw_code_received
|
||||
data:
|
||||
code: !lambda '
|
||||
reverse(x.begin(), x.end());
|
||||
std::string str = "";
|
||||
for (auto it = x.begin(); it != x.end(); ++it)
|
||||
{
|
||||
str += to_string(*it);
|
||||
str += ",";
|
||||
if (it != x.end() - 1) str += " ";
|
||||
}
|
||||
if (str.size() > 0) str.erase( str.end() - 2);
|
||||
return esphome::to_string("[" + str + "]");'
|
||||
on_pronto:
|
||||
- homeassistant.event:
|
||||
event: esphome.ir_pronto_code_received
|
||||
data:
|
||||
code: !lambda 'return x.data;'
|
||||
on_lg:
|
||||
- homeassistant.event:
|
||||
event: esphome.ir_lg_code_received
|
||||
data:
|
||||
data: !lambda 'return x.data;'
|
||||
nbits: !lambda 'return x.nbits;'
|
||||
on_panasonic:
|
||||
- homeassistant.event:
|
||||
event: esphome.ir_panasonic_code_received
|
||||
data:
|
||||
address: !lambda 'return x.address;'
|
||||
command: !lambda 'return x.command;'
|
||||
|
||||
#Setting up IR and RF transmitters
|
||||
remote_transmitter:
|
||||
- id: RF_TX
|
||||
pin: GPIO18
|
||||
carrier_duty_percent: 100%
|
||||
- id: IR_TX
|
||||
pin: GPIO13
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
#Status LED
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 12
|
||||
name: "Status Led"
|
||||
restore_mode: ALWAYS_ON
|
4393
Enclosure/Original files/bottom.step
Normal file
4393
Enclosure/Original files/bottom.step
Normal file
File diff suppressed because it is too large
Load Diff
5828
Enclosure/Original files/bottom_I2C.step
Normal file
5828
Enclosure/Original files/bottom_I2C.step
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Enclosure/Original files/full_enclosure.shapr
Normal file
BIN
Enclosure/Original files/full_enclosure.shapr
Normal file
Binary file not shown.
2307
Enclosure/Original files/top.step
Normal file
2307
Enclosure/Original files/top.step
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
|
BIN
Hardware/Production/Bottom/bom_bottom.xls
Normal file
BIN
Hardware/Production/Bottom/bom_bottom.xls
Normal file
Binary file not shown.
BIN
Hardware/Production/Top/Gerber_IR-transmitter_TOP_2025-03-16.zip
Normal file
BIN
Hardware/Production/Top/Gerber_IR-transmitter_TOP_2025-03-16.zip
Normal file
Binary file not shown.
BIN
Hardware/Production/Top/PickAndPlace_TOP_2025-03-16.csv
Normal file
BIN
Hardware/Production/Top/PickAndPlace_TOP_2025-03-16.csv
Normal file
Binary file not shown.
|
BIN
Hardware/Production/Top/bom_top.xls
Normal file
BIN
Hardware/Production/Top/bom_top.xls
Normal file
Binary file not shown.
10
Hardware/Production/readme.md
Normal file
10
Hardware/Production/readme.md
Normal file
@ -0,0 +1,10 @@
|
||||
I suggest you to buy also the right angle pin I soldered on the RF modules.
|
||||
|
||||
- I used [these](https://www.lcsc.com/product-detail/_XFCN-_C781823.html) for the 3-pin transmitter module ([STX883Pro](https://www.nicerf.com/ask-modules/ask-transmitter-module-stx883pro.html)).
|
||||
They have the standard pitch of 2.54 but they are thin enough to be inserted in the female connector on the board **You have to buy at least 4 (2x2)** and then cut one.
|
||||
|
||||
- For the receiver module ([SRX883Pro](https://www.nicerf.com/ask-modules/ask-receiver-module-srx883pro.html)), pins are [these](https://www.lcsc.com/product-detail/_HCTL-_C2905972.html). Also with these you have to cut one (I connected it to the board only with 5 pins out 6)
|
||||
|
||||
Pay attention if you need the RF modules in 433MHz or 315MHz version. And then buy the spring antenna accordingly, like [these ones](https://www.lcsc.com/products/Antennas_912.html).
|
||||
|
||||
If you let the manufacturer assemble the board, remember to ask them to bend the IR leds to 45°, otherwise the will solder them straight.
|
@ -2,7 +2,8 @@
|
||||
## An all-in-one remote based on the ESP32-WROOM-32E
|
||||
|
||||
|
||||
- ## ESP 360 Remote on [CrowdSupply](https://www.crowdsupply.com/aaelectronics/esp-360-remote)
|
||||
- ## ~~ESP 360 Remote on [CrowdSupply](https://www.crowdsupply.com/aaelectronics/esp-360-remote)~~ (Out of stock)
|
||||
- ## If you want, you can build it by yourself. Productions files are [here](https://github.com/ale1800/ESP-360-REMOTE/tree/main/Hardware/Production)
|
||||
|
||||
- ## ESP 360 Remote on [Discord](https://discord.gg/PsrK3KDkRy)
|
||||
|
||||
|
@ -0,0 +1,75 @@
|
||||
# This provides IR buttons for controlling a Lasko fan.
|
||||
#
|
||||
# I think Lasko may use the same codes for different meanings, so your mileage may vary on the button names.
|
||||
#
|
||||
# I used the same technique documented at https://ryfow.com/articles/esp-360-remote-rc300/ to find these codes.
|
||||
# The tricky part was figuring out that carrier_frequency: 38000 is required. I eventually guessed my way into that.
|
||||
|
||||
remote_receiver:
|
||||
- id: IR_RX
|
||||
pin:
|
||||
number: GPIO19
|
||||
inverted: true
|
||||
idle: 100ms
|
||||
dump: raw
|
||||
|
||||
remote_transmitter:
|
||||
- id: IR_TX
|
||||
pin: GPIO13
|
||||
carrier_duty_percent: 50%
|
||||
|
||||
button:
|
||||
- platform: template
|
||||
name: "Fan Power"
|
||||
on_press:
|
||||
remote_transmitter.transmit_raw:
|
||||
code: [1313, -383, 1312, -382, 460, -1234, 1313, -382, 1312, -382, 460, -1235, 466, -1229, 460, -1234, 462, -1233, 462, -1232, 461, -1233, 1314]
|
||||
carrier_frequency: 38000
|
||||
repeat:
|
||||
times: 10
|
||||
wait_time: 7200us
|
||||
transmitter_id: IR_TX
|
||||
- platform: template
|
||||
name: "Fan Speed"
|
||||
on_press:
|
||||
remote_transmitter.transmit_raw:
|
||||
code: [1282, -414, 1307, -387, 454, -1240, 1306, -389, 1279, -415, 454, -1240, 431, -1263, 456, -1238, 432, -1262, 457, -1238, 1308, -387, 430]
|
||||
carrier_frequency: 38000
|
||||
repeat:
|
||||
times: 10
|
||||
wait_time: 8000us
|
||||
transmitter_id: IR_TX
|
||||
|
||||
- platform: template
|
||||
name: "Fan Timer"
|
||||
on_press:
|
||||
remote_transmitter.transmit_raw:
|
||||
code: [1325, -372, 1320, -374, 471, -1223, 1322, -372, 1325, -370, 471, -1223, 471, -1223, 472, -1222, 1323, -373, 471, -1222, 471, -1223, 470]
|
||||
carrier_frequency: 38000
|
||||
repeat:
|
||||
times: 10
|
||||
wait_time: 8000us
|
||||
transmitter_id: IR_TX
|
||||
|
||||
- platform: template
|
||||
name: "Fan Ion"
|
||||
on_press:
|
||||
remote_transmitter.transmit_raw:
|
||||
code: [1325, -372, 1325, -369, 472, -1221, 1327, -369, 1324, -370, 474, -1219, 1326, -370, 473, -1221, 472, -1222, 499, -1195, 476, -1121, 572, -2133, 172]
|
||||
carrier_frequency: 38000
|
||||
repeat:
|
||||
times: 10
|
||||
wait_time: 8000us
|
||||
transmitter_id: IR_TX
|
||||
|
||||
- platform: template
|
||||
name: "Fan Oscillate"
|
||||
on_press:
|
||||
remote_transmitter.transmit_raw:
|
||||
code: [1315, -382, 1313, -381, 462, -1231, 1314, -382, 1314, -380, 464, -1229, 465, -1230, 1287, -409, 463, -1230, 464, -1230, 466, -1229, 464]
|
||||
carrier_frequency: 38000
|
||||
repeat:
|
||||
times: 10
|
||||
wait_time: 8000us
|
||||
transmitter_id: IR_TX
|
||||
|
@ -0,0 +1,12 @@
|
||||
switch:
|
||||
- platform: template
|
||||
name: "$upper_devicename Patio Lights Power Button p1"
|
||||
turn_on_action:
|
||||
- remote_transmitter.transmit_rc_switch_raw:
|
||||
transmitter_id: RF_TX
|
||||
code: '10101010111111111110100'
|
||||
protocol: 1
|
||||
repeat:
|
||||
times: 5
|
||||
wait_time: 1ms
|
||||
|
Reference in New Issue
Block a user