Skip to content

Commit

Permalink
Merge pull request #13 from athom-tech/test
Browse files Browse the repository at this point in the history
sycn
  • Loading branch information
tarontop authored Sep 27, 2023
2 parents 92576cb + ca48131 commit 140b662
Show file tree
Hide file tree
Showing 25 changed files with 175 additions and 72 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Athom ESPHome configurations
# Only applicable to ESP8285, ESP32 devices cannot be used

### Athom ESPHome configurations

This repository contains a bunch of ESPHome configurations for https://athom.tech devices.

Expand All @@ -8,18 +10,18 @@ If you are prompted that there is not enough space, you should upgrade `ESP8266_
- Connect to the hotspot and visit `http://192.168.4.1/update` in the browser
- Upload updated ESPHome firmware

# Migrating to Tasmota
### Migrating to Tasmota

- Select firmware upgrade, upload `tasmota.bin.gz` and click Update, ***Please don't choose `tasmota.bin`***
- Download Tasmota firmware here http://ota.tasmota.com/tasmota/release/tasmota.bin.gz

# Migrating from Tasmota
### Migrating from Tasmota

- First execute `SetOption78 1` in the console of Tasmota
- Select firmware upgrade, upload `tasmota-minimal.bin.gz` and click start upgrade
- Select the firmware upgrade again, upload the firmware of ESPHome and click to start upgrade

# Device List
### Device List
device|picture|file name|notice
:---:|:---:|:---:|:---:
Athom_Plug_V2|<img src="/images/Athom_EU_Plug_V2.png" width="50%" height="20%"><img src="/images/Athom_US_Plug_V2.png" width="50%" height="20%"><img src="/images/Athom_UK_Plug_V2.png" width="50%" height="20%"><img src="/images/Athom_BR_Plug_V2.png" width="50%" height="20%"><img src="/images/Athom_AU_Plug_V2.png" width="50%" height="20%"><img src="/images/Athom_IL_Plug_V2.png" width="50%" height="20%"><img src="/images/Athom_IT_Plug_V2.png" width="50%" height="20%">|athom-smart-plug-v2.yaml
Expand Down
6 changes: 5 additions & 1 deletion athom-cb02.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ sensor:
- platform: uptime
name: "Uptime Sensor"

- platform: wifi_signal
name: "${friendly_name} WiFi Signal"
update_interval: 60s

button:
- platform: factory_reset
name: "Reset"
Expand Down Expand Up @@ -103,7 +107,7 @@ text_sensor:
name: "Connected SSID"
mac_address:
name: "Mac Address"

time:
- platform: sntp
id: sntp_time
Expand Down
6 changes: 5 additions & 1 deletion athom-garage-door.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ sensor:
- platform: uptime
name: "Uptime Sensor"

- platform: wifi_signal
name: "${friendly_name} WiFi Signal"
update_interval: 60s

binary_sensor:
- platform: status
name: "Status"
Expand Down Expand Up @@ -130,7 +134,7 @@ text_sensor:
name: "Connected SSID"
mac_address:
name: "Mac Address"

time:
- platform: sntp
id: sntp_time
6 changes: 5 additions & 1 deletion athom-ls-4p-3wire.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ sensor:
- platform: uptime
name: "Uptime Sensor"

- platform: wifi_signal
name: "${friendly_name} WiFi Signal"
update_interval: 60s

button:
- platform: factory_reset
name: "Reset"
Expand Down Expand Up @@ -104,7 +108,7 @@ text_sensor:
name: "Connected SSID"
mac_address:
name: "Mac Address"

time:
- platform: sntp
id: sntp_time
6 changes: 5 additions & 1 deletion athom-ls-4p-4wire.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ sensor:
- platform: uptime
name: "Uptime Sensor"

- platform: wifi_signal
name: "${friendly_name} WiFi Signal"
update_interval: 60s

button:
- platform: factory_reset
name: "Reset"
Expand Down Expand Up @@ -105,7 +109,7 @@ text_sensor:
name: "Connected SSID"
mac_address:
name: "Mac Address"

time:
- platform: sntp
id: sntp_time
10 changes: 8 additions & 2 deletions athom-mini-switch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ output:

light:
- platform: status_led
id: led
name: "Blue LED"
disabled_by_default: true
pin:
Expand All @@ -72,6 +73,10 @@ sensor:
- platform: uptime
name: "Uptime Sensor"

- platform: wifi_signal
name: "${friendly_name} WiFi Signal"
update_interval: 60s

binary_sensor:
# Wired switch
- platform: gpio
Expand All @@ -83,7 +88,7 @@ binary_sensor:
mode: INPUT_PULLUP
on_state:
- light.toggle: mini_relay

- light.toggle: led
on_multi_click:
- timing:
- ON for at most 0.5s
Expand Down Expand Up @@ -111,6 +116,7 @@ binary_sensor:
- OFF for at least 0.2s
then:
- light.toggle: mini_relay
- light.toggle: led
- timing:
- ON for at least 4s
then:
Expand All @@ -127,7 +133,7 @@ text_sensor:
name: "Connected SSID"
mac_address:
name: "Mac Address"

time:
- platform: sntp
id: sntp_time
32 changes: 18 additions & 14 deletions athom-presence-sensor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ esphome:

esp8266:
board: esp8285
restore_from_flash: true

preferences:
flash_write_interval: 1min

# Enable logging
logger:
Expand All @@ -36,7 +40,7 @@ wifi:
captive_portal:

dashboard_import:
package_import_url: github://tarontop/athom-configs/athom-presence-sensor.yaml
package_import_url: github://athom-tech/athom-configs/athom-presence-sensor.yaml

