Assembling own selection of Plug-Ins — Compilation via platformio required?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Assembling own selection of Plug-Ins — Compilation via platformio required?

#1 Post by Wookbert » 30 Jan 2021, 11:22

I'm quite new to ESPEasy and need to combine the Plug-Ins Ser2Net, Infrared TX and others for use on an 4M ESP8266 (Wemos D1 mini). Unfortunately this Plug-In combination doesn't come pre-packed.

Do I understand it correctly that adding plug-in always requires compiling a new firmware file using PlatformIO, as — unfortunately not in its entirety — described here? Someone else was scratching his head on this previously.

If understood correct, it there any chance that ESPEasy will any time soon see a more user friendly Plug-In handling? I would imagine adding a desired Plug-Ins by uploading its binary via ESPEasy’s WebUI. Or is that already possible and I just don't know it!?

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

Re: Assembling own selection of Plug-Ins — Compilation via platformio required?

#2 Post by TD-er » 30 Jan 2021, 11:36

Yep, I am working on a build instance to make it more user friendly.
But that's not there yet.

You can also try this Vagrant build setup: https://github.com/letscontrolit/ESPEasy/issues/2594

That doesn't require a full build setup, just installing Vagrant and configure a Custom.h file as described in that issue.

Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Re: Assembling own selection of Plug-Ins — Compilation via platformio required?

#3 Post by Wookbert » 31 Jan 2021, 04:35

A basic improvement would be if one could upload the plug-ins in the Web UI via binary files which one has downloaded from github beforehand.

The killer implementation would be if the Web UI gets a list of all available plug-ins (w/ version numbers) from the official letcontrolit.com Server (which point to the latest versions on github), from which one can pick which ones to download directly and install.

Followed by auto-update option and/or (email) notification on new versions.

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Assembling own selection of Plug-Ins — Compilation via platformio required?

#4 Post by Ath » 31 Jan 2021, 10:04

That is a great idea, but has many implications, not the least the one of security. And you'd have to re-write the entire concept of how plugins are handled, as they are now linked into the binary, where a modular plugin system requires extra interfacing, and enough available storage on the device. In other words: I don't think that will happen soon, at least not until 16 MB ESP's with more RAM are mainstream. (ESP32 are getting in that direction)

What TD-er is hinting at is that he started work on a feature where you select the plugins you want on a website, some sanity checks are done, the server builds a bin for you (using caching, so if someone else made the same selection, no build would be needed) and you can download the bin file once it's completed.
/Ton (PayPal.me)

Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Re: Assembling own selection of Plug-Ins — Compilation via platformio required?

#5 Post by Wookbert » 31 Jan 2021, 10:13

Ath wrote: 31 Jan 2021, 10:04 What TD-er is hinting at is that he started work on a feature where you select the plugins you want on a website, some sanity checks are done, the server builds a bin for you (using caching, so if someone else made the same selection, no build would be needed) and you can download the bin file once it's completed.
... which already would be much sexier, than what the average user has to deal with now.

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

Re: Assembling own selection of Plug-Ins — Compilation via platformio required?

#6 Post by TD-er » 31 Jan 2021, 13:17

Wookbert wrote: 31 Jan 2021, 10:13
Ath wrote: 31 Jan 2021, 10:04 What TD-er is hinting at is that he started work on a feature where you select the plugins you want on a website, some sanity checks are done, the server builds a bin for you (using caching, so if someone else made the same selection, no build would be needed) and you can download the bin file once it's completed.
... which already would be much sexier, than what the average user has to deal with now.
And which is exactly what I'm working on.

diyprojectz
New user
Posts: 6
Joined: 05 Feb 2021, 20:07

Re: Assembling own selection of Plug-Ins — Compilation via platformio required?

#7 Post by diyprojectz » 08 Feb 2021, 14:39

Same issue here. Need MP3 player plugin only, for 1M ESP-01S. The desired plugin is only included with 4M test images.

I followed the Arduino IDE guide to the letter (only changed flash size, and adjusted custom.h file for my settings). The resulting image does not work, and I lack the know-how and willpower to debug. PlatformIO requires setting ExecutionPolicy in Windows to Unrestricted according to the guide, and forgetting to change it back after working with PlatformIO may lead to catastrophic consequences. So I guess I will try vagrant. Hopefully @TD-er 's build system will be implemented one day...

User avatar
Grumpf
Normal user
Posts: 124
Joined: 05 May 2017, 23:45
Location: Namur

Re: Assembling own selection of Plug-Ins — Compilation via platformio required?

#8 Post by Grumpf » 09 Feb 2021, 15:42

PlateformIO was a bit too intimidating for me so I went the lazy road and manually added the plugins I wanted using ArduinoIDE.

