To run the experiments locally they need to be served over TLS
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
to create a self-signed certificate (one time setup)npx http-server -S -C cert.pem
Simple exploration of the Web Bluetooth API. Shelly UUIDs discovered by inspecting with the LightBlue iOS app because WebBT needs service ids to be specified up front before discovery, etc.
Connecting to a Shelly device and making RPC calls as per the Shelly documentation at https://kb.shelly.cloud/knowledge-base/kbsa-communicating-with-shelly-devices-via-bluetoo
Local | GitHub | Arduino Sketch
A simple Arduino sketch that advertises a BLE service with charateristics that support a basic API to scan for networks, then set the selected network and password. The experiment page allows entering these and writing them to the characteristic, then retrieves the IP address from the characteristic, displays status and makes an fetch request to an API served by the sketch.
A more polished experiment refining Experiment 3 with more nicely factored code and error handling. Furthering the example with an API implementation to read a sensor (internal temperature?) and toggle a pin (LED).