Skip to content

Add Wifi setup API#5

Merged
tadelv merged 3 commits into
developfrom
feature/wifi-api
Jul 2, 2025
Merged

Add Wifi setup API#5
tadelv merged 3 commits into
developfrom
feature/wifi-api

Conversation

@tadelv
Copy link
Copy Markdown
Collaborator

@tadelv tadelv commented Jul 2, 2025

Add api for setting wifi credentials, to connect to other wifi networks
Add mdns name, so scale is accessible via http://hds.local, possible to enter wifi credentials from the scale homepage. Or use curl -d '{"ssid": <my-ssid>, "pass": <my-pass>} -H "Content-Type: application/json" hds.local/setup/wifi to do it via command line.
manual restart required after setting up new credentials.

The new logic for wifi works like this:

  • on boot, check if wifi credentials exist & wifi enabled. Don't do anything if wifi not enabled
  • if credentials don't exist, set up Access Point, "Decent Scale" without password
  • if credentials exist, try to connect to ssid with credentials for 10s. If can't connect, go back to previous step (create AP)

@tadelv tadelv requested a review from Sofronio July 2, 2025 18:24
@tadelv tadelv merged commit 8a2e35b into develop Jul 2, 2025
@tadelv tadelv deleted the feature/wifi-api branch July 2, 2025 18:25
tadelv added a commit that referenced this pull request Aug 13, 2025
Add api for setting wifi credentials, to connect to other wifi networks
Add mdns name, so scale is accessible via http://hds.local, possible to enter wifi credentials from the scale homepage. Or use curl -d '{"ssid": <my-ssid>, "pass": <my-pass>} -H "Content-Type: application/json" hds.local/setup/wifi to do it via command line.
manual restart required after setting up new credentials.

The new logic for wifi works like this:

on boot, check if wifi credentials exist & wifi enabled. Don't do anything if wifi not enabled
if credentials don't exist, set up Access Point, "Decent Scale" without password
if credentials exist, try to connect to ssid with credentials for 10s. If can't connect, go back to previous step (create AP)
tadelv added a commit that referenced this pull request Aug 13, 2025
Add api for setting wifi credentials, to connect to other wifi networks
Add mdns name, so scale is accessible via http://hds.local, possible to enter wifi credentials from the scale homepage. Or use curl -d '{"ssid": <my-ssid>, "pass": <my-pass>} -H "Content-Type: application/json" hds.local/setup/wifi to do it via command line.
manual restart required after setting up new credentials.

The new logic for wifi works like this:

on boot, check if wifi credentials exist & wifi enabled. Don't do anything if wifi not enabled
if credentials don't exist, set up Access Point, "Decent Scale" without password
if credentials exist, try to connect to ssid with credentials for 10s. If can't connect, go back to previous step (create AP)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant