Files
pig-house-controller/config.json.example
2025-09-07 15:46:10 +08:00

73 lines
1.8 KiB
JSON

{
"lora": {
"address": "0x1234",
"frequency": 433,
"bandwidth": 125,
"spreading_factor": 7,
"coding_rate": 5,
"encryption_key": "your_encryption_key_here"
},
"master": {
"lora_address": "0xABCD",
"protocol": "modbus"
},
"bus": {
"sensor": {
"port": "/dev/ttyUSB0",
"baudrate": 9600,
"devices": []
},
"actuator": {
"port": "/dev/ttyUSB1",
"baudrate": 9600,
"devices": []
}
},
"log": {
"level": "INFO",
"file_path": "logs/pig_house.log",
"max_size": "1MB",
"backup_count": 1,
"report_errors": true,
"terminate_on_report_failure": true
},
"system": {
"heartbeat_interval": 60,
"data_collection_interval": 30,
"command_timeout": 10,
"retry_count": 3,
"error_handling": "retry"
},
"devices": [
{
"id": "temp_01",
"type": "temperature",
"address": "0x01",
"bus": "sensor",
"unit": "celsius",
"location": "main_hall"
},
{
"id": "humidity_01",
"type": "humidity",
"address": "0x02",
"bus": "sensor",
"unit": "%",
"location": "main_hall"
},
{
"id": "feed_01",
"type": "feed_port",
"address": "0x10",
"bus": "actuator",
"location": "feeding_area_1"
},
{
"id": "water_01",
"type": "water_valve",
"address": "0x11",
"bus": "actuator",
"location": "watering_area_1"
}
]
}