Skip to content

Commit a360994

Browse files
committed
split out install and usage
more doc improvements
1 parent eb8cf93 commit a360994

4 files changed

Lines changed: 300 additions & 239 deletions

File tree

README.md

Lines changed: 3 additions & 227 deletions
Original file line numberDiff line numberDiff line change
@@ -12,241 +12,17 @@ It can also pull code from a web server, so you can run Adafruit example code di
1212

1313
It supports a search path for code locations, so you can define your own or use other people's libraries, and fall back to the ones bundled with circremote.
1414

15-
One thing it currently does not do is support Microsoft Windows. I do not have a Windows machine and have no way to test it with Windows. I understand that a lot of people use Windows and that the lack of support means that a lot of people who might benefit from circremote won't be able to use it. While I'm happy to spend some time and resources on continuing to develop circremote and support users, I don't have the time, energy or desire to bring up a new platform and get it working on it. If a motivated co-maintainer comes along who'd like to get circremote working properly with Windows and then support it, I'd be happy to bring someone like that onto the project.
15+
circremote does not support Microsoft Windows. I do not have a Windows machine and have no way to test it with Windows. I understand that a lot of people use Windows and that the lack of support means that a lot of people who might benefit from circremote won't be able to use it. While I'm happy to spend some time and resources on continuing to develop circremote and support users, I don't have the time, energy or desire to bring up a new platform and get it working on it. If a motivated co-maintainer comes along who'd like to get circremote working properly with Windows and then support it, I'd be happy to bring someone like that onto the project.
1616

1717
From here, see how to install circremote and then please check out the [FAQ](doc/FAQ.md) to see how to use it.
1818

1919
- [About circremote](doc/about.md)
20+
- [Install](doc/install.md)
21+
- [Usage](doc/usage.md)
2022
- [Commands](doc/commands.md)
2123
- [Configuration](doc/configuration.md)
2224
- [Contributing](doc/contributing.md)
2325

24-
## Installation
25-
26-
### ~~From PyPI~~
27-
28-
(Not yet listed on PyPl so try "From Github" instead)
29-
30-
```bash
31-
pip install circremote
32-
```
33-
34-
### From Github
35-
```
36-
pip install git+https://github.com/romkey/circremote
37-
```
38-
39-
### From Source
40-
41-
```bash
42-
git clone https://github.com/romkey/circremote
43-
cd circremote-python
44-
pip install -e .
45-
```
46-
47-
### Using Docker
48-
49-
**Note: running circup is not currently working correctly in the Docker image**
50-
51-
```bash
52-
# Build the Docker image (includes circup for dependency management)
53-
docker build -f docker/Dockerfile -t circremote:latest .
54-
55-
# Run circremote in a container with a serial port
56-
CIRCREMOTE_SERIAL=/dev/ttyUSB0 docker-compose -f docker/docker-compose.yml run circremote-serial /dev/ttyUSB0 BME280
57-
58-
# Run circremote in a container with a networked device
59-
docker-compose -f docker/docker-compose.yml run circremote 192.168.1.100 -p PASSWORD BME280
60-
61-
# Test circup installation
62-
docker run --rm circremote:latest circup --version
63-
64-
# For more Docker options, see [docker/README.md](docker/README.md)
65-
```
66-
67-
## Usage
68-
69-
### Basic Usage
70-
71-
```bash
72-
circremote [options] <serial_port or ip:port> <command_name> [command line options]
73-
```
74-
75-
### Show Version
76-
```bash
77-
circremote --version
78-
# or
79-
circremote -V
80-
```
81-
82-
### Examples
83-
84-
#### Serial Connection
85-
```bash
86-
# Run BME280 sensor code on serial port
87-
circremote /dev/ttyUSB0 BME280
88-
89-
# Run with verbose output
90-
circremote -v /dev/ttyACM0 VL53L1X
91-
92-
# Run with double exit (additional Ctrl+D)
93-
circremote -d /dev/ttyUSB0 system-info
94-
```
95-
96-
#### WebSocket Connection (CircuitPython Web Workflow)
97-
```bash
98-
# Connect to CircuitPython device via IP
99-
circremote 192.168.1.100 SHT30
100-
101-
# Connect with custom port
102-
circremote 192.168.1.100:8080 show-settings
103-
104-
# Connect with HTTP basic auth password
105-
circremote -p mypassword 192.168.1.100 scan-i2c
106-
107-
# Combine options
108-
circremote -v -d -p mypassword 192.168.1.100:8080 BME680
109-
110-
# Skip dependency installation
111-
circremote -c /dev/ttyUSB0 BME280
112-
113-
# Specify custom circup path
114-
circremote -u /usr/local/bin/circup /dev/ttyUSB0 BME280
115-
```
116-
## Options
117-
118-
- `-v, --verbose`: Enable verbose debug output
119-
- `-p, --password PASSWORD`: HTTP basic auth password for WebSocket connections
120-
- `-d, --double-exit`: Send additional Ctrl+D after Ctrl+B to exit raw REPL
121-
- `-y, --yes`: Skip confirmation prompts (run untested commands without asking)
122-
- `-c, --skip-circup`: Skip circup dependency installation
123-
- `-u, --circup PATH`: Path to circup executable
124-
- `-C, --config PATH`: Path to circremote.json config file
125-
- `-l, --list`: List all available commands from all sources
126-
- `-h, --help`: Show help message
127-
- `-h COMMAND`: Show help for a specific command
128-
- `-V, --version`: Show version and exit
129-
130-
## Features
131-
132-
### Automatic Dependency Management
133-
When a command has a `requirements.txt` file, circremote can automatically install CircuitPython libraries using `circup`:
134-
135-
- Detects if `circup` is available
136-
- Prompts user to install dependencies
137-
- Supports both serial and WebSocket connections for dependency installation
138-
- Provides options to run, skip, or exit
139-
140-
### Safety Warnings
141-
Commands can include safety warnings for potentially problematic code:
142-
143-
- Warns about modules that may make devices unreachable
144-
- Explains potential risks (deep sleep, network disconnection, etc.)
145-
- Requires user confirmation before proceeding
146-
147-
### Untested Module Warnings
148-
Commands can be marked as untested:
149-
150-
- Warns about modules that haven't been tested
151-
- Explains potential issues (wrong pins, addresses, etc.)
152-
- Requires user confirmation unless `-y` flag is used
153-
154-
### Connection Types
155-
156-
circremote needs a way to communicate with the CircuitPython device that's going to run the code.
157-
158-
#### Serial Connection
159-
- Supports standard serial ports (USB, UART)
160-
- Configurable baud rate (default: 115200)
161-
- Cross-platform support
162-
163-
#### WebSocket Connection
164-
- Supports CircuitPython Web Workflow
165-
- HTTP basic authentication
166-
- Automatic protocol detection (ws/wss)
167-
- Configurable host and port
168-
169-
### Custom Commands
170-
You can create your own commands in several ways:
171-
172-
#### Python File Directly
173-
Create a Python file and run it directly:
174-
```bash
175-
circremote /dev/ttyUSB0 ./my_sensor.py
176-
```
177-
Running directly will not allow you to use variables, define a command line or have libraries automatically installed.
178-
179-
#### Command Directory Structure
180-
Create a directory with the required files:
181-
```
182-
my_command/
183-
├── code.py # Required: Your Python code
184-
├── info.json # Optional: Command metadata and variables
185-
└── requirements.txt # Optional: Dependencies
186-
```
187-
188-
Then run it:
189-
```bash
190-
circremote /dev/ttyUSB0 ./my_command
191-
```
192-
193-
#### Using Search Paths
194-
Add custom command directories to your config (see Configuration section above).
195-
196-
### Web Commands
197-
Run commands directly from URLs:
198-
```bash
199-
# GitHub URLs (automatically converted to raw content)
200-
circremote /dev/ttyUSB0 https://github.com/user/repo/blob/main/sensor.py
201-
202-
# Direct URLs
203-
circremote /dev/ttyUSB0 https://example.com/sensor.py
204-
```
205-
206-
### Error Handling
207-
- Comprehensive error reporting
208-
- Graceful handling of connection failures
209-
- Detailed debug output with verbose mode
210-
- Automatic cleanup of connections
211-
212-
## Getting Help
213-
214-
### General Help
215-
```bash
216-
circremote --help
217-
```
218-
219-
### List All Commands
220-
```bash
221-
circremote -l
222-
```
223-
224-
This shows all available commands from:
225-
- Built-in commands
226-
- Search path commands
227-
- User commands directory
228-
- Command aliases (if configured)
229-
230-
### Command-Specific Help
231-
```bash
232-
# Show detailed help for any command
233-
circremote -h BME280
234-
circremote -h clean
235-
circremote -h ./my_custom_command
236-
237-
# Shows:
238-
# - Command description and location
239-
# - Command line format
240-
# - All arguments (required/optional)
241-
# - Default values
242-
# - Usage examples
243-
```
244-
245-
### Debug Information
246-
```bash
247-
circremote -v /dev/ttyUSB0 BME280
248-
```
249-
25026
## Development
25127

25228
### Installing Locally

doc/commands.md

Lines changed: 73 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,108 @@
33
The tool comes with a collection of pre-built sensor and utility commands:
44

55
### Temperature & Humidity Sensors
6+
- `ADT7410` - High-accuracy digital temperature sensor with ±0.5°C accuracy
67
- `AHT20` - Temperature and humidity sensor
78
- `BME280` - Temperature, humidity, and pressure sensor
89
- `BME680` - Temperature, humidity, pressure, and gas sensor
10+
- `DS18B20` - Digital temperature sensor using OneWire protocol
911
- `HDC3022` - High-accuracy temperature and humidity sensor
12+
- `HTU31` - Digital temperature and humidity sensor with ±0.2°C accuracy
13+
- `SHT20` - Digital temperature and humidity sensor
1014
- `SHT30` - High-accuracy temperature and humidity sensor
1115
- `SHT31D` - Digital temperature and humidity sensor
16+
- `SHT41` - High-precision digital temperature and humidity sensor
17+
- `SHT45` - High-precision digital temperature and humidity sensor
18+
- `SHTC3` - Digital temperature and humidity sensor with 16-bit resolution
19+
- `Si7021` - Digital temperature and humidity sensor
20+
- `TMP117` - High-accuracy digital temperature sensor
1221

1322
### Light Sensors
23+
- `APDS9960` - Digital proximity, ambient light, RGB color, and gesture sensor
24+
- `AS7341` - Multi-spectral color sensor
1425
- `BH1750` - Digital light sensor
26+
- `LTR-303` - Digital light sensor
27+
- `LTR-329` - Digital light sensor
1528
- `LTR390` - UV light sensor
29+
- `TCRT1000` - Reflective optical sensor
1630
- `TSL2591` - High-dynamic-range digital light sensor
1731
- `VEML7700` - High-accuracy ambient light sensor
1832

1933
### Motion & Position Sensors
34+
- `ADXL335` - 3-axis analog accelerometer
35+
- `ADXL343` - 3-axis accelerometer with high-resolution measurements
36+
- `ADXL345` - 3-axis accelerometer with high resolution (13-bit)
37+
- `ADXL375` - High-g accelerometer for impact detection (±200g)
38+
- `LIS2MDL` - 3-axis magnetometer for compass applications
2039
- `LIS3DH` - 3-axis accelerometer
2140
- `LIS3MDL` - 3-axis magnetometer
41+
- `LSGD20H` - 3-axis gyroscope
42+
- `LSM63SDTR-C` - 6-axis IMU (accelerometer + gyroscope)
43+
- `LSM6DSO32` - 6-axis IMU with machine learning core
2244
- `LSM6DSOX` - 6-axis IMU (accelerometer + gyroscope)
2345
- `MPU6050` - 6-axis motion tracking sensor
46+
- `MSA311` - 3-axis accelerometer with motion detection
2447
- `VL53L0X` - Time-of-flight distance sensor
2548
- `VL53L1X` - Long-range time-of-flight sensor
49+
- `VL53L4CX` - Advanced time-of-flight distance sensor
50+
- `VL6180X` - Time-of-flight distance sensor with ambient light sensing
51+
52+
### Pressure & Altitude Sensors
53+
- `BMP280` - Digital barometric pressure sensor
54+
- `BMP388` - High-precision barometric pressure sensor
55+
- `BMP390` - High-precision barometric pressure sensor for altitude measurement
56+
- `DPS310` - Digital barometric pressure sensor
57+
- `LPS22` - Digital barometric pressure sensor
58+
- `LPS28DFW` - Digital barometric pressure sensor with FIFO buffer
59+
- `MPL3115A2` - Digital barometric pressure sensor
60+
- `MS6807` - Digital barometric pressure sensor
2661

