Compare commits

...

13 Commits

Author SHA1 Message Date
pszafer
3741466e05 fix fw 2024-05-22 17:03:31 +02:00
pszafer
501155c99e fix ina L power 2024-05-22 16:59:20 +02:00
pszafer
866a2c99ea Add Power measure to INA 2024-05-22 12:47:15 +02:00
pszafer
6b44f23693 fix serial no 2024-05-22 10:25:02 +02:00
pszafer
ac9c9d6ac5 dimmer serial no 2024-05-22 10:00:46 +02:00
pszafer
8733d0f625 add serial number 2024-05-22 09:59:52 +02:00
pszafer
9a5c78334d fix INA to 10A 2024-05-22 09:59:44 +02:00
pszafer
28c60689c6 Dimmer output 2024-05-20 13:10:50 +02:00
pszafer
3ac8e38f75 move dimmer and buzzer to main dimmer file 2024-05-20 09:07:31 +02:00
pszafer
ea52b3d40e fix channel naming 2024-05-19 22:35:02 +02:00
pszafer
f03b078855 fix tag ref 2024-05-19 22:32:51 +02:00
pszafer
f152ce0508 rename ina to ina219 2024-05-19 22:31:33 +02:00
pszafer
dce79eadf6 add dimmer config split into multiple files 2024-05-19 20:41:18 +02:00
8 changed files with 447 additions and 149 deletions

View File

@@ -13,6 +13,21 @@ esphome:
esp32: esp32:
board: esp32dev board: esp32dev
external_components:
- source: github://boneIO-eu/esphome-LM75@main #Original source and thank you note for BTomala https://github.com/boneIO-eu/esphome-lm75
components: [lm75]
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.0.14
files:
[
'devices/dimmer_serial_no.yaml',
'devices/dimmer_i2c.yaml',
'devices/dimmer_ina219.yaml',
]
ethernet: ethernet:
id: eth id: eth
type: LAN8720 type: LAN8720
@@ -23,15 +38,9 @@ ethernet:
power_pin: GPIO16 power_pin: GPIO16
dashboard_import: dashboard_import:
package_import_url: github://boneIO-eu/esphome/boneio-dimmer_2rgbw-v0_1.yaml@v1.0.5 package_import_url: github://boneIO-eu/esphome/boneio-dimmer_2rgbw-v0_3.yaml@v1.0.14
import_full_config: true import_full_config: true
i2c:
sda: GPIO4
scl: GPIO5
scan: True
frequency: 400kHz
pcf8574: pcf8574:
- id: 'pcf_inputs' - id: 'pcf_inputs'
address: 0x38 address: 0x38
@@ -53,6 +62,13 @@ text_sensor:
ip_address: ip_address:
entity_category: diagnostic entity_category: diagnostic
name: boneio-dimmer IP name: boneio-dimmer IP
- platform: template
name: 'Hostname'
id: hostname
entity_category: diagnostic
lambda: |-
return id(eth).get_use_address();
update_interval: 5min
binary_sensor: binary_sensor:
- platform: gpio - platform: gpio
@@ -116,24 +132,6 @@ binary_sensor:
input: true input: true
inverted: true inverted: true
light:
- platform: rgbw
name: 'RGBW L'
red: chl01
green: chl02
blue: chl03
white: chl04
default_transition_length: 2s
gamma_correct: 0
- platform: rgbw
name: 'RGBW R'
red: chr01
green: chr02
blue: chr03
white: chr04
default_transition_length: 2s
gamma_correct: 0
output: output:
- platform: ledc - platform: ledc
pin: 33 pin: 33
@@ -177,46 +175,37 @@ output:
inverted: false inverted: false
id: chr04 id: chr04
light:
- platform: rgbw
name: 'RGBW L'
red: chl01
green: chl02
blue: chl03
white: chl04
default_transition_length: 2s
gamma_correct: 0
- platform: rgbw
name: 'RGBW R'
red: chr01
green: chr02
blue: chr03
white: chr04
default_transition_length: 2s
gamma_correct: 0
sensor: sensor:
- platform: tmp102 - platform: lm75
id: boneIO_temp id: boneIO_temp
name: 'Temperature' name: 'Temperature'
update_interval: 30s update_interval: 30s
entity_category: diagnostic entity_category: diagnostic
- platform: ina219 on_value_range:
address: 0x40 - above: 70.0
shunt_resistance: 1.0 ohm then:
bus_voltage: - switch.turn_on: buzzer
name: 'VDDL Supply' - below: 70.0
unit_of_measurement: 'V' then:
entity_category: diagnostic - switch.turn_off: buzzer
current:
name: 'VDDL Current'
unit_of_measurement: 'A'
entity_category: diagnostic
shunt_voltage:
name: 'VDDL Shunt Voltage'
entity_category: diagnostic
max_voltage: 32V
max_current: 3.2A
update_interval: 5s
- platform: ina219
address: 0x41
shunt_resistance: 1.0 ohm
bus_voltage:
name: 'VDDR Supply'
unit_of_measurement: 'V'
entity_category: diagnostic
current:
name: 'VDDR Current'
unit_of_measurement: 'A'
entity_category: diagnostic
shunt_voltage:
name: 'VDDR Shunt Voltage'
entity_category: diagnostic
max_voltage: 32V
max_current: 3.2A
update_interval: 5s
switch: switch:
- platform: gpio - platform: gpio

