Compare commits

..

4 Commits

Author SHA1 Message Date
f552ea0f97 Start playing with CANopen 2025-05-02 20:34:53 +02:00
e0b76fb95f Fix ethernet 2025-05-02 20:29:19 +02:00
f8ef9d261d Remove API and WIFI from vehicle beacons 2025-05-02 20:24:55 +02:00
f86cb569b0 Switch to pioarduino 2025-05-02 20:23:18 +02:00
33 changed files with 245 additions and 201 deletions

View File

@@ -3,6 +3,7 @@ ethernet:
type: LAN8720
mdc_pin: 23
mdio_pin: 18
clk_mode: GPIO17_OUT
clk_pin: 17
clk_mode: CLK_OUT
phy_addr: 0
power_pin: 12

View File

@@ -15,11 +15,13 @@ esp32:
# board: m5stamp-pico
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.12
# version: 5.3.1
# platform_version: 6.9.0
external_components:
- source: components
# external_components:
# - source: components
packages:
common: !include common/common.yaml
@@ -55,7 +57,6 @@ light:
rgb_order: GRB
pin: 27
num_leds: 1
# rmt_channel: 0
chipset: ws2812
restore_mode: ALWAYS_OFF
- platform: esp32_rmt_led_strip
@@ -64,7 +65,6 @@ light:
rgb_order: GRB
pin: 25
num_leds: 7
# rmt_channel: 1
chipset: ws2812
restore_mode: ALWAYS_OFF
effects:

View File

@@ -27,8 +27,8 @@ esp32:
# version: dev
# version: 5.1.2
# platform_version: 6.6.0
version: 5.3.1
platform_version: 6.9.0
version: 5.3.3
platform_version: 53.03.12
# type: arduino
pcf8574:

View File

@@ -14,8 +14,8 @@ esp32:
board: esp32doit-devkit-v1
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
sdkconfig_options:
CONFIG_FREERTOS_UNICORE: y
advanced:

View File

@@ -14,8 +14,8 @@ esp32:
board: esp32doit-devkit-v1
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
sdkconfig_options:
CONFIG_FREERTOS_UNICORE: y
advanced:

View File

@@ -40,8 +40,8 @@ esp32:
flash_size: 16MB
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
logger:
hardware_uart: USB_SERIAL_JTAG

View File

@@ -40,8 +40,8 @@ esp32:
flash_size: 16MB
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
logger:
hardware_uart: USB_SERIAL_JTAG

View File

@@ -13,12 +13,14 @@ esp32:
board: esp32dev
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
# version: 5.3.1
# platform_version: 6.9.0
external_components:
- source: github://mrk-its/esphome-canopen@dev
refresh: 1h
- source: github://mrk-its/esphome-canbus-udp-multicast@dev
refresh: 1h
packages:
common: !include common/common.yaml
@@ -28,65 +30,94 @@ canbus:
id: can_bus
rx_pin: 22
tx_pin: 23
can_id: 0
bit_rate: 125kbps
can_id: 1
bit_rate: 500kbps
canopen:
id: can_gate
id: can_open
canbus_id: can_bus
node_id: 1
entities:
- id: boot
index: 1
- index: 1
id: light1_state
rpdo:
- node_id: 2
tpdo: 0
- id: blue_led
index: 2
tpdo: 0
- id: uptime_sensor
index: 3
tpdo: 0
- id: cover1
index: 4
tpdo: 1
# - id: cover2
# index: 5
# tpdo: 1
offset: 0
cmd: 0
sensor:
- platform: uptime
id: uptime_sensor
name: "${name} Uptime"
update_interval: 5sec
internal: true
- index: 2
id: light1_brightness
size: 1
min_value: 0.0
max_value: 1.0
rpdo:
- node_id: 2
tpdo: 0
offset: 1
cmd: 0
- index: 3
id: light2_state
rpdo:
- node_id: 2
tpdo: 0
offset: 3
cmd: 0
- index: 4
id: light2_brightness
size: 1
min_value: 0.0
max_value: 1.0
rpdo:
- node_id: 2
tpdo: 0
offset: 4
cmd: 0
binary_sensor:
- platform: template
id: light1_state
name: "Test Light 1 State"
- platform: template
id: light2_state
name: "Test Light 2 State"
- platform: template
id: light1_state_cmd
- platform: gpio
name: "${name} Boot"
id: boot
internal: true
name: "Boot Button"
id: boot_button
pin:
number: 0
inverted: true
mode:
input: true
pullup: true
on_press:
then:
- lambda: |-
bool state = id(light1_state).state || id(light2_state).state;
// send command to entity #1 (light) on node #2
id(can_open).send_entity_cmd(2, 1, !state);
// send command to entity #2 (light2) on node #2
id(can_open).send_entity_cmd(2, 2, !state);
sensor:
- platform: template
id: light1_brightness
name: "Test Light 1 Brightness"
- platform: template
id: light2_brightness
name: "Test Light 2 Brightness"
switch:
- platform: gpio
name: "${name} Led"
name: "Led"
id: blue_led
internal: true
pin: 2
cover:
- platform: time_based
name: "${name} Cover"
id: cover1
internal: true
device_class: shutter
has_built_in_endstop: true
open_action:
- logger.log: open_action
open_duration: 10s
close_action:
- logger.log: close_action
close_duration: 10s
stop_action:
- logger.log: stop_action

