-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
93 lines (83 loc) · 2.36 KB
/
config.example.yaml
File metadata and controls
93 lines (83 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Timberborn Automation Controller Configuration
# Operation mode:
# "webhook" - Event-driven via HTTP webhooks (recommended)
# "polling" - Traditional polling of adapter API
# "hybrid" - Webhook primary + periodic polling sync
mode: "webhook"
# Webhook server port (used in webhook/hybrid mode)
webhook_port: 8081
# Game API endpoint
# Docker: Use host.docker.internal to reach the host's localhost (works on Docker Desktop)
# Linux: Uncomment extra_hosts in docker-compose.yml or use host IP directly
# Non-Docker: Use http://localhost:8080
game_api_url: http://host.docker.internal:8080
# Polling interval in seconds (used in polling/hybrid mode)
polling_interval_seconds: 5
# Automation rules
# Each rule has:
# - name: descriptive name for logging
# - conditions: adapter checks with AND/OR operator
# - actions: levers to trigger when conditions match
rules:
- name: "Drought Water Emergency"
conditions:
operator: AND
checks:
- adapter: "Weather Drought"
state: true
- adapter: "Water Depth Critical"
state: true
actions:
- lever: "Pump Station"
action: "on"
- lever: "Main Floodgate"
action: "off"
- name: "Low Log Supply"
conditions:
# OR is default if operator not specified
checks:
- adapter: "Log Storage Low"
state: true
actions:
- lever: "Forester Priority"
action: "on"
- name: "Gear Production Needed"
conditions:
checks:
- adapter: "Gear Count Low"
state: true
actions:
- lever: "Gear Factory"
action: "on"
- name: "Water Crisis Resolved"
conditions:
operator: AND
checks:
- adapter: "Weather Drought"
state: false
- adapter: "Water Depth Critical"
state: false
actions:
- lever: "Pump Station"
action: "off"
- lever: "Main Floodgate"
action: "on"
- name: "Night Power Save"
conditions:
operator: AND
checks:
- adapter: "Time Night"
state: true
- adapter: "Power Surplus"
state: true
actions:
- lever: "Non-Essential Buildings"
action: "off"
- name: "Day Power Restore"
conditions:
checks:
- adapter: "Time Day"
state: true
actions:
- lever: "Non-Essential Buildings"
action: "on"