View File

@@ -0,0 +1,229 @@
substitutions:
name: boneio-dr-4cct-03
friendly_name: 'BoneIO Dimmer LED'
esphome:
name: '${name}'
friendly_name: '${friendly_name}'
name_add_mac_suffix: true
project:
name: boneio.dimmer-led
version: '0.3'
esp32:
board: esp32dev
external_components:
- source: github://boneIO-eu/esphome-LM75@main #Original source and thank you note for BTomala https://github.com/boneIO-eu/esphome-lm75
components: [lm75]
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.0.14
files:
[
'devices/dimmer_serial_no.yaml',
'devices/dimmer_i2c.yaml',
'devices/dimmer_ina219.yaml',
]
ethernet:
id: eth
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO0_IN
phy_addr: 1
power_pin: GPIO16
dashboard_import:
package_import_url: github://boneIO-eu/esphome/boneio-dimmer_4cct-v0_3.yaml@v1.0.14
import_full_config: true
pcf8574:
- id: 'pcf_inputs'
address: 0x38
logger:
api:
ota:
web_server:
port: 80
local: true
text_sensor:
- platform: version
name: 'boneio-dimmer- Version'
icon: mdi:cube-outline
entity_category: diagnostic
- platform: ethernet_info
ip_address:
entity_category: diagnostic
name: boneio-dimmer IP
- platform: template
name: 'Hostname'
id: hostname
entity_category: diagnostic
lambda: |-
return id(eth).get_use_address();
update_interval: 5min
binary_sensor:
- platform: gpio
name: 'IN_01'
pin:
pcf8574: pcf_inputs
number: 1
mode:
input: true
inverted: true
- platform: gpio
name: 'IN_02'
pin:
pcf8574: pcf_inputs
number: 2
mode:
input: true
inverted: true
- platform: gpio
name: 'IN_03'
pin:
pcf8574: pcf_inputs
number: 3
mode:
input: true
inverted: true
- platform: gpio
name: 'IN_04'
pin:
pcf8574: pcf_inputs
number: 4
mode:
input: true
inverted: true
- platform: gpio
name: 'IN_05'
pin:
number: 36
mode:
input: true
inverted: true
- platform: gpio
name: 'IN_06'
pin:
number: 39
mode:
input: true
inverted: true
- platform: gpio
name: 'IN_07'
pin:
number: 34
mode:
input: true
inverted: true
- platform: gpio
name: 'IN_08'
pin:
number: 35
mode:
input: true
inverted: true
output:
- platform: ledc
pin: 33
frequency: 1000Hz
inverted: false
id: chl01
- platform: ledc
pin: 32
frequency: 1000Hz
inverted: false
id: chl02
- platform: ledc
pin: 12
frequency: 1000Hz
inverted: false
id: chl03
- platform: ledc
pin: 14
frequency: 1000Hz
inverted: false
id: chl04
- platform: ledc
pin: 13
frequency: 1000Hz
inverted: false
id: chr01
- platform: ledc
pin: 15
frequency: 1000Hz
inverted: false
id: chr02
- platform: ledc
pin: 2
frequency: 1000Hz
inverted: false
id: chr03
- platform: ledc
pin: 17
frequency: 1000Hz
inverted: false
id: chr04
light:
- platform: cwww
name: 'CHL_01_02'
cold_white: chl01
warm_white: chl02
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
- platform: cwww
name: 'CHL_03_04'
cold_white: chl03
warm_white: chl04
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
- platform: cwww
name: 'CHR_01_02'
cold_white: chl01
warm_white: chl02
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
- platform: cwww
name: 'CHR_03_04'
cold_white: chl03
warm_white: chl04
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
sensor:
- platform: lm75
id: boneIO_temp
name: 'Temperature'
update_interval: 30s
entity_category: diagnostic
on_value_range:
- above: 70.0
then:
- switch.turn_on: buzzer
- below: 70.0
then:
- switch.turn_off: buzzer
switch:
- platform: gpio
id: buzzer
name: 'Buzzer'
pin:
pcf8574: pcf_inputs
number: 0
mode:
output: true
inverted: true

