The "problem" with compiling on underpowered hardware

Would be soo handy if i could send the compiling to another computer on local. Like if there was a setting where i could choose another computer having esphome installed to do the hard work. Transferring those files over there and back is not a big job at all compared to compiling.

With this kind of setup the ESPhome dashboard could simply say that the compiler is not available when trying to compile while the compiler computer is not powered on, and end the compiling process there instead of 3 hours of unresponsiveness from something like rpi3b, or even a crash trying to do compiling with it.

And as an addition, on something like rpi3b it could simply give a warning that im trying to do compiling on a harware that is likely going to crash doing this kind of action due to its capabilities (Do you want to continue?) and give me a link to wiki regarding this stuff.

Taking this idea to itā€™s logical next step, it would be possible for the ESPHome UI to be web-based (like it is in the HA add-on.) Then you could access it from anywhere, including inside the HA dashboard.

If someone on the ESPHome dev team wanted to do this, Iā€™d be happy to help test. But frankly I wouldnā€™t want to divert development resources away from any other ESPHome work. To me, the HA UI is just another web site I go to when I want to do something specific. Itā€™s just as easy to click on a link to ESPHome on my laptop as it is to click on a link to ESPHome in the HA dashboard.

This is a well known issue with rpi3 and been discussed in detail and if you had used thr search box first, you would have seen this. You wish there was a way to send the file to another pc and compile it there? There are many easy ways to do this. The most obvious way is to open a browser on any pc, log into your HA and compile from that machineā€¦ yep! Itā€™s that simple!. You can even still use your rpi3 you just need to temporarily stop large add ons like node red or vs code, etc. Stop those then compile, then restart the add ons. Simple!

Taking this idea to itā€™s logical next step, it would be possible for the ESPHome UI to be web-based (like it is in the HA add-on.) Then you could access it from anywhere, including inside the HA dashboard.

Indeed you can do exactly that :slight_smile:

Launch the ESPHome dashboard in a regular docker container on any machine you like; Getting Started with the ESPHome Command Line ā€” ESPHome

I run the dashboard on an old i7 laptopā€¦ HA currently runs on the same machine, but it does not need toā€¦

Then (as long as you are just using plain HTTP) you can add something like this you your HA configuration.yaml to get a sidebar item in HA (mine is currently commented out as I broke it when I switched HA to HTTPS)

#panel_iframe:
#  router:
#    title: "ESPHome"
#    url: "http://<IP of ESPHome machine>:6052"
#    icon: mdi:chip

Of course you can just access the ESPHome dashboard directly at http://<IP of ESPHome machine>:6052

Cheers.

Iā€™m confused. If I open HA from a PC, then go to the ESPHome add-on and compile, wonā€™t it be the HA computer doing the compiling? In other words, my PC is only running the browser, not the actual compile. So it really doesnā€™t off-load the work from the HA host (in this example, an RPi which may be challenged by an ESPHome compile.)

For the record, I did that for years and it never took all that long, just a few minutes on my poor little RPi 3B+. It didnā€™t negatively impact HA. I only started compiling on my laptop, instead, to save all those writes to the SD card. Obviously a more complex HA environment, and maybe a more complex ESPHome compile, would take more resources, so I can see how you could overwhelm something like a RPi.

Your kidding me, right? It specifically asks you where you want the compiling done and you have to select one of the options to compile anything. How is it even possible to not know this?

That selection is where/how you want the compiled binary deliveredā€¦ not where the compile takes place.

The compilation is still done wherever ESPHome is running.

5 Likes

Then install esphome on the pc you want to compile from or quit being cheap and buy something that doesnā€™t just meet the bare minimum requirements like a pi3. Your making a mountain our of a mole hill. Itā€™s a pi3 and like I said, this topic and a lot of solutions have been discussed at length and can all be found by making an effort to use the search box. Idk why your even fighting with a pi3 as it only meets the minimum requirements and it likely wonā€™t meet the requirements in the near future anyway. You can buy a pi4b 4gb for 100$.

Hmmm. First you post a snarky reply which is factually wrong, then you rail on the OP for having the audacity to post a legitimate question.

If you have nothing to add, just move along. No need to get nasty.

Oh, and my RPi 3B+ has been running HA just fine for over 4-1/2 years now. It sits at single-digit CPU utilization and around 50% memory. No need to denigrate that hardware, either.

6 Likes

Thank you, I was watching a ton of videos and reading all sorts of documents for 3 weeks to finally discover this!

As mentioned in previous posts, the compilation did not want to complete on my RP 3

Did you try with the compile_process_limitmentioned :point_down:

Last time I tried it was still possible to compile on one core only which leads to much less memory consumption - still not advised because it takes quite long :snail::dash: