Skip to content

Commit

Permalink
Merge pull request #14 from athom-tech/main
Browse files Browse the repository at this point in the history
sycn
  • Loading branch information
tarontop authored Mar 11, 2024
2 parents d7e0b84 + 9b811a3 commit 7fec181
Show file tree
Hide file tree
Showing 62 changed files with 1,844 additions and 472 deletions.
10 changes: 5 additions & 5 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ runs:
esphome_version=$(esphome version)
esphome_version=$(echo $esphome_version | cut -d " " -f 2)
echo "::set-output name=name::$name"
echo "::set-output name=version::$version"
echo "::set-output name=devicename::$devicename"
echo "::set-output name=esphome_version::$esphome_version"
echo "name=$name" >> $GITHUB_OUTPUT
echo "version=$version" >> $GITHUB_OUTPUT
echo "devicename=$devicename" >> $GITHUB_OUTPUT
echo "esphome_version=$esphome_version" >> $GITHUB_OUTPUT
- name: Compile ${{ inputs.device }}
Expand All @@ -42,7 +42,7 @@ runs:
./${{ steps.info.outputs.name }}--${{ steps.info.outputs.version }}.bin
- name: Upload binary
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Athom Binaries (${{ steps.info.outputs.esphome_version }})
path: ./${{ steps.info.outputs.name }}--${{ steps.info.outputs.version }}.bin
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- rgb-light
- rgbww-light
- rgbct-light
- rgbw-light
- garage-door
- ws2812b
- mini-switch
Expand All @@ -25,6 +26,7 @@ jobs:
- relay-board-x8
- smart-plug
- smart-plug-v2
- wall-outlet
- sw01
- sw01-v2
- sw02
Expand All @@ -34,6 +36,7 @@ jobs:
- cb02
- ls-4p-3wire
- ls-4p-4wire
- presence-sensor
esphome:
- latest
- beta
Expand All @@ -42,7 +45,7 @@ jobs:
container: ghcr.io/esphome/esphome:${{ matrix.esphome }}
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3.2.0
- uses: ./.github/actions/build
with:
device: ${{ matrix.device }}
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- rgb-light
- rgbww-light
- rgbct-light
- rgbw-light
- garage-door
- ws2812b
- mini-switch
Expand All @@ -23,6 +24,7 @@ jobs:
- relay-board-x8
- smart-plug
- smart-plug-v2
- wall-outlet
- sw01
- sw01-v2
- sw02
Expand All @@ -32,9 +34,10 @@ jobs:
- cb02
- ls-4p-3wire
- ls-4p-4wire
- presence-sensor
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3.2.0
- uses: esphome/build-action@v1.1.0
id: esphome-build
with:
Expand Down
35 changes: 29 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Athom ESPHome configurations
# Only applicable to ESP8285,[Please click for ESP32 devices](https://github.com/athom-tech/esp32-configs)

### Athom ESPHome configurations

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