View File

@@ -13,12 +13,14 @@ esp32:
board: esp32dev
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
# version: 5.3.2
# platform_version: 53.03.11
external_components:
- source: github://mrk-its/esphome-canopen@dev
refresh: 1h
- source: github://mrk-its/esphome-canbus-udp-multicast@dev
refresh: 1h
packages:
common: !include common/common.yaml
@@ -28,65 +30,77 @@ canbus:
id: can_bus
rx_pin: 22
tx_pin: 23
can_id: 0
bit_rate: 125kbps
can_id: 2
bit_rate: 500kbps
canopen:
id: can_gate
id: can_open
canbus_id: can_bus
node_id: 2
entities:
- id: boot
index: 1
- index: 1
id: light1
tpdo: 0
- id: blue_led
index: 2
- index: 2
id: light2
tpdo: 0
- id: uptime_sensor
index: 3
- index: 3
id: light3
tpdo: 0
- id: cover1
index: 4
tpdo: 1
# - id: cover2
# index: 5
# tpdo: 1
sensor:
- platform: uptime
id: uptime_sensor
name: "${name} Uptime"
update_interval: 5sec
internal: true
output:
- platform: template
id: cw_output1
type: float
write_action:
- logger.log:
format: "output1: %f"
args: ['state']
binary_sensor:
- platform: gpio
name: "${name} Boot"
id: boot
internal: true
pin:
number: 0
inverted: true
- platform: template
id: ww_output1
type: float
write_action:
- logger.log:
format: "output2: %f"
args: ['state']
switch:
- platform: gpio
name: "${name} Led"
id: blue_led
internal: true
pin: 2
- platform: template
id: output2
type: float
write_action:
- logger.log:
format: "output1: %f"
args: ['state']
cover:
- platform: time_based
name: "${name} Cover"
id: cover1
internal: true
device_class: shutter
has_built_in_endstop: true
open_action:
- logger.log: open_action
open_duration: 10s
close_action:
- logger.log: close_action
close_duration: 10s
stop_action:
- logger.log: stop_action
- platform: template
id: output3
type: float
write_action:
- logger.log:
format: "output1: %f"
args: ['state']
light:
- platform: cwww
id: light1
name: "${name} Light 1"
cold_white: cw_output1
warm_white: ww_output1
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
constant_brightness: false
default_transition_length: 0s
- platform: monochromatic
id: light2
name: "${name} Light 2"
output: output2
default_transition_length: 0s
- platform: binary
id: light3
name: "${name} Light 3"
output: output3

View File

@@ -14,8 +14,8 @@ esp32:
framework:
# type: arduino
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
external_components:
# - source: github://pr#3017

View File

@@ -16,8 +16,8 @@ esp32:
variant: esp32c3
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.3
platform_version: 53.03.12
packages:
common: !include common/common.yaml

View File

@@ -13,8 +13,8 @@ esp32:
board: m5stack-atom
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
# external_components:
# - source: github://pr#7958

View File

