autohuttli/id3er.yaml

112 lines
2.9 KiB
YAML
Raw Permalink Normal View History

2025-08-28 10:46:00 +02:00
substitutions:
2025-08-28 20:26:49 +02:00
device_name: ID.3 monitor
2025-08-28 10:46:00 +02:00
device_id: id3er
project_name: juju.id3er
extra_version: ""
2025-08-30 14:26:18 +02:00
project_version: "0.8${extra_version}"
2025-08-28 10:46:00 +02:00
packages:
2025-08-28 20:26:49 +02:00
pids: !include id3pids.yaml
2025-08-28 10:46:00 +02:00
board: !include wican.yaml
base: !include base.yaml
2025-08-28 20:26:49 +02:00
id3er:
esphome:
on_boot:
priority: 600
2025-08-28 20:26:49 +02:00
then:
- light.turn_on:
id: green_led
effect: "wifi"
network:
# esp-idf takes a long time to connect over IPv6
enable_ipv6: false
2025-08-28 20:26:49 +02:00
2025-08-29 12:21:02 +02:00
api:
reboot_timeout: 0s
mqtt:
broker: mqtt.juju.nz
port: 1883
username: autohuttli
password: !secret mqtt_password
reboot_timeout: 0s
idf_send_async: true
log_topic: null
keepalive: 1min
on_connect:
- light.turn_off:
id: green_led
on_disconnect:
- light.turn_on:
id: green_led
effect: "mqtt"
2025-08-28 20:26:49 +02:00
wifi:
on_connect:
- light.turn_on:
id: green_led
effect: "mqtt"
2025-08-28 20:26:49 +02:00
on_disconnect:
- light.turn_on:
id: green_led
effect: "wifi"
2025-08-28 20:26:49 +02:00
light:
- platform: binary
id: !extend green_led
effects:
- strobe:
name: "wifi"
2025-08-28 20:26:49 +02:00
colors:
- state: True
duration: 100ms
- state: False
duration: 900ms
- strobe:
name: "mqtt"
colors:
- state: True
duration: 100ms
- state: False
duration: 100ms
- state: True
duration: 100ms
- state: False
duration: 700ms
2025-08-28 20:26:49 +02:00
2025-08-29 12:21:02 +02:00
globals:
- id: pid_index
type: int
2025-08-28 20:26:49 +02:00
canbus:
- platform: esp32_can
id: !extend can0
use_extended_id: true
on_frame:
- can_id: 0
can_id_mask: 0
use_extended_id: false
then:
- light.toggle: yellow_led
2025-08-28 20:26:49 +02:00
- logger.log:
format: "Got"
- lambda: |-
auto data_pretty = remote_transmission_request ? "n/a" : format_hex_pretty(x).c_str();
ESP_LOGW("eup_dump", "can_id: 0x%08x, rtr: %d, length: %d, content: %s", can_id, remote_transmission_request, x.size(), data_pretty);
- can_id: 0
can_id_mask: 0
use_extended_id: true
then:
- light.toggle: yellow_led
2025-08-28 20:26:49 +02:00
- logger.log:
format: "Got"
- lambda: |-
auto data_pretty = remote_transmission_request ? "n/a" : format_hex_pretty(x).c_str();
ESP_LOGW("eup_dump", "can_id: 0x%08x, rtr: %d, length: %d, content: %s", can_id, remote_transmission_request, x.size(), data_pretty);
interval:
2025-08-29 12:21:02 +02:00
- interval: 5s
2025-08-28 20:26:49 +02:00
then:
- light.toggle: yellow_led
2025-08-28 20:26:49 +02:00
- script.execute: poll_car