LogoLogo
  • Project PANOPTES
  • Overview
    • 🤷‍♀️FAQ
    • 🤖PANOPTES Units
    • ☎️Contact
  • Building Docs
    • 🔭Start Building!
      • Building Overview
      • Safety Guide
      • Parts Listing
    • 🛠️Hardware
      • Control Box
        • Electronics
        • Hardware and Assembly
        • Network Setup
        • Power Distribution
      • Camera Box
        • Camera Setup
        • Electronics
        • Hardware and Assembly
        • 4 Camera Design
      • Mount and Pier
        • Pier
          • Fabrication
          • Assembly
        • Mount
          • Assembly
          • Saddle Plate Rotation
          • Balancing
      • Weather Station
    • 👩‍💻Software
      • Installation
        • Installing OS
        • Installing POCS
        • Installing PowerBoard
      • Configuration
      • POCS Command Line
        • Mount
        • Config Server
        • PowerBoard
        • Weather Station
      • Appendix
        • SSH Access
        • Command Line & The Shell
        • tmux / byobu
        • Services
    • 📋Testing
    • 👷‍♀️Deployment
      • Site Planning
      • Camera Focus
      • Polar Alignment
        • Overview
        • Drift Method
        • Procedure
          • Find Misalignment
          • Fix Misalignment
    • 🪐Operation
      • Automatic Operation
      • Manual Operation
  • Science
    • 📊Data
Powered by GitBook
LogoLogo

Links

  • Forum
  • GitHub
  • Contact

Site

  • Getting Started
  • Teams
  • Data

2023 Project PANOPTES

On this page
  • Overview
  • Commands
  • status
  • off/on
  • control
  • readings
  • restart
  • Configuration
  1. Building Docs
  2. Software
  3. POCS Command Line

PowerBoard

Interact with the PowerBoard

Overview

You can control and monitor the Power Board from the command line using the pocs power command.

For example:

# Display the status for each power channel (relay)
pocs power status

# Turn off the fans.
pocs power off fans

# Turn on fans by relay index.
pocs power on RELAY_2

# See the current readings for all power channels.
pocs power readings

Commands

status

Get the status of the relays.

(conda-pocs)  panoptes@panoptes  pocs power status
[RELAY_0] weather_station..... ON
[RELAY_1] unused1............. OFF
[RELAY_2] fans................ ON
[RELAY_3] unused3............. ON
[RELAY_4] mount............... ON
(conda-pocs)  panoptes@panoptes  

off/on

Turn on or off the relay.

(conda-pocs)  panoptes@panoptes  pocs power off fans
{'relay': 'fans', 'command': 'turn_off'}

(conda-pocs)  panoptes@panoptes  pocs power status
[RELAY_0] weather_station..... ON
[RELAY_1] unused1............. OFF
[RELAY_2] fans................ OFF
[RELAY_3] unused3............. ON
[RELAY_4] mount............... ON

(conda-pocs)  panoptes@panoptes   pocs power on fans
{'relay': 'fans', 'command': 'turn_on'}

(conda-pocs)  panoptes@panoptes  pocs power status
[RELAY_0] weather_station..... ON
[RELAY_1] unused1............. OFF
[RELAY_2] fans................ ON
[RELAY_3] unused3............. ON
[RELAY_4] mount............... ON

control

A different way to control the relays.

(conda-pocs)  panoptes@panoptes  pocs power control --relay fans --command turn_off
{'relay': 'fans', 'command': 'turn_off'}

readings

Shows a simple bar plot of the most recent power usage statistics for each relay. Probably not actually useful.

(conda-pocs)  panoptes@panoptes  pocs power readings
ac_ok............... ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ [1]
weather_station..... ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ [0]
unused1............. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ [0]
fans................ ▆▅▆▅▄▆▅▄▅▆▆▄▇▆▄▆█▅▄▅▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ [2]
unused3............. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ [0]
mount............... ▄▂▄▄▄▄▂▁▄▄▂▂▄▄█▅▂▂▂▂▂▂▄▂▄▄▄▂▂▂▂▂▂▅▇▄▄▂▂▂▂▄▂▂▂▂▂▂▄▂ [22]

restart

Restart the power (supervisorctrl) service. Use if getting errors with the other commands.

(conda-pocs)  panoptes@panoptes  pocs power restart

Configuration

The configuration for the power board is stored under the environment.power key:

(conda-pocs)  panoptes@panoptes  pocs config get environment.power
{
    'arduino_board_name': 'power_board',
    'mean_interval': 5,
    'name': 'Trucker Power',
    'port': '/dev/ttyACM0',
    'record_interval': 60,
    'relays': {
        'RELAY_0': {'default_state': 'on', 'label': 'weather_station'},
        'RELAY_1': {'default_state': 'off', 'label': 'unused1'},
        'RELAY_2': {'default_state': 'on', 'label': 'fans'},
        'RELAY_3': {'default_state': 'off', 'label': 'unused3'},
        'RELAY_4': {'default_state': 'on', 'label': 'mount'}
    }
}
PreviousConfig ServerNextWeather Station

Last updated 1 year ago

👩‍💻