x

PiSugar

Make sure USB cable is connect to bottom left charging port.

Info

  • Name: Pisugar 3 Plus
  • i2c Addresses
    • 0x57 PowerIC i2cdump -y 1 0x57
    • 0x68 RTC
    • Shell Command: i2cdetect -y 1

CLI

  • Fetch battery charge percentage
echo "get battery" | nc -q 0 127.0.0.1 8423

Web UI: http://192.168.1.25:8421/#/

  • Turn off Pi:
    • Action: (Double Tap/Long Tap) Power button
    • Note: Sugar Pi in Sleep mode
  • Turn on Pi:
    • Remove and Return USB-C PS-Power
    • Current Schedule Wake up Config = On Power Restore
  • Status LED:
    • Solid Blue: On Battery
    • Incrementing Green: Charging (PS-Power Present)

Amazon
Install
TCP commands
PiSugar Power Manager
Web UI: http://192.168.1.25:8421/#/

Note

You can use SPI, I2C, and serial UART all at the same time. There is no conflict. The Pi only has one usable UART. The simplest way to add additional serial links is to use a USB serial dongle. However UART0 and UART1 can not be used at the same time.

Default ports:

uds     /tmp/pisugar-server.sock
tcp     0.0.0.0:8423
ws      0.0.0.0:8422    # standalone websocket api
http    0.0.0.0:8421    # web UI and websocket (/ws)
nc -U /tmp/pisugar-server.sock
get battery
get model
rtc_alarm_set 2020-06-26T16:09:34+08:00 127
set_button_enable long 1
set_button_enable long sudo shutdown now
safe_shutdown_level 3
safe_shutdown_delay 30
<ctrl+c to break>

Or

nc -q 0 192.168.1.23
get battery

Or

echo "get battery" | nc -q 0 127.0.0.1 8423

WebUI

Local WebUI access

Remote WebUI access via Local Port Forwarding
0. ssh -L <local-port>:<remote-server> -f user@<
1. In a terminal enter

 ssh -L 8080:192.168.1.22:8421 proxy8.remoteiot.com
  1. Via web browser visit http://localhost:8080/index.html

power_system_requirements_specifications

Left-click: follow link, Right-click: select node, Scroll: zoom
x