johnboiles / esp-roomba-mqtt

ESP8266 MQTT Roomba controller (Useful for hooking up old Roombas to Home Assistant)
200 stars 60 forks source link

Debug mode keeps disconnecting #23

Closed 2sheds closed 5 years ago

2sheds commented 5 years ago

Roomba 780 PLATFORM: Espressif 8266 > WeMos D1 R2 and mini HARDWARE: ESP8266 80MHz 80KB RAM (4MB Flash) BRC is on GPIO14 (marked as D5 on Wemos) Compiled with PlatformIO (had to fix ArduinoJSON to v5), WiFi and MQTT connections seemingly work but debug terminal keeps disconnecting (tried telnet, nc and websocket - same behavior). Pings to the ESP continue to return with no interruptions.

I suspect that this may have other symptoms as it responds to incoming MQTT commands but it feels as if it hangs waiting for response from Roomba - first command is executed but consecutive ones are seemingly not processed until it times out. Another symptom which may confirm lack of response is the status message:

Reporting packet Distance:0mm ChargingState:0 Voltage:0mV Current:0mA Charge:0mAh Capacity:0mAh

2sheds commented 5 years ago

I was able to overcome this by commenting out sendStatus() function call in main loop as roombaState can't be parsed due to aforementioned lack of response - this way I can still issue the commands to Roomba and telnet session doesn't disconnect every few seconds.