Yarbo API - Making my own web interface

Hi All,

Hope you are well.

I have started to put together a web interface to control my Yarbo. Plan to set up some monitoring, automations etc, made a start and put it on GitHub (link below). You are welcome to have a look and give it a go. I built in some camera functionality but this does not yet work as Yarbo seem not to have opened this up yet, I have left it there in a hope they do in future as an RTSP stream or similar.

If you have any ideas or suggestions, please let me know. I hope you find it useful.

Best wishes,

Martyn

Having 100% local access and control of Yarbo would be wonderful.

Thank you for undertaking this effort.

Cool, good to see something that I will be able to run on windows 10.

Hopefully you will be able to get the map and map editing added

Let us know when you have a bit more stuff added

The real thing that would be nice for them to add to the API is a way to export and import GeoJSON files. That would allow us to make a fully functional map editor so we don’t have to use the app and or drive the yarbo around to make edits.

I have so many spots where I tried to edit a map only to end up with a little jagged line instead of a straight line. The little error influences the mowing pattern and makes it do some weird stuff.

Also, we could use something like a survey stick with rtk antenna to mark of no-go zone etc instead of having to drive the yarbo to the tree or rock or whatever.

@jason.michas, @Stoneslinger76, @rgloverii

I agree with all of you …. :beer_mug:

Hi all,

Thank you for your valuable feedback. I am working on these step by step to see what I can get it to do. I have now got it to display the location on a map from the RTK data. I am hoping that I can access saved mapping and overlay those zones. We will see…

I am updating the GitHub with each update including the change log etc so you can see where I am up to but I will try and post here as well.

Do please feel free to give me any pointers or ideas you may have!

Best wishes,

Martyn

So I have now published an update that has a function to extract map data of a mowing area and overlay onto satellite imagery. Unfortunately I am away from home at the moment and my mower does not have a saved map in it yet so I cannot test this, so if anyone out there is willing to test, that would be great. If not I can carry on working on this in a week or so when I am back with my robot and can create some maps to test.

If anyone does have a test/play with it, do please let me know your feedback.

Best wishes,

Martyn

I think I have managed to build this into my latest GitHub version, well at least the ability to get the data out. If we can get it out, I can work on the editing and getting it back in, as it were. If you can test that would be great. Fingers and everything crossed…

Martyn

Cool!

So, you are returning the geojson from the maps?

I saw int he API there was something about decoding geojson, but I did not see anything about reading/importing it. I was checking after another discussion about using an rtk survey stick to mark no go zones and stuff like that. I have a homemade survey stick that works great. I use SW Maps to map out property boundaries, utility underground services, sprinkler heads, etc.

SW Maps outputs geojson and can read it so we could create maps without the rover that way or at least edit them.

I’ll see if I can test this stuff out. Time is tough for me right now though.

I dont know what most of this thread means, but it sounds like you are doing amazing work. Keep it up, and good luck!

I’m trying to see what I can get out. Are there official documents for an API? At the moment I am getting pointers from another GitHub project but if there is some more official point of reference please let me know.

If I can get the map data out, I hope to be able to modify it and write it back to the device, therefore allowing people to add, for example, a straight line between two points.

I have now added the ability to send the device to a waypoint but I cannot test this or the maps side of things until I am home next week. Working with what I can remotely at the moment. If anyone is able to install the script and give it a go with their maps etc, that would be helpful.

I will keep working on what I can and keep you all posted.

Best,

Martyn

This is the official repo I am aware of. I think this is going to be part of the open platform coming in 2027. GitHub - YarboInc/YarboDataSDK · GitHub

Pretty cool that you can send to a way point. That would be useful for sending to my garage for service. Currently I create a small area in front of my garage and then made a dead end and a pathway to the area so I can send it there and then cancel the program and manually drive it into the garage. But if you could just have it go somewhere and wait that would be better.

The problem with sending to a waypoint is that Yarbo won’t be able to reliably avoid obstacles between its current location and the desired endpoint.

I would NOT trust its obstacle avoidance unattended.

I have updated the GitHub with quite a few new features. A good one for future proofing is that updates can now be installed from a settings page, so once it is installed initially, it is easy to keep up to date without running any scripts. Also can add the IP and serial of the Yarbo in the UI, not via a code editor.

If someone actually installs it and tries it, do please let me know.

Hope it helps someone. I will continue my development of it over the coming weeks.

I have now got it to download maps from the core and they can be edited on the web interface by clicking and draging lines/points. I cannot get it to upload the saved edits to the robot though, I think this is restricted by Yarbo. I will keep trying on some reverse engineering of that. If anyone knows or has ideas on how to save an edited map back to the robot please let me know.

Good to hear your makeing progress. Will be makeing attemp at install soon, been years since I dl’d anything from Github. Thanks for the efforts!

@martyndix - excellent work

Wait, they exposed and API? I didn’t realize they had done that so I am starting to dig into it, what will certainly follow is my notes / questions.

@martyndix I see you’re already ahead of me here your panel has used it as an optional cloud fallback for map/plan reads since v1.2.0. I pulled this API/SDK apart and the results speak to what several people asked for in this thread, so here’s the full inventory.

