Found a very, very serious bug in the __Plugin.ino code and it looks like I introduced it around 20180705. See: https://github.com/letscontrolit/ESPEasy/commit/2fde3d28a8af4ff044ae123ca820d312b7e59a90
Problem is in the handling of some functions like PLUGIN_xxx (WRITE/READ/etc)
It is then using the wrong index to do stuff, which may yield strange results on builds with not all plugins included (mainly test and custom)
Impact is a bit hard to predict, but I guess it may lead to strange crashes.
That's also around the time when WDT reboots started to be reported.
So when fixed, it may hopefully fix a number of issues.
Plugin_ptr will only use indices based on the number of plugins included in the build.
So it must be addressed using an index based on the DeviceIndex (not sure if that's the right index) and not on the plugin ID number (e.g. 004 for Dallas sensor)
So perhaps that's why I experienced a device change from IRTX to Switch recently after replacing the ESP_Easy firmware with custom build without IRTX plugin while keeping the config... :-)
Great job, Gijs, that you found this bug!
The bug appears to be quite old, so not sure what big jump you made in versions?
Also I am already working on some refactoring of the code to make the naming of variables a bit more descriptive since I also got rather confused by them.
Maybe the bug is a bit less serious, but still it should be clear what the code does and the current code is really not clear.
Well, the config was very old and a many firmware upgrades performed during last 2 years on that node... In past both IRRX and IRTX were in std or test official builds but it's not the case anymore so I had to start with custom builds using Vagrant (btw. many thanks for preparing that great environment!). As I need a lot of plugins and the current IRRX and IRTX plugins are so big, I disabled the IRTX as IRRX is more important for me but the config remained the same when I uploaded the customized firmware to node. Then the IRTX (device 11) changed to Switch.
Yep, if a plugin cannot be found, it will set it to the first one.
That's also a bug, which I may be able to fix with these changes.
The size of IR plugins is what made me decide to move them to a separate build.
But like you also found out, you cannot have a 1-build-fits-all, so that's why I was looking into the Vagrant setup.
Also fixing a long lasting annoyance along the way.
If a task is set to a pluginID not included in the current build, it was showing "Switch" as plugin.
Also it was not really clear what would happen if you then edit the page.
This is how it will look after this has been fixed:

The plugin ID will be shown and the name. Enabled state will be shown as disabled and the rest will be left empty.
While typing this, I realize the red button should show "Add" or maybe some other text indicating you will create a new entry when pressing the button.