Skip to content

Migration from v0.x

import { Aside } from ‘@astrojs/starlight/components’;

PocketbaseExtended v1.0 is a superset of the old PocketbaseArduino library. Existing sketches compile without changes — but there are several fixes and new capabilities worth adopting.

There are no breaking changes. All v0.x method names still work.

v0.xv1.0
PocketbaseArduino pb(...)PocketbaseExtended pb(...)PocketbaseArduino still compiles as a typedef alias
#include <BearSSLHelpers.h> in sketchNo longer needed — included internally
#include <ESP8266HTTPClient.h> in sketchNo longer needed — included internally
getList wrote skipTotal=<filter> instead of filter=<filter> (bug)Fixed — all query params map correctly
No update()update() / updateEx() added
No authenticationauthWithPassword(), authRefresh(), setAuthToken(), clearAuthToken() added
All errors returned empty stringPBResponse struct with ok, statusCode, body, and error
Debug logging always onOff by default; enable with pb.setDebug(true)

The biggest improvement is structured error handling. Where v0.x returned an empty string on failure:

// v0.x — no way to tell success from failure
String body = pb.collection("notes").getList("1", "10");
if (body == "") {
// error? or just an empty list?
}

v1.0 has Ex variants that return a PBResponse:

// v1.0 — explicit, unambiguous
PBResponse resp = pb.collection("notes").getListEx("1", "10");
if (resp.ok) {
Serial.println(resp.body);
} else {
Serial.println("HTTP " + String(resp.statusCode) + ": " + resp.error);
}

The original getList, getOne, create, update, and deleteRecord methods are still present and return String, so migration can be done incrementally.

If your sketch includes these lines, they can be removed:

// These are now handled inside the library — safe to delete from your sketch
#include <BearSSLHelpers.h>
#include <ESP8266HTTPClient.h>

Keep only the platform WiFi include and PocketbaseExtended.h:

#include <PocketbaseExtended.h>
#include <ESP8266WiFi.h> // or <WiFi.h> for ESP32