What it gives you, please correct me if I am wrong

Login with your Yarbo account, list devices, then live MQTT telemetry: 43 defined fields covering battery (capacity, health, voltage, current, all six cell temps), working state, error codes, stuck, person/obstacle detection, plan status with detailed error codes, pause reason (manual vs low battery vs stuck), WiFi/4G/HaLow signal and which is active, RTK quality and satellite count, position and heading, ambient temp, rain sensor, head type/serial, and firmware versions. On demand you can pull a full status snapshot, GPS reference origin, the map, and all saved plans. Commands: standby/working, start plan by ID (including at a %), pause, resume, stop, return to charge, lights, sound/volume, child lock, geofence, obstacle settings, blade height and speed, chute angle.

@jason.michas your GeoJSON request is exactly half-answered I think…

Export already exists, officially: convert_map_to_geojson() turns the map into a proper FeatureCollection,work areas, no-go zones, no-vision zones and geofence as polygons, pathways/sidewalks/deadends as linestrings, charging stations as points, converted to real lat/lon, with zone IDs and names preserved in the properties. That is genuinely everything you need for the read side of a map editor.

Import does not exist. I checked all 24 command topics in the SDK and not one of them writes, saves or uploads map data. Plans are the same, readable and startable by ID, not creatable or editable. So the half of your idea that’s blocked is exactly the half that matters, and it’s blocked deliberately.

@rgloverii, @Stoneslinger76 on local control, don’t get your hopes up here I see no way this is coming anytime soon, but I WISH!

The official SDK is cloud only. REST login to Yarbo’s servers, then MQTT over TLS to their brokers. It is not a local path and can’t be configured into one.

More to the point: it’s actually more limited than what martyndix already built. The topic structure is identical on both paths, but his local panel sends commands the official SDK simply doesn’t expose – manual drive (cmd_vel), buzzer, plan deletion, controller hold. None of those exist in the SDK’s command list. So on the local-vs-cloud question, local is already the more capable route.

@martyndix one lead on your map upload problem.

That gap cuts both ways. The fact that local MQTT accepts del_plan and cmd_vel while the cloud SDK exposes neither means the robot’s real command surface is wider than the official library admits. It doesn’t prove a map-write command exists — but it does mean “the SDK doesn’t have it” isn’t evidence that it’s impossible. If such a command is in the firmware, local is far likelier to accept it than cloud, since the cloud broker enforces a server-side permission list (the SDK’s own source notes that unrecognised topics get rejected by the EMQX ACL). Worth aiming your reverse engineering at the local broker rather than the cloud one.

On the camera: nothing in the SDK either. 43 telemetry fields, 24 commands, zero video. Your read that Yarbo hasn’t opened it up looks right.

Other limits worth knowing: commands are fire-and-forget (published at QoS 0, every command documented as returning no confirmation you have to poll status to see whether it took), auth is your account password with no API keys or read-only tokens, only one device type is defined, and the docs are largely in Chinese (thank you google translate). It’s Python so Windows is fine, @Stoneslinger76.

So based on what I see and as I think through this the best idea I’ve come up with for the SDK is below, and I’d like a sanity check before I start from the group.

Record telemetry over time and map it. Nothing out there keeps history that I have seen; every tool shows live state and then forgets it. But the SDK gives you RTK status and satellite count alongside position, plus your yard as GeoJSON. Record those across a few sessions and you get a colour-graded map of where RTK actually degrades in your specific yard. “You lose fix on the north side of the garage, every pass, nine sessions running” is a lot more useful than “it went funny near the trees.”

To be clear on scope, and I don’t want to tread on what martyndix is building: this is a data layer, not another control panel. No driving, no commands, nothing that overlaps with the tools already out there. It just sits and listens, writes to a plain documented SQLite file, and ships with a simple map view so it’s useful on its own. Anything else a panel, Home Assistant, Grafana can read that file if it’s wanted. It’d run on local MQTT by default, so no cloud account needed.

Main unknown: how often does the robot push position updates? At roughly once a second this works nicely; at every 30 seconds it probably doesn’t. Does anyone know? Then it does not look like any API keys are around so you would have to use your own login, something to know for initial access. EDIT - it does look like for this we can just use the yarbo local IP and we can get this data via its own broker.

And is RTK diagnosis actually the pain worth solving here, or would you point me at something else first? I sure have seen a lot of people have issues on this, including me, so it feels like it might be useful for us and maybe even Yarbo.

Thoughts? Am I off my rocker? @martyndix - you have been closest, thoughts?

Wow. Thanks for the super detailed info.

I saw the chinese docs but, unlike you, I didn’t have the wherewithal to translate and read most of it. I did do enough to find out exactly what you did, there is no map upload/ingestion command/endpoint/etc.

My biggest gripe with the entire Yarbo experience is the mapping and editing. I mean once I have a defined area or areas I feel like I should be able to use a software tool on my laptop or something bigger than a tablet to redraw/move/edit paths/deadends/minor area boundaries or make areas inside of areas (I used them for fooling yarbo to do things it doesn’t do well).

So, when they officially release the “open platform” in 2027, I really hope they give us access to full read and write mapping capabilities so we, the community, can make custom tools to edit how we want.