2762
### Air Quality Sensors
63+
- `CCS811` - Digital gas sensor for VOCs and eCO2
64+
- `ENS160` - Digital gas sensor for VOCs, eCO2, and TVOC
2865
- `PMS5003` - Particulate matter sensor
2966
- `PMSA003I` - I2C particulate matter sensor
67+
- `SCD30` - CO2, temperature, and humidity sensor
3068
- `SCD40` - CO2, temperature, and humidity sensor
31-
- `SGP30` - Air quality sensor
69+
- `SEN54` - Multi-gas environmental sensor (temperature, humidity, VOC, NOx)
70+
- `SEN55` - Comprehensive environmental sensor (temperature, humidity, VOC, NOx, PM)
71+
- `SEN66` - Environmental sensor
72+
- `SGP30` - Air quality sensor for eCO2 and TVOC
3273
- `SGP40` - VOC air quality sensor
3374

75+
### Magnetic Field Sensors
76+
- `DRV5032` - Digital hall effect sensor for magnetic field detection
77+
- `LIS2MDL` - 3-axis magnetometer
78+
- `LIS3MDL` - 3-axis magnetometer
79+
- `MMC5603` - 3-axis magnetometer with high resolution
80+
- `MLX90393` - 3-axis magnetometer
81+
- `TLV493D` - 3-axis magnetometer
82+
83+
### Thermal Imaging
84+
- `AMG8833` - 8x8 thermal camera sensor for infrared temperature measurements
85+
- `MLX90640` - Thermal imaging sensor
86+
87+
### Time & Real-Time Clock
88+
- `DS3231` - High-accuracy real-time clock
89+
- `PCF8523` - Real-time clock
90+
3491
### Utility Commands
35-
- `blink` - blinks a simple LED
36-
- `cat` - cat a file
37-
- `clean` - clean unwanted files like ._file_, file~ and others from the device
38-
- `hello` - Hello world
39-
- `neopixel-blink` - blinks a NeoPixel LED
40-
- `neopixel-rainbow` - cycles through rainbow colors on a NeoPixel LED
41-
- `ntp` - get the time from an NTP server
42-
- `ping` - ping (ICMP Echo Request) another device
43-
- `reset` - restart the device (`microcontroller.reset()`)
44-
- `run` - reads a file on the device and executes it
92+
- `blink` - Blinks a simple LED
93+
- `cat` - Display contents of a file
94+
- `clean` - Clean unwanted files like ._file_, file~ and others from the device
95+
- `hello` - Hello world
96+
- `neopixel-blink` - Blinks a NeoPixel LED
97+
- `neopixel-rainbow` - Cycles through rainbow colors on a NeoPixel LED
98+
- `ntp` - Get the time from an NTP server
99+
- `ping` - Ping (ICMP Echo Request) another device
100+
- `relay-serial` - Control a relay via serial communication
101+
- `reset` - Restart the device (`microcontroller.reset()`)
102+
- `run` - Reads a file on the device and executes it
45103
- `scan-i2c` - Scan for I2C devices
46104
- `scan-wifi` - Scan for WiFi networks
47105
- `settings` - Display contents of `settings.toml` (same as `cat settings.toml`)
48106
- `system-info` - Display system information
49-
- `uf2` - restart compatible devices in UF2 bootloader mode (this will take the device offline if it's on wifi)
107+
- `uf2` - Restart compatible devices in UF2 bootloader mode (this will take the device offline if it's on wifi)
108+
109+
### OneWire Interface
110+
- `DS2484` - 1-Wire master controller for I2C to 1-Wire bridge functionality

0 commit comments

Comments
 (0)