112 lines
2.9 KiB
YAML
112 lines
2.9 KiB
YAML
substitutions:
|
|
device_name: ID.3 monitor
|
|
device_id: id3er
|
|
project_name: juju.id3er
|
|
extra_version: ""
|
|
project_version: "0.8${extra_version}"
|
|
|
|
packages:
|
|
pids: !include id3pids.yaml
|
|
board: !include wican.yaml
|
|
base: !include base.yaml
|
|
id3er:
|
|
esphome:
|
|
on_boot:
|
|
priority: 600
|
|
then:
|
|
- light.turn_on:
|
|
id: green_led
|
|
effect: "wifi"
|
|
|
|
network:
|
|
# esp-idf takes a long time to connect over IPv6
|
|
enable_ipv6: false
|
|
|
|
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"
|
|
|
|
wifi:
|
|
on_connect:
|
|
- light.turn_on:
|
|
id: green_led
|
|
effect: "mqtt"
|
|
on_disconnect:
|
|
- light.turn_on:
|
|
id: green_led
|
|
effect: "wifi"
|
|
|
|
light:
|
|
- platform: binary
|
|
id: !extend green_led
|
|
effects:
|
|
- strobe:
|
|
name: "wifi"
|
|
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
|
|
|
|
globals:
|
|
- id: pid_index
|
|
type: int
|
|
|
|
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
|
|
- 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
|
|
- 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:
|
|
- interval: 5s
|
|
then:
|
|
- light.toggle: yellow_led
|
|
- script.execute: poll_car
|