Pocket server

Install

Click the button below to flash your ESP8266 with the pocket server firmware (supported on Chrome-based browsers only).





Run

After flashing and rebooting your ESP8266, connect to the Wi-Fi network prefixed with "pocket-server" using default password "password123". On some devices, the admin page will automatically appear. If not, you can navigate to http://192.168.4.1.

Once on the admin page, upload any .html file. Downloadable examples below. Any future devices connecting to your pocket server will see this page by default.

To get back to the admin page, navigate to http://192.168.4.1/admin.


Example applications




API Documentation

The API allows you to interact with the pocket server to manage files, control GPIO pins, and communicate via WebSockets.

1. File Management

List Files: retrieve a list of all files stored on the device's filesystem.

Upload File: uploads a file to the device. The file will be saved with its original filename.

Set Home Page: uploads a file and saves it as index.html, effectively setting it as the homepage of the device.

Delete File: deletes a specific file from the filesystem.

Clear Storage: deletes all files from the filesystem (excluding system files if any are protected, though currently it wipes everything visible).

2. GPIO Control

Read Pin State: reads the current digital state of a GPIO pin.

Control Pin: sets the mode and/or digital value of a GPIO pin.

3. WebSocket

WebSocket Connection: connect to the WebSocket for real-time interaction. Messages sent to this endpoint are broadcast to all other connected clients.

4. Administration

Admin Page: access the built-in file management interface.