FC0x02 Read Discrete Inputs

I am trying to create a Arduino application that read from remote modbus IO device a discrete inputs, bt using FC0x02 Read Discrete Inputs.
I am attaching callback to the onResponse() method of the modbus master bus the only thing that I receive is the request.
The application is not printing response information in the call back method.
Here is the experimental code:
/*

MIT License

Copyright (c) [2023] [MADE4HOME]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

*/

// Note: this is an example for the "EASTRON SDM630 Modbus-V2" power meter!

#pragma region Definitions

#define UPDATE_INTERVAL 1000

#define MB_BAUDRATE 9600

#define MB_SLAVE_ID 2

#define MB_REG_START 0

#define MB_REG_COUNT 8

#pragma endregion

#pragma region Headers

#include "made4home.h"

// Include the header for the ModbusClient RTU style
#include "ModbusClientRTU.h"
#include "Logging.h"

#include "FxTimer.h"

#pragma endregion

#pragma region Variables

/**
 * @brief Data ready flag.
 *
 */
bool DataReadyFlag_g = false;

/**
 * @brief Response values.
 *
 */
vector<uint8_t> Values_g;

/**
 * @brief Request time.
 *
 */
uint32_t RequestTime_g;

/**
 * @brief The RS485 module has no halfduplex, so the parameter with the DE/RE pin is required!
 *
 */
ModbusClientRTU *MB;

/**
 * @brief Update timer instance.
 */
FxTimer *UpdateTimer_g;

#pragma endregion

#pragma region Prototypes

/**
 * @brief Define an onData handler function to receive the regular responses
 *
 * @param response Received response message.
 * @param token Request's token.
 */
void handleData(ModbusMessage response, uint32_t token);

/**
 * @brief Define an onError handler function to receive error responses
 *
 * @param error Error code.
 * @param token User-supplied token to identify the causing request.
 */
void handleError(Error error, uint32_t token);

#pragma endregion

void setup()
{
      for (int i = 1; i <= MB_REG_COUNT*2; i++)
      {
        Values_g.push_back(i);
      }

    // Init Serial monitor
    Serial.begin(115200);
    while (!Serial) {}

  	// Setup the blink timer.
	  UpdateTimer_g = new FxTimer();
	  UpdateTimer_g->setExpirationTime(UPDATE_INTERVAL);
	  UpdateTimer_g->updateLastTime();

    Made4Home.setup();

    Serial.println("__ OK __");

    // Set up Serial2 connected to Modbus RTU
    Serial2.begin(MB_BAUDRATE, SERIAL_8N1, PIN_RS485_RX, PIN_RS485_TX);
    RTUutils::prepareHardwareSerial(Serial2);

    MB = new ModbusClientRTU(PIN_RS485_EN);

    // Set up ModbusRTU client.
    // - provide onData handler function
    MB->onResponseHandler(&handleResponse);
    // - provide onData handler function
    MB->onDataHandler(&handleData);
    // - provide onError handler function
    MB->onErrorHandler(&handleError);
    // Set message timeout to 2000ms
    MB->setTimeout(2000);
    // Start ModbusRTU background task
    MB->begin(Serial2);
}

void loop()
{
    UpdateTimer_g->update();
    if(UpdateTimer_g->expired())
    {
        UpdateTimer_g->updateLastTime();
        UpdateTimer_g->clear();

        // Yes.
        DataReadyFlag_g = false;

        // Issue the request
        Error err = MB->addRequest((uint32_t)millis(), MB_SLAVE_ID, READ_COIL, MB_REG_START, MB_REG_COUNT);
        if (err!=SUCCESS)
        {
          ModbusError e(err);
          LOG_E("Error creating request: %02X - %s\n", (int)e, (const char *)e);
        }

        // Issue the request
        err = MB->addRequest((uint32_t)millis(), MB_SLAVE_ID, READ_DISCR_INPUT, MB_REG_START, MB_REG_COUNT);
        if (err!=SUCCESS)
        {
          ModbusError e(err);
          LOG_E("Error creating request: %02X - %s\n", (int)e, (const char *)e);
        }

        // Issue the request
        err = MB->addRequest((uint32_t)millis(), MB_SLAVE_ID, READ_INPUT_REGISTER, MB_REG_START, MB_REG_COUNT);
        if (err!=SUCCESS)
        {
          ModbusError e(err);
          LOG_E("Error creating request: %02X - %s\n", (int)e, (const char *)e);
        }

        // Issue the request
        err = MB->addRequest((uint32_t)millis(), MB_SLAVE_ID, READ_HOLD_REGISTER, MB_REG_START, MB_REG_COUNT);
        if (err!=SUCCESS)
        {
          ModbusError e(err);
          LOG_E("Error creating request: %02X - %s\n", (int)e, (const char *)e);
        }
    }
    else
    {
        // No, but we may have another response
        if (DataReadyFlag_g)
        {
            DataReadyFlag_g = false;

            // We do. Print out the data
            Serial.printf("Requested at %8.3fs:\n", RequestTime_g / 1000.0);
            for (uint8_t i = 0; i < MB_REG_COUNT * 2; ++i)
            {
              Serial.printf("   %04X: %i\n", i + MB_REG_START, Values_g[i]);
            }
            Serial.printf("\r\n\r\n");
        }
    }
}

#pragma region Functions

/**
 * @brief Define an onData handler function to receive the regular responses
 *
 * @param response Received response message.
 * @param token Request's token.
 */
void handleData(ModbusMessage response, uint32_t token)
{
  // // First value is on pos 3, after server ID, function code and length byte
  // uint16_t offs = 0;

  // // The device has values all as IEEE754 float32 in two consecutive registers
  // // Read the requested in a loop
  for (uint8_t i = 0; i < MB_REG_COUNT; ++i)
  {
    response.get(i, Values_g[i]);
  }

  // uint16_t addr, words;
  // response.get(2, addr);
  // response.get(4, words);
  // Serial.print("Addr: ");
  // Serial.print(addr);
  // Serial.print(" Word: ");
  // Serial.println(words);
  Serial.println("handleData");

  // Signal "data is complete"
  RequestTime_g = token;
  DataReadyFlag_g = true;
}

void handleResponse(ModbusMessage response, uint32_t token)
{
  // // First value is on pos 3, after server ID, function code and length byte
  // uint16_t offs = 0;

  // // The device has values all as IEEE754 float32 in two consecutive registers
  // // Read the requested in a loop
  for (uint8_t i = 0; i < MB_REG_COUNT; ++i)
  {
    response.get(i, Values_g[i]);
  }

  // uint16_t addr, words;
  // response.get(2, addr);
  // response.get(4, words);
  // Serial.print("Addr: ");
  // Serial.print(addr);
  // Serial.print(" Word: ");
  // Serial.println(words);
  Serial.println("handleResponse");

  // Signal "data is complete"
  RequestTime_g = token;
  DataReadyFlag_g = true;
}

/**
 * @brief Define an onError handler function to receive error responses
 *
 * @param error Error code.
 * @param token User-supplied token to identify the causing request.
 */
void handleError(Error error, uint32_t token)
{
    // ModbusError wraps the error code and provides a readable error message for it
    ModbusError ModbusErrorL(error);
    LOG_E("Error response: %02X - %s\n", (int)ModbusErrorL, (const char *)ModbusErrorL);
}

#pragma endregion

Several things came to my mind reading the code:

You are providing onData/onError handlers as well as an onResponse handler. The latter will have precedence, so the former two never will be called.
You defined Values_g as a vector of uint8_t, so the calls to get() in the response handler will read the responses byte by byte. A Modbus register is uint16_t, so you may not get what you are expecting
You are firing several different requests in short succession, but the response handler does not take care of the different responses at all.

If you will provide a logging output I can try to explain what may be happening from it.

Anything new? Else I will close this issue within a week.

Well, no further help required obviously.

Hello, thanks for the fast answer, BUT unfortunately I can not response that fast, so shame on me!
So back to the topic. I did create a small man in the middle device and have the packages between the master and slave.
This is the communication in raw:
Req: {2}{2}{0}{0}{0}{8}{79}{FF}
Res: {2}{2}{1}{0}{A1}{CC}
Req: {2}{2}{0}{0}{0}{8}{79}{FF}
Res: {2}{2}{1}{0}{A1}{CC}
Req: {2}{2}{0}{0}{0}{8}{79}{FF}
Res: {2}{2}{1}{0}{A1}{CC}
AAAAND, this is the boot of the device and examples that you provide. I am worried that the response bytes are actually the request. That's why I will provide a boot time debug console messages:
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
__ OK __
handleData
Requested at    1.011s:   0000: 2   0001: 2   0002: 0   0003: 0   0004: 0   0005: 8   0006: 7   0007: 8   0008: 9   0009: 10   000A: 11   000B: 12   000C: 13   000D: 14   000E: 15   000F: 16
handleData
Requested at    2.011s:   0000: 2   0001: 2   0002: 0   0003: 0   0004: 0   0005: 8   0006: 7   0007: 8   0008: 9   0009: 10   000A: 11   000B: 12   000C: 13   000D: 14   000E: 15   000F: 16
handleData
Requested at    3.011s:   0000: 2   0001: 2   0002: 0   0003: 0   0004: 0   0005: 8   0006: 7   0007: 8   0008: 9   0009: 10   000A: 11   000B: 12   000C: 13   000D: 14   000E: 15   000F: 16
AND of course the code that I use.
/*
MIT License
Copyright (c) [2023] [MADE4HOME]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#pragma region Definitions
#define UPDATE_INTERVAL 1000
#define MB_BAUDRATE 9600
#define MB_SLAVE_ID 2
#define MB_REG_START 0
#define MB_REG_COUNT 8
#pragma endregion
#pragma region Headers
#include "made4home.h"
// Include the header for the ModbusClient RTU style
#include "ModbusClientRTU.h"
#include "Logging.h"
#include "FxTimer.h"
#pragma endregion
#pragma region Variables
/**

@brief Data ready flag.

*/
bool DataReadyFlag_g = false;
/**

@brief Response values.

*/
vector<uint8_t> Values_g;
/**

@brief Request time.

*/
uint32_t RequestTime_g;
/**

@brief The RS485 module has no halfduplex, so the parameter with the DE/RE pin is required!

*/
ModbusClientRTU *ModbusClientRTU_g;
/**

@brief Update timer instance.
*/
FxTimer *UpdateTimer_g;

#pragma endregion
#pragma region Prototypes
/**

@brief Define an onData handler function to receive the regular responses

@param response Received response message.
@param token Request's token.
*/
void handleData(ModbusMessage response, uint32_t token);

/**

@brief Define an onError handler function to receive error responses

@param error Error code.
@param token User-supplied token to identify the causing request.
*/
void handleError(Error error, uint32_t token);