View File

@@ -13,6 +13,21 @@ esphome:
esp32: esp32:
board: esp32dev board: esp32dev
external_components:
- source: github://boneIO-eu/esphome-LM75@main #Original source and thank you note for BTomala https://github.com/boneIO-eu/esphome-lm75
components: [lm75]
packages:
internals_packages:
url: https://github.com/boneIO-eu/esphome
ref: v1.0.14
files:
[
'devices/dimmer_serial_no.yaml',
'devices/dimmer_i2c.yaml',
'devices/dimmer_ina219.yaml',
]
ethernet: ethernet:
id: eth id: eth
type: LAN8720 type: LAN8720
@@ -23,15 +38,9 @@ ethernet:
power_pin: GPIO16 power_pin: GPIO16
dashboard_import: dashboard_import:
package_import_url: github://boneIO-eu/esphome/boneio-dimmer_8ch-v0_1.yaml@v1.0.5 package_import_url: github://boneIO-eu/esphome/boneio-dimmer_8ch-v0_3.yaml@v1.0.14
import_full_config: true import_full_config: true
i2c:
sda: GPIO4
scl: GPIO5
scan: True
frequency: 400kHz
pcf8574: pcf8574:
- id: 'pcf_inputs' - id: 'pcf_inputs'
address: 0x38 address: 0x38
@@ -53,6 +62,13 @@ text_sensor:
ip_address: ip_address:
entity_category: diagnostic entity_category: diagnostic
name: boneio-dimmer IP name: boneio-dimmer IP
- platform: template
name: 'Hostname'
id: hostname
entity_category: diagnostic
lambda: |-
return id(eth).get_use_address();
update_interval: 5min
binary_sensor: binary_sensor:
- platform: gpio - platform: gpio
@@ -116,6 +132,49 @@ binary_sensor:
input: true input: true
inverted: true inverted: true
output:
- platform: ledc
pin: 33
frequency: 1000Hz
inverted: false
id: chl01
- platform: ledc
pin: 32
frequency: 1000Hz
inverted: false
id: chl02
- platform: ledc
pin: 12
frequency: 1000Hz
inverted: false
id: chl03
- platform: ledc
pin: 14
frequency: 1000Hz
inverted: false
id: chl04
- platform: ledc
pin: 13
frequency: 1000Hz
inverted: false
id: chr01
- platform: ledc
pin: 15
frequency: 1000Hz
inverted: false
id: chr02
- platform: ledc
pin: 2
frequency: 1000Hz
inverted: false
id: chr03
- platform: ledc
pin: 17
frequency: 1000Hz
inverted: false
id: chr04
light: light:
- platform: monochromatic - platform: monochromatic
output: chl01 output: chl01
@@ -167,91 +226,19 @@ light:
default_transition_length: 2s default_transition_length: 2s
gamma_correct: 0 gamma_correct: 0
output:
- platform: ledc
pin: 33
frequency: 1000Hz
inverted: false
id: chl01
- platform: ledc
pin: 32
frequency: 1000Hz
inverted: false
id: chl02
- platform: ledc
pin: 12
frequency: 1000Hz
inverted: false
id: chl03
- platform: ledc
pin: 14
frequency: 1000Hz
inverted: false
id: chl04
- platform: ledc
pin: 13
frequency: 1000Hz
inverted: false
id: chr01
- platform: ledc
pin: 15
frequency: 1000Hz
inverted: false
id: chr02
- platform: ledc
pin: 2
frequency: 1000Hz
inverted: false
id: chr03
- platform: ledc
pin: 17
frequency: 1000Hz
inverted: false
id: chr04
sensor: sensor:
# Lower board temperature - platform: lm75
- platform: tmp102
id: boneIO_temp id: boneIO_temp
name: 'Temperature' name: 'Temperature'
update_interval: 10s update_interval: 30s
entity_category: diagnostic entity_category: diagnostic
on_value_range:
- platform: ina219 - above: 70.0
address: 0x40 then:
shunt_resistance: 1.0 ohm - switch.turn_on: buzzer
bus_voltage: - below: 70.0
name: 'VDDL Supply' then:
unit_of_measurement: 'V' - switch.turn_off: buzzer
entity_category: diagnostic
current:
name: 'VDDL Current'
unit_of_measurement: 'A'
entity_category: diagnostic
shunt_voltage:
name: 'VDDL Shunt Voltage'
entity_category: diagnostic
max_voltage: 32V
max_current: 3.2A
update_interval: 5s
- platform: ina219
address: 0x41
shunt_resistance: 1.0 ohm
bus_voltage:
name: 'VDDR Supply'
unit_of_measurement: 'V'
entity_category: diagnostic
current:
name: 'VDDR Current'
unit_of_measurement: 'A'
entity_category: diagnostic
shunt_voltage:
name: 'VDDR Shunt Voltage'
entity_category: diagnostic
max_voltage: 32V
max_current: 3.2A
update_interval: 5s
switch: switch:
- platform: gpio - platform: gpio