Here's what I've done to compile :

First, create a portable version of your IDE for Espeasy https://www.arduino.cc/en/Guide/PortableIDE, it's small and allow you avoid retards things like having 7 versions of your libraries in various system folders, depending on your user :roll: . Let's not go there, hardcoding choices in the base files is redneck and messy enough...

Then I modified define_plugin_sets.h to remove some and add some plugins around line 714, "Stable" (I don't know how to use switches for compiling etc.).

Code: Select all

// STABLE #####################################
#ifdef PLUGIN_SET_STABLE
    #ifndef DONT_USE_SERVO
        #define USE_SERVO
    #endif

    #define USES_P001   // Switch
    #define USES_P002   // ADC
    #define USES_P003   // Pulse
    #define USES_P004   // Dallas
    #define USES_P005   // DHT
    #define USES_P006   // BMP085
    #define USES_P007   // PCF8591
    #define USES_P008   // RFID
    #define USES_P009   // MCP

    #define USES_P010   // BH1750
    #define USES_P011   // PME
    #define USES_P012   // LCD
    #define USES_P013   // HCSR04
    #define USES_P014   // SI7021
    #define USES_P015   // TSL2561
//    #define USES_P016   // IR
    #define USES_P017   // PN532
    #define USES_P018   // Dust
    #define USES_P019   // PCF8574

    #define USES_P020   // Ser2Net
    #define USES_P021   // Level
    #define USES_P022   // PCA9685
//    #define USES_P023   // OLED  //###########################################################################################################################################################
    #define USES_P024   // MLX90614
    #define USES_P025   // ADS1115
    #define USES_P026   // SysInfo
    #define USES_P027   // INA219
    #define USES_P028   // BME280
    #define USES_P029   // Output

//    #define USES_P030   // BMP280   (Made obsolete, now BME280 can handle both)
    #define USES_P031   // SHT1X
    #define USES_P032   // MS5611
    #define USES_P033   // Dummy
    #define USES_P034   // DHT12
//    #define USES_P035   // IRTX
    #define USES_P036   // FrameOLED
    #define USES_P037   // MQTTImport
    #define USES_P038   // NeoPixel
    #define USES_P039   // Environment - Thermocouple

    #define USES_P040   // RFID - ID12LA/RDM6300
    // FIXME TD-er: Disabled NeoClock and Candle plugin to make builds fit in max bin size.
//    #define USES_P041   // NeoClock
//    #define USES_P042   // Candle
    #define USES_P043   // ClkOutput
    #define USES_P044   // P1WifiGateway

    #define USES_P049   // MHZ19

    #define USES_P052   // SenseAir
    #define USES_P056   // SDS011-Dust
    #define USES_P059   // Encoder

    #define USES_P063   // TTP229_KeyPad
    #define USES_P073   // 7DG
    #define USES_P079   // Wemos Motoshield
    #define USES_P118  // CCS811 ##############################################################################################################################################################
    #define USES_P113  // SI1145 ##############################################################################################################################################################
    #define USES_P095  // TFT ILI9341 #########################################################################################################################################################
#endif
I changed the version in buildinfo to know I'm using a custom release (optional).

You also of course, have to add all the _Pxxx.ino you want to add.

Optional, I also added my wifi credentials in define_plugin_sets.h (top of the file). You can customize more but unless you plan for massive deployment the cache of my browser is enough for me to configure all "advanced settgins" fast.

I did all that as I modified P012 to add special character to my LCD and I needed SI1145 & CCS811 for another project.

If you have trouble making it work like that(I may have forgotten a step, I hope not), should you want to even do it, tell me and I'll update to the latest Espeasy beta and I'll document step by step.

I would advice to keep the IDE version & libraries before and as close as possible to the release of Espeasy you're gonna use. Then zip the whole folder and save it for later. I got several portable IDE, makes life a lot easier when you must recompile old projects.

Cheers!

Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Re: Assembling own selection of Plug-Ins — Compilation via platformio required?

#9 Post by Wookbert » 23 Apr 2021, 04:14

TD-er wrote: 31 Jan 2021, 13:17
Wookbert wrote: 31 Jan 2021, 10:13
Ath wrote: 31 Jan 2021, 10:04 What TD-er is hinting at is that he started work on a feature where you select the plugins you want on a website, some sanity checks are done, the server builds a bin for you (using caching, so if someone else made the same selection, no build would be needed) and you can download the bin file once it's completed.
... which already would be much sexier, than what the average user has to deal with now.
And which is exactly what I'm working on.
@TD-er Any news on this?

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

Re: Assembling own selection of Plug-Ins — Compilation via platformio required?

#10 Post by TD-er » 23 Apr 2021, 08:22

Nope not yet, as other issues were dealt with first.

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests