Conversation
…rigger for berryscripting incoming knx-messages
Noschvie
left a comment
There was a problem hiding this comment.
Please post comments in English.
|
And post in dev branch. |
| snprintf(event_cmd, sizeof(event_cmd), "Event knx_rx={\"ga\":%d,\"ct\":%d,\"len\":%d,\"val\":\"%s\"}", | ||
| msg.received_on, (int)msg.ct, msg.data_len, tempchar); | ||
| ExecuteCommand(event_cmd, SRC_IGNORE); | ||
| // -------------------------------- |
There was a problem hiding this comment.
What is wrong with the already available events KNXRX_CMND and KNRX_VAL?
| if (ArgC() < 3 || !Settings->flag.knx_enabled) { | ||
| ResponseCmndError(); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Pls keep syntax in line with other KNX commands. So in this case 5 parameters:
KnxTx_GA <area>,<line>,<member>,<type>,<value>
This way you can also support:
KnxTx_PA <area>,<line>,<member>,<type>,<value>
|
|
||
| int area = 0, line = 0, member = 0; | ||
| // Parse die Gruppenadresse (Haupt/Mittel/Unter) | ||
| if (sscanf(arg1, "%d/%d/%d", &area, &line, &member) < 3) { |
There was a problem hiding this comment.
sscanf() is expensive use of code.
Using the suggested syntax ther is no need for sscanf().
|
This PR has been automatically marked as stale because it hasn't any activity in last few weeks. It will be closed if no further activity occurs. Thank you for your contributions. |
Description:
Related issue (if applicable): fixes #
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass