Initial Commit
This commit is contained in:
commit
670919805f
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
# Gitignore settings for ESPHome
|
||||
# This is an example and may include too much for your use-case.
|
||||
# You can modify this file to suit your needs.
|
||||
/.esphome/
|
||||
secrets.yaml
|
8
README.md
Normal file
8
README.md
Normal file
@ -0,0 +1,8 @@
|
||||
* [ESP32-C3 Core dev board](https://wiki.luatos.com/chips/esp32c3/board.html)
|
||||
* https://wiki-luatos-com.translate.goog/chips/esp32c3/board.html?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp
|
||||
* ![ESP32-C3 Core Pinout](./docs/esp32-c3-core_pinout.png)
|
||||
* [Current Transformer site](https://en.yhdc.com/comp/file/download.do?id=950)
|
||||
* [Current Transformer Datasheet](./docs/SCT013-100-100A-1V.pdf)
|
||||
* https://learn.openenergymonitor.org/electricity-monitoring/ct-sensors/interface-with-arduino
|
||||
* https://learn.openenergymonitor.org/electricity-monitoring/ct-sensors/introduction
|
||||
* https://esphome.io/components/sensor/ct_clamp.html
|
10
docker-compose.yaml
Normal file
10
docker-compose.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
version: '3'
|
||||
services:
|
||||
esphome:
|
||||
container_name: esphome
|
||||
image: esphome/esphome:2022.10
|
||||
volumes:
|
||||
- ./:/config
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
privileged: true
|
||||
network_mode: host
|
19241
docs/SCT013-100-100A-1V.pdf
Normal file
19241
docs/SCT013-100-100A-1V.pdf
Normal file
File diff suppressed because one or more lines are too long
BIN
docs/esp32-c3-core_pinout.png
Normal file
BIN
docs/esp32-c3-core_pinout.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 623 KiB |
8
laser-cutter.yaml
Normal file
8
laser-cutter.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
substitutions:
|
||||
node_name: "cms-laser-cutter-power"
|
||||
node_verbose_name: "Laser Cutter"
|
||||
|
||||
packages:
|
||||
esp32_c3_core: !include packages/esp32-c3-core.yaml
|
||||
cms: !include packages/cms-general.yaml
|
||||
ct_clamp: !include packages/esp32-c3-core_ct_clamp.yaml
|
18
packages/cms-general.yaml
Normal file
18
packages/cms-general.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
esphome:
|
||||
name: "${node_name}"
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
password: !secret api_password
|
||||
encryption:
|
||||
key: !secret api_key
|
||||
|
||||
ota:
|
||||
password: !secret ota_password
|
||||
|
||||
wifi:
|
||||
ssid: "CMS-HVAC"
|
||||
password: !secret wifi_password
|
10
packages/esp32-c3-core.yaml
Normal file
10
packages/esp32-c3-core.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
esphome:
|
||||
platformio_options:
|
||||
board_build.f_flash: 40000000L
|
||||
board_build.flash_mode: dio
|
||||
board_build.flash_size: 4MB
|
||||
|
||||
esp32:
|
||||
board: esp32-c3-devkitm-1
|
||||
framework:
|
||||
type: esp-idf
|
24
packages/esp32-c3-core_ct_clamp.yaml
Normal file
24
packages/esp32-c3-core_ct_clamp.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
sensor:
|
||||
- platform: ct_clamp
|
||||
sensor: adc_sensor
|
||||
name: "${node_verbose_name} Measured Current"
|
||||
update_interval: 5s
|
||||
filters:
|
||||
- calibrate_linear:
|
||||
# measured -> actual
|
||||
- 0.003 -> 0
|
||||
- 0.0087 -> 0.8
|
||||
- 0.012 -> 1.117
|
||||
- 0.017 -> 1.575
|
||||
|
||||
- platform: adc
|
||||
pin: GPIO4
|
||||
id: adc_sensor
|
||||
attenuation: 11db
|
||||
|
||||
- platform: adc
|
||||
pin: GPIO0
|
||||
id: adc_ref
|
||||
name: "${node_verbose_name} ADC Ref"
|
||||
update_interval: 10s
|
||||
attenuation: 11db
|
Loading…
Reference in New Issue
Block a user