@@ -33,8 +33,8 @@ esp32:
board: m5stack-atom
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.12
external_components:
- source: github://pr#7072

View File

@@ -15,8 +15,8 @@ esp32:
framework:
# type: arduino
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
external_components:
- source: components

View File

@@ -14,8 +14,8 @@ esp32:
variant: esp32c3
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
packages:
common: !include common/common.yaml

View File

@@ -13,8 +13,8 @@ esp32:
board: m5stack-atom
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
external_components:
- source: github://mknjc/esphome@ds248x

View File

@@ -13,8 +13,8 @@ esp32:
board: m5stack-atom
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
external_components:
- source: components

View File

@@ -10,13 +10,13 @@ esphome:
esp32:
board: esp32doit-devkit-v1
framework:
# version: 5.1.2
# platform_version: 6.6.0
version: 5.3.2
platform_version: 53.03.11
type: esp-idf
# external_components:
# - source: github://pr#4062
# components: ethernet
external_components:
- source: github://pr#8457
components: ethernet
# - source: github://pr#4080
# components: [lcd_pcf8574, lcd_base]
# - source: github://pr#3564

View File

@@ -14,8 +14,8 @@ esp32:
board: m5stack-atom
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
external_components:
- source: github://mknjc/esphome@ds248x

View File

@@ -31,8 +31,8 @@ esp32:
board: m5stack-atom
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
packages:
common: !include common/common.yaml

View File

@@ -20,8 +20,8 @@ esp32:
flash_size: 16MB
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
sdkconfig_options:
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y
CONFIG_ESP32S3_DATA_CACHE_64KB: y
@@ -46,7 +46,7 @@ i2c:
psram:
mode: octal
speed: 120MHz
speed: 40MHz
spi:
id: display_qspi

View File

@@ -18,8 +18,8 @@ esp32:
flash_size: 16MB
framework:
type: esp-idf
# version: 5.1.2
# platform_version: 6.5.0
version: 5.3.2
platform_version: 53.03.11
# Required to achieve sufficient PSRAM bandwidth
sdkconfig_options:
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y
@@ -301,10 +301,12 @@ image:
# mdi:battery-arrow-down-outline
id: solar_power_icon
resize: 50x50
type: BINARY
- file: mdi:battery-arrow-down-outline
id: home_battery_icon
resize: 30x30
type: BINARY
lvgl:
log_level: INFO
@@ -374,8 +376,8 @@ lvgl:
color: 0xFFFFFF
r_mod: 12 #sets line length by this much difference from the scale default radius
value: 50
- img:
id: power_meter_input_img
# - image:
# id: power_meter_input_img
- arc:
color: 0xFF3000
r_mod: 10 #radius difference from the scale default radius
@@ -439,12 +441,12 @@ lvgl:
#bg_color: 0xFFFFFF
#y: -35
#x: -60
- img:
- image:
src: solar_power_icon
id: img_solar_power
align: center
img_recolor: 0xFFFF00
img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
image_recolor: 0xFFFF00
image_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
#bg_color: 0xFFFFFF
y: 50
#x: -60
@@ -482,8 +484,8 @@ lvgl:
color: 0xFFFFFF
r_mod: 12 #sets line length by this much difference from the scale default radius
value: 50
- img:
id: power_meter_input_img2
# - image:
# id: power_meter_input_img2
- arc:
color: 0xFF3000
r_mod: 10 #radius difference from the scale default radius
@@ -547,12 +549,12 @@ lvgl:
#bg_color: 0xFFFFFF
#y: -35
#x: -60
- img:
- image:
src: solar_power_icon
id: img_solar_power2
align: center
img_recolor: 0xFFFF00
img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
image_recolor: 0xFFFF00
image_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
#bg_color: 0xFFFFFF
y: 50
#x: -60
@@ -590,8 +592,8 @@ lvgl:
color: 0xFFFFFF
r_mod: 12 #sets line length by this much difference from the scale default radius
value: 50
- img:
id: power_meter_input_img3
# - image:
# id: power_meter_input_img3
- arc:
color: 0xFF3000
r_mod: 10 #radius difference from the scale default radius
@@ -655,12 +657,12 @@ lvgl:
#bg_color: 0xFFFFFF
#y: -35
#x: -60
- img:
- image:
src: solar_power_icon
id: img_solar_power3
align: center
img_recolor: 0xFFFF00
img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
image_recolor: 0xFFFF00
image_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
#bg_color: 0xFFFFFF
y: 50
#x: -60

