I just want to switch a relay by ESPHome.
ESPHome is running over HA on my Pi3 B+, but i can’t compile anything…
Or, I haven’t found it yet, whether it’s possible to upload and flash the bin file compiled on another computer.
i know, but i didn’t find any tool to create that bin file
Had the same issue, the Pi3 is simply not powerful enough. Anything beyond a few lines of code crashed the whole thing. If this sounds like an okay way: I’m using the command line version of esphome on my windows10 laptop for the compiling and OTA flashing.
If your RPi is not powerfull enough you can install esphome on another platform, even on Windows.
https://www.esphome.io/guides/installing_esphome.html
https://esphome.io/guides/migrate_espeasy.html
-
Using the command line: run
esphome livingroom.yaml compile
(replacinglivingroom.yaml
with your configuration file of course) and navigate to the<NODE_NAME>/.pioenvs/<NODE_NAME>/
folder. There you will find afirmware.bin
file, this is the binary you will upload.
That works, but now how do I persuade esphome to flash the bin-file on a Pi3 running HASS OS, accessible via tailscale?
It’s a memory issue. You can increase the swap file to 2GB. That will help.
I’m on mobile but you can just search the forum how to do this.
I increased the swap according to the instructions and esphome compiled to the end without a crash. Unfortunately I don’t have an 8266 on site for the real test, but I didn’t get that far otherwise. That’s the solution for me, thanks for the tip.
https://www.youtube.com/watch?v=a3iay-g1AsI
Just compile it on Windows, using your more powerful desktop / laptop
Dang, I wish I’d known this last week before replacing a pi 3 install with an x86 for this reason!
maybe it still is something for WTH.
why does HAOS crash when to much memory is consumed?
using better memory management should only kill process, in this case esphome build.
or
why doens’t HAOS automatically increase the swap file if needed. the same way like Windows does.
I know SSD wearout, but maybe make it a setting or something.
Linux use a swap drive not a swap file like Windows.
Using a drive increase the flexibility in access, since the best access can be chosen.
Using a file increase the flexibility in size and placement, since it can be moved around and resized like a file, but you also have to access it like a file.
Thanks for the tip
So now I flashed the ESP32 with the Windows command line.
But my HA ESPhome Dashboard doesn’t show the device.
How can I get it there?
You have installed the ESPHome integration?
yes, ESP Home Integration is installed
If it is not auto detected then just add another ESPHome integration and set the correct IP address.
It won’t show up in the dashboard if it hasn’t been set up from the pi. It should appear in Devices and Services as a new integration.
Click on add integration and search for esphome
thank you, now I got it.