Hi all!
I am brand new to this forum and sorry for the following newbie question.
I just finished assembling a serial gateway consisting of an Arduino Nano (clone) and an NRF24L01 radio module. The gateway is connected to an RPi 3 via USB port. The gateway and the test child node is able to communicate just fine. However Home Assistant is having an issue with the data coming from the gateway.
Excerpt:
2022-09-11 18:02:48.316 INFO (MainThread) [mysensors.gateway_serial] Trying to connect to /dev/ttyACM0
2022-09-11 18:02:48.343 INFO (MainThread) [mysensors.transport] Connected to Serial<id=0x7fa5227640, open=True>(port='/dev/ttyACM0', baudrate=38400, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False)
2022-09-11 18:05:43.312 DEBUG (MainThread) [mysensors.transport] Receiving �E������������@���P��������E������������@���P��������E������������@���P��������E������������@���P��������E������������@���P��������E������������@���P��������
2022-09-11 18:05:43.313 WARNING (MainThread) [mysensors.message] Error decoding message from gateway, bad data received: �E������������@���P��������E������������@���P��������E������������@���P��������E������������@���P��������E������������@���P��������E������������@���P��������
2022-09-11 18:05:43.331 WARNING (MainThread) [mysensors] Not a valid message: not enough values to unpack (expected 5, got 0)
2022-09-11 18:05:43.370 DEBUG (MainThread) [mysensors.transport] Receiving E����6�������
2022-09-11 18:05:43.371 WARNING (MainThread) [mysensors.message] Error decoding message from gateway, bad data received: E����6�������
2022-09-11 18:05:43.378 WARNING (MainThread) [mysensors] Not a valid message: not enough values to unpack (expected 5, got 0)
Of course the same baud rate is used on both gateway and home assistant. I tried lowering the baud rate, but that didn't help, only gibberish is received.
The sketch running on the gateway is as follows:
/ Enable debug prints to serial monitor
// #define MY_DEBUG
// Enable and select radio type attached
#define MY_RADIO_RF24
//#define MY_RADIO_NRF5_ESB
//#define MY_RADIO_RFM69
//#define MY_RADIO_RFM95
// Set LOW transmit power level as default, if you have an amplified NRF-module and
// power your radio separately with a good regulator you can turn up PA level.
#define MY_RF24_PA_LEVEL RF24_PA_LOW
// Enable serial gateway
#define MY_GATEWAY_SERIAL
#define MY_BAUD_RATE 38400
// Enable inclusion mode
#define MY_INCLUSION_MODE_FEATURE
// Enable Inclusion mode button on gateway
//#define MY_INCLUSION_BUTTON_FEATURE
// Inverses behavior of inclusion button (if using external pullup)
//#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
// Set inclusion mode duration (in seconds)
#define MY_INCLUSION_MODE_DURATION 60
// Digital pin used for inclusion mode button
//#define MY_INCLUSION_MODE_BUTTON_PIN 3
// Set blinking period
#define MY_DEFAULT_LED_BLINK_PERIOD 300
// Inverses the behavior of leds
//#define MY_WITH_LEDS_BLINKING_INVERSE
// Flash leds on rx/tx/err
// Uncomment to override default HW configurations
//#define MY_DEFAULT_ERR_LED_PIN 4 // Error led pin
//#define MY_DEFAULT_RX_LED_PIN 6 // Receive led pin
//#define MY_DEFAULT_TX_LED_PIN 5 // the PCB, on board LED
#include <MySensors.h>
void setup()
{
// Setup locally attached sensors
}
void presentation()
{
// Present locally attached sensors
}
void loop()
{
// Send locally attached sensor data here
}
I am using the following software versions:
MySensors: 2.3.2
Home Assistant OS: 8.5
I'm kinda stuck and clueless. Any help is welcome and highly appreciated!