View File

@@ -14,8 +14,8 @@ esp32:
board: m5stack-atom
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
packages:
common: !include common/common.yaml

View File

@@ -34,8 +34,8 @@ esp32:
board: nodemcu-32s
framework:
type: esp-idf
# version: 5.1.2
# platform_version: 6.6.0
version: 5.3.2
platform_version: 53.03.11
external_components:
# - source:

View File

@@ -17,8 +17,8 @@ esp32:
variant: esp32c3
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
packages:
common: !include common/common.yaml

View File

@@ -13,8 +13,8 @@ esp32:
board: m5stack-atom
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
packages:
common: !include common/common.yaml

View File

@@ -17,8 +17,8 @@ esp32:
variant: ESP32C3
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
packages:
common: !include common/common.yaml

View File

@@ -88,8 +88,8 @@ esp32:
# platform_version: 6.5.0
framework:
type: esp-idf
version: 5.1.2
platform_version: 6.5.0
version: 5.3.2
platform_version: 53.03.11
## TESTING
@@ -117,13 +117,13 @@ i2c:
modem:
id: atmodem
ready: modem_ready
# ready: modem_ready
rx_pin: 26
tx_pin: 27
model: SIM7600
apn: o2internet
username: ""
password: ""
# username: ""
# password: ""
pin_code: ""
init_at:
- AT+CGNSSMODE=15,1 # GNSS all navigation systems

View File

@@ -37,11 +37,11 @@ esp32:
framework:
type: esp-idf
api:
reboot_timeout: 0s
# api:
# reboot_timeout: 0s
wifi:
reboot_timeout: 0s
# wifi:
# reboot_timeout: 0s
external_components:
- source: components
@@ -80,7 +80,6 @@ light:
rgb_order: GRB
pin: 27
num_leds: 1
rmt_channel: 0
chipset: ws2812
restore_mode: ALWAYS_OFF
effects:

View File

@@ -37,11 +37,11 @@ esp32:
framework:
type: esp-idf
api:
reboot_timeout: 0s
# api:
# reboot_timeout: 0s
wifi:
reboot_timeout: 0s
# wifi:
# reboot_timeout: 0s
external_components:
- source: components
@@ -80,7 +80,6 @@ light:
rgb_order: GRB
pin: 27
num_leds: 1
rmt_channel: 0
chipset: ws2812
restore_mode: ALWAYS_OFF
effects:

View File

@@ -36,24 +36,24 @@ esp32:
board: m5stack-atom
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
external_components:
- source: components
packages:
wifi: !include common/wifi.yaml
# wifi: !include common/wifi.yaml
logger: !include common/logger.yaml
# api: !include common/api.yaml
ota: !include common/ota.yaml
# ota: !include common/ota.yaml
# common: !include common/common.yaml
# api:
# reboot_timeout: 0s
wifi:
reboot_timeout: 0s
# wifi:
# reboot_timeout: 0s
# debug:
@@ -85,7 +85,6 @@ light:
rgb_order: GRB
pin: 27
num_leds: 1
rmt_channel: 0
chipset: ws2812
restore_mode: ALWAYS_OFF
effects:

View File

@@ -37,18 +37,18 @@ esp32:
framework:
type: esp-idf
api:
reboot_timeout: 0s
# api:
# reboot_timeout: 0s
wifi:
reboot_timeout: 0s
# wifi:
# reboot_timeout: 0s
external_components:
- source: components
packages:
common: !include common/logger.yaml
wifi: !include common/wifi.yaml
# wifi: !include common/wifi.yaml
# common: !include common/common.yaml
# debug:
@@ -81,7 +81,6 @@ light:
rgb_order: GRB
pin: 27
num_leds: 1
rmt_channel: 0
chipset: ws2812
restore_mode: ALWAYS_OFF
effects:

View File

@@ -26,8 +26,8 @@ esp32:
board: m5stack-atom
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
version: 5.3.2
platform_version: 53.03.11
packages:
common: !include common/common.yaml