#pragma endregion
void setup()
{
for (int i = 1; i <= MB_REG_COUNT*2; i++)
{
Values_g.push_back(i);
}
// Init Serial monitor
Serial.begin(115200);
while (!Serial) {}

// Setup the update timer.
  UpdateTimer_g = new FxTimer();
  UpdateTimer_g->setExpirationTime(UPDATE_INTERVAL);
  UpdateTimer_g->updateLastTime();

Made4Home.setup();

Serial.println("__ OK __");

// Set up Serial2 connected to Modbus RTU
RTUutils::prepareHardwareSerial(Serial2);
Serial2.begin(MB_BAUDRATE, SERIAL_8N1, PIN_RS485_RX, PIN_RS485_TX);

ModbusClientRTU_g = new ModbusClientRTU(PIN_RS485_EN);

// Set up ModbusRTU client.
// - provide onData handler function
// ModbusClientRTU_g->onResponseHandler(&handleResponse);
// - provide onData handler function
ModbusClientRTU_g->onDataHandler(&handleData);
// - provide onError handler function
ModbusClientRTU_g->onErrorHandler(&handleError);
// Set message timeout to 2000ms
ModbusClientRTU_g->setTimeout(2000);
// Start ModbusRTU background task
ModbusClientRTU_g->begin(Serial2);

}
void loop()
{
UpdateTimer_g->update();
if(UpdateTimer_g->expired())
{
UpdateTimer_g->updateLastTime();
UpdateTimer_g->clear();
    // Yes.
    DataReadyFlag_g = false;

    // Issue the request
    // Error ErrorL = ModbusClientRTU_g->addRequest((uint32_t)millis(), MB_SLAVE_ID, READ_COIL, MB_REG_START, MB_REG_COUNT);
    // if (ErrorL!=SUCCESS)
    // {
    //   ModbusError e(ErrorL);
    //   LOG_E("Error creating request: %02X - %s\n", (int)e, (const char *)e);
    // }

    // Issue the request
    Error ErrorL = ModbusClientRTU_g->addRequest((uint32_t)millis(), MB_SLAVE_ID, READ_DISCR_INPUT, MB_REG_START, MB_REG_COUNT);
    if (ErrorL!=SUCCESS)
    {
      ModbusError e(ErrorL);
      LOG_E("Error creating request: %02X - %s\n", (int)e, (const char *)e);
    }

    // // Issue the request
    // ErrorL = ModbusClientRTU_g->addRequest((uint32_t)millis(), MB_SLAVE_ID, READ_INPUT_REGISTER, MB_REG_START, MB_REG_COUNT);
    // if (ErrorL!=SUCCESS)
    // {
    //   ModbusError e(ErrorL);
    //   LOG_E("Error creating request: %02X - %s\n", (int)e, (const char *)e);
    // }

    // // Issue the request
    // ErrorL = ModbusClientRTU_g->addRequest((uint32_t)millis(), MB_SLAVE_ID, READ_HOLD_REGISTER, MB_REG_START, MB_REG_COUNT);
    // if (ErrorL!=SUCCESS)
    // {
    //   ModbusError e(ErrorL);
    //   LOG_E("Error creating request: %02X - %s\n", (int)e, (const char *)e);
    // }
}
else
{
    // No, but we may have another response
    if (DataReadyFlag_g)
    {
        DataReadyFlag_g = false;

        // We do. Print out the data
        Serial.printf("Requested at %8.3fs:\n", RequestTime_g / 1000.0);
        for (uint8_t i = 0; i < MB_REG_COUNT * 2; ++i)
        {
          Serial.printf("   %04X: %i\n", i + MB_REG_START, Values_g[i]);
        }
        Serial.printf("\r\n\r\n");
    }
}

}
#pragma region Functions
/**

@brief Define an onData handler function to receive the regular responses

@param response Received response message.
@param token Request's token.
*/
void handleData(ModbusMessage response, uint32_t token)
{
// // First value is on pos 3, after server ID, function code and length byte
// uint16_t offs = 0;

// // The device has values all as IEEE754 float32 in two consecutive registers
// // Read the requested in a loop
// for (uint8_t i = 0; i < MB_REG_COUNT; ++i)
// {
//   response.get(i, Values_g[i]);
// }
for (uint8_t i = 0; i < response.size(); ++i)
{
// response.get(i, Values_g[i]);
Values_g[i] = response[i];
// Serial.printf("%02X: %02X, ", i, response[i]);
}
// Serial.println();
// uint16_t addr, words;
// response.get(2, addr);
// response.get(4, words);
// Serial.print("Addr: ");
// Serial.print(addr);
// Serial.print(" Word: ");
// Serial.println(words);
Serial.println("handleData");
// Signal "data is complete"
RequestTime_g = token;
DataReadyFlag_g = true;
}
void handleResponse(ModbusMessage response, uint32_t token)
{
// // First value is on pos 3, after server ID, function code and length byte
// uint16_t offs = 0;
// // The device has values all as IEEE754 float32 in two consecutive registers
// // Read the requested in a loop
for (uint8_t i = 0; i < response.size(); ++i)
{
// response.get(i, Values_g[i]);
Values_g[i] = response[i];
// Serial.printf("%02X: %02X, ", i, response[i]);
}
// Serial.println();
// uint16_t addr, words;
// response.get(2, addr);
// response.get(4, words);
// Serial.print("Addr: ");
// Serial.print(addr);
// Serial.print(" Word: ");
// Serial.println(words);
Serial.println("handleResponse");
// Signal "data is complete"
RequestTime_g = token;
DataReadyFlag_g = true;
}
/**

@brief Define an onError handler function to receive error responses

@param error Error code.
@param token User-supplied token to identify the causing request.
*/
void handleError(Error error, uint32_t token)
{
// ModbusError wraps the error code and provides a readable error message for it
ModbusError ModbusErrorL(error);
LOG_E("Error response: %02X - %s\n", (int)ModbusErrorL, (const char *)ModbusErrorL);
}

#pragma endregion

There still is something missing in your understanding of the whereabouts in the code, I am afraid. No offense meant of course.
The handleData output is the only thing printed from the data handler, the request logged stems from your output of it in loop(). You are in fact completely ignoring the response as is received in the handleData callback.
You are trying to read coils, BTW, which is the Modbus name for single bits. To decode these, you will need to analyze the responded bytes accordingly. Your "man in the middle" device clearly shows you are requesting 8 coils from address 0, that fit in a single response byte, so the response has a single 0 byte telling you all 8 coils requested are zero.

"I am afraid. No offense meant of course.", I am afraid you are right, but please provide me a example because I am new to this topic.
Here what I found after I gave an logic one to first input:

This i s raw message from man in the midle:

"I am afraid. No offense meant of course.", I am afraid you are right, but please provide me a example because I am new to this topic.
Here what I found after I gave an logic one to first input:

This i s raw message from man in the middle:

Req: {2}{2}{0}{0}{0}{8}{79}{FF}
Res: {2}{2}{1}{1}{60}{12}
Req: {2}{2}{0}{0}{0}{8}{79}{FF}
Res: {2}{2}{1}{1}{60}{12}
Req: {2}{2}{0}{0}{0}{8}{79}{FF}
Res: {2}{2}{1}{1}{60}{12}

This is the debug console messages.

ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
__ OK __
00: 02, 01: 02, 02: 00, 03: 00, 04: 00, 05: 08,
handleData
00: 02, 01: 02, 02: 00, 03: 00, 04: 00, 05: 08,
handleData
00: 02, 01: 02, 02: 00, 03: 00, 04: 00, 05: 08,
handleData

And of course the code, you were right I red in the handle function bytes:

/*
MIT License
Copyright (c) [2023] [MADE4HOME]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#pragma region Definitions
#define UPDATE_INTERVAL 1000
#define MB_BAUDRATE 9600
#define MB_SLAVE_ID 2
#define MB_REG_START 0
#define MB_REG_COUNT 8
#pragma endregion
#pragma region Headers
#include "made4home.h"
// Include the header for the ModbusClient RTU style
#include "ModbusClientRTU.h"
#include "Logging.h"
#include "FxTimer.h"
#pragma endregion
#pragma region Variables
/**

@brief Data ready flag.

*/
bool DataReadyFlag_g = false;
/**

@brief Response values.

*/
vector<uint8_t> Values_g;
/**

@brief Request time.

*/
uint32_t RequestTime_g;
/**

@brief The RS485 module has no halfduplex, so the parameter with the DE/RE pin is required!

*/
ModbusClientRTU *ModbusClientRTU_g;
/**

@brief Update timer instance.
*/
FxTimer *UpdateTimer_g;

#pragma endregion
#pragma region Prototypes
/**

@brief Define an onData handler function to receive the regular responses

@param response Received response message.
@param token Request's token.
*/
void handleData(ModbusMessage response, uint32_t token);

/**

@brief Define an onError handler function to receive error responses

@param error Error code.
@param token User-supplied token to identify the causing request.
*/
void handleError(Error error, uint32_t token);

#pragma endregion
void setup()
{
for (int i = 1; i <= MB_REG_COUNT*2; i++)
{
Values_g.push_back(i);
}
// Init Serial monitor
Serial.begin(115200);
while (!Serial) {}

// Setup the update timer.
  UpdateTimer_g = new FxTimer();
  UpdateTimer_g->setExpirationTime(UPDATE_INTERVAL);
  UpdateTimer_g->updateLastTime();

Made4Home.setup();

Serial.println("__ OK __");

// Set up Serial2 connected to Modbus RTU
RTUutils::prepareHardwareSerial(Serial2);
Serial2.begin(MB_BAUDRATE, SERIAL_8N1, PIN_RS485_RX, PIN_RS485_TX);

ModbusClientRTU_g = new ModbusClientRTU(PIN_RS485_EN);

// Set up ModbusRTU client.
// - provide onData handler function
// ModbusClientRTU_g->onResponseHandler(&handleResponse);
// - provide onData handler function
ModbusClientRTU_g->onDataHandler(&handleData);
// - provide onError handler function
ModbusClientRTU_g->onErrorHandler(&handleError);
// Set message timeout to 2000ms
ModbusClientRTU_g->setTimeout(2000);
// Start ModbusRTU background task
ModbusClientRTU_g->begin(Serial2);

}
void loop()
{
UpdateTimer_g->update();
if(UpdateTimer_g->expired())
{
UpdateTimer_g->updateLastTime();
UpdateTimer_g->clear();
    // Yes.
    DataReadyFlag_g = false;

    // Issue the request
    // Error ErrorL = ModbusClientRTU_g->addRequest((uint32_t)millis(), MB_SLAVE_ID, READ_COIL, MB_REG_START, MB_REG_COUNT);
    // if (ErrorL!=SUCCESS)
    // {
    //   ModbusError e(ErrorL);
    //   LOG_E("Error creating request: %02X - %s\n", (int)e, (const char *)e);
    // }

    // Issue the request
    Error ErrorL = ModbusClientRTU_g->addRequest((uint32_t)millis(), MB_SLAVE_ID, READ_DISCR_INPUT, MB_REG_START, MB_REG_COUNT);
    if (ErrorL!=SUCCESS)
    {
      ModbusError e(ErrorL);
      LOG_E("Error creating request: %02X - %s\n", (int)e, (const char *)e);
    }

    // // Issue the request
    // ErrorL = ModbusClientRTU_g->addRequest((uint32_t)millis(), MB_SLAVE_ID, READ_INPUT_REGISTER, MB_REG_START, MB_REG_COUNT);
    // if (ErrorL!=SUCCESS)
    // {
    //   ModbusError e(ErrorL);
    //   LOG_E("Error creating request: %02X - %s\n", (int)e, (const char *)e);
    // }

    // // Issue the request
    // ErrorL = ModbusClientRTU_g->addRequest((uint32_t)millis(), MB_SLAVE_ID, READ_HOLD_REGISTER, MB_REG_START, MB_REG_COUNT);
    // if (ErrorL!=SUCCESS)
    // {
    //   ModbusError e(ErrorL);
    //   LOG_E("Error creating request: %02X - %s\n", (int)e, (const char *)e);
    // }
}
else
{
    // No, but we may have another response
    if (DataReadyFlag_g)
    {
        DataReadyFlag_g = false;

        // // We do. Print out the data
        // Serial.printf("Requested at %8.3fs:\n", RequestTime_g / 1000.0);
        // for (uint8_t i = 0; i < MB_REG_COUNT * 2; ++i)
        // {
        //   Serial.printf("   %04X: %i\n", i + MB_REG_START, Values_g[i]);
        // }
        // Serial.printf("\r\n\r\n");
    }
}

}
#pragma region Functions
/**

@brief Define an onData handler function to receive the regular responses

@param response Received response message.
@param token Request's token.
*/
void handleData(ModbusMessage response, uint32_t token)
{
// // First value is on pos 3, after server ID, function code and length byte
// uint16_t offs = 0;

// // The device has values all as IEEE754 float32 in two consecutive registers
// // Read the requested in a loop
// for (uint8_t i = 0; i < MB_REG_COUNT; ++i)
// {
//   response.get(i, Values_g[i]);
// }
for (uint8_t i = 0; i < response.size(); ++i)
{
// response.get(i, Values_g[i]);
// Values_g[i] = response[i];
Serial.printf("%02X: %02X, ", i, response[i]);
}
Serial.println();
// uint16_t addr, words;
// response.get(2, addr);
// response.get(4, words);
// Serial.print("Addr: ");
// Serial.print(addr);
// Serial.print(" Word: ");
// Serial.println(words);
Serial.println("handleData");
// Signal "data is complete"
RequestTime_g = token;
DataReadyFlag_g = true;
}
void handleResponse(ModbusMessage response, uint32_t token)
{
// // First value is on pos 3, after server ID, function code and length byte
// uint16_t offs = 0;
// // The device has values all as IEEE754 float32 in two consecutive registers
// // Read the requested in a loop
for (uint8_t i = 0; i < response.size(); ++i)
{
// response.get(i, Values_g[i]);
// Values_g[i] = response[i];
Serial.printf("%02X: %02X, ", i, response[i]);
}
Serial.println();
// uint16_t addr, words;
// response.get(2, addr);
// response.get(4, words);
// Serial.print("Addr: ");
// Serial.print(addr);
// Serial.print(" Word: ");
// Serial.println(words);
Serial.println("handleResponse");
// Signal "data is complete"
RequestTime_g = token;
DataReadyFlag_g = true;
}
/**

@brief Define an onError handler function to receive error responses

@param error Error code.
@param token User-supplied token to identify the causing request.
*/
void handleError(Error error, uint32_t token)
{
// ModbusError wraps the error code and provides a readable error message for it
ModbusError ModbusErrorL(error);
LOG_E("Error response: %02X - %s\n", (int)ModbusErrorL, (const char *)ModbusErrorL);
}

