-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Dummy Data Injector #5566
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
Open
SuksAE
wants to merge
12
commits into
letscontrolit:mega
Choose a base branch
from
SuksAE:Dummy_Injector
base: mega
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dummy Data Injector #5566
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4ab36a7
Initial Commit
SuksAE 13fdd39
added documentation
SuksAE b593c03
removed debug flag
SuksAE 538bb70
implemented PR review feedback in code
SuksAE bbbd151
implemented PR review feedback in documentation
SuksAE 281e942
added P187_data_struct.cpp
SuksAE 2076263
moved time handling into P187_data_struct::plugin_read
SuksAE 465aa34
Merge branch 'letscontrolit:mega' into Dummy_Injector
SuksAE be6b67b
Merge branch 'letscontrolit:mega' into Dummy_Injector
SuksAE 3bade5e
code cleanup
SuksAE a457e7f
Merge branch 'letscontrolit:mega' into Dummy_Injector
SuksAE 9beec04
Merge branch 'Dummy_Injector' of https://github.com/SuksAe/ESPEasy in…
SuksAE File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| @ECHO OFF | ||
|
|
||
| set PYTHONUTF8=1 | ||
|
|
||
| pushd %~dp0 | ||
|
|
||
| REM Command file for Sphinx documentation | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| .. include:: ../Plugin/_plugin_substitutions_p18x.repl | ||
| .. _P187_page: | ||
|
|
||
| |P187_typename| | ||
| ================================================== | ||
|
|
||
| |P187_shortinfo| | ||
|
|
||
| Plugin details | ||
| -------------- | ||
|
|
||
| Type: |P187_type| | ||
|
|
||
| Name: |P187_name| | ||
|
|
||
| Status ESP32: |P187_status| | ||
|
|
||
| Status ESP8266: |P187_status_lb| | ||
|
|
||
| GitHub: |P187_github|_ | ||
|
|
||
| Maintainer: |P187_maintainer| | ||
|
|
||
| Used libraries: |P187_usedlibraries| | ||
|
|
||
| Introduction | ||
| ------------ | ||
|
|
||
| The Dummy Data Injector plugin simulates peripheral data output. It can be used e.g. to test IOT backend systems by providing input data for debugging. | ||
|
|
||
| The plugin can be applied multiple times in the devices list. Up to four synchronized data streams can be generated per deployment of the plugin, but the outputs of multiple plugins are not synchronized across the plugin boundaries. | ||
|
|
||
| Currently, there are following output configurations supported: | ||
|
|
||
| * **Sinus**: produces sinus shaped output values. The data stream can be configured in Amplitude, Offset, Period and Phase. | ||
|
|
||
| * **Trapezoid**: trapezoid shaped output values are created. The data stream's On-Level, Off-Level, Period, On-Time, Rise-Time and Fall-Time can be configured. | ||
|
|
||
| * **Random**: generates random output values. Minimum and Maximum values can be configured. | ||
|
|
||
| .. image:: P187_OutputCombined.png | ||
| :alt: Output view | ||
|
|
||
|
|
||
| Configuration | ||
| ------------- | ||
|
|
||
| .. image:: P187_DeviceConfiguration.png | ||
| :alt: Device configuration | ||
|
|
||
| * **Name**: Required by ESPEasy, must be unique within the list of available devices/tasks. | ||
|
|
||
| * **Enabled**: The device can be disabled or enabled. When not enabled, no output data is generated. | ||
|
|
||
| Device Settings | ||
| ^^^^^^^^^^^^^^^ | ||
|
|
||
| Depending on the selected 'Number Output values', up to four sections are used to configure the output values (press 'Submit' after changing) : | ||
|
|
||
| .. image:: P187_OutputConfiguration.png | ||
| :alt: Output configuration | ||
|
|
||
| Output Sinus | ||
| ~~~~~~~~~~~~ | ||
|
|
||
| .. image:: P187_OutputConfigurationSinus.png | ||
| :alt: Output sinus configuration | ||
|
|
||
| * **Amplitude**: Amplitude of the signal (integer value 0 to +65537) | ||
| * **Offset**: Offset from 0-Line (integer value -65537 to +65537) | ||
| * **Period**: period time in seconds (integer value 30 - 3600) | ||
| * **Phase**: phase offset in degrees (integer value 0 - 359) | ||
|
|
||
| .. image:: P187_OutputSinus.png | ||
| :alt: Output sinus view | ||
|
|
||
| - for floating value output, use formula to divide the output levels (e.g. for floating value output with 2 decimals use the formula '%value%/100'). | ||
|
|
||
| Output Trapezoid | ||
| ~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. image:: P187_OutputConfigurationTrapezoid.png | ||
| :alt: Output trapezoid configuration | ||
|
|
||
| * **On-Level**: output level during On-Time period (integer value -65537 to +65537) | ||
| * **Off-Level**: output level during Off-Time period (integer value -65537 to +65537) | ||
| * **Period**: period time in seconds (integer value 30 - 3600) | ||
| * **On-Time**: duration of On-Time period in seconds (integer value 0 - 3600) | ||
| * **Rise-Time**: duration of linear slope from Off-Level to On-Level (integer value 0 - 3600) | ||
| * **Fall-Time**: duration of linear slope from On-Level to Off-Level (integer value 0 - 3600) | ||
|
|
||
| .. image:: P187_OutputTrapezoid.png | ||
| :alt: Output trapezoid view | ||
|
|
||
| - for inverted output, swap On-Level value with Off-Level value. | ||
| - Period must be greater or equal than the sum of On-Time, Rise-Time and Fall-Time. If not, some automatic adjustments are made to these values to meet this rule. | ||
| - for floating value output, use formula to divide the output levels (e.g. for floating value output with 2 decimals use the formula '%value%/100'). | ||
|
|
||
| Output Random | ||
| ~~~~~~~~~~~~~ | ||
|
|
||
| .. image:: P187_OutputConfigurationRandom.png | ||
| :alt: Output random configuration | ||
|
|
||
| * **Max-Level**: maximum output level (integer value -65537 to +65537) | ||
| * **Min-Level**: minimum output level (integer value -65537 to +65537) | ||
|
|
||
| .. image:: P187_OutputRandom.png | ||
| :alt: Output random view | ||
|
|
||
| - for floating value output, use formula to divide the output levels (e.g. for floating value output with 2 decimals use the formula '%value%/100'). | ||
|
|
||
|
|
||
| Performance | ||
| ----------- | ||
|
|
||
| For performance measurement, an ESP32 development board was reset to factory default settings via Wi-Fi. | ||
|
|
||
| One 'System Info' device was added with a single output measuring the system load each 30s. | ||
|
|
||
| Furthermore 3 Dummy Data Injector plugins were added to the devices: | ||
| - Number one generates 4 sinus outputs, interval was set to 1 second, 'Stats' box was activated for all four outputs. | ||
| - Number two generates 4 trapezoid outputs, interval was set to 1 second, 'Stats' box was activated for all four outputs. | ||
| - Number three generates 4 random outputs, interval was set to 1 second, 'Stats' box was activated for all four outputs. | ||
|
|
||
| The devices page was open in one browser window, and the device was left idling for 5 minutes. Afterwards the System load shows ~29% | ||
|
|
||
| In comparison, the same ESP32 system, after deleting the three Dummy Data Injector plugins showed an idle System load of ~23%. | ||
|
|
||
| Change log | ||
| ---------- | ||
|
|
||
| .. versionadded:: 1.0 | ||
| ... | ||
|
|
||
| |added| | ||
| Initial release version. | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This docs file is also missing the Data acquisition chapter, Interval and Values, and the Change log is missing the date of introduction.