View File

@@ -21,7 +21,7 @@ firmware_destination = "../website/public/esp/firmware"
def json_pattern(firmware_name): def json_pattern(firmware_name):
return { return {
"name": "ESPHome", "name": "ESPHome",
"version": "2024.3.1", "version": "2024.5.0",
"home_assistant_domain": "esphome", "home_assistant_domain": "esphome",
"funding_url": "https://esphome.io/guides/supporters.html", "funding_url": "https://esphome.io/guides/supporters.html",
"new_install_prompt_erase": False, "new_install_prompt_erase": False,

5
devices/dimmer_i2c.yaml Normal file
View File

@@ -0,0 +1,5 @@
i2c:
sda: GPIO4
scl: GPIO5
scan: True
frequency: 400kHz

View File

@@ -0,0 +1,37 @@
sensor:
- platform: ina219
address: 0x40
shunt_resistance: 0.005 ohm
bus_voltage:
name: 'VDDL Supply'
entity_category: diagnostic
power:
name: 'VDDL Power'
entity_category: diagnostic
current:
name: 'VDDL Current'
entity_category: diagnostic
shunt_voltage:
name: 'VDDL Shunt Voltage'
entity_category: diagnostic
max_voltage: 32V
max_current: 10A
update_interval: 5s
- platform: ina219
address: 0x41
shunt_resistance: 0.005 ohm
bus_voltage:
name: 'VDDR Supply'
entity_category: diagnostic
power:
name: 'VDDR Power'
entity_category: diagnostic
current:
name: 'VDDR Current'
entity_category: diagnostic
shunt_voltage:
name: 'VDDR Shunt Voltage'
entity_category: diagnostic
max_voltage: 32V
max_current: 10A
update_interval: 5s

View File

@@ -0,0 +1,42 @@
output:
- platform: ledc
pin: 33
frequency: 1000Hz
inverted: false
id: chl01
- platform: ledc
pin: 32
frequency: 1000Hz
inverted: false
id: chl02
- platform: ledc
pin: 12
frequency: 1000Hz
inverted: false
id: chl03
- platform: ledc
pin: 14
frequency: 1000Hz
inverted: false
id: chl04
- platform: ledc
pin: 13
frequency: 1000Hz
inverted: false
id: chr01
- platform: ledc
pin: 15
frequency: 1000Hz
inverted: false
id: chr02
- platform: ledc
pin: 2
frequency: 1000Hz
inverted: false
id: chr03
- platform: ledc
pin: 17
frequency: 1000Hz
inverted: false
id: chr04

View File

@@ -0,0 +1,9 @@
text_sensor:
- platform: template
name: 'Serial No.'
lambda: |-
std::string mac = get_mac_address();
return "dim" + mac.erase(0, mac.length()/2);
icon: mdi:expansion-card-variant
entity_category: diagnostic
update_interval: 10min