CadiLACi
(Laszlo Balogh)
1
Hi!
I am looking to run multiple esphome boards running the same firmware, and it would be nice if they could differentiate themselves automatically.
The boards all have wifi chips with mac addresses that have the last 6 characters that are unique. Can I get those characters into a variable?
I use CANBUS to send data between them, it would be nice to differentiate data coming from multiple sources automatically.
Else I would have to flash the boards each with a unique Yaml file, and that would be hard…
stevemann
(Stephen Mann (YAML-challenged))
3
@nickrout beat me to it.
esphome:
# Automatically add the mac address to the name
# so you can use a single firmware for all devices
name_add_mac_suffix: true
CadiLACi
(Laszlo Balogh)
5
Thanks!
I knew about this one, but I needed the unique mac characters for the CAN id-s too!
CadiLACi
(Laszlo Balogh)
6
Thanks!
This should help me a lot! I will try to put this into the CANbus extended id!
I will write if it is successful!
stevemann
(Stephen Mann (YAML-challenged))
7
This might help. I make a text_sensor that contains my MAC:
# Get the WiFi details
text_sensor:
- platform: wifi_info
mac_address:
name: ${friendly_name} Mac Address
You could probably use the sensor state in assembling your CAN message.
But, I know so little about CAN that I don’t know the meaning of the TLA.