#pragma endregion

Conclusion
i am again saying that I am giving the first input logic one.
What I am afraid that the response debug messages are the same as previous time.

Kindly Regards

Awg, man, your code is hard to read... 😉
Do me a favor and modify Logging.h at the very start to have LOG_LEVEL_VERBOSE as default logging level, compile again, run it and post the logging output here.

I did change the log as you mentioned LOG_LEVEL_VERBOSE and this is the result:
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
__ OK __
[D] 21| ModbusClientRTU.cpp  [ 111] setTimeout: Timeout set to 2000
[V] 21| RTUutils.cpp         [ 112] calculateInterval: Calc interval(9600)=3645
[D] 32| ModbusClientRTU.cpp  [  86] doBegin: Client task<PHONE_NUMBER> started. Interval=3645
[V] 1011| ModbusMessage.cpp    [ 477] checkData: Check data #3
[D] 1011| ModbusClientRTU.cpp  [ 147] addRequestM: request for 02/02
[D] 1011| ModbusClientRTU.cpp  [ 230] addToQueue: RC=01
[D] 1011| ModbusClientRTU.cpp  [ 248] handleConnection: Pulled request from queue
[D] 1021| ModbusClientRTU.cpp  [ 158] addRequestM: RC=00
[D] Sent packet: @3FFB37EC/6:
| 0000: 02 02 00 00 00 08                                 |......          |
[D] 1040| ModbusClientRTU.cpp  [ 253] handleConnection: Request sent.
[V] 1055| RTUutils.cpp         [ 262] receive: C/3656us without data after 8
[V] 1055| RTUutils.cpp         [ 272] receive: C/[V] Raw buffer received: @3FFB3834/8:
| 0000: 02 02 00 00 00 08 79 FF                           |......y.        |
[D] 1075| RTUutils.cpp         [ 437] receive: C/[D] Received packet: @3FFB37BC/6:
| 0000: 02 02 00 00 00 08                                 |......          |
[D] 1086| ModbusClientRTU.cpp  [ 268] handleConnection: Data response (6 bytes) received.
[V] Data: @3FFB37BC/6:
| 0000: 02 02 00 00 00 08                                 |......          |
[D] 1096| ModbusClientRTU.cpp  [ 289] handleConnection: Response generated.
[V] Response packet: @3FFB37BC/6:
| 0000: 02 02 00 00 00 08                                 |......          |
00: 02, 01: 02, 02: 00, 03: 00, 04: 00, 05: 08,
handleData
[V] 2011| ModbusMessage.cpp    [ 477] checkData: Check data #3
[D] 2011| ModbusClientRTU.cpp  [ 147] addRequestM: request for 02/02
[D] 2021| ModbusClientRTU.cpp  [ 230] addToQueue: RC=01
[D] 2021| ModbusClientRTU.cpp  [ 158] addRequestM: RC=00
[D] 2021| ModbusClientRTU.cpp  [ 248] handleConnection: Pulled request from queue
[D] Sent packet: @3FFB37D4/6:
| 0000: 02 02 00 00 00 08                                 |......          |
[D] 2041| ModbusClientRTU.cpp  [ 253] handleConnection: Request sent.
[V] 2064| RTUutils.cpp         [ 262] receive: C/3663us without data after 14
[V] 2064| RTUutils.cpp         [ 272] receive: C/[V] Raw buffer received: @3FFB381C/14:
| 0000: 02 02 00 00 00 08 79 FF  02 02 01 01 60 0C        |......y.....`.  |
[D] 2074| RTUutils.cpp         [ 437] receive: C/[D] Received packet: @3FFB8308/1:
| 0000: E2                                                |.               |
[D] 2095| ModbusClientRTU.cpp  [ 268] handleConnection: Error response (1 bytes) received.
[V] Data: @3FFB8308/1:
| 0000: E2                                                |.               |
[D] 2106| ModbusClientRTU.cpp  [ 289] handleConnection: Response generated.
[V] Response packet: @3FFB8308/3:
| 0000: 02 82 E2                                          |...             |
[1;33m[E] 2126| modbus_master.ino    [ 291] handleError: Error response: E2 - CRC check error
[0m

The first response received is in fact the request you sent. The next response looks like a collision of the next request with a response on the bus.
Can you check the wiring and have a close look at the response times and configuration of the servers on the bus? The collision would be explainable by a slow server not maintaining the RTU protocol. A picture of your connections could be helpful as well.

I did try to remove all other devices from the bus (RS485). This is the new messages:
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
__ OK __
[D] 21| ModbusClientRTU.cpp  [ 111] setTimeout: Timeout set to 2000
[V] 21| RTUutils.cpp         [ 112] calculateInterval: Calc interval(9600)=3645
[D] 32| ModbusClientRTU.cpp  [  86] doBegin: Client task<PHONE_NUMBER> started. Interval=3645
[V] 1011| ModbusMessage.cpp    [ 477] checkData: Check data #3
[D] 1011| ModbusClientRTU.cpp  [ 147] addRequestM: request for 02/02
[D] 1011| ModbusClientRTU.cpp  [ 230] addToQueue: RC=01
[D] 1011| ModbusClientRTU.cpp  [ 248] handleConnection: Pulled request from queue
[D] 1021| ModbusClientRTU.cpp  [ 158] addRequestM: RC=00
[D] Sent packet: @3FFB37EC/6:
| 0000: 02 02 00 00 00 08                                 |......          |
[D] 1040| ModbusClientRTU.cpp  [ 253] handleConnection: Request sent.
[V] 1059| RTUutils.cpp         [ 262] receive: C/3647us without data after 14
[V] 1059| RTUutils.cpp         [ 272] receive: C/[V] Raw buffer received: @3FFB3834/14:
| 0000: 02 02 00 00 00 08 79 FF  02 02 01 01 60 0C        |......y......  | [D] 1069| RTUutils.cpp         [ 437] receive: C/[D] Received packet: @3FFB8308/1:   | 0000: E2                                                |.               | [D] 1090| ModbusClientRTU.cpp  [ 268] handleConnection: Error response (1 bytes) received. [V] Data: @3FFB8308/1:   | 0000: E2                                                |.               | [D] 1101| ModbusClientRTU.cpp  [ 289] handleConnection: Response generated. [V] Response packet: @3FFB8308/3:   | 0000: 02 82 E2                                          |...             | [1;33m[E] 1121| modbus_master.ino    [ 291] handleError: Error response: E2 - CRC check error [0m[V] 2011| ModbusMessage.cpp    [ 477] checkData: Check data #3 [D] 2011| ModbusClientRTU.cpp  [ 147] addRequestM: request for 02/02 [D] 2021| ModbusClientRTU.cpp  [ 230] addToQueue: RC=01 [D] 2021| ModbusClientRTU.cpp  [ 158] addRequestM: RC=00 [D] 2021| ModbusClientRTU.cpp  [ 248] handleConnection: Pulled request from queue [D] Sent packet: @3FFB37D4/6:   | 0000: 02 02 00 00 00 08                                 |......          | [D] 2040| ModbusClientRTU.cpp  [ 253] handleConnection: Request sent. [V] 2059| RTUutils.cpp         [ 262] receive: C/3648us without data after 14 [V] 2059| RTUutils.cpp         [ 272] receive: C/[V] Raw buffer received: @3FFB381C/14:   | 0000: 02 02 00 00 00 08 79 FF  02 02 01 01 60 0C        |......y......  |
[D] 2070| RTUutils.cpp         [ 437] receive: C/[D] Received packet: @3FFB8308/1:
| 0000: E2                                                |.               |
[D] 2090| ModbusClientRTU.cpp  [ 268] handleConnection: Error response (1 bytes) received.
[V] Data: @3FFB8308/1:
| 0000: E2                                                |.               |
[D] 2101| ModbusClientRTU.cpp  [ 289] handleConnection: Response generated.
[V] Response packet: @3FFB8308/3:
| 0000: 02 82 E2                                          |...             |
[1;33m[E] 2121| modbus_master.ino    [ 291] handleError: Error response: E2 - CRC check error
[0m[V] 3011| ModbusMessage.cpp    [ 477] checkData: Check data #3
[D] 3011| ModbusClientRTU.cpp  [ 147] addRequestM: request for 02/02
[D] 3021| ModbusClientRTU.cpp  [ 230] addToQueue: RC=01
[D] 3021| ModbusClientRTU.cpp  [ 158] addRequestM: RC=00
[D] 3021| ModbusClientRTU.cpp  [ 248] handleConnection: Pulled request from queue
[D] Sent packet: @3FFB37D4/6:
| 0000: 02 02 00 00 00 08                             ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
__ OK __
[D] 21| ModbusClientRTU.cpp  [ 111] setTimeout: Timeout set to 2000
[V] 21| RTUutils.cpp         [ 112] calculateInterval: Calc interval(9600)=3645
[D] 32| ModbusClientRTU.cpp  [  86] doBegin: Client task<PHONE_NUMBER> started. Interval=3645

Same again. The server seems to first echo the request, then responds without maintaining the required quiet time of 3500 microseconds. Another explanation would be a misplaced connection between the ESP's RX and TX lines...

This is again the log, I did suceed the message transport.
This is the log:
The oldest data was removed. Continue...
11| ModbusMessage.cpp    [ 477] checkData: Check data #3
[D] 2011| ModbusClientRTU.cpp  [ 147] addRequestM: request for 02/02
[D] 2021| ModbusClientRTU.cpp  [ 230] addToQueue: RC=01
[D] 2021| ModbusClientRTU.cpp  [ 158] addRequestM: RC=00
[D] 2021| ModbusClientRTU.cpp  [ 248] handleConnection: Pulled request from queue
[D] Sent packet: @3FFB37D4/6:
| 0000: 02 02 00 00 00 08                                 |......          |
[D] 2040| ModbusClientRTU.cpp  [ 253] handleConnection: Request sent.
[V] 2060| RTUutils.cpp         [ 262] receive: C/3670us without data after 14
[V] 2060| RTUutils.cpp         [ 272] receive: C/[V] Raw buffer received: @3FFB381C/14:
| 0000: 02 02 00 00 00 08 79 FF  02 02 01 01 60 0C        |......y......  | [D] 2071| RTUutils.cpp         [ 437] receive: C/[D] Received packet: @3FFB8308/1:   | 0000: E2                                                |.               | [D] 2091| ModbusClientRTU.cpp  [ 268] handleConnection: Error response (1 bytes) received. [V] Data: @3FFB8308/1:   | 0000: E2                                                |.               | [D] 2102| ModbusClientRTU.cpp  [ 289] handleConnection: Response generated. [V] Response packet: @3FFB8308/3:   | 0000: 02 82 E2                                          |...             | [1;33m[E] 2123| modbus_master.ino    [ 291] handleError: Error response: E2 - CRC check error [0m[V] 3011| ModbusMessage.cpp    [ 477] checkData: Check data #3 [D] 3011| ModbusClientRTU.cpp  [ 147] addRequestM: request for 02/02 [D] 3021| ModbusClientRTU.cpp  [ 230] addToQueue: RC=01 [D] 3021| ModbusClientRTU.cpp  [ 158] addRequestM: RC=00 [D] 3021| ModbusClientRTU.cpp  [ 248] handleConnection: Pulled request from queue [D] Sent packet: @3FFB37D4/6:   | 0000: 02 02 00 00 00 08                                 |......          | [D] 3040| ModbusClientRTU.cpp  [ 253] handleConnection: Request sent. [V] 3060| RTUutils.cpp         [ 262] receive: C/3647us without data after 14 [V] 3060| RTUutils.cpp         [ 272] receive: C/[V] Raw buffer received: @3FFB381C/14:   | 0000: 02 02 00 00 00 08 79 FF  02 02 01 01 60 0C        |......y......  |
[D] 3071| RTUutils.cpp         [ 437] receive: C/[D] Received packet: @3FFB8308/1:
| 0000: E2                                                |.               |
[D] 3091| ModbusClientRTU.cpp  [ 268] handleConnection: Error response (1 bytes) received.
[V] Data: @3FFB8308/1:
| 0000: E2                                                |.               |
[D] 3102| ModbusClientRTU.cpp  [ 289] handleConnection: Response generated.
[V] Response packet: @3FFB8308/3:
| 0000: 02 82 E2                                          |...             |
[1;33m[E] 3123| modbus_master.ino    [ 291] handleError: Error response: E2 - CRC check error
[0m[V] 4011| ModbusMessage.cpp    [ 477] checkData: Check data #3
[D] 4011| ModbusClientRTU.cpp  [ 147] addRequestM: request for 02/02
[D] 4021| ModbusClientRTU.cpp  [ 230] addToQueue: RC=01
[D] 4021| ModbusClientRTU.cpp  [ 158] addRequestM: RC=00
[D] 4021| ModbusClientRTU.cpp  [ 248] handleConnection: Pulled request from queue
[D] Sent packet: @3FFB37D4/6:
| 0000: 02 02 00 00 00 08                                 |......          |
[D] 4040| ModbusClientRTU.cpp  [ 253] handleConnection: Request sent.
[V] 4060| RTUutils.cpp         [ 262] receive: C/3687us without data after 14
[V] 4061| RTUutils.cpp         [ 272] receive: C/[V] Raw buffer received: @3FFB381C/14:
| 0000: 02 02 00 00 00 08 79 FF  02 02 01 01 60 0C        |......y.....`.  |
[D] 4071| RTUutils.cpp         [ 437] receive: C/[D] Received packet: @3FFB8308/1:
| 0000: E2                                                |.               |
[D] 4092| ModbusClientRTU.cpp  [ 268] handleConnection: Error response (1 bytes) received.
[V] Data: @3FFB8308/1:
| 0000: E2                                                |.               |
[D] 4102| ModbusClientRTU.cpp  [ 289] handleConnection: Response generated.
[V] Response packet: @3FFB8308/3:
| 0000: 02 82 E2                                          |...             |
[1;33m[E] 4123| modbus_master.ino    [ 291] handleError: Error response: E2 - CRC check error
[0m
Serial port COM11 closed
And this is the communication:
Req: {2}{2}{0}{0}{0}{8}{79}{FF}
Res: {2}{2}{1}{1}{60}{12}
Req: {2}{2}{0}{0}{0}{8}{79}{FF}
Res: {2}{2}{1}{1}{60}{12}
Req: {2}{2}{0}{0}{0}{8}{79}{FF}
Res: {2}{2}{1}{1}{60}{12}
Req: {2}{2}{0}{0}{0}{8}{79}{FF}
Res: {2}{2}{1}{1}{60}{12}

Again: did you check if there is an unwanted connection between the ESP's RX and TX pins? That would explain what we see - the request immediately read back again.

I did check all the wearing. The length is so short that the wires can not play role as a antenna or internal interference.

To verify that disconnect the RS485 wires and let run your sketch. If we see the requests echoed back, there is something wrong on the ESP side. If all you will get are E0 timeout errors, the problem must lie on the RS485 or server's side.

I think you are right. There is problem with the slave device. Will try another. May I keep the chance to communicate with you for further support?

Of course we will continue trying to kill the bug 😉
The log you posted some minutes ago still has the E2 CRC errors, so you did not cut the RS485 connection yet. To sort things out please do as advised yesterday, disconnect the A+/B- wires and do another run. I really would like to see the resulting log...

No, I did try with another MODBUS library for arduino, bu still the same thing popped up. So will just try with another modbus slave device. Beside with python library on windows 10 are working just fine, with all OPCodes that I want to try.  It is inside the slave firmware.

No, I did try with another MODBUS library for arduino, bu still the same thing popped up. So will just try with another modbus slave device. Beside with python library on windows 10 are working just fine, with all OPCodes that I want to try.  It is inside the slave firmware.

Hey I have break trough. I did try with modbus RTU bu for python pymodbus:
#!/usr/bin/env python3
-- coding: utf8 --
import time
import logging
---------------------------------------------------------------------------
import the modbus client and the framers
---------------------------------------------------------------------------
from pymodbus.client.sync import ModbusTcpClient as ModbusClient
from pymodbus.transaction import ModbusSocketFramer as ModbusFramer
from pymodbus.client.serial import ModbusSerialClient
from pymodbus.transaction import ModbusRtuFramer
from pymodbus.transaction import ModbusBinaryFramer as ModbusFramer
from pymodbus.transaction import ModbusAsciiFramer as ModbusFramer
---------------------------------------------------------------------------
configure the client logging
---------------------------------------------------------------------------
log = logging.getLogger()
log.setLevel(logging.DEBUG)
def handle_discrete_input(client, slave):
"""Read discrete inputs."""
log.info("### Reading discrete input, Read address:0-7")
rr = client.read_discrete_inputs(0, 8, slave=slave)
if not rr.isError():
print(rr.bits)
else:
    print(rr)

def main():
unit = 2
port = "COM13"
# ----------------------------------------------------------------------- #
# Initialize the client
# ----------------------------------------------------------------------- #

with ModbusSerialClient(
        port,
        method="rtu",
        framer=ModbusRtuFramer,
        timeout=1,
        # retries=3,
        # retry_on_empty=False,
        # close_comm_on_error=False,.
        # strict=True,
        baudrate=9600,
        bytesize=8,
        parity="N",
        stopbits=1,
        # handle_local_echo=False,
    ) as client:

    # ----------------------------------------------------------------------- #
    # perform your requests
    # ----------------------------------------------------------------------- #
    handle_discrete_input(client, unit)

    # ----------------------------------------------------------------------- #
    # close the client
    # ---------------------------------------------------------------------- #
    client.close()

if name == "main":
main()
The result from the code:
[True, False, False, False, False, False, False, False]
Like I said before I give high level to first input.

This is on your PC, right? So it does show the server is working in principle, but does not help much in regards to finding the problem on the ESP32.
I still would suggest you to do the simple disconnected test as described above to find if it is in the wiring or the software...

There is no man in the middle device, only p2p as you said, just change the master.

But COM13 in the Python code clearly says "PC", so no ESP32 involved?

Yes ESP is not involved, the data is received and parsed with no problems. This is what puzzling me. Why ESP32 does not accept it, and PC accept it.

For the fourth time: please do as advised, so we will know if it is the wiring or the software!

with RS485

ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
__ OK __
[D] 25| ModbusClientRTU.cpp  [ 111] setTimeout: Timeout set to 2000
[V] 25| RTUutils.cpp         [ 112] calculateInterval: Calc interval(9600)=3645
[D] 36| ModbusClientRTU.cpp  [  86] doBegin: Client task<PHONE_NUMBER> started. Interval=3645
[V] 1015| ModbusMessage.cpp    [ 477] checkData: Check data #3
[D] 1015| ModbusClientRTU.cpp  [ 147] addRequestM: request for 02/02
[D] 1015| ModbusClientRTU.cpp  [ 230] addToQueue: RC=01
[D] 1015| ModbusClientRTU.cpp  [ 248] handleConnection: Pulled request from queue
[D] 1025| ModbusClientRTU.cpp  [ 158] addRequestM: RC=00
[D] Sent packet: @3FFB37EC/6:
  | 0000: 02 02 00 00 00 08                                 |......          |
[D] 1044| ModbusClientRTU.cpp  [ 253] handleConnection: Request sent.
[V] 1059| RTUutils.cpp         [ 262] receive: C/3664us without data after 14
[V] 1059| RTUutils.cpp         [ 272] receive: C/[V] Raw buffer received: @3FFB3834/14:
  | 0000: 02 02 00 00 00 08 79 FF  02 02 01 01 60 0C        |......y.....`.  |
[D] 1070| RTUutils.cpp         [ 437] receive: C/[D] Received packet: @3FFB8308/1:
  | 0000: E2                                                |.               |
[D] 1090| ModbusClientRTU.cpp  [ 268] handleConnection: Error response (1 bytes) received.
[V] Data: @3FFB8308/1:
  | 0000: E2                                                |.               |
[D] 1101| ModbusClientRTU.cpp  [ 289] handleConnection: Response generated.
[V] Response packet: @3FFB8308/3:
  | 0000: 02 82 E2                                          |...             |
[E] 1121| modbus_master.ino    [ 291] handleError: Error response: E2 - CRC check error
[V] 2015| ModbusMessage.cpp    [ 477] checkData: Check data #3
[D] 2015| ModbusClientRTU.cpp  [ 147] addRequestM: request for 02/02
[D] 2025| ModbusClientRTU.cpp  [ 230] addToQueue: RC=01
[D] 2025| ModbusClientRTU.cpp  [ 158] addRequestM: RC=00
[D] 2025| ModbusClientRTU.cpp  [ 248] handleConnection: Pulled request from queue
[D] Sent packet: @3FFB37D4/6:
  | 0000: 02 02 00 00 00 08                                 |......          |
[D] 2044| ModbusClientRTU.cpp  [ 253] handleConnection: Request sent.
[V] 2059| RTUutils.cpp         [ 262] receive: C/3669us without data after 14
[V] 2059| RTUutils.cpp         [ 272] receive: C/[V] Raw buffer received: @3FFB381C/14:
  | 0000: 02 02 00 00 00 08 79 FF  02 02 01 01 60 0C        |......y.....`.  |
[D] 2080| RTUutils.cpp         [ 437] receive: C/[D] Received packet: @3FFB8308/1:
  | 0000: E2                                                |.               |
[D] 2090| ModbusClientRTU.cpp  [ 268] handleConnection: Error response (1 bytes) received.
[V] Data: @3FFB8308/1:
  | 0000: E2                                                |.               |
[D] 2101| ModbusClientRTU.cpp  [ 289] handleConnection: Response generated.
[V] Response packet: @3FFB8308/3:
  | 0000: 02 82 E2                                          |...             |
[E] 2122| modbus_master.ino    [ 291] handleError: Error response: E2 - CRC check error

no RS485

ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
__ OK __
[D] 25| ModbusClientRTU.cpp  [ 111] setTimeout: Timeout set to 2000
[V] 25| RTUutils.cpp         [ 112] calculateInterval: Calc interval(9600)=3645
[D] 36| ModbusClientRTU.cpp  [  86] doBegin: Client task<PHONE_NUMBER> started. Interval=3645
[V] 1015| ModbusMessage.cpp    [ 477] checkData: Check data #3
[D] 1015| ModbusClientRTU.cpp  [ 147] addRequestM: request for 02/02
[D] 1015| ModbusClientRTU.cpp  [ 230] addToQueue: RC=01
[D] 1015| ModbusClientRTU.cpp  [ 248] handleConnection: Pulled request from queue
[D] 1025| ModbusClientRTU.cpp  [ 158] addRequestM: RC=00
[D] Sent packet: @3FFB37EC/6:
  | 0000: 02 02 00 00 00 08                                 |......          |
[D] 1044| ModbusClientRTU.cpp  [ 253] handleConnection: Request sent.
[V] 1059| RTUutils.cpp         [ 262] receive: C/3650us without data after 8
[V] 1059| RTUutils.cpp         [ 272] receive: C/[V] Raw buffer received: @3FFB3834/8:
  | 0000: 02 02 00 00 00 08 79 FF                           |......y.        |
[D] 1079| RTUutils.cpp         [ 437] receive: C/[D] Received packet: @3FFB37BC/6:
  | 0000: 02 02 00 00 00 08                                 |......          |
[D] 1090| ModbusClientRTU.cpp  [ 268] handleConnection: Data response (6 bytes) received.
[V] Data: @3FFB37BC/6:
  | 0000: 02 02 00 00 00 08                                 |......          |
[D] 1100| ModbusClientRTU.cpp  [ 289] handleConnection: Response generated.
[V] Response packet: @3FFB37BC/6:
  | 0000: 02 02 00 00 00 08                                 |......          |
00: 02, 01: 02, 02: 00, 03: 00, 04: 00, 05: 08,
handleData
[V] 2015| ModbusMessage.cpp    [ 477] checkData: Check data #3
[D] 2015| ModbusClientRTU.cpp  [ 147] addRequestM: request for 02/02
[D] 2025| ModbusClientRTU.cpp  [ 230] addToQueue: RC=01
[D] 2025| ModbusClientRTU.cpp  [ 158] addRequestM: RC=00
[D] 2025| ModbusClientRTU.cpp  [ 248] handleConnection: Pulled request from queue
[D] Sent packet: @3FFB37D4/6:
  | 0000: 02 02 00 00 00 08                                 |......          |
[D] 2044| ModbusClientRTU.cpp  [ 253] handleConnection: Request sent.
[V] 2059| RTUutils.cpp         [ 262] receive: C/3646us without data after 8
[V] 2059| RTUutils.cpp         [ 272] receive: C/[V] Raw buffer received: @3FFB381C/8:
  | 0000: 02 02 00 00 00 08 79 FF                           |......y.        |
[D] 2080| RTUutils.cpp         [ 437] receive: C/[D] Received packet: @3FFB37D4/6:
  | 0000: 02 02 00 00 00 08                                 |......          |
[D] 2090| ModbusClientRTU.cpp  [ 268] handleConnection: Data response (6 bytes) received.
[V] Data: @3FFB37D4/6:
  | 0000: 02 02 00 00 00 08                                 |......          |
[D] 2101| ModbusClientRTU.cpp  [ 289] handleConnection: Response generated.
[V] Response packet: @3FFB37D4/6:
  | 0000: 02 02 00 00 00 08                                 |......          |
00: 02, 01: 02, 02: 00, 03: 00, 04: 00, 05: 08,
handleData

Thanks! now we get somewhere.
The request still is echoed back, so the problem is located on the ESP32  side. The software is acting as if there is a loopback between TX and RX of the Serial interface. This can be some unintended wire or false contact on the breadboard, or a wrong GPIO assignment somewhere. Can it be some other library you are using is doing Serial configuration as well?

OK, I am digging.
Will keep doing the same test and see what will comes out.
Thanks in advance!

Can you see it?

I am afraid: no? I personally would not recommend pulling RE to a constant GND, but what else should I see?

I personally would not recommend pulling RE to a constant GND

I will call my colleague tomorrow and we should redesign this thing!

I would like to apologies for wasting your time!

No worries. I would have told you if you had been wasting my time. One always will learn something.
The usual connection is to wire both RE and DE to the same GPIO, so that toggling that between HIGH and LOW levels will switch between listen and send modes.

Hello, and Merry Christmas! I wish you guys all best!
Well after revising our electrical schematic and fix the F.. issue all things are great and work.
I face the following problem by creating message and here the problem.
I am not able to create a single coil message and send it FC=0x05.
The code:
        // Issue the request
        Error ErrorL = ModbusClientRTU_g->addRequest((uint32_t)millis(), MB_SLAVE_ID, WRITE_COIL, 1, 1);
        if (ErrorL!=SUCCESS)
        {
          ModbusError e(ErrorL);
          LOG_E("Error creating request: %02X - %s\n", (int)e, (const char *)e);
        }

[V] 109042| ModbusMessage.cpp    [ 477] checkData: Check data #3
[E] 109042| modbus_master.ino    [ 174] loop: Error creating request: E7 - Parameter out of bounds

Thanks in advance.
I decide not open a new issue because it is easy to track what we achieve due to our device development
Regards

Good to read you got your schematics fixed and the initial problem is gone.
The Modbus standard is stating for the 0x05 Set Coil function code the second parameter (your second '1') has to be 0 to clear the coil/bit and 0xff00 to set it, so you want to use 0xff00 here.

Great, you are providing the best support!
Can you please show me example for multiple coils. The idea is to reduce the  number of messages through the network.
Regards

You should have a look at the TCPcoilExample sketch, that makes use of the eModbus CoilData type and has an example for writing multiple coils as well.

I would like to thank you for your help.
Great library, great team!
Regards

May I ask if your code is prepared for the following situation in hardware development?
Specifically, in the case of an ESP32 equipped with an LAN8720 Ethernet controller, can your code handle MODBUS TCP and send MODBUS packages to slave server devices?

I do not know that specific Ethernet controller, but I myself am using exactly the setup you described. Base is a ModbusBridgeEthernet with a ModbusClientRTU attached to it. This way I can request from the bridge over TCP data it will in turn request from RTU servers on the bus. There is an example sketch for that as well. 😉


Update tree structures to use "virtual root"?

I'm not sure how much has been done here with the representation of trees (if anything), but wanted to check if any updates were needed to take advantage of the virtual root (and perhaps traversal functions?) added in https://github.com/tskit-dev/tskit/pull/1704
I'm happy to help where I can.

#183 updated the C API and only the root iterator initialization needed changing.  I used the "get left root" function for that.  Keeping this issue open in case something else pops up...

Note: virtual root is a tsk_id_t, so we'll get to re-use our macros to make a newtype out of this.

Note: virtual root is a tsk_id_t, so we'll get to re-use our macros to make a newtype out of this.

Actually, it is a "root"-like thing, so NodeId covers it.


fix rule to allow package goes to green when their are migrated

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 1 (0.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 0.851%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/reports/custom/custom_helpers.go
0
1
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
18

Relevant Lines:
2115

💛  - Coveralls


Support for sklearn Pipeline

Hi,
I am wondering about the same thing since i do not get SHAP to work with sklearn pipeline for regression problems my code is as follows:
import sklearn
import pandas as pd
import shap
from sklearn.linear_model import LinearRegression, Ridge
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler, FunctionTransformer
from sklearn.decomposition import PCA
boston = sklearn.datasets.load_boston()
data = boston['data']
y = boston['target']
columns = boston['feature_names']
X = pd.DataFrame(data,columns=columns)
X_train = X[:300]
X_test = X[300:]
y_train = y[:300]
y_test = y[300:]
rs = 1
lr_pipe = Pipeline([
('SC',StandardScaler(with_mean=True)),
('pca',PCA(random_state=rs)),
('Lr', Ridge(random_state=rs))])
lr_pipe.fit(X_train,y_train)
explainer = shap.LinearExplainer(lr_pipe, X_train, feature_dependence="independent")
Exception: An unknown model type was passed: <class 'sklearn.pipeline.Pipeline'>

Hi,
I came across the same problem, instead of ** lr_pipe**  you should use lr_pipe.named_steps['Lr'].
But now the problem is the next step of the process, we need the new representation of the sample in order to get the shap values (after the scaling and PCA). Any idea how to get it from the pipeline? or how to incorporate the shap into the pipeline?

Hi,
I started to make my own custom function "just_transform"

There is an elephant in the room here though: what if you want feature importance measures for your original features, not your engineered features? For example, it does little good to have a hundred SHAP values for various one-hot variables when the point of explainability is, in part, to produce useful explanations. (Moreover, I'm not sure there is any theoretical basis in simply adding up the SHAP values for those new features when computing global feature importance.)

I do something like this :
## transform your instances using pipeline
scaled = lr_pipe['SC'].transform(X_test)
X_test_transformed = lr_pipe['pca'].transform(scaled)

## create explainer using model only
explainer = shap.LinearExplainer(lr_pipe['Lr'], X_train, feature_dependence="independent")

#get Shap values from preprocessed data
shap_values = explainer.shap_values(X_test_transformed[1])

I do something like this :
## transform your instances using pipeline
scaled = lr_pipe['SC'].transform(X_test)
X_test_transformed = lr_pipe['pca'].transform(scaled)

## create explainer using model only
explainer = shap.LinearExplainer(lr_pipe['Lr'], X_train, feature_dependence="independent")

#get Shap values from preprocessed data
shap_values = explainer.shap_values(X_test_transformed[1])

Is it ok to create explainer using X_train not X_train_scaled? I mean also transform X_train  as you have transformed X_test.

@thatlittleboy Candidate for closing?


CONTRIBUTING.md not found

Can you also add a CONTRIBUTING file which explains other areas of contribution, like coding guidelines? This could then reference the OSS policy. (CONTRIBUTING file was not required yet but will be needed for others to add to your repository.)

I've included the OSS policy in the CONTRIBUTING.md file, is that okay?


.mermaid-config.json not being used

When I was using -F mermaid-filter it would find styling in .mermaid-config.json. That doesn't seem to be picked up by diagram and I don't see any documentation on what I might be doing wrong.

Additionally, setting the document's metadata doesn't seem to work either:
---
title: "The column in context"
author: "Joseph Reagle"
date: 2024-08-01
suppress-bibliography: true
diagram:
  cache: true
  engine:
    mermaid:
      mime-types: [image/svg+xml]
      theme: base
      themeVariables:
        primaryColor: "#ffffff"
        primaryTextColor: "#000000"
        primaryBorderColor: "#000000"
        lineColor: "#000000"
        secondaryColor: "#ffffff"
        tertiaryColor: "#ffffff"
---

Sorry, this isn't supported yet, but it would be a good addition. Would you point me to some docs for this? I'm not really familiar with mermaid and its capabilities.

I'm a newbie myself and find it confusing, but I first went don't that path from mermaid-filter.

Mermaid cli allows you to specify additional options in a json configuration file and a css file. mermaid-filter will look in the current working directory for .mermaid-config.json and .mermaid.css and if found, pass them in to mermaid cli.

There's also these:

https://mermaid.js.org/config/configuration.html
https://mermaid.js.org/config/schema-docs/config.html
https://mermaid.js.org/config/theming.html

I would think/hope the config options would be well documented in mermaid-cli, but that doesn't seem to be the case.

I made an PR adding some common params for mmdc. With themeVariables, you can write like this example or write an json file with option cssFile
Example metadata
diagram:
  engine:
    mermaid:
      execpath: /usr/local/bin/mmdc
      theme: default
      configFile: 'some file like https://mermaid.js.org/schemas/config.schema.json'
      cssFile: your-theme-variables.json
      puppeteerConfigFile: /etc/puppeteer-conf.json

Just want to add my 2 cents here.
One important setting for flowcharts to to set htmlLabels to false.  This makes the SVG export use native text and tspan instead of foreignObject.  See https://github.com/mermaid-js/mermaid/issues/58
Thankfully, mermaid allows for this setting and the theme to be set in the input file.  That means I can configure this in each mermaid section like so:
---
config:
  theme: neutral
  flowchart:
    htmlLabels: false
---
flowchart LR
    START(Start) --> DOIT[Just Do It] --> END(End)

Thank you for the PR @ngocptblaplafla. I wonder what needs to happen next? I'd love to try it.


build: dont always clean

Description
Improves bootstrap.sh
Checklist:

[ ] I have reviewed my diff in github, line by line.
[ ] Every change is related to the PR description.
[ ] I have linked this pull request to the issue(s) that it resolves.
[ ] There are no unexpected formatting changes, superfluous debug logs, or commented-out code.
[ ] There are no circuit changes, OR specifications in /specs have been updated.
[ ] There are no circuit changes, OR a cryptographer has been assigned for review.
[ ] I've updated any terraform that needs updating (e.g. environment variables) for deployment.
[ ] The branch has been rebased against the head of its merge target.
[ ] I'm happy for the PR to be merged at the reviewer's next convenience.
[ ] New functions, classes, etc. have been documented according to the doxygen comment format. Classes and structs must have @brief describing the intended functionality.
[ ] If existing code has been modified, such documentation has been added or updated.

Note
If you are updating the submodule, please make sure you do it in its own special PR and avoid making changes to the submodule as a part of other PRs.
To update a submodule, you can run the following commands:
$ git submodule update --recursive

Alternatively, you can select a particular commit in barretenberg/aztec3 that you wish to point to:
$ cd barretenberg
$ git pull origin aztec3        # This will point to the latest commit in `barretenberg/aztec3`
$ git checkout <commit_hash>    # Use this if you wish to point to a particular commit.
$ cd ..
$ git add . && git commit -m <commit_msg>
$ git push

Don't think this will work since we assume all args are build targets: https://github.com/AztecProtocol/aztec3-circuits/pull/155/files#diff-06803de5f47eed6ddbdead5dda7a413fb294ab4d4143ce5963b685e822a6784bR71

Good point. How do we feel about just getting rid of the clean then? I'm not sure why it was there to begin with. If you really want to simulate someone onboarding you can just reclone

I guess I'll just make this read an env variable instead

I guess I'll just make this read an env variable instead

I think that's a good plan. We should try to be consistent across repos to avoid confusion, but I am happy to start with this repo.


Add Meetup/Eventbrite context retrieval

As I RSVP to events on Meetup/Eventbrite, it'd be useful to have the
Pipes that I've set up for retrieving metadata from them to be supported
in fetch-context.
These follow the format of Granary, but expose an is..Url helper so we
can simplify the logic when retrieving context.
Additionally, we only want to use them if properties are found for a
lookup, otherwise still fall back to Granary/OpenGraph.

This should be fine. I'm away this weekend but will take a look when I'm back.

Is there any way to auto-fix the style changes? Sorry about that!

@jamietanna No problem! I use StandardJS, but I've not specified any config for it which I should probably add to help contributors.


[NEW PROJECT]: Standardise docstrings to numpydoc(?) standard

Project title:
Key Investigators

Chris Halcrow

Project Description
Bring our docstrings up to numpydoc standard (for one module)
Background
Docstrings are important. If they are formatted properly, they can be used by other packages to autogenerate stuff e.g. Sphinx uses them to build our docs API. Future GUIs would depend on them, and having (typed?) good ones can make development much easier. Our are pretty good, but it would be nice if they were met a specific standard.  I propose to bring the docstrings up to the numpydoc(?) standard: https://numpydoc.readthedocs.io/en/latest/format.html
To see the fun that awaits try running e.g. python -m numpydoc --validate spikeinterface.generation.generate_noise (sorry to pick on one function: this was the first one I saw!). Think it’d be good to try and do a module and see how long it takes, and how annoying it is. Ruff (https://docs.astral.sh/ruff/) can do linting based on this standard, which makes it easier to develop.
Objectives
Standardise one module, find out how long this takes and what are the time-heavy steps (if they exist).
Approach and Plan

[ ] Make a simple workflow which makes standardising docstrings easy (probably installing the vscode ruff extension is enough)
[ ] Standarise the docstrings for one module

Progress

[ ] Decide on which standard to use
[ ] Standardise one docstring
[ ] Figure out how long it takes to standardise one docstring => estimate size of task
[ ] Standardise all docstrings in one module

BTW ruff has a docstring linter, a colleague is using it to great effect

@JoeZiminski you're going to get us to ruff eventually :)

I think that optional should be used when the value is None (e.g. value=None) That is, the parameter does not have to be specified. Default is used when there is default value that is not None.
This policy seems to be the most consistent with both python.typing Optional and with numpy docstring specification:
https://docs.python.org/3/library/typing.html#typing.Optional
https://numpydoc.readthedocs.io/en/latest/format.html

Hello,
Just been preparing some stuff for this. A couple of things:
Ruff only applies a subset of numpydoc standards. In particular it doesn't implement ones about parameters, which I'm keen to implement. But it's so good for lots of other things, thanks for mentioning it @JoeZiminski !
Both of your suggestions are valid with numpydoc standards (see Section 4 of https://numpydoc.readthedocs.io/en/latest/format.html#parameters, you can either do the optional thing or supply a default). Here's a real world example:
def generate_noise(noise_level=15.0, spatial_decay=None):
    """
    Return a recording which is just noise.

    Parameters
    ==========
    noise_level : float | np.array | tuple, default: 15.0
        a description.
    spatial_decay : float, optional
        a description.
    """

Opinions? @zm711 do you agree with the optional? @h-mayorquin does it look ok? I'll ask a few more people before the hackathon!

I think both or and | are fine. No opinion on that one. I usually use auto generation so I hope I can set it up to that. I don't think that it matters enough to grant extra work on our side.
As for the real example, yes, that's exactly how I read the documentation that it should be. This is consistent with typing.Optional semantics. Having optional for cases when the default is None (the most common case of typing.Optional) and having default and making the value explicit when the you are choosing.
There is the degenerate case when you are choosing, None is an option but the default is something else that I think we should try to avoid anyway. But we should discuss that case separateley and don't let an edge case dictate common policy.

def generate_noise(noise_level=15.0, spatial_decay=None):
    """
    Return a recording which is just noise.

    Parameters
    ==========
    noise_level : float | np.array | tuple, default: 15.0
        a description.
    spatial_decay : Optional[float], optional
        a description.
    """

def generate_noise(noise_level=15.0, spatial_decay=None):
    """
    Return a recording which is just noise.

    Parameters
--------------
    noise_level : float | np.array | tuple, optional, default (15.0 )
        a description.
    spatial_decay : float | None default: None # Zach likes this
        a description.
    """

def generate_noise(noise_level=15.0, spatial_decay=None):
    """
    Return a recording which is just noise.

    Parameters
    -----------
    noise_level : float | np.array | tuple, default: 15.0
        a description.
    spatial_decay : float, optional
        a description.
    """

The last option is consistent with numpy docstrings and is also consistent with python typing semantics where optional means that it can be None.


[BUG]

Command: uname -a && php -v && composer info | grep hyperf && php --ri swoole
Linux DEV119 3.10.0-1062.1.2.el7.x86_64 #1 SMP Mon Sep 30 14:19:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
PHP 7.4.4 (cli) (built: Apr 15 2020 20:10:06) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
hyperf/amqp                          v1.1.26 A amqplib for hyperf.
hyperf/async-queue                   v1.1.26 A async queue component for hyperf.
hyperf/cache                         v1.1.26 A cache component for hyperf.
hyperf/command                       v1.1.26 Command for hyperf
hyperf/config                        v1.1.26 An independent component that provides configuration container.
hyperf/constants                     v1.1.26 A constants component for hyperf.
hyperf/consul                        v1.1.26 A Consul Client for Hyperf.
hyperf/contract                      v1.1.26 The contracts of Hyperf.
hyperf/database                      v1.1.26 A flexible database library.
hyperf/db-connection                 v1.1.26 A hyperf db connection handler for hyperf/database.
hyperf/devtool                       v1.1.26 A Devtool for Hyperf.
hyperf/di                            v1.1.26 A DI for Hyperf.
hyperf/dispatcher                    v1.1.26 A HTTP Server for Hyperf.
hyperf/elasticsearch                 v1.1.26 Elasticsearch client for hyperf
hyperf/event                         v1.1.26 an event manager that implements PSR-14.
hyperf/exception-handler             v1.1.26 Exception handler for hyperf
hyperf/framework                     v1.1.26 A coroutine framework that focuses on hyperspeed and flexible, specifically use for build microservices and middlewares.
hyperf/guzzle                        v1.1.26 Swoole coroutine handler for guzzle
hyperf/http-message                  v1.1.26 microservice framework base on swoole
hyperf/http-server                   v1.1.26 A HTTP Server for Hyperf.
hyperf/json-rpc                      v1.1.26 A JSON RPC component for Hyperf RPC Server or Client.
hyperf/load-balancer                 v1.1.26 A load balancer library for Hyperf.
hyperf/logger                        v1.1.26 A logger component for hyperf.
hyperf/memory                        v1.1.26 An independent component that use to operate and manage memory.
hyperf/model-cache                   v1.1.26 A model cache component for hyperf.
hyperf/model-listener                v1.1.26 A model listener for Hyperf.
hyperf/paginator                     v1.1.26 A paginator component for hyperf.
hyperf/pool                          v1.1.26 An independent universal connection pool component.
hyperf/process                       v1.1.26 A process component for hyperf.
hyperf/rate-limit                    v1.1.26 A rate limiter implemented for Hyperf or other coroutine framework
hyperf/redis                         v1.1.26 A redis component for hyperf.
hyperf/rpc                           v1.1.26 A rpc basic library for Hyperf.
hyperf/rpc-client                    v1.1.26 An abstract rpc server component for Hyperf.
hyperf/rpc-server                    v1.1.26 An abstract rpc server component for Hyperf.
hyperf/server                        v1.1.26 A base server library for Hyperf.
hyperf/service-governance            v1.1.26 A service governance component for Hyperf.
hyperf/task                          v1.1.26 A task library for Hyperf.
hyperf/testing                       v1.1.26 Testing for hyperf
hyperf/translation                   v1.1.26 An independent translation component, forked by illuminate/translation.
hyperf/utils                         v1.1.26 A tools package that could help developer solved the problem quickly.
hyperf/validation                    v1.1.26 hyperf validation
hyperf/view                          v1.1.26 A view library for Hyperf.
hyperf/websocket-server              v1.1.26 A websocket server library for Hyperf.

swoole

Swoole => enabled
Author => Swoole Team<EMAIL_ADDRESS>Version => 4.4.17
Built => Apr 15 2020 20:18:28
coroutine => enabled
epoll => enabled
eventfd => enabled
signalfd => enabled
cpu_affinity => enabled
spinlock => enabled
rwlock => enabled
pcre => enabled
zlib => 1.2.7
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
async_redis => enabled

Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => Off => Off
swoole.unixsock_buffer_size => 8388608 => 8388608

Description:
Model update will cause notice when use db::raw(Hyperf\Database\Query\Expression) as value
Steps To Reproduce:
class User extends Hyperf\DbConnection\Model\Model {
}
User::query()->find(1)->update(['number' => Db::raw('`number` + 2')]);

可以把问题描述清楚一点吗

Update table set a=a+1 where...
通过模型如何实现这样更新

    public function incr()
    {
        $res = UserExt::query()->where('id', 1)->update(
            [
                'count' => Db::raw('count + 1')
            ]
        );

        return $this->response->success($res);
    }

我这边实测是可以的。。。

你试一下这个 demo
https://github.com/limingxinleo/hyperf-demo/tree/db
curl http://<IP_ADDRESS>:9501/db/incr
数据库在项目里

我知道哪里的问题了。。你 find(1) 查出来一个模型，而模型字段是不支持这个的。。
需要你直接 query()->where()->update() 才行

明白了。只能通过Builder使用自增。谢谢。


Door hacking doesn't quite work

Description

If you disable the power on one side by pulse/wirecutting then try to open with crowbar, it doesn't work. If you do it to both doors, it doesn't work. I assume this is a double door problem but I haven't tried hacking a non-double door.
Edit: Seems to effect many doors
Reproduction

Screenshots

Additional context

Dupe of #4467

Wrong issue commented on >_>


Typo in jgraph GitHub org location

Currently, the location of the jgraph organization on GitHub is set to "England/Switerzland". Can this typo be fixed? Should be "England/Switzerland" I assume...

Fixed. Thanks for the report!


Theme Submission: hugo-theme-codex

Theme submission
Please make sure that you have read the theme submission guidelines before submitting a theme. The guidelines provide all relevant information and requirements that have to be fulfilled before the submission. We strongly suggest that you test your theme with the Hugo Themes Build Script before submitting the theme for review. If a submission does not meet the criteria mentioned in the README it will be closed. You may re-submit once you fix the problems with your submission. However, please note that we have limited resources and can not provide help for general web development issues. For Hugo support questions please refer to the dedicated support forum.
Please tick the relevant boxes for your theme in the checklist below:
Link to my theme repository: REPLACE-WITH-URL
I made sure that...

[x] the repository contains a good README.md describing my theme
[x] an open source license has been added to LICENSE.md
[x] all metadata have been added to theme.toml
[x] screenshots have been added in the images/ folder with the required dimensions
[x] in case I'm using a customized demo via the exampleSite folder that

[x] https://example.com is set as base url in exampleSite/config.{toml, yaml, json} to avoid the abuse of unused domains
[x] I tested that my theme's demo works with the content directory of gohugoio/HugoBasicExample

[ ] I tested my theme against the gohugoio/HugoBasicExample

[x] I've checked the developer tools' console in my browser for error messages

[x] in case my theme is using Hugo Pipes features like toCSS and PostCSS that I have committed the /resources directory with all generated assets, for my theme to work in the basic version of Hugo

N.B. By submitting a theme to the Hugo Themes Showcase you understand that you need to maintain your theme. If a theme demo breaks and remains broken then at some point it will be removed from the list without prior warning. If you no longer wish to maintain a theme please let us know.
New themes will usually be promoted on Hugo's official Twitter account. If you would like to be mentioned in the tweet please add your Twitter username to this submission.
Link to my Twitter account (optional): https://twitter.com/jakewies
Feel free to ask questions. We're glad to help.

My theme structure does not align with the content directory of hugoBasicExample, however my theme's exampleSite directory has a fully enclosed theme demo that runs. Is this going to be a problem?
If so, what would be the best way to align with the content directory of the hugo example without compromising on the goals of the theme?
Thanks so much!

Also, I'm noticing the the images for screenshot and thumbnail that I upload to the images directory of my theme are being doubled in dimensions. Is that abnormal behavior?

Hello Jake,
thank you for sharing this theme with the Hugo community.

My theme structure does not align with the content directory of hugoBasicExample, however my theme's exampleSite directory has a fully enclosed theme demo that runs. Is this going to be a problem?

The hugoBasicExample tries to cover as many themes as possible. Usually, only very complex themes require being whitelisted, i.e. their provided content in the exampleSite directory is used instead of the default one provided by the hugoBasicExample. However, it's in the nature of your that it doesn't align. Hence I'm tending to whitelist your theme.

Also, I'm noticing the the images for screenshot and thumbnail that I upload to the images directory of my theme are being doubled in dimensions. Is that abnormal behavior?

Do you refer to something Github specific? When checking the dimensions I always click on the download button to see  the raw image. The dimensions of the images in your repository are fine.
While reviewing your theme I noticed the following:

please add an actual minimal version of Hugo to theme.toml that is at least required to use your theme.

Consider to use mainSections for listing blog posts. This approach gives users more flexibility as they're not bound to the post content type.

Hey @digitalcraftsman ! Thanks for the feedback.

please add an actual minimal version of Hugo to theme.toml that is at least required to use your theme.

Done!

Consider to use mainSections for listing blog posts. This approach gives users more flexibility as they're not bound to the post content type.

Ok I will get to work on this. Is this something that would halt the process of getting this theme into hugo's official list of themes?

Thank your for applying the fixes.

Ok I will get to work on this. Is this something that would halt the process of getting this theme into hugo's official list of themes?

It doesn't, just a recommendation.
Your theme should appear soon on Hugo's theme site. Next, I'll promote your theme on Hugo's official Twitter account.

Awesome thanks a lot!

I've fixed the issue. Your theme is now live.


Add a play button for cells

On the Jupyter Notebook, we have a play button to execute the code in a simple way. This is also very useful for those who use Jupyter on smartphones. Can you add this feature to Jupyterlab-Classic?
PS. Sorry for my English, I'm Brazilian.

Thanks @eliascarv for the suggestion!
As a start, it might be possible to install the jlab-enhanced-cell-toolbar extension for JupyterLab, which should also work in JupyterLab Classic. It can be installed with pip install jlab-enhanced-cell-toolbar.
It will add the run button next to the input cell:

More info in the repo: https://github.com/jupyterlab-contrib/jlab-enhanced-cell-toolbar

OK so it looks like this extension unfortunately doesn't work out of the box with JupyterLab Classic.
This seems to be related to @jupyterlab/celltags not being exposed by JupyterLab Classic, while jlab-enhanced-cell-toolbar expects to find it since it has been compiled against JupyterLab, and @jupyterlab/celltags ends up in the webpack shared scope.

In some way this makes sense, since @jupyterlab/celltags is provided by JupyterLab via the celltags-extension. But in JupyterLab Classic celltags-extension is not part of the build.

@eliascarv the short story is that it should be possible to fix this in JupyterLab Classic, so the extension can be installed and work out of the box.

The play button in jlab is visually misaligned to the start of the cell.
Moreover, it should be visible even if cell is not active.
And, in addition to that, when the cell is hidden using hide_code - the play button should be there and next to the cell.
Current version of that extension is not usable/comparable.

@eliascarv normally with #106 it should be possible to install the jlab-enhanced-cell-toolbar extension and have the extra cell buttons including the run button.
But feel free to reopen if you think this should be part of JupyterLab Classic by default. Thanks!


PM Prompting on CI

The yarn/npm package manager inquirer prompt was blocking CI
As suggested this PR skips this for CI builds.
It also fixes a bug with the yarn.lock paths
To test:
Builds progress on ci but locally prompts still happen (caveated by presence of lock files etc)

This pr remedies that as mentioned.
I can start adding dependencies between PRs?

"This pr remedies that as mentioned.
I can start adding dependencies between PRs?"
Nope. this really is essentially a "one liner(ish)" fix. (its purpose: unblock CI ..nothing else)
such a fix should not become dependant on another PR which (unlike this one) will require full sanity testing as it affects the core functionality and potentially existing projects

Updated.
Can i please suggest that we have a new label "sanity required" so we know which PRs are likely to take longer


Chore: Discord channel structure

Description
Right now we have 1 channel, plus an empty "Rules".

It might be nice if we had at least 2 channels:

general
announcements

But I could also see a few others:

questions/support
welcome

What This Enables
Improved Discord community experience
Impacts
Discord Administrator

GlareDB Discord Server Idea (#1394)

This is to establish a collaborative and engaging platform for the project community; the idea is to facilitate project discussions, contributions, and support, while also offering spaces for off-topic interactions to keep the environment "chill".

SERVER STRUCTURE
Category: General

# 👋 | welcome : For welcoming users and pinning server rules.
# 📢 | announcements: For important project updates.
# 💬 | general-chat: For general discussions.

Category: Project Discussion

# 💾 | database-discussion: For database project discussions.
# 👨💻 | development: For development-related discussions.
# 🐞 | bug-reports: For reporting software bugs.
# 🌟 | feature-requests: For suggesting new features.

Category: Contribution

# 📝 | contribution-guidelines: For contribution guidelines.
# 🔄 | pull-requests: For discussing pull requests.
# 📚 | documentation: For documentation discussions.

Category: Support

# 🔧 | installation-help: For installation assistance.
# ❓ | usage-questions: For software usage questions.
# 🔍 | troubleshooting: For troubleshooting software issues.

Category: Off-Topic

# 🎲 | random: For off-topic discussions.
# 😂 | fun-stuff: For sharing fun contents and memes.

Category: Admin

# 🔒 | moderator-chat: For moderator discussions.
# 📝 | server-feedback: For server feedback and suggestions.

Server mock-up sample

ADMIN TOOLS SUGGESTION
The seggestion here would be MEE6 as a Discord bot for the server; it's offers a wide range of features that can help in moderating the server, for instance:
This could be used for users to open tickets

And this for community voting on project proposals

tracked elsewhere


RPDO bug?

In the CANopen network, I have two nodes, the master node with Node ID 0x0D, and the slave node with Node ID 0x01. The slave node sends status information to the master node through TPOD. The problem I am facing now is that when the slave node sends the TPOD message, it is being filtered by the filter in the canopenNode driver.
The CAN message from the slave is as follows:
ID: 00000181  DLC: 08  Data: 9A E4 01 00 00 00 40 00
The filter was created following an example, and the code is as follows:
static void prv_read_can_received_msg(uint32_t can_port, uint32_t fifo)
{
CO_CANrxMsg_t rcvMsg;
CO_CANrx_t *buffer = NULL;
uint16_t index;
uint32_t rcvMsgIdent;
uint8_t messageFound = 0;
can_receive_message_struct receive_message;
can_message_receive(can_port, fifo, &receive_message);
rcvMsg.ident = receive_message.rx_sfid
| (receive_message.rx_ft == CAN_FT_REMOTE ? FLAG_RTR : 0x00);
rcvMsg.dlc = receive_message.rx_dlen;
memcpy(rcvMsg.data, receive_message.rx_data, receive_message.rx_dlen);
rcvMsgIdent = rcvMsg.ident;
if (CANModule_local->useCANrxFilters) {
} else {
buffer = CANModule_local->rxArray;
for (index = CANModule_local->rxSize; index > 0U; --index, ++buffer) {
if (((rcvMsgIdent ^ buffer->ident) & buffer->mask) == 0U) {
messageFound = 1;
break;
}
}
}
if (messageFound && buffer != NULL && buffer->CANrx_callback != NULL) {
buffer->CANrx_callback(buffer->object, (void *)&rcvMsg);
}
}
While looking at the source code, I found that the CO_CANrxBufferInit called in the CO_RPDO_init method reads the current RPDO configuration's COB-ID as the CAN filter condition. According to the Canopen CIA301 standard, I understand that the RPDO should be in the format of 0x200+NodeId. However, the TPDO data received is in the format of 0x180+NodeId. I don't understand why this is happening and how to solve it. Thank you very much.

This should be implemented correctly. By default, no RPDO maps to any TPDO. You need to configure the mappings either by using a network tool or in one of the devices default RPDO/TPDO entries, whichever is better for your needs.


Cannot initialize  connect to websocket

Describe the bug
In MainActivity ,click a button Cannot initialize connect to websocket.
SDK Version

Bom Bom: 1.1.0
dependencies {
implementation(platform("com.walletconnect:android-bom:1.1.0"))
implementation("com.walletconnect:android-core")
implementation("com.walletconnect:sign")
}

fun initWalletconnect(application: Application) {
    val serverUri =
        "wss://$WALLET_CONNECT_PROD_RELAY_URL?projectId=my projectId"
    "${Thread.currentThread().name}:initWalletconnect $serverUri".debugLog();
    CoreClient.initialize(
        relayServerUrl = serverUri,
        connectionType = ConnectionType.AUTOMATIC,
        application = application,
        metaData = Core.Model.AppMetaData(
            name = "Kotlin Dapp",
            description = "Dapp description",
            url = "example.dapp",
            icons = listOf("https://gblobscdn.gitbook.com/spaces%2F-LJJeCjcLrr53DcT1Ml7%2Favatar.png?alt=media"),
            redirect = "kotlin-dapp-wc:/request"
        )
    )

    val initParams = Sign.Params.Init(core = CoreClient)

    SignClient.initialize(initParams) { error ->
        error.throwable.stackTraceToString().debugLog()
        Timber.e(error.throwable.stackTraceToString())
    }
}

init when click the button
class MainActivity : AppCompatActivity() {

    private lateinit var binding: ActivityMainBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        WindowCompat.setDecorFitsSystemWindows(window, false)
        super.onCreate(savedInstanceState)
        binding = ActivityMainBinding.inflate(layoutInflater)
        setContentView(binding.root)

        binding.btn1.setOnClickListener {
           // init faild,
            initWalletconnect(application)
        }
        binding.btn2.setOnClickListener {
            createPair()
        }

    }
}

hey, @kecson try to move the whole initialization logic to the Application class of your app instead of calling it in the Activity. One of our requirements to initialize the SDK properly is to call init functions from the Application level.

hey, @kecson try to move the whole initialization logic to the Application class of your app instead of calling it in the Activity. One of our requirements to initialize the SDK properly is to call init functions from the Application level.

Why cannot initialization in the Activity?
I want to initialize when I need it.  My DAPP Use WalletConnect once, then I will disconnect it.
When I use  iOS WalletConnectSwiftV2 , it is succeed when I need it.

Our recommended way of initializing the SDK is to do it in the Application class, due to the wss lib we use for networking.
However, thanks to the MANUAL connection mode you're able to open and close the connection whenever you want. To follow your use case you can call CoreClient.Relay.connect {  } when you need to use the SDK and CoreClient.Relay.disconnect {  } when your flow is completed.
Ref: https://docs.walletconnect.com/2.0/kotlin/core/relay

Our recommended way of initializing the SDK is to do it in the Application class, due to the wss lib we use for networking.
However, thanks to the MANUAL connection mode you're able to open and close the connection whenever you want. To follow your use case you can call CoreClient.Relay.connect { } when you need to use the SDK and CoreClient.Relay.disconnect { } when your flow is completed.
Ref: https://docs.walletconnect.com/2.0/kotlin/core/relay

CoreClient.Relay.connect doesn't work


Backend : Add support for tags suggestion API

As part of this PR https://github.com/open-metadata/OpenMetadata/issues/5330 , we have added suggestions for API support for many fields.
It would be great if we add a suggestion API for the tags field as well.
This will require to support tags for advanced search #5371

@harshach, Are we going to handle this in this release?


Add aws.instance_type=instances['instance_type'] to vagrant-aws/Vagrantfile

Add aws.instance_type=instances['instance_type'] to vagrant-aws/Vagrantfile because if not it will always use default values... (m3.medium) which is not the cheapest node to test ;)
Thnks,
Javier R.

Closing this issue, fixed via 5a061b1. Thanks!

Thanks for developing all these tools!!
Javier R.


Comedy Central playlist URL download fails

Please follow the guide below

You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your issue (like that [x])
Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2<IP_ADDRESS>. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

[x] I've verified and I assure that I'm running youtube-dl 2<IP_ADDRESS>

Before submitting an issue make sure you have:

[x] At least skimmed through README and most notably FAQ and BUGS sections
[x] Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

[x] Bug report (encountered problems with youtube-dl)
[ ] Site support request (request for adding support for a new site)
[ ] Feature request (request for a new functionality)
[ ] Question
[ ] Other

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):
PS C:\Users\live\Videos> youtube-dl.exe --verbose http://www.cc.com/shows/chappelle-s-show/episode-guide
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://www.cc.com/shows/chappelle-s-show/episode-guide']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2<IP_ADDRESS>
[debug] Python version 3.4.4 - Windows-10-10.0.14393
[debug] exe versions: ffmpeg 3.1.4, ffprobe 3.1.4, rtmpdump 2.3
[debug] Proxy map: {}
[ComedyCentral] episode-guide: Downloading webpage
ERROR: Unable to extract mgid; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest ve
rsion; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete outpu
t.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpee_sdt7t\build\youtube_dl\YoutubeDL.py", line 694,
in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpee_sdt7t\build\youtube_dl\extractor\common.py", lin
e 357, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpee_sdt7t\build\youtube_dl\extractor\mtv.py", line 2
30, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpee_sdt7t\build\youtube_dl\extractor\mtv.py", line 2
24, in _extract_mgid
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpee_sdt7t\build\youtube_dl\extractor\common.py", lin
e 660, in _search_regex
youtube_dl.utils.RegexNotFoundError: Unable to extract mgid; please report this issue on https://yt-dl.org/bug . Make su
re you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag
and include its complete output....
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Single video: https://www.youtube.com/watch?v=BaW_jenozKc
Single video: https://youtu.be/BaW_jenozKc
Playlist: https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc

Description of your issue, suggested solution and other information
Can't download from Comedy Central

Comedy Central playlists are not supported yet. See #10003


Grafana docker updated, receiving errors back now on some data panels

Describe the bug
When selecting charge level (for example), many panels in main overview problematic:
{
  "response": {
    "results": {
      "A": {
        "error": "pq: invalid input syntax for integer: \"$__all\"",
        "refId": "A",
        "meta": {
          "executedQueryString": "select date AS \"time\", \n  battery_level AS \"Battery Level [%]\", coalesce(usable_battery_level, battery_level) as \"Usable Battery Level [%]\"\nfrom\n    (SELECT\n    battery_level, usable_battery_level\n        , date\n    FROM\n    positions\n    WHERE\n    car_id = '$__all' AND\n    date BETWEEN '2020-08-14T21:27:48.759Z' AND '2020-08-21T21:27:48.759Z'\n    UNION ALL\n    select\n    battery_level, null as usable_battery_level\n        , date\n    from charges c\njoin\n  charging_processes p ON p.id = c.charging_process_id \nWHERE\n  date BETWEEN '2020-08-14T21:27:48.759Z' AND '2020-08-21T21:27:48.759Z' and\n  p.car_id = '$__all') as data\n\nORDER BY\n    1 ASC"
        },
        "series": null,
        "tables": null,
        "dataframes": null
      }
    },
    "message": "pq: invalid input syntax for integer: \"$__all\""
  }
}

Seems to be related to looping car IDs as $__all?,
Environment

TeslaMate version : 1.19.4
Type of installation: Docker
OS TeslaMate is installed on: unRAID
User OS & Browser: Windows 10, Firefox 79
Others: Grafana 7.1.4

Devs confirm fixed in 7.1.5


Write CDK to build dev EC2 instance for deploying Sleeper from

https://github.com/gchq/sleeper/issues/37

When I deployed sleeper in a VPC with a single public subnet, the system test wouldn't run because it uses an ECS task with the awsvpc network mode. See this article:
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking-awsvpc.html

When hosting tasks that use the awsvpc network mode on Amazon EC2 Linux instances, your task ENIs aren't given public IP addresses. To access the internet, tasks must be launched in a private subnet that's configured to use a NAT gateway. For more information, see NAT gateways in the Amazon VPC User Guide. Inbound network access must be from within a VPC that uses the private IP address or routed through a load balancer from within the VPC. Tasks that are launched within public subnets do not have access to the internet.


add tabs and address bar

add tabs and address bar
so could make it like a real brownser.

Duplicate of #8.


Replace _ with + for OCI artifacts tags when pulled for helm

Closes https://github.com/fluxcd/helm-controller/issues/1099
OCI tags are not semver compatible, with + character not allowed. Helm worked around this by converting + to _ before pushing to the OCI repo and vice versa when pulling from the repo.
This PR makes helm-controller adhere to that convention, by converting OCI artifact tag using _ to + replacement prior to any check or processing.

I'm not sure what should be best returned as error
return "", fmt.Errorf("failed parsing artifact revision %s", tagD[0])

or
return "", fmt.Errorf("failed parsing artifact revision %s", tagConverted)

but the conversion needs to happen prior to calling semver.NewVersion

I think we should return the one with a + as that's the string we try to validate as semver.
PS. This PR needs a test using a tag that has _.

thank you, I've added a test for it, which is passing make test. I'm new to this, so if it's not that good, please inform


How to send a message to group members through group chat?

sendMessage it cannot send messages to group members
How to send a message to group members through group chat ( NOT send message to group chat)?

use method createPrivateChat before sendMessage  can solve it