Platformio and ESPEasy: firmware perso

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Paminon
New user
Posts: 4
Joined: 01 Apr 2021, 16:42

Platformio and ESPEasy: firmware perso

#1 Post by Paminon » 07 Apr 2021, 10:11

Good morning all,
first of all thank you to those who will take the time to help me.
I am looking for a tutorial to include plugins in espeasy on esp8266 / Nodemcu. I looked and tried the tutorials from "projetdiy.fr" but I can't get to the end of the tutorial and it doesn't work.
I am wondering how to include plugins with the latest version of espeasy. Could you help me?
I just need to be able to add the plugins that interest me for my projects, I don't need to make any other modifications.

thanks again

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Platformio and ESPEasy: firmware perso

#2 Post by TD-er » 07 Apr 2021, 10:17

There is some documentation on how to install PlatformIO to build ESPEasy: https://espeasy.readthedocs.io/en/lates ... th-vs-code
Also I made a video on how to setup VS code https://www.youtube.com/watch?v=ArqwMcYSMsU

When you've installed PlatformIO, you can rename Custom-sample.h to Custom.h (in the src dir of the repository) and enable the defines you like to have.
In PlatformIO there are several environments to build, like "custom_ESP8266_4M1M" to make a build based on the Custom.h file you edited for an ESP8266 with 4M flash.

All "Custom" environments will then use this Custom.h file. When you scroll down the list of PIO environments, you will see the custom ESP32 variations (with and without Ethernet).

Paminon
New user
Posts: 4
Joined: 01 Apr 2021, 16:42

Re: Platformio and ESPEasy: firmware perso

#3 Post by Paminon » 07 Apr 2021, 11:22

thank you again for your answer!

I don't really know by what miracle but thanks to your advice I finally succeeded!

It's nice to have help

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Platformio and ESPEasy: firmware perso

#4 Post by TD-er » 07 Apr 2021, 12:16

You're welcome.
Have fun with it.

VEFF
New user
Posts: 4
Joined: 13 Apr 2021, 16:26

Re: Platformio and ESPEasy: firmware perso

#5 Post by VEFF » 13 Apr 2021, 16:40

Hello everybody!
I wanted to build my firmware using PlatformIO. I was able to build the firmware using the custom.h file. But on the assembled firmware, the web server is very different from the web server of the normal firmware.
I'm frustrated that I can't use the rules. I attach a screenshot of the web server page with the rules.
Please tell me how to correctly build the firmware using platformio, so that the web server there is the same as in normal firmware?
1.png
1.png (13.65 KiB) Viewed 6986 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Platformio and ESPEasy: firmware perso

#6 Post by TD-er » 13 Apr 2021, 23:10

That looks like you're running a build that doesn't include the static files.
A very quick-and-easy fix (without even rebuilding) is copy the missing files to your file system as described here: https://espeasy.readthedocs.io/en/lates ... is-al-mean

VEFF
New user
Posts: 4
Joined: 13 Apr 2021, 16:26

Re: Platformio and ESPEasy: firmware perso

#7 Post by VEFF » 14 Apr 2021, 08:40

Thanks for the answer! I found mention of static files in the file WebStaticData.cpp. External links look like in the picture. Please tell me how to change the links so that static files are pulled up, for example, from a local network file server?
2.png
2.png (21.44 KiB) Viewed 6957 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Platformio and ESPEasy: firmware perso

#8 Post by TD-er » 14 Apr 2021, 08:44

You can define WEBSERVER_CSS in your Custom.h (or the .py files you may have changed to build your version)

Code: Select all

#define WEBSERVER_CSS

VEFF
New user
Posts: 4
Joined: 13 Apr 2021, 16:26

Re: Platformio and ESPEasy: firmware perso

#9 Post by VEFF » 14 Apr 2021, 12:50

I found that the link in the file WebStaticData.cpp it doesn't work. Correct link to github.
3.png
3.png (7.43 KiB) Viewed 6937 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Platformio and ESPEasy: firmware perso

#10 Post by TD-er » 14 Apr 2021, 13:04

OK, that must have been a recent change then....
I will have a look at it.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Platformio and ESPEasy: firmware perso

#11 Post by TD-er » 14 Apr 2021, 13:09

What if you update the URL to use a more recent tag like this: https://cdn.jsdelivr.net/gh/letscontrol ... efault.css
That still does seem to work... for now
But I don't think this is a good way to continue using the GitHub CDN servers.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Platformio and ESPEasy: firmware perso

#12 Post by TD-er » 14 Apr 2021, 13:38

I made an issue for this: https://github.com/letscontrolit/ESPEasy/issues/3577

I had planned to make a new nightly build this evening, but I guess this really has to be dealt with before I make a new nightly build.

VEFF
New user
Posts: 4
Joined: 13 Apr 2021, 16:26

Re: Platformio and ESPEasy: firmware perso

#13 Post by VEFF » 14 Apr 2021, 19:32

Good. Thank you very much!

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests