DRAFT — Preliminary version, do not share. · Version préliminaire, ne pas partager.

Quickstart: AtomS3 Lite

In about 15 minutes, you take an AtomS3 Lite starter kit from the box to a device online in Fundamentum. You then see its states in the Hub and change its LED colour with an action. No firmware or coding is needed: Fundamentum flashes and registers the kit before it ships.

Before you begin

You need:

Each kit comes with its own project, named kickstarter <serial-number>. The project has one registry, REG1, and one device type, AtomS3Lite. The device is already registered there.

1. Join the kit's project

  1. Scan the QR code on the card. The Join this project page opens.
  2. Enter your email address and select Join. The page shows Check your email.

Only the first person to join a kit can do so. If the page shows an error, check this table:

Message What it means
Someone has already joined this project Another account already claimed this kit.
This device is not part of this project The QR code and serial number don't match. Check the card.
This project does not accept invitations from this page The project is not a starter-kit project.

2. Create your account

  1. Open the invitation email and follow the link to Connect, the Fundamentum sign-in service.
  2. Set a password, or sign in with Google or Microsoft. Your password must have at least 8 characters, with uppercase and lowercase letters, a number, and a special character.

You get the project_manager role on the kit's project. Connect then redirects you to the kit's device page.

3. Connect the device to Wi-Fi

  1. Plug the device into USB-C power. The LED turns blue (booting), then purple (waiting for Wi-Fi settings).
  2. From your phone or laptop, join the open Wi-Fi network AtomS3-Demo (no password). The setup portal usually opens by itself. If it doesn't, browse to http://192.168.4.1.
  3. Select Configure WiFi, pick your network, enter its password, and select Save. The portal shows Saving Credentials.
  4. Within about 30 seconds, the LED goes from yellow (joining Wi-Fi) to orange (connecting to Fundamentum) to green (connected).
  5. Press the button. A white flash confirms the press was sent.
LED Meaning
Blue Booting
Purple Setup portal open, waiting for Wi-Fi settings
Steady yellow Joining Wi-Fi
Blinking yellow Wi-Fi lost, retrying
Orange Connecting to Fundamentum
Green Connected
Red Cannot reach Fundamentum
White flash A button press was sent

4. Watch the device page

The device page you reached after signing in shows live tiles for chip temperature, button presses, LED colour, Wi-Fi signal and uptime, along with a chart of the last few hours. Press the button a few times and watch the press count go up.

The device publishes its states every 15 seconds and on each press:

State Meaning
button_count Presses since boot. Resets when the device reboots.
wifi_rssi Wi-Fi signal strength, in dBm
uptime_s Seconds since boot
ip Current IP address
chip_temp_c Chip temperature in °C. This is not the room temperature.
wifi_pertes Wi-Fi disconnections since boot
mqtt_pertes MQTT disconnections since boot
mqtt_dernier_etat MQTT client state at the last disconnection
reset_reason Cause of the last boot
firmware_version Firmware version

The platform adds two states of its own: connection and authentication. Each press also sends a telemetry event shaped like {"timestamp": ..., "event": "button_press", "button_count": ...}.

To tell whether the device is live, look at the timestamp of its latest state. If it's more than about 30 seconds old, the device isn't reporting.

5. Find the device in the Hub

  1. Sign in to the Hub at https://hub.fundamentum-iot.com with the same account.
  2. Select the kickstarter <serial-number> project in the project selector.
  3. Open Registries and select REG1, then open the device.
  4. Open the States tab to see the same values as on the device page. The Actions, Alerts and Security tabs show the rest of the device's life in Fundamentum.

6. Read the states from the command line

If you installed the fun CLI, sign in and refresh the API commands:

fun login
fun api refresh

fun login opens your browser. See Authentication for details. Next, find the project and device IDs. The device page links to the Hub at /devices/<device-id>/edit, and the CLI can list devices too:

fun api v1 device list-devices --project-id <project-id>

Read the latest value of each state, with timestamps:

fun api v1 device get-last-states --project-id <project-id> --device-id <device-id> --with-timestamps true

Read the state history:

fun api v1 device get-list-states --project-id <project-id> --device-id <device-id> --item-per-page 50

7. Change the LED colour with an action

The quickest way is to tap one of the eight colour swatches on the device page. That sends an action to the device.

To send the same action yourself, first find the action type that sets the LED. The firmware matches on the action type's type number: 1000 sets the LED colour. The API, however, needs the action type's id:

fun api v1 action list-action-types --project-id <project-id>
fun api v1 registry list-registries --project-id <project-id>

Note the id of the action type whose type is 1000, and the ID of registry REG1. Then send green. The payload is the three RGB bytes 00 FF 00, base64-encoded as AP8A:

fun api v1 action store-action-by-registry --project-id <project-id> --registry-id <registry-id> \
  --body '{"action_type_id": <action-type-id>, "devices": [<device-id>], "payload": "AP8A", "description": "LED to green"}'

The LED turns green. Try /wAA for red or AAD/ for blue. The payload must be base64: a plain-text payload is rejected with HTTP 422. The firmware also accepts these forms, base64-encoded: #RRGGBB, {"r": 0, "g": 255, "b": 0} and {"color": "#00FF00"}.

Check the result:

fun api v1 action get-device-actions --project-id <project-id> --device-id <device-id>

The device replies couleur appliquee (colour applied) on success, or format de couleur non reconnu (colour format not recognized) if it couldn't decode the payload.

The project also has an action type with type 1001, which resets the device's Wi-Fi settings. Only send it if someone can reach the device to configure Wi-Fi again.

Troubleshooting

What's next