|
2 | 2 | """
|
3 | 3 | Example configuration file for radar distance monitoring.
|
4 | 4 | Copy this file to config.py and modify the values for your setup.
|
| 5 | +
|
| 6 | +Two configuration formats are supported: |
| 7 | +
|
| 8 | +1. New HOSTS format (recommended) - supports any number of hosts: |
| 9 | + Use the HOSTS list below for flexible configuration. |
| 10 | +
|
| 11 | +2. Legacy format (backward compatible) - supports exactly 1 or 2 hosts: |
| 12 | + Use HOST1_CONFIG and HOST2_CONFIG (commented out below). |
| 13 | +
|
| 14 | +Choose ONE format - do not use both at the same time. |
5 | 15 | """
|
6 | 16 |
|
7 |
| -# SSH connection settings for Host 1 |
8 |
| -HOST1_CONFIG = { |
9 |
| - 'host': '192.168.0.58', # IP address or hostname |
10 |
| - 'username': 'fio', # SSH username |
11 |
| - 'password': 'fio', # SSH password (consider using SSH keys instead) |
12 |
| - 'command': 'sudo RADAR_DEBUG=1 seamless_dev_spi spi.mode="presence"', # Command to run on the host |
13 |
| - 'tag': 'Sentai', # Display name for this host on the chart |
14 |
| -} |
| 17 | +# ============================================================================ |
| 18 | +# NEW FORMAT (Recommended): HOSTS list - supports 1 to many hosts |
| 19 | +# ============================================================================ |
15 | 20 |
|
16 |
| -# SSH connection settings for Host 2 |
17 |
| -HOST2_CONFIG = { |
18 |
| - 'host': '192.168.0.96', # IP address or hostname |
19 |
| - 'username': 'rpi', # SSH username |
20 |
| - 'password': 'infineon', # SSH password (consider using SSH keys instead) |
21 |
| - 'command': 'sudo RADAR_DEBUG=1 RADAR_SPI_SPEED=12000000 ./seamless_dev_spi spi.mode="presence"', # Command to run on the host |
22 |
| - 'tag': 'Raspberry Pi', # Display name for this host on the chart |
23 |
| -} |
| 21 | +HOSTS = [ |
| 22 | + { |
| 23 | + 'host': '192.168.0.58', # IP address or hostname |
| 24 | + 'username': 'fio', # SSH username |
| 25 | + 'password': 'fio', # SSH password (consider using SSH keys instead) |
| 26 | + 'command': 'sudo RADAR_DEBUG=1 seamless_dev_spi spi.mode="presence"', # Command to run on the host |
| 27 | + 'tag': 'Sentai', # Display name for this host on the chart |
| 28 | + }, |
| 29 | + { |
| 30 | + 'host': '192.168.0.96', # IP address or hostname |
| 31 | + 'username': 'rpi', # SSH username |
| 32 | + 'password': 'infineon', # SSH password (consider using SSH keys instead) |
| 33 | + 'command': 'sudo RADAR_DEBUG=1 RADAR_SPI_SPEED=12000000 ./seamless_dev_spi spi.mode="presence"', # Command to run on the host |
| 34 | + 'tag': 'Raspberry Pi', # Display name for this host on the chart |
| 35 | + }, |
| 36 | + # Add more hosts as needed: |
| 37 | + # { |
| 38 | + # 'host': '192.168.0.100', |
| 39 | + # 'username': 'sensor', |
| 40 | + # 'password': 'password123', |
| 41 | + # 'command': 'sensor_command', |
| 42 | + # 'tag': 'Sensor 3', |
| 43 | + # }, |
| 44 | +] |
| 45 | + |
| 46 | +# ============================================================================ |
| 47 | +# LEGACY FORMAT (Backward Compatible): Individual host configs |
| 48 | +# ============================================================================ |
| 49 | +# Comment out the HOSTS list above and uncomment the configs below to use legacy format |
| 50 | + |
| 51 | +# # SSH connection settings for Host 1 |
| 52 | +# HOST1_CONFIG = { |
| 53 | +# 'host': '192.168.0.58', # IP address or hostname |
| 54 | +# 'username': 'fio', # SSH username |
| 55 | +# 'password': 'fio', # SSH password (consider using SSH keys instead) |
| 56 | +# 'command': 'sudo RADAR_DEBUG=1 seamless_dev_spi spi.mode="presence"', # Command to run on the host |
| 57 | +# 'tag': 'Sentai', # Display name for this host on the chart |
| 58 | +# } |
| 59 | + |
| 60 | +# # SSH connection settings for Host 2 (optional - can be omitted for single host) |
| 61 | +# HOST2_CONFIG = { |
| 62 | +# 'host': '192.168.0.96', # IP address or hostname |
| 63 | +# 'username': 'rpi', # SSH username |
| 64 | +# 'password': 'infineon', # SSH password (consider using SSH keys instead) |
| 65 | +# 'command': 'sudo RADAR_DEBUG=1 RADAR_SPI_SPEED=12000000 ./seamless_dev_spi spi.mode="presence"', # Command to run on the host |
| 66 | +# 'tag': 'Raspberry Pi', # Display name for this host on the chart |
| 67 | +# } |
24 | 68 |
|
25 | 69 | # Graph settings
|
26 | 70 | GRAPH_CONFIG = {
|
|
0 commit comments