-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Plugins] List of planned new plugins (request a Plugin-ID here) #3839
Comments
I added it to the pinned issues. |
Hello, Best regards. |
Isn't that already supported by Plugin 25 ADS1115 (not fully compatible with ADS1015) or the ADS1015 plugin from PluginPlayground? Or is it an extension/improvement of that plugin? P130 is the next available Plugin ID. |
And add it to the "testing E" set. |
Hello, Remark, I still have to do an improvement : I want to add a setup key to choose sample rate and a "just-in-time reader" in continuous mode sampling. I don't want to duplicate an already code existing if so. I just suggest my work . |
OK |
OK, so it is indeed some different approach. |
Right : and this is exactly why I:
|
I can imagine that 20 msec isn't "stable" as you may just start on the "spike" of current on devices with poor power factor. Upto roughly 100 msec is OK, but less is better as every blocking code for over 10 msec can lead to missing WiFi packets. But these kinds of discussions are best for the actual PR I guess :) |
In fact, I wrote my own ino code at beginning (wifimanager + adafruit GFX + adafruit1X15 + MQTT + personnal code), and it was working for 4 months . I decided to switch to easyesp to avoid me managing the Wifi and the MQTT diffusion. Note/question : I'm not used to pull-request (well, in fact, it will be my first time). I commited on mega branch on my fork of espeasy, but i commited also dirty code before the good one. is it possible to choose only good commit? or may I have to refork a new time, create a branch, and make a clean delivery commit in it? |
Have a look at the guide for developers, new to Github and ESPEasy, part of our Read The Docs (RTD) documentation. On that same page, a few paragraphs up, there is also a guide on how to set up your development environment using VSCode and PlatformIO, as that's currently the preferred development environment. |
That's the main thing you need to do. |
Hello. Sorry for being absent.i should be able to do the job on next two weeks. 20220306: I started to prepare the pull request on my fork in a branch named P130 (I can't use previous commit as they are not clean, and I created my plugin under P127 already used... :-( ). I have to clean up the code as I did tests before ending to this solution. Question : you ask me to add it to "testing E" But, I would like also to have a personnal profile build with only what I need. May I ask you how to do it without pulling it? |
There are several ways to achieve that, the officially supported ways:
Some alternatives: (when not using a
|
OK, thanks for answer. So, adding a custom personnal env in platformio_esp32_envs.ini is not the right way, isn't it? |
Adding such environment is only feasible if it adds an improvement to ESPEasy for all to benefit. |
@tonhuisman : Thanks for all your answer. Note that compiling TEST_E : I failed sometime with a memory size error, so with customer.h I success each time as keeping only controller/notif/plugin I need, it's perfect! On my side, I have ended my first cleaning of code to do a first PR (prep on this branch), BUT I would like to document the use of this plugin (with simple schema, and picture). May I ask you where this should be done to win a bit of time? |
Are you building that using VSCode/PlatformIO? And what operating system?
That is a great initiative 👍 Documentation is part of the source code. The format used is ReStructured Text (.rst files), using the Sphinx tools. Initial setup is documented here. (Need to execute at least once). Once the PR is merged your doc work is available on the ESPEasy readthedocs page.
|
Waouh, ok, it is a lot of stuff, but I don't stop my work here, let me this week to have a look. |
Hello, It was more complicated to start writing doc as I was thinking, but it is done, and commited on here . |
Understood, I've gone through the same learning curve, some time ago, but it is looking good, though there are a few spelling thingies to be resolved.
It sure does look like that 👍 so, just create the PR, and we'll comment on it (we're always nice 😄), but that is all part of the learning curve. |
I'd not bother about that now and just create the pull request, as suggested, as that merge can be done later without much issue. |
Pull request created, but I failed to remove some local commit on my repo from pull request like creating a custom build in general config file or adding an alert header in the readme.md file of the project to redirect people to the original project... |
I would like to play with the ens160 TVOC sensor (gases). This is yeat another I2C based gas sensor. Can I reserve a plugin number for this one? ScioSense provided an Arduino library on GitHub (https://github.com/sciosense/ENS160_driver). Sensor is still traveling from ALi to home... |
There are lots of calls to
|
Thanks for the warning. Then I have to rewrite it to something more suitable for ESPEasy. Is there any convention on where to put such device specific code in ESPEasy? I see imported libraries in \lib. But if I have to rewrite stuff I assume it is better to put it all in the \src\PluginStructs\Pxxx_data_struct.cpp? For now I will use P164, I can always renumber it. |
Usually we add the library in the |
The library has a quite peculiar way of controlling the sensor, pulling pins high and low, and also sends logging to the serial port when a variable is set. |
As per P160 here's a playground plugin update: letscontrolit/ESPEasyPluginPlayground#186 |
I'll start migration soon-ish, still working on other issues and improvements 😉 |
Hello,
Can I get a plugin ID for this? |
I've assigned |
@tonhuisman would it be hard to also add NOx from SEN55? |
Have to look closely at the PR for P167 (there will be some feedback, as I already had a quick glance at the code 😉), but the NOx measurement is interesting enough to be included in SEN55 mode 👍 |
After PR for P167 finish, I intend to make an update and integrate standalone SEN54 and SEN55 sensors. |
I am playing with a plugin to control the pump of my floor heating. I want local control with remote override and use a RGB led for status. This made it a bit too complex for rules. However, it is not really a standard plugin, although reusable for thermostats alike control. Question is how to handle such plugins? Is there a reserved plugin range to prevent overlap with the growing amount of plugins? I started with P999, but it looks like the plugin ID is a 8 bit integer, now using P254 locally. Looks likewe are rapidly filling the available space. |
We already have the ESPEasyPluginPlayground repository for a long time, but reality is that, because of many improvements to the ESPEasy Core code, and not many updates of the code on the playground, a lot of the plugins there are no longer compatible with the current ESPEasy code. And another issue is that a lot of code is written with quite basic Arduino-knowledge & skills, resulting in, well, less-optimal code, to name it nicely. The PluginID is indeed limited to an 8 bit unsigned int ( By the gist of your explanation, it seems quite reasonable that other ESPEasy users might be interested in your plugin, so the simple solution is to assign the next available plugin ID ( |
Thanks for feedback. P109 is too complex for my use case. But I missed P021. This looks close to my prototype, except for the LED feedback. I have to study P021 closely to estimate impact on adding my stuff or just reuse that one. Current design:
Note I am pretty well aware of real-time software, but more involved with UML and Powerpoint than having C++ experience... So review is required. It would be nice to have a "plugin builders manual" providing references and design guides and rules. I can help with the writing of such documentation as long as I get the right feedback from the architects. One of the questions for me is how to access IO pins. Direct Arduino function calls ere available, but I also see some ESPEasy abstraction levels. I need to do reverse engineering of existing plugins which could be potentially bad examples. A cookbook would tell me how to do this best... |
Still playing with my pump controller. Probably the name fits best as "regulator - heating pump" or "regulator - pump". |
Not sure if it should be 1 plugin and if it is only a minor extension to an existing plugin, why not adding such a feature to the existing plugin via some parameter or as a command? |
The OFF and ON states are clear (as described), but not sure what kind of purpose or meaning Standby, Local or Remote would have? If the state can be changed by a command, then you have the option of remote-control, as there are several ways of sending commands to a unit, HTTP, UDP (P2P), MQTT, Time based. Controlling a multi-color led, either 3-color via a few GPIO pins, or a Neopixel that has a full RGB color scale, could be handled from rules, using the correct events. Adding some new events shouldn't be too hard. Currently, an event is generated when the output state changes ( Controlling GPIO state can be done in the standard 'Arduino' way via |
Thanks, good food for thoughts and helping me to understand the design patters for ESPEasy. My initial idea was to configure the "mode" from the web interface and use an on-off command only for remote control. But that can be changed. |
Is there any chance of a plugin for the Seeedstudio (grove) i2c capacitive water level sensor? |
I've reserved Plugin ID |
I have been playing with my floor heating pump controller plugin. I see some issues in merging it into P021. This will make the new version not backwards compatible with the original P021. The new plugin is simple, keeping all data in the standard structures. Main difference is the state machine I added to implement the additional, pump related, requirements like maintenance runs, operation modes and time extensions. I still tried to keep it generic. In case it is seen as reusable I can refactor it with a new plugin ID. Let me know if the plugin is seen as useful. If so, provide me with a plugin ID and collection. |
You could add a Yes/No checkbox to enable/disable your new features. (Add a new settings section below Auto-save interval.) For inspiration of how that's usually done, check P037 MQTT Import, where several features and settings are enabled/shown or disabled/hidden using a checkbox (that can submit the page) And, most likely and said before, there will be someone interested in functionality like this. Especially if you explain in the documentation how it is intended to be used 👍 |
One of the new features is also to provide 2 "values". The output set to the GPIO pin (pump on/off) and the state of the internal state machine. If this can also be managed in a backwards compatible way I will try to merge the two different concepts. Minor issue is the way how to handle hysteresis. I prefer to use a "switch on" setpoint and a hysteresis value added/subtracted to/from the setpoint to switch off. P021 uses a symmetrical window around the setpoint. But that can be managed too. The concept to modify the setpoint using a command can be merged with the command to force the output to "on" which I need to run my pump whenever the CV is enabled. I have to investigate if there are enough PCONFIG parameters available to store all the static data. Both plugins use some of them to store timers and other data. Moving to a P021_data_struct make the code a bit more complex. I am still wondering how this "auto save" should work in P021. Quite some code to guard saving parameters too often. Something my original plugin does not need, but can be added too. So main question for now is can I add a new value to P021 without breaking existing use cases and can I keep the code lean and mean. |
Having a variable number of values, depending on settings, is handled via the GetDeviceValueCount, like done in P026: case PLUGIN_GET_DEVICEVALUECOUNT:
{
event->Par1 = P026_NR_OUTPUT_VALUES;
success = true;
break;
} That setting can also be a conditional returning either 1 or 2, P026 allows setting 1..4 output values 😃 Besides the |
That second sentence is exactly the reason it is implemented. Some people update the value from rules every few seconds, causing an implicit save, that will eventually wear out the flash memory, rendering the ESP useless. To avoid that, the AutoSave feature keeps track of the currently stored value, and only saves to flash after the timeout is reached if the value is effectively changed.
A more fine-grained way of handling the hysteresis is certainly an improvement over the current handling, as long as it can be made backward compatible (read: current settings value should still result in the same behavior after an upgrade. No requirement of saving the task to 'fix' that.) |
As it is sometimes quite hard to find the next available Plugin-ID for a new plugin, this list is supposed to be updated by either me or TD-er once a plugin is planned.
If you are working on a new plugin (for the
mega
branch, not the ESPEasyPluginPlayground repository, that has its own numbers), you can request a Plugin-ID to be reserved, just add a comment, a short description/title for the plugin and we'll assign an available ID.Once the plugin is merged it must be removed from this list, as the current list of plugins is available in this Read The Docs page
New plugins, currently being worked on:
P130
Current - IRMS_ADS1015 ( @handfreezer see ) PR [P130] Add simple circuit to get a current sensor , result is Irms #4009P136
Display - SSD1306/SH1106 using AdaGFX helper ( @tonhuisman) PR #(todo)P139
Power mgt - AXP2101 Power management ESP32 ( @tonhuisman) PR [P139] Add support for AXP2101 Powermanagement #4977P140
Input - CardKB QWERTY Keyboard ( @tonhuisman) PR #(todo)P149
Display - ePaper 1.9" 91 segment display ( @tonhuisman) PR #(todo)P155
SML smart meter ( @Brommander PR pending )P156
Kostal PV inverter ( @Brommander PR pending )P157
Varta Storage ( @Brommander PR pending )P158
I2C analog 4ch 0-10V ( @Brommander PR pending )P160
RF Receiver (433 MHz) ( @tonhuisman) PR #(todo)P161
RF Transmitter (433 MHz) ( @tonhuisman) PR #(todo)P171
RFID - WL-134 (request) ( @tonhuisman) PR #(todo)P174
Generic - CAN Importer ( @bclbruno) PR CAN bus implementation #5120P175
Dust - PMSA003i (requested here) ( @tonhuisman) PR [P175] Add Dust - PMSx003i (I2C) Sensor #5142P176
Communication - Victron VE.Direct (request) ( @tonhuisman) PR [P176] Add plugin Communication - Victron VE.Direct #5148P177
AvailableNew controllers: (Supported Controllers)
C020
Siemens PLC S7 ( @Brommander PR pending )C021
LoRa (bidirectional communication) ( Warrick (forum link) PR pending )C022
CAN Controller ( @bclbruno) PR CAN bus implementation #5120New notifications: (Supported Notifications)
N003
Email Advanced (request) ( ?) PR #(todo)Reference: ESPEasy Development guide
The text was updated successfully, but these errors were encountered: