Mysensors bridge

Tags: #<Tag:0x00007fc4094c1a38>

I got mysensors with ESP wifi gateway and node working fine unless wifi is lost for one seconds, IT WILL NOT RECONNECT
no matter which etup used old config.yaml versus new integration setup
ONCE I RELOAD = config->server control->server mang reload it will work fine
Before that I pinged Bridge it seems to be connected but home assistant lost the loop
ANY HELP…!!!

ERRORS:
No response from (‘192.168.xx.xx’, 5003). Disconnecting

May 2, 2021, 3:19:57 PM – (ERROR) /usr/local/lib/python3.8/site-packages/mysensors/gateway_tcp.py - message first occurred at April 24, 2021, 3:53:12 PM and shows up 71 times
Connecting to socket timed out for (‘192.168.xx.xx’, 5003)
May 2, 2021, 3:18:27 PM – (ERROR) /usr/local/lib/python3.8/site-packages/mysensors/gateway_tcp.py - message first occurred at April 24, 2021, 3:53:22 PM and shows up 37 times

can you post your gateway config? what version did you compile for the gateway?

THANKS for quick response
compiled:

Arduino AVR board 1.6.20
ESP8266 board community v 2.6.0
Mysensors v 2.3.2

now commented out mysensors GW inside config.yaml AFTER i have installed INTEGRATION mysensors
config.yaml made no difference problems occuurred any time i rebooted router
SEE snapshot
Screenshot 2021-05-04 063233

############ mysensors:

mysensors:

gateways:

- device: ‘192.168.1.xx’

persistence_file: ‘mysensors915.json’

tcp_port: 5003

optimistic: false

persistence: true

retain: true

version: ‘2.3’

############ mysensors:

it doesn’t sound like a problem with HA it sounds like the gateway is crashing. I’m running my gateway on an RPi 3 with NRF24 radio. we had that issue and fixed it by using the development branch. having a peek at the 8266 gateway the only thing i can see based on what you posted was they require IDE 1.6.5+ and you used 1.6.2, I’m not sure that will make a difference. I would suggest you sign up for the mysensors forum and seek help. you will likely need to enable debug logging and watch it till it crashes (or turn off Wi-Fi to simulate a crash) and see what is going on

yes, but strange that rebooting HA solve the issue while ESP-GW remains pingable, also a second ESP-MQTT GW remains working simultaneously and not failing.
what kind of debug level do i need?
i got inside config.yaml
logger:
default: info
logs:
homeassistant.components.mysensors: debug
mysensors: debug
homeassistant.components.rest_command: debug
is this enough?
thanks again

I must have misunderstood the issue then. 2 things. 1) i would download myscontroller from the mysensors forum and connect to your gate way and watch what is going on in the console.
2) can you post the sketch you used to flash the arduino? again, i’m running mine on a RPI, and i’m not having any issues with the integration, but that may be because it’s linux vs arduino. I used to run on an arduino ethernet gateway, but i always had disconnect problems and had to physically go press the reset button on that device… that is why i switched to an RPI. but it could have easily been my coding of the arduino that was the problem. either way. i’m happy to look at the code if you want.

#define MY_DEBUG
// Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h
#define MY_BAUD_RATE 9600
#define MY_HOSTNAME “MySensorsEth”
#define MY_RADIO_RFM69
// RFM69_315MHZ
// RFM69_433MHZ
// RFM69_865MHZ
// RFM69_868MHZ
// RFM69_915MHZ
//#define MY_RFM69_FREQUENCY RFM69_433MHZ
#define MY_RFM69_FREQUENCY RFM69_915MHZ
#define MY_IS_RFM69HW
#define MY_GATEWAY_ESP8266
#define MY_WIFI_SSID “xxx”
#define MY_WIFI_PASSWORD “xxx”
// Enable UDP communication
//#define MY_USE_UDP // If using UDP you need to set MY_CONTROLLER_IP_ADDRESS below
// Set the hostname for the WiFi Client. This is the hostname
// it will pass to the DHCP server if not static.
//#define MY_HOSTNAME “sensor-gateway”
// Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
#define MY_IP_ADDRESS 192,168,1,xx
//#define MY_IP_ADDRESS 192,168,1,xx
// If using static ip you can define Gateway and Subnet address as well
#define MY_IP_GATEWAY_ADDRESS 192,168,1,1
#define MY_IP_SUBNET_ADDRESS 255,255,255,0
// The port to keep open on node server mode
#define MY_PORT 5003
// How many clients should be able to connect to this gateway (default 1)
#define MY_GATEWAY_MAX_CLIENTS 15
// Controller ip address. Enables client mode (default is “server” mode).
// Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
//#define MY_CONTROLLER_IP_ADDRESS 192, 168, 1, ZZxx
// Enable inclusion mode
#define MY_INCLUSION_MODE_FEATURE
// Enable Inclusion mode button on gateway
//#define MY_INCLUSION_BUTTON_FEATURE
// Set inclusion mode duration (in seconds)
#define MY_INCLUSION_MODE_DURATION 30
// Digital pin used for inclusion mode button
//#define MY_INCLUSION_MODE_BUTTON_PIN D1
// Set blinking period
//#define MY_DEFAULT_LED_BLINK_PERIOD 300
// Flash leds on rx/tx/err
// Led pins used if blinking feature is enabled above
//#define MY_DEFAULT_ERR_LED_PIN 16 // Error led pin
//#define MY_DEFAULT_RX_LED_PIN 16 // Receive led pin
//#define MY_DEFAULT_TX_LED_PIN 16 // the PCB, on board LED
#if defined(MY_USE_UDP)
#include <WiFiUdp.h>
#endif
#include <ESP8266WiFi.h>
#include <MySensors.h>
void setup()
{
// Setup locally attached sensors
}

void presentation()
{
// Present locally attached sensors here
}

void loop()
{
// // Send locally attached sensors data here
////-------------- Heart Beat---------------------------------------------------------
////this is sent by the Mysensors MQTTGateway to topic: mygateway1-out/1/255/3/0/22
//static unsigned long lastLoopTime = 0; // Holds the last time the main loop ran.
//if (millis() - lastLoopTime > 30000) {//one every 30 seconds
//lastLoopTime = millis();
//sendHeartbeat();//sends heartbeat msg time in millisseconds
//}
////-------------------------------------------------------------------------------
}

thanks for helping
look at my GW config
HOW did you do RPI WIFI GW?