light:
- platform: status_led
Expand Down Expand Up @@ -120,14 +124,14 @@ binary_sensor:
lambda: |-
if ( id(mmwave).state and id(pir).state) {
return true;
}
}
else if (id(mmwave).state == 0) {
return false;
}
}
else {
return id(occupancy).state;
}
sensor:
- platform: uptime
name: "Uptime Sensor"
Expand All @@ -148,7 +152,7 @@ switch:
internal: true
entity_category: config
optimistic: true
restore_state: false
restore_mode: DISABLED
turn_on_action:
- uart.write: "sensorStart\r\n"
turn_off_action:
Expand All @@ -158,7 +162,7 @@ switch:

number:
- platform: template
name: Farthest Detection #Value range: 1.9 ~ 12m Default: 6
name: Farthest Detection #Value range: 1.9 ~ 12m Default: 6
id: Farthest_Detection
entity_category: config
min_value: 1.9
Expand All @@ -172,7 +176,7 @@ number:
set_action:
- switch.turn_off: mmwave_sensor
- delay: 500ms
- uart.write: !lambda
- uart.write: !lambda
std::string ranges = "setRange 1.8 " + str_sprintf("%.1f",id(Farthest_Detection).state) + "\r\n";
return std::vector<uint8_t>(ranges.begin(), ranges.end());
- delay: 500ms
Expand All @@ -195,7 +199,7 @@ number:
set_action:
- switch.turn_off: mmwave_sensor
- delay: 500ms
- uart.write: !lambda
- uart.write: !lambda
std::string sensitivitys = "setSensitivity " + str_sprintf("%.0f",id(Maintain_Sensitivity).state) + " " + str_sprintf("%.0f",id(Trigger_Sensitivity).state) + "\r\n";
return std::vector<uint8_t>(sensitivitys.begin(), sensitivitys.end());
- delay: 500ms
Expand All @@ -218,7 +222,7 @@ number:
set_action:
- switch.turn_off: mmwave_sensor
- delay: 500ms
- uart.write: !lambda
- uart.write: !lambda
std::string sensitivityss = "setSensitivity " + str_sprintf("%.0f",id(Maintain_Sensitivity).state) + " " + str_sprintf("%.0f",id(Trigger_Sensitivity).state) + "\r\n";
return std::vector<uint8_t>(sensitivityss.begin(), sensitivityss.end());
- delay: 500ms
Expand Down Expand Up @@ -274,7 +278,7 @@ number:
- switch.turn_on: mmwave_sensor


- platform: template
- platform: template
name: Blockade Time #Configure block time Value range: 1 ~ 255, default 1 seconds.
id: Blockade_Time
entity_category: config
Expand All @@ -289,7 +293,7 @@ number:
set_action:
- switch.turn_off: mmwave_sensor
- delay: 500ms
- uart.write: !lambda
- uart.write: !lambda
std::string blockades = "setInhibit " + str_sprintf("%.0f",x) + "\r\n";
return std::vector<uint8_t>(blockades.begin(), blockades.end());
- delay: 500ms
Expand All @@ -301,7 +305,7 @@ button:
- platform: factory_reset
name: Restart with Factory Default Settings
id: Reset
entity_category: config
entity_category: config
internal: true
- platform: template
name: "Reset device"
Expand All @@ -318,7 +322,7 @@ button:
- platform: restart
name: Restart_esp
id: restart_esp
entity_category: config
entity_category: config
internal: true
- platform: template
name: "Restart_mmWave"
Expand All @@ -344,7 +348,7 @@ text_sensor:
name: "Connected SSID"
mac_address:
name: "Mac Address"

time:
- platform: sntp
id: my_time
Expand Down
4 changes: 4 additions & 0 deletions athom-relay-board-x1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ sensor:
- platform: uptime
name: "Uptime Sensor"

- platform: wifi_signal
name: "${friendly_name} WiFi Signal"
update_interval: 60s

button:
- platform: factory_reset
name: "Reset"
Expand Down
4 changes: 4 additions & 0 deletions athom-relay-board-x2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ sensor:
- platform: uptime
name: "Uptime Sensor"

- platform: wifi_signal
name: "${friendly_name} WiFi Signal"
update_interval: 60s

button:
- platform: factory_reset
name: "Reset"
Expand Down
4 changes: 4 additions & 0 deletions athom-relay-board-x4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ sensor:
- platform: uptime
name: "Uptime Sensor"

- platform: wifi_signal
name: "${friendly_name} WiFi Signal"
update_interval: 60s

button:
- platform: factory_reset
name: "Reset"
Expand Down
4 changes: 4 additions & 0 deletions athom-relay-board-x8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ sensor:
- platform: uptime
name: "Uptime Sensor"

- platform: wifi_signal
name: "${friendly_name} WiFi Signal"
update_interval: 60s

button:
- platform: factory_reset
name: "Reset"
Expand Down
4 changes: 4 additions & 0 deletions athom-rgb-light.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ sensor:
- platform: uptime
name: "Uptime"

- platform: wifi_signal
name: "${friendly_name} WiFi Signal"
update_interval: 60s

button:
- platform: factory_reset
name: "Reset"
Expand Down
8 changes: 6 additions & 2 deletions athom-rgbct-light.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ globals:
type: int
restore_value: yes
initial_value: '0'

esphome:
name: "${device_name}"
friendly_name: ""
Expand All @@ -28,7 +28,7 @@ esp8266:

preferences:
flash_write_interval: 1min

api:

ota:
Expand Down Expand Up @@ -57,6 +57,10 @@ sensor:
- platform: uptime
name: "Uptime Sensor"

- platform: wifi_signal
name: "${friendly_name} WiFi Signal"
update_interval: 60s

button:
- platform: factory_reset
name: "Reset"
Expand Down
Loading

0 comments on commit 140b662

Please sign in to comment.