You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to build firmware for different hardware versions for the same CPU platform? #162
The build workflow produces binaries that are named {name}-{platform}.factory.bin
Where {name} is the name as configured in the ESPHome configuration YAML:
esphome:
name: my-device
and {platform} the CPU platform, ESP8266, ESP32, ESPC3 etc
When using different hardware versions one might want to create a firmware version for that specific hardware version. However since both hardware versions use the same CPU platform its not possible to create separate binaries for each hardware version.
Unfortunately some revisions of the hardware uses different components so I need separate configuration files.
I want the binaries named exactly as you say. How did you achieve this? For me both binaries are named my-device-esp32c3.factory.bin and thus the compile of the second config file over writes the binary of the first compile
Thanks for figuring that out! Unfortunately that also means the hostnames will be different depending on the hardware.
I'm developing an component that can be installed on off the shelf ESP boards and some of these boards need different configurations. For instance on board has a nor mal status LED, while others have an RGB LED. This needs to be configured differently in the YAML. Or some sensors need a different way GPIO.
I named my YAMLs <project>-<board>-<sensor>.yaml and <project>-<board>-<sensor>.factory.yaml and I'dd like to have the firmware bins to follow the same naming scheme.
The name is also only allowed to be 24 characters long, so I would need to use abbreviations for board and sensor to fit within that size.
So there is no way to configure the name of the resulting bin? I am able to set the build path for each config file, but that doesn't solve the problem of the bin files being the same name and being over written when the compiled bin file is copied to GitHun pages
Big Mike (@mikelawrence) Don't you have the same problem with for instance rev-b-pkg-a-c4001-esp32-s3.yaml and rev-b-pkg-a-ld2450-esp32-s3.yaml having the same name but different configurations?
Well I could have read all your messages. The crux of your problem is you want the same ESPHome name but a different filename for each config file beyond a different platform. You are right, this is not possible with the current workflow.
Activity
mikelawrence commentedon Apr 29, 2026
Don't you need a new configuration YAML file for each hardware version and can't you just use a new name?
I used separate config files for two different PCB revisions of a sensor and my binaries looked like:
Maybe I don't understand...
rrooggiieerr commentedon Apr 29, 2026
Unfortunately some revisions of the hardware uses different components so I need separate configuration files.
I want the binaries named exactly as you say. How did you achieve this? For me both binaries are named
my-device-esp32c3.factory.binand thus the compile of the second config file over writes the binary of the first compilemikelawrence commentedon Apr 29, 2026
Have at look at ESPHome example repo. The publish-firmware workflow builds multiple config files. I based my setup on this example.
To answer your question, I changed the name in each config file (just an example below).
1st config file
2nd config file
If you want to see my setup have a look at my repo
All of this is for publishing on GitHub.
rrooggiieerr commentedon Apr 30, 2026
Thanks for figuring that out! Unfortunately that also means the hostnames will be different depending on the hardware.
I'm developing an component that can be installed on off the shelf ESP boards and some of these boards need different configurations. For instance on board has a nor mal status LED, while others have an RGB LED. This needs to be configured differently in the YAML. Or some sensors need a different way GPIO.
I named my YAMLs
<project>-<board>-<sensor>.yamland<project>-<board>-<sensor>.factory.yamland I'dd like to have the firmware bins to follow the same naming scheme.The
nameis also only allowed to be 24 characters long, so I would need to use abbreviations for board and sensor to fit within that size.So there is no way to configure the name of the resulting bin? I am able to set the build path for each config file, but that doesn't solve the problem of the bin files being the same name and being over written when the compiled bin file is copied to GitHun pages
rrooggiieerr commentedon Apr 30, 2026
Big Mike (@mikelawrence) Don't you have the same problem with for instance
rev-b-pkg-a-c4001-esp32-s3.yamlandrev-b-pkg-a-ld2450-esp32-s3.yamlhaving the same name but different configurations?rrooggiieerr commentedon Apr 30, 2026
Ah, it appears you overwrite the name in the
factory.yamlmikelawrence commentedon May 3, 2026
Yes. Is it working for you now?
rrooggiieerr commentedon May 3, 2026
Not really the way I'd like. Each board/sensor combo gets a different name while I would prefer it to have the same name.
mikelawrence commentedon May 4, 2026
Well I could have read all your messages. The crux of your problem is you want the same ESPHome
namebut a differentfilenamefor each config file beyond a different platform. You are right, this is not possible with the current workflow.