Expand All @@ -8,14 +10,35 @@ 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!!!
- 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` and click start upgrade
- 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
- Download ESPHome firmware here https://github.com/athom-tech/athom-configs/actions

### 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
Athom_Wall_Outlet|<img src="/images/Athom_Wall_Outlet.png" width="50%" height="20%">|athom-wall-outlet.yaml
Athom_1Gang_Switch|<img src="/images/Athom_1Gang_Touch_Switch.png" width="50%" height="20%"><img src="/images/Athom_1Gang_Key_Switch.png" width="50%" height="20%"><img src="/images/Athom_1Gang_US_Switch.png" width="50%" height="20%">|athom-sw01.yaml
Athom_2Gang_Switch|<img src="/images/Athom_2Gang_Touch_Switch.png" width="50%" height="20%"><img src="/images/Athom_2Gang_Key_Switch.png" width="50%" height="20%">|athom-sw02.yaml
Athom_3Gang_Switch|<img src="/images/Athom_3Gang_Touch_Switch.png" width="50%" height="20%"><img src="/images/Athom_3Gang_Key_Switch.png" width="50%" height="20%">|athom-sw03.yaml
Athom_4Gang_Switch|<img src="/images/Athom_4Gang_Touch_Swtich.png" width="50%" height="20%">|athom-sw04.yaml
Athom_7W_Bulb<br/>Athom_GU10_Bulb|<img src="/images/Athom_7w_Bulb.png" width="50%" height="20%"><img src="/images/Athom_GU10_Bulb.png" width="50%" height="20%">|athom-rgbww-light.yaml
Athom_15W_Bulb|<img src="/images/Athom_15w_Bulb.png" width="50%" height="20%">|athom-rgbct-light.yaml
Athom_12W_Bulb|<img src="/images/Athom_BR30_Bulb.png" width="50%" height="20%">|athom-rgbct-light.yaml|<h4>Temporarily discontinued</h4>
Athom_RGB_Controller|<img src="/images/Athom_RGB_Controller.png" width="50%" height="20%">|athom-rgb-light.yaml
Athom_Addressable_Light_Strip_Controller|<img src="/images/Athom_3Pin_Controller.png" width="50%" height="20%">|athom-ws2812b.yaml
Athom_High_Power_RGBW_Light_Strip_Controller|<img src="/images/Athom_RGBW_Controller.png" width="50%" height="20%">|athom-rgbw-light.yaml
Athom_High_Power_Addressable_Light_Strip_Controller|<img src="/images/Athom_4Pin_Controller.png" width="50%" height="20%">|athom-ls-4p-3wire.yaml
Athom_Mini_Switch|<img src="/images/Athom_Mini_Relay.png" width="50%" height="20%">|athom-mini-switch.yaml
Athom_CB02_Switch|<img src="/images/Athom_CB02.png" width="50%" height="20%">|athom-cb02.yaml
Athom_Presence_Sensor|<img src="/images/Athom_Presence_Sensor.png" width="50%" height="40%">|athom-presence-sensor.yaml
Athom_Garage_Door_Opener|<img src="/images/Athom_Garage_Door_Opener.png" width="50%" height="20%">|athom-garage-door.yaml
Athom_Plug|<img src="/images/Athom_EU_Plug.png" width="50%" height="20%"><img src="/images/Athom_UK_Plug.png" width="50%" height="20%">|athom-smart-plug.yaml|<h4>Discontinued</h4>
54 changes: 38 additions & 16 deletions athom-cb02.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
substitutions:
device_name: "athom-cb02-switch"
friendly_name: "Athom CB02 Switch"
project_name: "athom.cb02-switch"
project_version: "1.0"
project_name: "Athom Technology.Switch Module"
project_version: "1.1"
relay_restore_mode: RESTORE_DEFAULT_OFF

esphome:
name: "${device_name}"
friendly_name: ""
name_add_mac_suffix: true
project:
name: "${project_name}"
Expand All @@ -15,12 +16,18 @@ esp8266:
board: esp8285
restore_from_flash: true

preferences:
flash_write_interval: 1min

api:

ota:

logger:

mdns:
disabled: false

web_server:
port: 80

Expand All @@ -34,14 +41,14 @@ dashboard_import:

binary_sensor:
- platform: status
name: "${friendly_name} Status"
name: "Status"

- platform: gpio
pin:
number: 3
mode: INPUT_PULLUP
inverted: true
name: "${friendly_name} Power Button"
name: "Power Button"
disabled_by_default: true
on_multi_click:
- timing:
Expand All @@ -52,24 +59,31 @@ binary_sensor:
- timing:
- ON for at least 4s
then:
- button.press: restart_button
- button.press: Reset

sensor:
- platform: uptime
name: "${friendly_name} Uptime"
disabled_by_default: true
name: "Uptime Sensor"

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

button:
- platform: restart
id: restart_button
name: "${friendly_name} Restart"
- platform: factory_reset
name: "Reset"
id: Reset

- platform: safe_mode
name: "Safe Mode"
internal: false

switch:
- platform: gpio
name: "${friendly_name}"
name: "Relay"
pin: GPIO13
id: relay
restore_mode: RESTORE_DEFAULT_ON
restore_mode: ${relay_restore_mode}
on_turn_on:
- light.turn_on: blue_led

Expand All @@ -78,7 +92,7 @@ switch:

light:
- platform: status_led
name: "${friendly_name} Status LED"
name: "Status LED"
id: blue_led
disabled_by_default: true
pin:
Expand All @@ -88,5 +102,13 @@ light:
text_sensor:
- platform: wifi_info
ip_address:
name: "${friendly_name} IP Address"
disabled_by_default: true
name: "IP Address"
ssid:
name: "Connected SSID"
mac_address:
name: "Mac Address"

time:
- platform: sntp
id: sntp_time

75 changes: 47 additions & 28 deletions athom-garage-door.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
substitutions:
name: "athom-garage-door"
friendly_name: "Athom Garage Door"
project_name: "athom.garage-door"
project_version: "1.1"
device_name: "athom-garage-door"
project_name: "Athom Technology.Garage Door Opener"
project_version: "1.2"


esphome:
name: "${name}"
name: "${device_name}"
friendly_name: ""
name_add_mac_suffix: true
project:
name: "${project_name}"
Expand All @@ -20,6 +21,10 @@ ota:

logger:


mdns:
disabled: false

web_server:
port: 80

Expand All @@ -33,15 +38,18 @@ dashboard_import:

sensor:
- platform: uptime
name: "${friendly_name} Uptime"
disabled_by_default: true
name: "Uptime Sensor"

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

binary_sensor:
- platform: status
name: "${friendly_name} Status"
name: "Status"

- platform: gpio
name: "${friendly_name} Contact"
name: "Contact"
disabled_by_default: true
device_class: garage_door
id: contact
Expand All @@ -56,7 +64,7 @@ binary_sensor:
number: GPIO14
mode: INPUT_PULLUP
inverted: true
name: "${friendly_name} Button"
name: "Button"
disabled_by_default: true
on_multi_click:
- timing:
Expand All @@ -67,17 +75,21 @@ binary_sensor:
- timing:
- ON for at least 4s
then:
- button.press: restart_button
- button.press: Reset

button:
- platform: restart
id: restart_button
name: "${friendly_name} Restart"
- platform: factory_reset
name: "Reset"
id: Reset

- platform: safe_mode
name: "Safe Mode"
internal: false

switch:
- platform: gpio
pin: GPIO5
name: "${friendly_name} Relay"
name: "Relay"
id: relay
disabled_by_default: true
on_turn_on:
Expand All @@ -88,35 +100,42 @@ switch:

light:
- platform: status_led
name: "${friendly_name} Status LED"
name: "Status LED"
id: wifi_led
disabled_by_default: true
pin: GPIO12

cover:
- platform: template
device_class: garage
name: "${friendly_name}"
name: "Garage Door"
lambda: "return id(contact).state ? COVER_OPEN : COVER_CLOSED;"
open_action:
then:
- if:
condition:
lambda: 'return !id(contact).state;'
then:
- if:
condition:
lambda: 'return !id(contact).state;'
then:
- switch.turn_on: relay
stop_action:
- switch.turn_on: relay
close_action:
then:
- if:
condition:
lambda: 'return id(contact).state;'
then:
- switch.turn_on: relay
- if:
condition:
lambda: 'return id(contact).state;'
then:
- switch.turn_on: relay

text_sensor:
- platform: wifi_info
ip_address:
name: "${friendly_name} IP Address"
disabled_by_default: true
name: "IP Address"
ssid:
name: "Connected SSID"
mac_address:
name: "Mac Address"

time:
- platform: sntp
id: sntp_time
Loading

0 comments on commit 7fec181

Please sign in to comment.