johnboiles / esp-roomba-mqtt Goto Github PK
View Code? Open in Web Editor NEWESP8266 MQTT Roomba controller (Useful for hooking up old Roombas to Home Assistant)
ESP8266 MQTT Roomba controller (Useful for hooking up old Roombas to Home Assistant)
Hi,
using suggested Visual studio Code, I obtain this error during build task:
src/main.cpp:1:10: fatal error:
'Arduino.h' file not found
#include <Arduino.h>
I need to download libraries from other repository?
Getting the following warning on build:
src\main.cpp: In function 'bool parseRoombaStateFromStreamPacket(uint8_t*, int, RoombaState*)':
src\main.cpp:309:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Quick fix of adding a "return false" statement to the end of the function caused boot-loops, so this will need a more in-depth look.
Platform: Roomba 780
board: d1_mini
Used PlatformIO to build the code.
Start/stop/return_to_home seems to work just fine but unfortunately no telemetry. Connecting back to telnet debug port getting repeating:
(d) Failed to read sensor values from Roomba
Happy to provide any necessary information
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
Hi.
Ive tried uploading it to an Wemos D1 mini..
And connected it. But i get nothing in MQTT. Not even the hello message.. First time using Platform IO.
Tried uploading to an ESP01 instead.. This does not work either.
What is the correct schematic for using the wemos D1 mini. The Schematics seems to show some of the internal resistors also
if I have different Roomba to control where I can change name of Roomba to control them all together with same MQTT server?
After charging, MQTT stopped working. Reason: https://github.com/knolleary/pubsubclient has documented limit to 128b - this is apparently exceeded when voltage and charge have sufficient digits.
Workaround: Prepend
#define MQTT_MAX_PACKET_SIZE 256
before other includes or withing PubSubClient.h
Im having a great deal of problems getting this integrated.
The legacy MQTT Vacuum is going to be removed. So im trying to switch to the newest state driven object.
I just cant figure out howto get this script to report the right format.
Once flashed, D1 mini is restarting every 11 seconds.
When connected through telnet to the device, last message shows it is trying to connect to MQTT server before telnet connection is lost
* Please type the command and press enter to execute.(? or h for this help)
***
v
* Debug: Command received: v
* Debug level set to Verbose
(D) Reconnecting MQTT
(D) Attempting MQTT connection...
(D) MQTT connected
This issue occurs both right after flashing a new D1Mini, as well as when it is connected to Roomba.
No MQTT status updates observed with vacuum/#
Below the platformio.ini
[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino
lib_deps =
RemoteDebug
PubSubClient
ArduinoJson@~5.13.4,!=6
upload_port = COM3
build_flags = -DLOGGING=1 -DMQTT_MAX_PACKET_SIZE=512
and config.h
#include "secrets.h"
#define HOSTNAME "roomba555" // e.g. roomba.local
#define BRC_PIN 14
#define ROOMBA_650_SLEEP_FIX 1
#define ADC_VOLTAGE_DIVIDER 44.551316985
//#define ENABLE_ADC_SLEEP
#define MQTT_SERVER "192.168.1.1"
#define MQTT_USER "********"
#define MQTT_COMMAND_TOPIC "vacuum/command"
#define MQTT_STATE_TOPIC "vacuum/state"
Hi,
any updates from preventing the roomba going to deep sleep, so the serial comm doesn't get disabled?
Same problem here :/
I've got this "working" on my Roomba 770.
I had to make some changes where ArduinoJSON got version incremented and broke a few things.
The side effect seems to be that the roomba wakes up and cleans randomly and stops responding over mqtt. I suspect its crashing, but the telnet interface never goes down or stops responding.
Hi,
I see there isn't MQTT_USER line in secrets.h file, I don't use default conifg/integrated MQTT in HASSIO, so I ask you if I can add this line:
#define MQTT_USER "usernameMQTT"
Suggest the following be added to the Readme.
In readme.md the Electronics picture is wrong.
Connection "ESP GPIO15 -> 10kOhm Resistor -> GND" is not there. Instead there is a connection of GPIO14 to GND.
Hello! Great project! Finally may be I can get a remote control to my 500 old guy :)
But I have a question: I successfully compiled and uploaded firmware to esp card. Booted it then and connected to it using telnet. Seems to be ok so far. But what I don't understand - is when card is booted I see AI-THINKER_xxxxx wifi hotspot with no security provided. Can you tell me how to turn off that wifi?
Regards,
Dash
Hello
I have the following issue: from time to time my Roomba is saying something in docking position, "lei aler" maybe???
I don't have any clue what is he saying.
I changed the software on my ESP 01 and tried a simple sketch and when the Roomba is Docked and I send again the seak dock command to it it's saving the same thing."lei aler"
Why is the command to seek Dock is sent from time to time if the Roomba is in docking position?
Can I disable this? And How?
Device: Roomba 700 using ESP01
I have one problem and one question;
Question: Can I switch the BRC ping from GPIO15 to GPIO2 since the esp01 doesnt expose 15?
Hello, does someone use it with Domoticz ? I don't have home assistant, only domoticz. Could you tell me what command send to start the roomba ? When it's connected on my wifi, there is no web interface. Is it normal ?
I have uploaded the code on a D1 Mini board and it doesn't appear to work.
If i monitor the serial out i can see
--- Miniterm on /dev/cu.usbserial-1410 9600,8,N,1 --- --- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- ,E����dGI�0lK��␄i�␞H␡����Ȍ!C����V)��3���T!��4�B�P�j���������������������������������\����������������������������������������������������n���ʿ�������\��������������q��R8���d:w����␌!��␎��f闍␙���v��!�K��b��\�l�������������������������������\��T����������������ş�����������l�������ղ�����������ڱ����������������������������?3�b(��
;G������E�����)��7��!!�:�TD�j�����������d���������������������\�������������������������������������ڌ�������Ų��������?��������������������l�����u��V(�)�D
�������E���␙�ť�7�1!��*�␚����U�����������������������܍�������������������ʲ���g��������������������ݸ������������F�܌�������������������l�����u���)�D`
I also don't get any messages published to the MQTT Topic.
Hello,
Would it be possible to post a wiring Scmatics & Config changes required for use with an ESP 01?
I seen another video online from The Hookup where Rob uses a PNP transistor and a buck converter. I’m wondering why you use all the resistors?
Apologies, my electronic knowledge is not great!
I have the hardware built and it is working with the "hookup" MQTT code but I wanted to use the mqtt_vacuum code instead.
its an esp07 to start with and voltage regulator and the PNP for the TX line boost.
I can telnet to the esp running the code and see verbose messages. I see it uploading info to MQTT topics with all 0s and when I send a command I see it in the debug telnet session.
it's like the Roomba is not recognizing the codes sent.
Does this code work with the older 500 series?
Do I need to change the code and comment out something? I have read through most of the code
Doe anyone know how to push build_flags in platformio.ini to Arduino IDE or optional code to be used for Arduino IDE? For now I worked around by removing #IF LOGGING (and #ELSE structure) to have it compiled with debug mode.
I would know if it work also with roomba 521
When connecting the Nodemcu the roomba enters a loop that wakes it up (sound included) and after about 10 seconds it restarts and returns to do the same. I can have debug connection by telnet. But when sending a command I receive the disconnect message. When trying to press the buttons of the roomba, he receives the commands but executes them with these 10-second pauses. By executing a pin to the ip of the nodemcu, I check that the board restarts at that time. Test with 2 other plates and the result is the same. Even if the feed for usb and without any additional connection is reset every 10 seconds.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.