hoeby wrote: ↑18 Sep 2021, 09:13
I got it compiled with p144 in it, but if i did it how it is supposed, i don't know.
Yay! Great achievement!
hoeby wrote: ↑18 Sep 2021, 09:13
Opened in platformIO.
Added the .ino in the plugin folder
Added the rc-switch library in library folder
Compiled normal_esp8266_4m1m and it was done.
That's fine for now, I'll explain below.
hoeby wrote: ↑18 Sep 2021, 09:13
The .ino hasn't the line #ifdef uses p144
Could this because it is made for an old espeasy version?
The different environments in the PlatformIO list enable specific sets of plugins, controllers and other options/features, as defined in 'define_plugin_sets.h' but this file shouldn't usually be messed with, unless you add a new plugin. (Selecting the best environment can be tricky, as especially the 'test' builds are already quite crammed, and these add to the 'normal' environments, so adding it there could also cause issues with .bin sizes being too large)
As there is no conditional compilation in this P144 .ino file, it will now be compiled into
all environments, as all files with .ino extension are added to ESPEasy.ino at compiletime and then compiled. So the only way to disable a plugin is to not enable it to start with
and that is where such '#ifdef USES_P144' comes in (it has an accompanying '#endif' too, of course).
For a Custom build, there are 2 ways to create a configuration, A) copy Custom-sample.h to Custom.h (
with the uppercase C), and enable/disable all settings, plugins, controllers etc. there, and build one of the 'custom' environments, as the PlatformIO scripting recognizes that file, or B) modify the 'pre_custom_ESP82xx.py' (For ESP8266 and ESP8285 custom builds) or 'pre_custom_ESP32.py' for the ESP32 custom builds. This last option requires to use the Python syntax, but the examples are quite clear.
hoeby wrote: ↑18 Sep 2021, 09:13
Connected the espeasy to wifi and tested the plugin with an event url. The plugin does it job. But looks like espeasy is responding slow on the event. Have to look at it why. I have some other devices with an old espeasy version, looks like they are responding faster.
I haven't looked closely at the code of the plugin, but a quick glance does not yet trigger any red flags, regarding performance, as it doesn't use the 'high frequency' plugin events, that are good candidates for causing sluggish performance.
The rest of the source isn't very up to date with the latest ESPEasy compiler macro's available, but that doesn't make it work bad or slow.
hoeby wrote: ↑18 Sep 2021, 09:13
@Ath (Ton)
If i didn't compile it, how it has to be done and this could give problems. Is it possible that you make a compile with P144?
You did a fine job already, so far, so no need for me to create a build for you