Firmware Version: V1.6 Last Updated: November 2025
SolarBit OS provides a complete HTTP REST API accessible via:
- WiFi:
http://<wifi-ip-address>/ - Ethernet:
http://<ethernet-ip-address>/ - WiFi Bridge:
http://192.168.4.1/(when bridge is active)
Default Hostnames:
- WiFi:
Solarbit-wifi.local - Ethernet:
Solarbit-lan.local
Note: Both WiFi and Ethernet interfaces provide identical API functionality.
Current Status: No authentication required Security Note: Ensure your SolarBit is on a trusted network. Future versions may add authentication.
- System Status & Monitoring
- Motor Control
- Miner Power Control
- Miner Automation Configuration
- Fan Control
- System Configuration
- Network Management
- Debug & Diagnostics
Returns complete system status in JSON format.
Response Example:
{
"systemState": "TRACKING",
"trackingMode": "AUTO",
"userStopped": false,
"brightestLDR": 850,
"ldrValues": " NE:850 SE:820 NW:780 SW:790",
"motorXWorking": true,
"motorYWorking": true,
"limitNorth": false,
"limitSouth": false,
"limitEast": false,
"limitWest": false,
"temperature": 32.5,
"fanRPM": 1200,
"fanSpeed": 128,
"fanProfile": "Noctua",
"solarData": "14.250V | 2.340A | 33.345W",
"battData": "13.850V | 1.200A | 16.620W",
"rail12VData": "12.100V | 0.850A | 10.285W",
"rail5VData": "5.050V | 0.450A | 2.273W",
"miner12VState": true,
"miner5VState": false,
"miner12VAutoControl": true,
"miner5VAutoControl": false,
"wifiSsid": "YourNetwork",
"wifiIP": "192.168.1.100",
"wifiRSSI": -45,
"activeHostname": "Solarbit-wifi",
"ethernetStatus": "Connected",
"ethernetIP": "192.168.1.121",
"ethernetMode": "Static",
"bridgeState": "ACTIVE",
"bridgeSSID": "SolarbitAP",
"bridgeIP": "192.168.4.1",
"bridgeConnectedClients": 2,
"bridgeMainWiFiRSSI": -45,
"uptime": "00:12:34:56",
"autostartEnabled": true
}Home Assistant Sensor Examples:
sensor:
- platform: rest
resource: http://solarbit-wifi.local/data
name: "SolarBit Battery Voltage"
value_template: "{{ value_json.battData.split('V')[0] }}"
unit_of_measurement: "V"
scan_interval: 5
- platform: rest
resource: http://solarbit-wifi.local/data
name: "SolarBit Solar Power"
value_template: "{{ value_json.solarData.split('W')[0].split('|')[-1].strip() }}"
unit_of_measurement: "W"
scan_interval: 5
- platform: rest
resource: http://solarbit-wifi.local/data
name: "SolarBit State"
value_template: "{{ value_json.systemState }}"
scan_interval: 10Response Fields:
| Field | Type | Description |
|---|---|---|
systemState |
String | Current state: STARTUP, WAITING_FOR_USER, DAWN, TRACKING, SUNSET, SLEEP, OTA_UPDATE |
trackingMode |
String | AUTO or MANUAL |
userStopped |
Boolean | True if user manually stopped tracking |
brightestLDR |
Integer | Highest LDR sensor value (0-4095) |
ldrValues |
String | All four LDR values (NE, SE, NW, SW) |
motorXWorking |
Boolean | X-axis motor operational status |
motorYWorking |
Boolean | Y-axis motor operational status |
limitNorth/South/East/West |
Boolean | Limit switch states (true = triggered) |
temperature |
Float | Enclosure temperature in ยฐC |
fanRPM |
Integer | Current fan speed in RPM |
fanSpeed |
Integer | Fan PWM value (0-255, -1 = auto) |
fanProfile |
String | Active fan profile: "Noctua" or "Delta" |
solarData |
String | Solar charger: "voltage | current | power" |
battData |
String | Battery: "voltage | current | power" |
rail12VData |
String | 12V rail: "voltage | current | power" |
rail5VData |
String | 5V rail: "voltage | current | power" |
miner12VState |
Boolean | 12V miner power state (on/off) |
miner5VState |
Boolean | 5V miner power state (on/off) |
miner12VAutoControl |
Boolean | 12V auto control enabled |
miner5VAutoControl |
Boolean | 5V auto control enabled |
wifiSsid |
String | Connected WiFi network name |
wifiIP |
String | WiFi IP address |
wifiRSSI |
Integer | WiFi signal strength (dBm) |
activeHostname |
String | Currently active hostname |
ethernetStatus |
String | "Connected", "Disconnected", or "Not Initialized" |
ethernetIP |
String | Ethernet IP address |
ethernetMode |
String | "DHCP" or "Static" |
bridgeState |
String | Bridge status: DISABLED, STARTING, ACTIVE, ERROR, RECOVERING |
bridgeSSID |
String | WiFi bridge network name |
bridgeIP |
String | Bridge IP (usually 192.168.4.1) |
bridgeConnectedClients |
Integer | Number of devices connected to bridge |
uptime |
String | System uptime (HH:MM:SS:DD) |
autostartEnabled |
Boolean | Auto-tracking on boot enabled |
Enable automatic solar tracking mode.
Response: 200 OK - "Auto tracking enabled"
Home Assistant Example:
switch:
- platform: rest
resource: http://solarbit-wifi.local/auto
name: "SolarBit Auto Tracking"
body_on: ''
body_off: ''Enable manual motor control mode.
Response: 200 OK - "Manual mode enabled"
Stop all motor movement and remain in current position.
Response: 200 OK - "Motors stopped by user"
Home Assistant Example:
button:
- platform: rest
resource: http://solarbit-wifi.local/stop
name: "SolarBit Emergency Stop"Resume tracking after manual stop.
Response: 200 OK - "Tracking resumed"
Move X-axis (East/West) by specified steps. Only works in MANUAL mode.
Parameters:
steps(integer): Positive = East, Negative = West
Examples:
/stepperX?steps=100- Move 100 steps East/stepperX?steps=-50- Move 50 steps West
Response: 200 OK - "X-axis movement started: {steps} steps"
Error: 400 Bad Request - "Can't move steps in auto mode or missing steps parameter"
Move Y-axis (North/South) by specified steps. Only works in MANUAL mode.
Parameters:
steps(integer): Positive = South, Negative = North
Examples:
/stepperY?steps=100- Move 100 steps South/stepperY?steps=-50- Move 50 steps North
Response: 200 OK - "Y-axis movement started: {steps} steps"
Error: 400 Bad Request - "Can't move steps in auto mode or missing steps parameter"
Start homing sequence to return to dawn position (East + South limits).
Response: 200 OK - "Homing started"
Note: Only available in MANUAL mode.
Control 12V miner power rail.
Parameters:
state: "on" or "off"
Examples:
/miner12V?state=on- Turn ON 12V rail/miner12V?state=off- Turn OFF 12V rail
Response: 200 OK - "12V Miner {state}"
Home Assistant Example:
switch:
- platform: rest
resource: http://solarbit-wifi.local/miner12V?state=on
name: "SolarBit 12V Miner"
body_on: ''
body_off: ''
is_on_template: "{{ states('sensor.solarbit_12v_state') == 'true' }}"Control 5V miner power rail.
Parameters:
state: "on" or "off"
Examples:
/miner5V?state=on- Turn ON 5V rail/miner5V?state=off- Turn OFF 5V rail
Response: 200 OK - "5V Miner {state}"
Enable/disable automatic control for 12V rail.
Parameters:
state: "on" or "off"
Response: 200 OK - "12V Miner auto control {state}"
Home Assistant Example:
switch:
- platform: rest
resource: http://solarbit-wifi.local/miner12VAuto?state=on
name: "SolarBit 12V Auto Control"
body_on: ''
body_off: ''Enable/disable automatic control for 5V rail.
Parameters:
state: "on" or "off"
Response: 200 OK - "5V Miner auto control {state}"
Retrieve current automation configuration for both rails.
Response Example:
{
"miner12V": {
"onVoltage": 13.70,
"onWatts": 15.0,
"onDuration": 10,
"offVoltage": 12.70,
"offWatts": 10.0,
"offDuration": 10
},
"miner5V": {
"onVoltage": 13.70,
"onWatts": 15.0,
"onDuration": 10,
"offVoltage": 12.70,
"offWatts": 10.0,
"offDuration": 10
}
}Home Assistant Sensor Example:
sensor:
- platform: rest
resource: http://solarbit-wifi.local/getMinerConfig
name: "SolarBit 12V ON Voltage"
value_template: "{{ value_json.miner12V.onVoltage }}"
unit_of_measurement: "V"
scan_interval: 3600Update automation configuration for one or both rails.
Content-Type: application/json
Request Body:
{
"miner12V": {
"onVoltage": 13.8,
"onWatts": 20.0,
"onDuration": 15,
"offVoltage": 12.5,
"offWatts": 12.0,
"offDuration": 20
},
"miner5V": {
"onVoltage": 13.5,
"onWatts": 10.0,
"onDuration": 5,
"offVoltage": 12.5,
"offWatts": 5.0,
"offDuration": 15
}
}Parameters:
| Parameter | Type | Range | Description |
|---|---|---|---|
onVoltage |
Float | 10.0-15.0 | Battery voltage to enable (V) |
onWatts |
Float | 0-500 | Solar power required (W) |
onDuration |
Integer | 1-300 | Duration conditions must be met (seconds) |
offVoltage |
Float | 10.0-15.0 | Battery voltage to disable (V) |
offWatts |
Float | 0-500 | Solar power threshold for disable (W) |
offDuration |
Integer | 1-300 | Duration low power must persist (seconds) |
Note: You can update just one rail by only including that rail in the JSON.
Response: 200 OK - "Miner config saved successfully"
Home Assistant Automation Example:
automation:
- alias: "Update SolarBit Miner Config for Summer"
trigger:
- platform: time
at: "00:00:00"
condition:
- condition: template
value_template: "{{ now().month in [6, 7, 8] }}"
action:
- service: rest_command.solarbit_set_miner_config
data:
miner12V:
onVoltage: 13.5
onWatts: 25
onDuration: 10REST Command Configuration:
rest_command:
solarbit_set_miner_config:
url: http://solarbit-wifi.local/saveMinerConfig
method: POST
content_type: 'application/json'
payload: '{{ {"miner12V": miner12V} | tojson }}'Control enclosure fan.
Parameters:
mode: "auto" or "manual"speed: PWM value (0-255, required if mode=manual)
Examples:
/fan?mode=auto- Enable automatic temperature-based control/fan?mode=manual&speed=128- Set fan to 50% speed (128/255)/fan?mode=manual&speed=255- Set fan to 100% speed/fan?mode=manual&speed=0- Turn fan off
Response: 200 OK - "Fan mode set to {mode}" or "Fan set to manual mode"
Home Assistant Example:
fan:
- platform: rest
resource: http://solarbit-wifi.local/fan
name: "SolarBit Enclosure Fan"
command_on_template: "?mode=manual&speed=255"
command_off_template: "?mode=manual&speed=0"
speed_command_template: "?mode=manual&speed={{ (speed * 2.55) | int }}"
speeds:
- low
- medium
- highSet fan profile for automatic temperature control.
Parameters:
profile: "noctua" or "delta"
Profiles:
- Noctua: Quieter operation, lower RPM range (25ยฐC-50ยฐC โ 40-100% speed)
- Delta: High-performance, higher RPM range (25ยฐC-50ยฐC โ 60-100% speed)
Response: 200 OK - "Fan profile set to {profile}"
Home Assistant Example:
select:
- platform: rest
resource: http://solarbit-wifi.local/fanProfile
name: "SolarBit Fan Profile"
options:
- noctua
- delta
command_template: "?profile={{ value }}"Get current hostname configuration.
Response Example:
{
"wifiHostname": "Solarbit-wifi",
"ethernetHostname": "Solarbit-lan",
"activeHostname": "Solarbit-wifi"
}Set new hostnames for WiFi and Ethernet interfaces.
Content-Type: application/x-www-form-urlencoded
Parameters:
wifi_hostname: WiFi interface hostname (1-31 chars, alphanumeric + hyphens)ethernet_hostname: Ethernet interface hostname (1-31 chars, alphanumeric + hyphens)
Example:
POST /hostname
wifi_hostname=MySolarBit-wifiðernet_hostname=MySolarBit-lan
Response: 200 OK - "Hostnames updated. Restart required."
Note: Restart required for changes to take effect.
Get autostart configuration.
Response Example:
{
"enabled": true
}Enable/disable automatic tracking on boot.
Content-Type: application/x-www-form-urlencoded
Parameters:
enabled: "true" or "false"
Example:
POST /autostart
enabled=true
Response: 200 OK - "Autostart preference saved"
Home Assistant Example:
switch:
- platform: rest
resource: http://solarbit-wifi.local/autostart
name: "SolarBit Autostart Tracking"
method: POST
body_on: 'enabled=true'
body_off: 'enabled=false'
is_on_template: "{{ states('sensor.solarbit_autostart') == 'true' }}"Restart the ESP32 system.
Response: 200 OK - "Restarting..."
Note: System will restart in 2 seconds after this call.
Home Assistant Example:
button:
- platform: rest
resource: http://solarbit-wifi.local/restart
name: "SolarBit Restart"Reset WiFi credentials and restart into AP mode.
Response: 200 OK - "WiFi reset. Restarting..."
Note: System will restart in AP mode for reconfiguration.
Warning: This will disconnect the device from current WiFi network.
Get WiFi bridge status.
Response Example:
{
"state": "ACTIVE",
"enabled": true,
"ssid": "SolarbitAP",
"connectedClients": 2,
"mainWiFiRSSI": -45,
"health": "Healthy"
}Get WiFi bridge configuration.
Response Example:
{
"enabled": true,
"ssid": "SolarbitAP",
"configValid": true
}Save WiFi bridge configuration.
Content-Type: application/x-www-form-urlencoded
Parameters:
enabled: "true" or "false"ssid: Bridge network name (max 31 chars)password: Bridge password (max 31 chars)
Example:
POST /bridge/save
enabled=true&ssid=MySolarBit-AP&password=strongpassword123
Response: 200 OK - "Bridge configuration saved. Restart bridge to apply."
Restart WiFi bridge (reload configuration).
Response: 200 OK - "Bridge restarting..."
Get Ethernet configuration.
Response Example:
{
"mode": "static",
"ip": "192.168.1.121",
"gateway": "192.168.1.1",
"subnet": "255.255.255.0",
"dns1": "8.8.8.8",
"dns2": "1.1.1.1"
}Configure Ethernet interface.
Content-Type: application/x-www-form-urlencoded
Parameters:
mode: "dhcp" or "static"ip: Static IP address (required if mode=static)gateway: Gateway address (required if mode=static)subnet: Subnet mask (required if mode=static)dns1: Primary DNS (required if mode=static)dns2: Secondary DNS (required if mode=static)
Example (Static IP):
POST /ethernetConfig
mode=static&ip=192.168.1.121&gateway=192.168.1.1&subnet=255.255.255.0&dns1=8.8.8.8&dns2=1.1.1.1
Example (DHCP):
POST /ethernetConfig
mode=dhcp
Response: 200 OK - "Ethernet configuration saved. Restart required."
Get real-time debug log (HTML page with streaming updates).
Response: HTML page with debug console
Note: This endpoint returns an HTML page, not JSON. Use for browser viewing or scraping with HTML parser.
Get debug messages in JSON format.
Response Example:
{
"messages": [
{
"timestamp": 12345678,
"message": "System started"
},
{
"timestamp": 12345789,
"message": "Tracking mode: AUTO"
}
],
"count": 2
}Home Assistant Sensor Example:
sensor:
- platform: rest
resource: http://solarbit-wifi.local/debugData
name: "SolarBit Last Debug Message"
value_template: "{{ value_json.messages[-1].message }}"
json_attributes:
- messages
- count# SolarBit Integration
homeassistant:
customize:
sensor.solarbit_battery_voltage:
friendly_name: "Battery Voltage"
icon: mdi:battery
sensor.solarbit_solar_power:
friendly_name: "Solar Power"
icon: mdi:solar-power
sensor.solarbit_state:
friendly_name: "System State"
icon: mdi:state-machine
# REST Sensors
sensor:
- platform: rest
resource: http://solarbit-wifi.local/data
name: solarbit_data
json_attributes:
- systemState
- trackingMode
- brightestLDR
- temperature
- fanRPM
- solarData
- battData
- rail12VData
- rail5VData
- miner12VState
- miner5VState
- wifiRSSI
- uptime
value_template: "OK"
scan_interval: 5
# Battery Voltage
- platform: template
sensors:
solarbit_battery_voltage:
value_template: >
{% set data = state_attr('sensor.solarbit_data', 'battData') %}
{% if data %}
{{ data.split('V')[0] }}
{% else %}
unknown
{% endif %}
unit_of_measurement: "V"
device_class: voltage
# Solar Power
- platform: template
sensors:
solarbit_solar_power:
value_template: >
{% set data = state_attr('sensor.solarbit_data', 'solarData') %}
{% if data %}
{{ data.split('W')[0].split('|')[-1].strip() }}
{% else %}
unknown
{% endif %}
unit_of_measurement: "W"
device_class: power
# System State
- platform: template
sensors:
solarbit_state:
value_template: >
{{ state_attr('sensor.solarbit_data', 'systemState') }}
# Temperature
- platform: template
sensors:
solarbit_temperature:
value_template: >
{{ state_attr('sensor.solarbit_data', 'temperature') }}
unit_of_measurement: "ยฐC"
device_class: temperature
# Switches
switch:
# Auto Tracking
- platform: rest
resource: http://solarbit-wifi.local/auto
name: solarbit_auto_tracking
body_on: ''
is_on_template: >
{{ state_attr('sensor.solarbit_data', 'trackingMode') == 'AUTO' }}
# 12V Miner
- platform: rest
resource: http://solarbit-wifi.local/miner12V
name: solarbit_12v_miner
body_on: 'state=on'
body_off: 'state=off'
is_on_template: >
{{ state_attr('sensor.solarbit_data', 'miner12VState') }}
# 12V Auto Control
- platform: rest
resource: http://solarbit-wifi.local/miner12VAuto
name: solarbit_12v_auto
body_on: 'state=on'
body_off: 'state=off'
is_on_template: >
{{ state_attr('sensor.solarbit_data', 'miner12VAutoControl') }}
# Buttons
button:
- platform: rest
resource: http://solarbit-wifi.local/stop
name: solarbit_emergency_stop
- platform: rest
resource: http://solarbit-wifi.local/restart
name: solarbit_restart
# REST Commands
rest_command:
solarbit_set_miner_config:
url: http://solarbit-wifi.local/saveMinerConfig
method: POST
content_type: 'application/json'
payload: >
{
"miner12V": {
"onVoltage": {{ on_voltage }},
"onWatts": {{ on_watts }},
"onDuration": {{ on_duration }},
"offVoltage": {{ off_voltage }},
"offWatts": {{ off_watts }},
"offDuration": {{ off_duration }}
}
}
# Automations
automation:
- alias: "SolarBit - Stop tracking at night"
trigger:
- platform: sun
event: sunset
action:
- service: switch.turn_off
target:
entity_id: switch.solarbit_auto_tracking
- alias: "SolarBit - Resume tracking at dawn"
trigger:
- platform: sun
event: sunrise
action:
- service: switch.turn_on
target:
entity_id: switch.solarbit_auto_tracking
- alias: "SolarBit - Low battery alert"
trigger:
- platform: numeric_state
entity_id: sensor.solarbit_battery_voltage
below: 12.0
action:
- service: notify.mobile_app
data:
message: "SolarBit battery voltage low: {{ states('sensor.solarbit_battery_voltage') }}V"type: vertical-stack
cards:
- type: entities
title: SolarBit Status
entities:
- entity: sensor.solarbit_state
- entity: sensor.solarbit_battery_voltage
- entity: sensor.solarbit_solar_power
- entity: sensor.solarbit_temperature
- entity: switch.solarbit_auto_tracking
- entity: switch.solarbit_12v_miner
- entity: switch.solarbit_12v_auto
- type: button
name: Emergency Stop
tap_action:
action: call-service
service: button.press
target:
entity_id: button.solarbit_emergency_stop
hold_action:
action: none
- type: gauge
entity: sensor.solarbit_battery_voltage
min: 11
max: 15
severity:
green: 13
yellow: 12
red: 11curl http://solarbit-wifi.local/datacurl http://solarbit-wifi.local/autocurl http://solarbit-wifi.local/miner12V?state=oncurl -X POST http://solarbit-wifi.local/saveMinerConfig \
-H "Content-Type: application/json" \
-d '{
"miner12V": {
"onVoltage": 13.8,
"onWatts": 20.0,
"onDuration": 15,
"offVoltage": 12.5,
"offWatts": 12.0,
"offDuration": 20
}
}'curl "http://solarbit-wifi.local/fan?mode=manual&speed=128"curl http://solarbit-wifi.local/restart| Code | Meaning | Description |
|---|---|---|
| 200 | OK | Request successful |
| 400 | Bad Request | Invalid parameters or mode restriction |
| 404 | Not Found | Endpoint doesn't exist |
| 500 | Internal Server Error | Firmware error occurred |
- Verify SolarBit is powered on and WiFi/Ethernet is connected
- Check IP address: visit http://192.168.4.1 if in AP mode
- Ping the device:
ping solarbit-wifi.local - Check firewall settings on client device
- Ensure sensors are connected and reading values
- Check debug log:
curl http://solarbit-wifi.local/debugData - Verify firmware version: V1.6 required for new miner config endpoints
- Verify system is in MANUAL mode first:
curl http://solarbit-wifi.local/manual - Check limit switches aren't triggered
- Ensure motors are not disabled
- Verify auto control is enabled:
/miner12VAuto?state=on - Check configuration values:
curl http://solarbit-wifi.local/getMinerConfig - Monitor debug logs for automation events
- Verify battery voltage and solar wattage meet thresholds
- All GET endpoints can be called without parameters for default behavior
- POST endpoints require proper Content-Type headers
- Endpoints are case-sensitive
- Boolean values in JSON are lowercase:
true/false - Ethernet and WiFi interfaces provide identical API functionality
- No rate limiting implemented - be considerate with polling intervals
Planned for future releases:
- WebSocket support for real-time updates
- Authentication/API keys
- MQTT integration
- Historical data endpoints
- Battery charge/discharge curves
- Detailed motor position tracking
For API questions and integration help:
- GitHub Issues: [Repository URL]
- Community Forum: [Forum URL]
- Project Support: https://geyser.fund/project/solarbit
Happy Integrating! ๐ โกโ๏ธ