Skip to content
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

[P044] Led settings and events without client, merged into [P020] #4283

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
9410058
[P044] Uncrustify format source
tonhuisman Oct 1, 2022
86dc1f8
[P044] Make Led pin configurable
tonhuisman Oct 1, 2022
7ed1cc8
[P044] Correct auto-complete typo
tonhuisman Oct 1, 2022
9f4c038
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Oct 2, 2022
603e6a8
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Oct 8, 2022
3bb189d
[Plugins] Call PLUGIN_WEBFORM_PRE_SERIAL_PARAMS before serial setting…
tonhuisman Oct 8, 2022
547f571
[Plugins] Call PLUGIN_WEBFORM_PRE_SERIAL_PARAMS before serial setting…
tonhuisman Oct 8, 2022
bb66f34
[P020] Merge [P044] code into [P020], so P020 van emulate P044
tonhuisman Oct 8, 2022
7fb2382
[P020/P044] Migrate settings also on plugin start without prior save …
tonhuisman Oct 9, 2022
986d53a
[P020] Code improvement
tonhuisman Oct 9, 2022
dc8ef70
[P020/P044] Add option for including P1 data in #data event
tonhuisman Oct 11, 2022
07592e5
Merge branch 'mega' into feature/P044-led-and-events-without-client
tonhuisman Oct 16, 2022
ea65240
Merge branch 'mega' into feature/P044-led-and-events-without-client
tonhuisman Oct 28, 2022
fee72ce
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Nov 2, 2022
a027541
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Nov 26, 2022
471f65e
Merge branch 'feature/P044-led-and-events-without-client' of https://…
tonhuisman Nov 29, 2022
5455c28
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Nov 29, 2022
7c1c9a7
Merge branch 'mega' into feature/P044-led-and-events-without-client
tonhuisman Dec 3, 2022
7a357d7
Merge branch 'mega' into feature/P044-led-and-events-without-client
tonhuisman Dec 11, 2022
22e3ddd
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Dec 14, 2022
2c12f5a
[UI] Add Separator character input selector
tonhuisman Dec 14, 2022
a6292b7
[P020/P044] Add feature to replace spaces and newlines in received data
tonhuisman Dec 14, 2022
47ef2b8
[P020] Add plugin documentation
tonhuisman Dec 14, 2022
80a175e
[P037] Implement replacement character input selector, update documen…
tonhuisman Dec 14, 2022
e0b3250
[UI] Fix unsupported feature compilation error, fix signed/unsigned w…
tonhuisman Dec 14, 2022
7573e46
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Dec 16, 2022
b20af2b
[P044] Only show usable settings
tonhuisman Dec 16, 2022
5530e94
[P044] Update plugin documentation (based on P020)
tonhuisman Dec 16, 2022
a2299f9
Merge branch 'mega' into feature/P044-led-and-events-without-client
TD-er Dec 23, 2022
ec611d1
Merge branch 'mega' into feature/P044-led-and-events-without-client
TD-er Dec 23, 2022
8f81cf0
Merge branch 'mega' into feature/P044-led-and-events-without-client
tonhuisman Jan 3, 2023
b2358e0
[Build] Adjust Custom ESP8266 as already planned to fix build failure
tonhuisman Jan 3, 2023
a270a25
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 14, 2023
5e68eec
[P020/P044] Adjustments to complete the merge
tonhuisman Jan 14, 2023
064912d
[P020] Add extra check before sending P1 data
tonhuisman Jan 15, 2023
57666f6
[P020] Revert extra check before sending P1 data, minor improvements
tonhuisman Jan 17, 2023
537d35c
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 28, 2023
89c280f
Merge branch 'feature/P044-led-and-events-without-client' of https://…
tonhuisman Feb 18, 2023
03ddf0e
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Feb 18, 2023
a3bb6da
Merge branch 'mega' into feature/P044-led-and-events-without-client
tonhuisman Feb 21, 2023
61955c8
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Mar 14, 2023
073ad87
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Mar 21, 2023
151cf5e
[StringConverter] Add parseHexTextString()
tonhuisman Mar 21, 2023
a0ae909
[P020] Add command `serialsendmix`
tonhuisman Mar 21, 2023
8da4362
[StringConverter] Improvements to parseHexTextString()
tonhuisman Mar 22, 2023
c8573b5
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Mar 23, 2023
e2ae659
Merge branch 'mega' into feature/P044-led-and-events-without-client
tonhuisman Mar 23, 2023
a4fdcaf
Merge branch 'feature/P044-led-and-events-without-client' of https://…
tonhuisman Mar 23, 2023
8ffc8da
[P020] Add command documentation
tonhuisman Mar 23, 2023
6df4649
[P020] Correct some typos in documentation
tonhuisman Mar 25, 2023
188f6f4
[StringConverter] Add parseHexTextData() to handle 0x00
tonhuisman Mar 25, 2023
05337a5
[P020] Use parseHextTextData() to handle 0x00 in data
tonhuisman Mar 25, 2023
0c99aaa
[P020] Update documentation for 0x00..0xFF hex data support in serial…
tonhuisman Mar 25, 2023
b817f18
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Mar 25, 2023
2aba1bf
[P020] Update changelog
tonhuisman Mar 25, 2023
ed0d0a1
Merge branch 'mega' into feature/P044-led-and-events-without-client
tonhuisman Mar 31, 2023
18cfc86
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Apr 1, 2023
5063421
Merge branch 'mega' into feature/P044-led-and-events-without-client
tonhuisman Apr 9, 2023
c287448
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Apr 11, 2023
73938e3
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Apr 11, 2023
e6a44a3
Merge branch 'mega' into feature/P044-led-and-events-without-client
tonhuisman May 12, 2023
bd1a6f5
Merge branch 'mega' into feature/P044-led-and-events-without-client
tonhuisman May 14, 2023
5df32fd
Merge branch 'feature/P044-led-and-events-without-client' of https://…
tonhuisman May 22, 2023
29f6357
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman May 22, 2023
d5d31a7
[P020] Unification of Ser2Net log messages
tonhuisman May 22, 2023
aef7909
Merge branch 'mega' into feature/P044-led-and-events-without-client
tonhuisman Jun 1, 2023
20a5668
[Build] Manually apply WiFi build fixes (missing includes)
tonhuisman Jun 1, 2023
3e41ad7
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jun 2, 2023
5b37962
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jun 23, 2023
fb853a4
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jun 24, 2023
e3f8adf
[ESPEasySerial] Add shortName option to be used as eventname
tonhuisman Jun 24, 2023
ca6669c
[Helpers] Implement ESPEasySerial shortName option to be used as even…
tonhuisman Jun 24, 2023
280ad63
[P020] Increase max. buffer size
tonhuisman Jun 24, 2023
2968737
[P020] Update documentation for new options
tonhuisman Jun 24, 2023
60f4dd5
Merge branch 'mega' into feature/P044-led-and-events-without-client
tonhuisman Jun 27, 2023
83cda20
Merge branch 'feature/P044-led-and-events-without-client' of https://…
tonhuisman Aug 7, 2023
57505e8
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Aug 7, 2023
f0d9f6a
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Aug 12, 2023
eb12171
[P020] Fix receiving P1 data
tonhuisman Aug 12, 2023
6e3fd62
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Aug 13, 2023
19a619e
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Aug 13, 2023
b383418
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Aug 14, 2023
2e498be
[P020] Fix merge conflict
tonhuisman Aug 17, 2023
9d0dd10
[P020] Allow some extra time-out while receiving P1 data, add missing…
tonhuisman Aug 17, 2023
16f7c9e
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Aug 26, 2023
5fb0975
[P044/P020] Improved defaults for P1 WiFigateway
tonhuisman Aug 26, 2023
4f5783a
Merge branch 'mega' into feature/P044-led-and-events-without-client
tonhuisman Sep 17, 2023
6a0b131
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Sep 26, 2023
83f224c
Merge branch 'mega' into feature/P044-led-and-events-without-client
tonhuisman Oct 4, 2023
1413ae2
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Oct 12, 2023
2e4ef9a
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Dec 2, 2023
40762e4
[P020][P044] Minor improvements, update with latest mega changes
tonhuisman Dec 2, 2023
d4c6cb9
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Dec 28, 2023
d5606e3
[P020] Replace WiFiServer->available() by accept() (for IDF >= 5)
tonhuisman Dec 28, 2023
68a0578
Merge branch 'mega' into feature/P044-led-and-events-without-client
TD-er Dec 28, 2023
97bb276
Merge branch 'mega' into feature/P044-led-and-events-without-client
TD-er Dec 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/_P020_Ser2Net.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/************
* Changelog:
* 2023-08-12 tonhuisman: Strip off occasional 8th bit from received data, to avoid unexpected failures on P1 data reception
* 2023-06-24 tonhuisman: Fix initialization with non-GPIO serial ports like CDC/HW-CDC
* Add option: append the task number to the event-name (Generic and RFLink event options)
* 2023-06-23 tonhuisman: Add option: use Serial Port name (serialxxx -> xxx= 0/1/2/0swap/i2c/sw/hwcdc/cdc) as event-name for Generic events
Expand Down
21 changes: 14 additions & 7 deletions src/src/PluginStructs/P020_data_struct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ void P020_Task::rulesEngine(const String& message) {
NewLinePos = message.length();
}

String eventString;

// Remove preceeding CR also
if ((message[NewLinePos] == '\n') && (message[NewLinePos - 1] == '\r')) {
NewLinePos--;
Expand All @@ -292,13 +294,11 @@ void P020_Task::rulesEngine(const String& message) {
}
break;
}
case P020_Events::RFLink: { // RFLink
StartPos += 6; // RFLink, strip 20;xx; from incoming message

String eventString;
case P020_Events::RFLink: { // RFLink
StartPos += 6; // RFLink, strip 20;xx; from incoming message

if ((NewLinePos - StartPos) >= 8 &&
message.substring(StartPos, StartPos + 8)
if (((NewLinePos - StartPos) >= 8) &&
message.substring(StartPos, StartPos + 8)
.startsWith(F("ESPEASY"))) { // Special treatment for gpio values, strip unneeded parts...
StartPos += 8; // Strip "ESPEASY;"
eventString = F("RFLink");
Expand All @@ -323,7 +323,9 @@ void P020_Task::rulesEngine(const String& message) {

if (_P1EventData) {
eventString += '=';
eventString += message; // Include entire message, may cause memory overflow!
eventString += message; // Include entire message, may cause memory overflow!
eventString.replace(F("\n"), F(",")); // Make it a single line, comma-separated, as much as possible
eventString.replace(F("\r"), F("")); // We don't need no st*n carriage returns :)
}
break;
} // switch
Expand All @@ -335,6 +337,9 @@ void P020_Task::rulesEngine(const String& message) {
StartPos++;
}

if (!eventString.isEmpty()) {
eventQueue.add(eventString);
}
NewLinePos = message.indexOf('\n', StartPos);

if (handleMultiLine && (NewLinePos < 0)) {
Expand Down Expand Up @@ -464,6 +469,7 @@ bool P020_Task::handleP1Char(char ch) {
# endif // ifndef BUILD_NO_DEBUG
state = ParserState::WAITING; // reset
}
ch &= 0x7F; // Strip off occasional 8th bit for now
TD-er marked this conversation as resolved.
Show resolved Hide resolved

bool done = false;
bool invalid = false;
Expand Down Expand Up @@ -497,6 +503,7 @@ bool P020_Task::handleP1Char(char ch) {
state = ParserState::WAITING; // reset
return handleP1Char(ch);
} else {
addLog(LOG_LEVEL_ERROR, strformat(F("P1 : Receiving unknown: %d,'%c'"), ch, ch));
invalid = true;
}
break;
Expand Down