mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-12-06 09:06:52 +01:00
mcu-its-g5: MQTT only, to the own broker with an EMQX bridge to OpenTrafficMap
HA can't reach the API on the car hotspot, so the device talks MQTT to the own broker like the tracker; EMQX forwards its/<node_id>/# to cits1.opentrafficmap.org. API and homeassistant time removed, the OTA key set directly. MQTT discovery unique ids with the MAC (its-g5 and tracker): the default ESP<type><object_id> made the common entities of both devices clash in HA. Uptime in "d": HA MQTT discovery rejects "days" with device class duration.
This commit is contained in:
1 parent
177bdcb3de
commit
3676c0bbcc
4 files changed
+22
-42
No files matched your search
@@ -2,7 +2,7 @@
|
|||||||
platform: uptime
|
platform: uptime
|
||||||
name: Uptime
|
name: Uptime
|
||||||
id: uptime_sensor
|
id: uptime_sensor
|
||||||
unit_of_measurement: "days"
|
unit_of_measurement: d # HA unit for duration; MQTT discovery rejects "days"
|
||||||
accuracy_decimals: 2
|
accuracy_decimals: 2
|
||||||
update_interval: 60s
|
update_interval: 60s
|
||||||
filters:
|
filters:
|
||||||
|
|||||||
+17
-41
@@ -39,6 +39,14 @@ packages:
|
|||||||
# ipv6_only off: eppp_link (pulled in by esp_wifi_remote) needs IPv4, fix belongs in esp-protocols
|
# ipv6_only off: eppp_link (pulled in by esp_wifi_remote) needs IPv4, fix belongs in esp-protocols
|
||||||
# ipv6_only: !include common/ipv6_only.yaml
|
# ipv6_only: !include common/ipv6_only.yaml
|
||||||
|
|
||||||
|
# MQTT only: HA can't reach the API on the car hotspot, and both would duplicate the entities
|
||||||
|
api: !remove
|
||||||
|
time: !remove # homeassistant time needs the API
|
||||||
|
ota:
|
||||||
|
- id: !extend ota_esphome
|
||||||
|
encryption:
|
||||||
|
key: !secret api_key # was inherited from api
|
||||||
|
|
||||||
external_components:
|
external_components:
|
||||||
# Wi-Fi on the esp32_hosted co-processor of a host with its own radio
|
# Wi-Fi on the esp32_hosted co-processor of a host with its own radio
|
||||||
- source: github://pr#22819
|
- source: github://pr#22819
|
||||||
@@ -73,49 +81,17 @@ wifi:
|
|||||||
udp:
|
udp:
|
||||||
id: its_udp
|
id: its_udp
|
||||||
|
|
||||||
# Raw frames to the OpenTrafficMap C-ITS server, as in hn's its-g5-opentrafficmap.yaml
|
# Own broker as on the tracker: HA sees the entities (API is unreachable on the car hotspot), and an
|
||||||
|
# EMQX bridge forwards its/${node_id}/# to cits1.opentrafficmap.org:8883 (as hn's its-g5-opentrafficmap.yaml)
|
||||||
mqtt:
|
mqtt:
|
||||||
id: mqtt_client
|
id: mqtt_client
|
||||||
broker: cits1.opentrafficmap.org
|
broker: !secret mqtt_ext
|
||||||
port: 8883 # TLS is mandatory; publishing is anonymous
|
# Own user, so the broker ACL can limit it to its own topics
|
||||||
discovery: false
|
username: !secret mqtt_its_g5_username
|
||||||
# *.opentrafficmap.org wildcard certificate, the hostname check fails with MbedTLS
|
password: !secret mqtt_its_g5_password
|
||||||
skip_cert_cn_check: true
|
discovery: true
|
||||||
certificate_authority: |
|
# MAC in the unique_id: the default ESP<type><object_id> clashes with the tracker's common entities
|
||||||
-----BEGIN CERTIFICATE-----
|
discovery_unique_id_generator: mac
|
||||||
MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw
|
|
||||||
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
|
|
||||||
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4
|
|
||||||
WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu
|
|
||||||
ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY
|
|
||||||
MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc
|
|
||||||
h77ct984kIxuPOZXoHj3dcKi/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cOj/KK
|
|
||||||
NFtY2PwByVS5uCbMiogziUwthDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5
|
|
||||||
ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJwTdwJx4nLCgdNbOhdjsnvzqvHu7Ur
|
|
||||||
TkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nxe5AW0wdeRlN8NwdC
|
|
||||||
jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc
|
|
||||||
oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq
|
|
||||||
4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA
|
|
||||||
mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d
|
|
||||||
emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=
|
|
||||||
-----END CERTIFICATE-----
|
|
||||||
# Empty prefix: no entity states, no command topics (the broker is anonymous) and no log topic;
|
|
||||||
# only the OpenTrafficMap topics below
|
|
||||||
topic_prefix: null
|
|
||||||
log_topic: null
|
log_topic: null
|
||||||
birth_message:
|
birth_message:
|
||||||
topic: its/${node_id}/status
|
topic: its/${node_id}/status
|
||||||
|
|||||||
@@ -119,6 +119,8 @@ mqtt:
|
|||||||
username: !secret mqtt_tracker_username
|
username: !secret mqtt_tracker_username
|
||||||
password: !secret mqtt_tracker_password
|
password: !secret mqtt_tracker_password
|
||||||
discovery: true
|
discovery: true
|
||||||
|
# MAC in the unique_id: the default ESP<type><object_id> clashes with other devices' common entities
|
||||||
|
discovery_unique_id_generator: mac
|
||||||
# Every message costs data: logs stay on USB, and one ping per 10 min keeps the session.
|
# Every message costs data: logs stay on USB, and one ping per 10 min keeps the session.
|
||||||
# Lower keepalive if O2's CGNAT drops idle TCP sooner (reconnects resend all discovery)
|
# Lower keepalive if O2's CGNAT drops idle TCP sooner (reconnects resend all discovery)
|
||||||
log_topic: null
|
log_topic: null
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ mqtt_username: "username"
|
|||||||
mqtt_password: "password"
|
mqtt_password: "password"
|
||||||
mqtt_tracker_username: "username"
|
mqtt_tracker_username: "username"
|
||||||
mqtt_tracker_password: "password"
|
mqtt_tracker_password: "password"
|
||||||
|
mqtt_its_g5_username: "username"
|
||||||
|
mqtt_its_g5_password: "password"
|
||||||
|
|
||||||
ble_beacon_honda_uuid: "00000000-0000-0000-0000-000000000000"
|
ble_beacon_honda_uuid: "00000000-0000-0000-0000-000000000000"
|
||||||
ble_beacon_honda_major: 10167
|
ble_beacon_honda_major: 10167
|
||||||
|
|||||||
Reference in new issue
Block a user