boneIO 1.0.0.dev1__py3-none-any.whl → 1.0.0.dev3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- boneio/boards/{0.3_test → 0.4}/input.yaml +0 -1
- boneio/boards/0.4/output_24_16.yaml +103 -0
- boneio/boards/{0.3_test/output_24_16.yaml → 0.4/output_32_5.yaml} +38 -36
- boneio/core/config/config_helper.py +6 -0
- boneio/core/config/yaml_util.py +7 -2
- boneio/core/manager/covers.py +25 -1
- boneio/core/utils/logger.py +3 -0
- boneio/example_config/24x16/adc.yaml +7 -7
- boneio/example_config/24x16/binary_sensor.yaml +2 -2
- boneio/example_config/24x16/event.yaml +47 -47
- boneio/example_config/24x16/output24x16A.yaml +24 -24
- boneio/example_config/32x10/adc.yaml +7 -7
- boneio/example_config/32x10/binary_sensor.yaml +2 -2
- boneio/example_config/32x10/event.yaml +47 -47
- boneio/example_config/32x10/output32x10A.yaml +32 -32
- boneio/example_config/cover/adc.yaml +7 -7
- boneio/example_config/cover/binary_sensor.yaml +2 -2
- boneio/example_config/cover/cover.yaml +16 -16
- boneio/example_config/cover/event.yaml +44 -44
- boneio/example_config/cover/outputCover.yaml +32 -32
- boneio/example_config/cover_mix/adc.yaml +7 -7
- boneio/example_config/cover_mix/binary_sensor.yaml +2 -2
- boneio/example_config/cover_mix/cover.yaml +8 -8
- boneio/example_config/cover_mix/event.yaml +44 -44
- boneio/example_config/cover_mix/outputCoverMix.yaml +32 -32
- boneio/example_config/different_configs/adc.yaml +7 -7
- boneio/example_config/different_configs/all_binary_sensor.yaml +2 -2
- boneio/example_config/different_configs/binary_sensor.yaml +6 -6
- boneio/example_config/different_configs/binary_sensor_v_0_7.yaml +1 -1
- boneio/example_config/different_configs/event_all.yaml +46 -46
- boneio/example_config/different_configs/event_v_0_7.yaml +48 -48
- boneio/example_config/different_configs/led32x4A.yaml +32 -32
- boneio/example_config/different_configs/output24x16A.yaml +24 -24
- boneio/example_config/different_configs/output24x16A_v0.3.yaml +24 -24
- boneio/example_config/different_configs/output32x10A.yaml +32 -32
- boneio/example_config/different_configs/output32x5A.yaml +32 -32
- boneio/integration/homeassistant.py +3 -2
- boneio/runner.py +1 -0
- boneio/schema/schema.yaml +2 -2
- boneio/version.py +1 -1
- boneio/webui/app.py +64 -32
- boneio/webui/frontend-dist/assets/{cssMode-CkjpAAex.js → cssMode-BSvYPcIN.js} +1 -1
- boneio/webui/frontend-dist/assets/{freemarker2-Av-3FReO.js → freemarker2-C__0W91N.js} +1 -1
- boneio/webui/frontend-dist/assets/{handlebars-qezla3CJ.js → handlebars-22h5tWBv.js} +1 -1
- boneio/webui/frontend-dist/assets/{html-Cs9u56jf.js → html-DT1yHO-V.js} +1 -1
- boneio/webui/frontend-dist/assets/{htmlMode-lxjICnmv.js → htmlMode-DbtxAYPb.js} +1 -1
- boneio/webui/frontend-dist/assets/{index-D7KG9SNl.js → index-C9lGk449.js} +234 -234
- boneio/webui/frontend-dist/assets/index-DLpL94_J.css +1 -0
- boneio/webui/frontend-dist/assets/{javascript-C1Zru0lg.js → javascript-DeJhuRTQ.js} +1 -1
- boneio/webui/frontend-dist/assets/{jsonMode-0Klvb2wk.js → jsonMode-DiXZpOPb.js} +1 -1
- boneio/webui/frontend-dist/assets/{liquid-DYMwgNMn.js → liquid-B4SGbCZG.js} +1 -1
- boneio/webui/frontend-dist/assets/{mdx-CPZd3z06.js → mdx-D7svsLCe.js} +1 -1
- boneio/webui/frontend-dist/assets/{python-D0OGlI5x.js → python--gpd6WYa.js} +1 -1
- boneio/webui/frontend-dist/assets/{razor-DOQ5njH9.js → razor-C-cXqWaE.js} +1 -1
- boneio/webui/frontend-dist/assets/{tsMode-Bx5_UdUI.js → tsMode-Dku2pGm1.js} +1 -1
- boneio/webui/frontend-dist/assets/{typescript-3z3O4l_3.js → typescript-38mG84nz.js} +1 -1
- boneio/webui/frontend-dist/assets/{xml-DYIiTE3w.js → xml-BxM7bh-R.js} +1 -1
- boneio/webui/frontend-dist/assets/{yaml-Dzkg5K3f.js → yaml-DlY6J-Ge.js} +1 -1
- boneio/webui/frontend-dist/index.html +2 -2
- boneio/webui/frontend-dist/schem/adc.schema.json +6 -6
- boneio/webui/frontend-dist/schem/areas.schema.json +2 -2
- boneio/webui/frontend-dist/schem/binary_sensor.schema.json +14 -14
- boneio/webui/frontend-dist/schem/boneio.schema.json +12 -5
- boneio/webui/frontend-dist/schem/config.schema.json +142 -135
- boneio/webui/frontend-dist/schem/cover.schema.json +10 -10
- boneio/webui/frontend-dist/schem/ds2482.schema.json +2 -2
- boneio/webui/frontend-dist/schem/event.schema.json +18 -18
- boneio/webui/frontend-dist/schem/ina219.schema.json +8 -8
- boneio/webui/frontend-dist/schem/lm75.schema.json +6 -6
- boneio/webui/frontend-dist/schem/logger.schema.json +2 -2
- boneio/webui/frontend-dist/schem/mcp23017.schema.json +4 -4
- boneio/webui/frontend-dist/schem/mcp9808.schema.json +6 -6
- boneio/webui/frontend-dist/schem/modbus.schema.json +2 -2
- boneio/webui/frontend-dist/schem/modbus_devices.schema.json +14 -14
- boneio/webui/frontend-dist/schem/mqtt.schema.json +4 -4
- boneio/webui/frontend-dist/schem/oled.schema.json +6 -6
- boneio/webui/frontend-dist/schem/output.schema.json +6 -6
- boneio/webui/frontend-dist/schem/output_group.schema.json +2 -2
- boneio/webui/frontend-dist/schem/pca9685.schema.json +4 -4
- boneio/webui/frontend-dist/schem/pcf8575.schema.json +4 -4
- boneio/webui/frontend-dist/schem/sensor.schema.json +6 -6
- boneio/webui/frontend-dist/schem/web.schema.json +4 -4
- boneio/webui/schema/adc.schema.json +6 -6
- boneio/webui/schema/areas.schema.json +2 -2
- boneio/webui/schema/binary_sensor.schema.json +14 -14
- boneio/webui/schema/boneio.schema.json +12 -5
- boneio/webui/schema/config.schema.json +142 -135
- boneio/webui/schema/cover.schema.json +10 -10
- boneio/webui/schema/ds2482.schema.json +2 -2
- boneio/webui/schema/event.schema.json +18 -18
- boneio/webui/schema/ina219.schema.json +8 -8
- boneio/webui/schema/lm75.schema.json +6 -6
- boneio/webui/schema/logger.schema.json +2 -2
- boneio/webui/schema/mcp23017.schema.json +4 -4
- boneio/webui/schema/mcp9808.schema.json +6 -6
- boneio/webui/schema/modbus.schema.json +2 -2
- boneio/webui/schema/modbus_devices.schema.json +14 -14
- boneio/webui/schema/mqtt.schema.json +4 -4
- boneio/webui/schema/oled.schema.json +6 -6
- boneio/webui/schema/output.schema.json +6 -6
- boneio/webui/schema/output_group.schema.json +2 -2
- boneio/webui/schema/pca9685.schema.json +4 -4
- boneio/webui/schema/pcf8575.schema.json +4 -4
- boneio/webui/schema/sensor.schema.json +6 -6
- boneio/webui/schema/web.schema.json +4 -4
- {boneio-1.0.0.dev1.dist-info → boneio-1.0.0.dev3.dist-info}/METADATA +1 -1
- {boneio-1.0.0.dev1.dist-info → boneio-1.0.0.dev3.dist-info}/RECORD +114 -113
- boneio/webui/frontend-dist/assets/index-GkK8ZZZL.css +0 -1
- /boneio/boards/{0.3_test → 0.4}/output_32_10.yaml +0 -0
- /boneio/boards/{0.3_test → 0.4}/output_cover.yaml +0 -0
- /boneio/boards/{0.3_test → 0.4}/output_cover_mix.yaml +0 -0
- {boneio-1.0.0.dev1.dist-info → boneio-1.0.0.dev3.dist-info}/WHEEL +0 -0
- {boneio-1.0.0.dev1.dist-info → boneio-1.0.0.dev3.dist-info}/entry_points.txt +0 -0
- {boneio-1.0.0.dev1.dist-info → boneio-1.0.0.dev3.dist-info}/licenses/LICENSE +0 -0
- {boneio-1.0.0.dev1.dist-info → boneio-1.0.0.dev3.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
mcp23017:
|
|
2
|
+
- id: mcp_left
|
|
3
|
+
address: 0x20
|
|
4
|
+
- id: mcp_right
|
|
5
|
+
address: 0x21
|
|
6
|
+
|
|
7
|
+
output_mapping:
|
|
8
|
+
out_01:
|
|
9
|
+
kind: mcp
|
|
10
|
+
mcp_id: mcp_left
|
|
11
|
+
pin: 9
|
|
12
|
+
out_02:
|
|
13
|
+
kind: mcp
|
|
14
|
+
mcp_id: mcp_left
|
|
15
|
+
pin: 8
|
|
16
|
+
out_03:
|
|
17
|
+
kind: mcp
|
|
18
|
+
mcp_id: mcp_right
|
|
19
|
+
pin: 1
|
|
20
|
+
out_04:
|
|
21
|
+
kind: mcp
|
|
22
|
+
mcp_id: mcp_right
|
|
23
|
+
pin: 0
|
|
24
|
+
out_05:
|
|
25
|
+
kind: mcp
|
|
26
|
+
mcp_id: mcp_left
|
|
27
|
+
pin: 13
|
|
28
|
+
out_06:
|
|
29
|
+
kind: mcp
|
|
30
|
+
mcp_id: mcp_left
|
|
31
|
+
pin: 12
|
|
32
|
+
out_07:
|
|
33
|
+
kind: mcp
|
|
34
|
+
mcp_id: mcp_left
|
|
35
|
+
pin: 11
|
|
36
|
+
out_08:
|
|
37
|
+
kind: mcp
|
|
38
|
+
mcp_id: mcp_left
|
|
39
|
+
pin: 10
|
|
40
|
+
out_09:
|
|
41
|
+
kind: mcp
|
|
42
|
+
mcp_id: mcp_right
|
|
43
|
+
pin: 14
|
|
44
|
+
out_10:
|
|
45
|
+
kind: mcp
|
|
46
|
+
mcp_id: mcp_right
|
|
47
|
+
pin: 15
|
|
48
|
+
out_11:
|
|
49
|
+
kind: mcp
|
|
50
|
+
mcp_id: mcp_right
|
|
51
|
+
pin: 13
|
|
52
|
+
out_12:
|
|
53
|
+
kind: mcp
|
|
54
|
+
mcp_id: mcp_right
|
|
55
|
+
pin: 12
|
|
56
|
+
out_13:
|
|
57
|
+
kind: mcp
|
|
58
|
+
mcp_id: mcp_left
|
|
59
|
+
pin: 6
|
|
60
|
+
out_14:
|
|
61
|
+
kind: mcp
|
|
62
|
+
mcp_id: mcp_left
|
|
63
|
+
pin: 5
|
|
64
|
+
out_15:
|
|
65
|
+
kind: mcp
|
|
66
|
+
mcp_id: mcp_left
|
|
67
|
+
pin: 4
|
|
68
|
+
out_16:
|
|
69
|
+
kind: mcp
|
|
70
|
+
mcp_id: mcp_left
|
|
71
|
+
pin: 3
|
|
72
|
+
out_17:
|
|
73
|
+
kind: mcp
|
|
74
|
+
mcp_id: mcp_left
|
|
75
|
+
pin: 2
|
|
76
|
+
out_18:
|
|
77
|
+
kind: mcp
|
|
78
|
+
mcp_id: mcp_left
|
|
79
|
+
pin: 0
|
|
80
|
+
out_19:
|
|
81
|
+
kind: mcp
|
|
82
|
+
mcp_id: mcp_left
|
|
83
|
+
pin: 1
|
|
84
|
+
out_20:
|
|
85
|
+
kind: mcp
|
|
86
|
+
mcp_id: mcp_left
|
|
87
|
+
pin: 7
|
|
88
|
+
out_21:
|
|
89
|
+
kind: mcp
|
|
90
|
+
mcp_id: mcp_right
|
|
91
|
+
pin: 8
|
|
92
|
+
out_22:
|
|
93
|
+
kind: mcp
|
|
94
|
+
mcp_id: mcp_right
|
|
95
|
+
pin: 9
|
|
96
|
+
out_23:
|
|
97
|
+
kind: mcp
|
|
98
|
+
mcp_id: mcp_right
|
|
99
|
+
pin: 11
|
|
100
|
+
out_24:
|
|
101
|
+
kind: mcp
|
|
102
|
+
mcp_id: mcp_right
|
|
103
|
+
pin: 10
|
|
@@ -1,137 +1,139 @@
|
|
|
1
1
|
mcp23017:
|
|
2
|
-
- id: mcp_right
|
|
3
|
-
address: 0x20
|
|
4
2
|
- id: mcp_left
|
|
3
|
+
address: 0x20
|
|
4
|
+
- id: mcp_right
|
|
5
5
|
address: 0x21
|
|
6
6
|
|
|
7
7
|
output_mapping:
|
|
8
|
+
# mcp_left - upper left 8 relays
|
|
8
9
|
out_01:
|
|
9
10
|
kind: mcp
|
|
10
11
|
mcp_id: mcp_left
|
|
11
|
-
pin:
|
|
12
|
+
pin: 0
|
|
12
13
|
out_02:
|
|
13
14
|
kind: mcp
|
|
14
15
|
mcp_id: mcp_left
|
|
15
|
-
pin:
|
|
16
|
+
pin: 1
|
|
16
17
|
out_03:
|
|
17
18
|
kind: mcp
|
|
18
19
|
mcp_id: mcp_left
|
|
19
|
-
pin:
|
|
20
|
+
pin: 2
|
|
20
21
|
out_04:
|
|
21
22
|
kind: mcp
|
|
22
23
|
mcp_id: mcp_left
|
|
23
|
-
pin:
|
|
24
|
+
pin: 3
|
|
24
25
|
out_05:
|
|
25
26
|
kind: mcp
|
|
26
27
|
mcp_id: mcp_left
|
|
27
|
-
pin:
|
|
28
|
+
pin: 4
|
|
28
29
|
out_06:
|
|
29
30
|
kind: mcp
|
|
30
31
|
mcp_id: mcp_left
|
|
31
|
-
pin:
|
|
32
|
+
pin: 5
|
|
32
33
|
out_07:
|
|
33
34
|
kind: mcp
|
|
34
35
|
mcp_id: mcp_left
|
|
35
|
-
pin:
|
|
36
|
+
pin: 6
|
|
36
37
|
out_08:
|
|
37
38
|
kind: mcp
|
|
38
39
|
mcp_id: mcp_left
|
|
39
|
-
pin:
|
|
40
|
+
pin: 7
|
|
41
|
+
# mcp_right - upper right 8 relays
|
|
40
42
|
out_09:
|
|
41
43
|
kind: mcp
|
|
42
44
|
mcp_id: mcp_right
|
|
43
|
-
pin:
|
|
45
|
+
pin: 0
|
|
44
46
|
out_10:
|
|
45
47
|
kind: mcp
|
|
46
48
|
mcp_id: mcp_right
|
|
47
|
-
pin:
|
|
49
|
+
pin: 1
|
|
48
50
|
out_11:
|
|
49
51
|
kind: mcp
|
|
50
52
|
mcp_id: mcp_right
|
|
51
|
-
pin:
|
|
53
|
+
pin: 2
|
|
52
54
|
out_12:
|
|
53
55
|
kind: mcp
|
|
54
56
|
mcp_id: mcp_right
|
|
55
|
-
pin:
|
|
57
|
+
pin: 3
|
|
56
58
|
out_13:
|
|
57
59
|
kind: mcp
|
|
58
60
|
mcp_id: mcp_right
|
|
59
|
-
pin:
|
|
61
|
+
pin: 4
|
|
60
62
|
out_14:
|
|
61
63
|
kind: mcp
|
|
62
64
|
mcp_id: mcp_right
|
|
63
|
-
pin:
|
|
65
|
+
pin: 5
|
|
64
66
|
out_15:
|
|
65
67
|
kind: mcp
|
|
66
68
|
mcp_id: mcp_right
|
|
67
|
-
pin:
|
|
69
|
+
pin: 6
|
|
68
70
|
out_16:
|
|
69
71
|
kind: mcp
|
|
70
72
|
mcp_id: mcp_right
|
|
71
|
-
pin:
|
|
73
|
+
pin: 7
|
|
74
|
+
# mcp_left - lower left 8 relays
|
|
72
75
|
out_17:
|
|
73
76
|
kind: mcp
|
|
74
77
|
mcp_id: mcp_left
|
|
75
|
-
pin:
|
|
78
|
+
pin: 15
|
|
76
79
|
out_18:
|
|
77
80
|
kind: mcp
|
|
78
81
|
mcp_id: mcp_left
|
|
79
|
-
pin:
|
|
82
|
+
pin: 14
|
|
80
83
|
out_19:
|
|
81
84
|
kind: mcp
|
|
82
85
|
mcp_id: mcp_left
|
|
83
|
-
pin:
|
|
86
|
+
pin: 13
|
|
84
87
|
out_20:
|
|
85
88
|
kind: mcp
|
|
86
89
|
mcp_id: mcp_left
|
|
87
|
-
pin:
|
|
90
|
+
pin: 12
|
|
88
91
|
out_21:
|
|
89
92
|
kind: mcp
|
|
90
93
|
mcp_id: mcp_left
|
|
91
|
-
pin:
|
|
94
|
+
pin: 11
|
|
92
95
|
out_22:
|
|
93
96
|
kind: mcp
|
|
94
97
|
mcp_id: mcp_left
|
|
95
|
-
pin:
|
|
98
|
+
pin: 10
|
|
96
99
|
out_23:
|
|
97
100
|
kind: mcp
|
|
98
101
|
mcp_id: mcp_left
|
|
99
|
-
pin:
|
|
102
|
+
pin: 9
|
|
100
103
|
out_24:
|
|
101
104
|
kind: mcp
|
|
102
105
|
mcp_id: mcp_left
|
|
103
|
-
pin:
|
|
106
|
+
pin: 8
|
|
107
|
+
# mcp_right - lower right 8 relays
|
|
104
108
|
out_25:
|
|
105
109
|
kind: mcp
|
|
106
110
|
mcp_id: mcp_right
|
|
107
|
-
pin:
|
|
111
|
+
pin: 15
|
|
108
112
|
out_26:
|
|
109
113
|
kind: mcp
|
|
110
114
|
mcp_id: mcp_right
|
|
111
|
-
pin:
|
|
115
|
+
pin: 14
|
|
112
116
|
out_27:
|
|
113
117
|
kind: mcp
|
|
114
118
|
mcp_id: mcp_right
|
|
115
|
-
pin:
|
|
119
|
+
pin: 13
|
|
116
120
|
out_28:
|
|
117
121
|
kind: mcp
|
|
118
122
|
mcp_id: mcp_right
|
|
119
|
-
pin:
|
|
123
|
+
pin: 12
|
|
120
124
|
out_29:
|
|
121
125
|
kind: mcp
|
|
122
126
|
mcp_id: mcp_right
|
|
123
|
-
pin:
|
|
127
|
+
pin: 11
|
|
124
128
|
out_30:
|
|
125
129
|
kind: mcp
|
|
126
130
|
mcp_id: mcp_right
|
|
127
|
-
pin:
|
|
131
|
+
pin: 10
|
|
128
132
|
out_31:
|
|
129
133
|
kind: mcp
|
|
130
134
|
mcp_id: mcp_right
|
|
131
|
-
pin:
|
|
135
|
+
pin: 9
|
|
132
136
|
out_32:
|
|
133
137
|
kind: mcp
|
|
134
138
|
mcp_id: mcp_right
|
|
135
|
-
pin:
|
|
136
|
-
|
|
137
|
-
|
|
139
|
+
pin: 8
|
|
@@ -37,6 +37,7 @@ class ConfigHelper:
|
|
|
37
37
|
ha_discovery_prefix: str = HOMEASSISTANT,
|
|
38
38
|
network_info: dict = {},
|
|
39
39
|
is_web_active: bool = False,
|
|
40
|
+
web_port: int = 8090,
|
|
40
41
|
config_file_path: str | None = None,
|
|
41
42
|
):
|
|
42
43
|
self._name = name
|
|
@@ -45,6 +46,7 @@ class ConfigHelper:
|
|
|
45
46
|
self._ha_discovery = ha_discovery
|
|
46
47
|
self._ha_discovery_prefix = ha_discovery_prefix
|
|
47
48
|
self._device_type = device_type
|
|
49
|
+
self._web_port = web_port
|
|
48
50
|
self._fetch_old_discovery = None
|
|
49
51
|
self._autodiscovery_messages = {
|
|
50
52
|
SWITCH: {},
|
|
@@ -107,6 +109,10 @@ class ConfigHelper:
|
|
|
107
109
|
def is_web_active(self) -> bool:
|
|
108
110
|
return self._is_web_active
|
|
109
111
|
|
|
112
|
+
@property
|
|
113
|
+
def web_port(self) -> int:
|
|
114
|
+
return self._web_port
|
|
115
|
+
|
|
110
116
|
@property
|
|
111
117
|
def topic_prefix(self) -> str:
|
|
112
118
|
return self._topic_prefix
|
boneio/core/config/yaml_util.py
CHANGED
|
@@ -228,7 +228,8 @@ def normalize_board_name(name: str) -> str:
|
|
|
228
228
|
"""Normalize board name to a standard format.
|
|
229
229
|
|
|
230
230
|
Examples:
|
|
231
|
-
32x10a, 32x10A,
|
|
231
|
+
32x10a, 32x10A, 32x10 -> 32_10
|
|
232
|
+
32x5a, 32x5A, 32x5 -> 32_5
|
|
232
233
|
cover -> cover
|
|
233
234
|
cover mix, cm -> cover_mix
|
|
234
235
|
24x16A, 24x16, 24 -> 24_16
|
|
@@ -246,7 +247,11 @@ def normalize_board_name(name: str) -> str:
|
|
|
246
247
|
if name == 'cover':
|
|
247
248
|
return 'cover'
|
|
248
249
|
|
|
249
|
-
# Handle
|
|
250
|
+
# Handle 32x5A variations (must check before 32x10 since both start with 32)
|
|
251
|
+
if name in ('32x5a', '32x5'):
|
|
252
|
+
return '32_5'
|
|
253
|
+
|
|
254
|
+
# Handle 32x10A variations (default for 32 without suffix)
|
|
250
255
|
if name.startswith('32'):
|
|
251
256
|
return '32_10'
|
|
252
257
|
|
boneio/core/manager/covers.py
CHANGED
|
@@ -293,10 +293,14 @@ class CoverManager:
|
|
|
293
293
|
def reload_covers(self) -> None:
|
|
294
294
|
"""Reload cover configuration from file.
|
|
295
295
|
|
|
296
|
-
This updates cover timings
|
|
296
|
+
This updates cover timings and creates new covers if needed.
|
|
297
|
+
After reload, broadcasts all cover states to WebSocket clients.
|
|
297
298
|
"""
|
|
298
299
|
_LOGGER.info("Reloading cover configuration")
|
|
299
300
|
self._configure_covers(reload_config=True)
|
|
301
|
+
|
|
302
|
+
# Broadcast updated states to WebSocket clients
|
|
303
|
+
self._broadcast_all_states()
|
|
300
304
|
|
|
301
305
|
async def handle_cover_action(
|
|
302
306
|
self,
|
|
@@ -355,6 +359,26 @@ class CoverManager:
|
|
|
355
359
|
else:
|
|
356
360
|
_LOGGER.debug("Unknown cover action %s for device %s", message, device_id)
|
|
357
361
|
|
|
362
|
+
def _broadcast_all_states(self) -> None:
|
|
363
|
+
"""Broadcast current state of all covers via WebSocket.
|
|
364
|
+
|
|
365
|
+
This is called after reload to ensure frontend receives
|
|
366
|
+
the state of all covers, including newly created ones.
|
|
367
|
+
|
|
368
|
+
Handles both PreviousCover (async_send_state) and BaseCover
|
|
369
|
+
(send_state with state and position args) implementations.
|
|
370
|
+
"""
|
|
371
|
+
for cover in self._covers.values():
|
|
372
|
+
try:
|
|
373
|
+
# PreviousCover has async_send_state()
|
|
374
|
+
if hasattr(cover, 'async_send_state'):
|
|
375
|
+
self._manager.loop.create_task(cover.async_send_state())
|
|
376
|
+
# BaseCover (TimeBasedCover, VenetianCover) has send_state(state, json_position)
|
|
377
|
+
elif hasattr(cover, 'send_state') and hasattr(cover, 'json_position'):
|
|
378
|
+
cover.send_state(cover.state, cover.json_position)
|
|
379
|
+
except Exception as e:
|
|
380
|
+
_LOGGER.debug(f"Error broadcasting cover state {cover.id}: {e}")
|
|
381
|
+
|
|
358
382
|
async def send_ha_autodiscovery(self) -> None:
|
|
359
383
|
"""Send Home Assistant autodiscovery for all covers."""
|
|
360
384
|
for cover_id, cover in self._covers.items():
|
boneio/core/utils/logger.py
CHANGED
|
@@ -25,6 +25,9 @@ def configure_logger(log_config: dict, debug: int) -> None:
|
|
|
25
25
|
"""Configure logger based on config yaml."""
|
|
26
26
|
|
|
27
27
|
def debug_logger():
|
|
28
|
+
# Always suppress hypercorn access logs (they spam INFO level)
|
|
29
|
+
logging.getLogger("hypercorn.access").setLevel(logging.WARNING)
|
|
30
|
+
|
|
28
31
|
if debug == 0:
|
|
29
32
|
logging.getLogger().setLevel(logging.INFO)
|
|
30
33
|
if debug > 0:
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
-
|
|
1
|
+
- name: adc1
|
|
2
2
|
pin: P9_33
|
|
3
|
-
-
|
|
3
|
+
- name: adc2
|
|
4
4
|
pin: P9_36
|
|
5
|
-
-
|
|
5
|
+
- name: adc3
|
|
6
6
|
pin: P9_35
|
|
7
|
-
-
|
|
7
|
+
- name: adc4
|
|
8
8
|
pin: P9_38
|
|
9
|
-
-
|
|
9
|
+
- name: adc5
|
|
10
10
|
pin: P9_37
|
|
11
|
-
-
|
|
11
|
+
- name: adc6
|
|
12
12
|
pin: P9_40
|
|
13
|
-
-
|
|
13
|
+
- name: adc7
|
|
14
14
|
pin: P9_39
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
# PINs are shared between event.yaml and binary_sensor.yaml.
|
|
4
4
|
# Don't duplicate PINs.
|
|
5
5
|
|
|
6
|
-
-
|
|
6
|
+
- name: IN_48
|
|
7
7
|
boneio_input: IN_48
|
|
8
8
|
actions:
|
|
9
9
|
pressed:
|
|
10
10
|
- action: output
|
|
11
11
|
pin: OUT_01
|
|
12
|
-
-
|
|
12
|
+
- name: IN_49
|
|
13
13
|
boneio_input: IN_49
|
|
14
14
|
actions:
|
|
15
15
|
pressed:
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# Don't duplicate PINs.
|
|
5
5
|
|
|
6
6
|
# IN_48 and IN_49 are enabled in binary_sensor.yaml by default.
|
|
7
|
-
-
|
|
7
|
+
- name: IN_01
|
|
8
8
|
boneio_input: IN_01
|
|
9
9
|
actions:
|
|
10
10
|
single:
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
double:
|
|
14
14
|
- action: output
|
|
15
15
|
pin: OUT_01
|
|
16
|
-
-
|
|
16
|
+
- name: IN_02
|
|
17
17
|
boneio_input: IN_02
|
|
18
18
|
actions:
|
|
19
19
|
single:
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
double:
|
|
23
23
|
- action: output
|
|
24
24
|
pin: OUT_01
|
|
25
|
-
-
|
|
25
|
+
- name: IN_03
|
|
26
26
|
boneio_input: IN_03
|
|
27
27
|
actions:
|
|
28
28
|
single:
|
|
@@ -34,178 +34,178 @@
|
|
|
34
34
|
long:
|
|
35
35
|
- action: output
|
|
36
36
|
pin: OUT_03
|
|
37
|
-
-
|
|
37
|
+
- name: IN_04
|
|
38
38
|
boneio_input: IN_04
|
|
39
39
|
actions:
|
|
40
40
|
single:
|
|
41
41
|
- action: output
|
|
42
42
|
pin: OUT_04
|
|
43
|
-
-
|
|
43
|
+
- name: IN_05
|
|
44
44
|
boneio_input: IN_05
|
|
45
45
|
actions:
|
|
46
46
|
single:
|
|
47
47
|
- action: output
|
|
48
48
|
pin: OUT_05
|
|
49
|
-
-
|
|
49
|
+
- name: IN_06
|
|
50
50
|
boneio_input: IN_06
|
|
51
51
|
actions:
|
|
52
52
|
single:
|
|
53
53
|
- action: output
|
|
54
54
|
pin: OUT_06
|
|
55
|
-
-
|
|
55
|
+
- name: IN_07
|
|
56
56
|
boneio_input: IN_07
|
|
57
57
|
actions:
|
|
58
58
|
single:
|
|
59
59
|
- action: output
|
|
60
60
|
pin: OUT_07
|
|
61
|
-
-
|
|
61
|
+
- name: IN_08
|
|
62
62
|
boneio_input: IN_08
|
|
63
63
|
actions:
|
|
64
64
|
single:
|
|
65
65
|
- action: output
|
|
66
66
|
pin: OUT_08
|
|
67
|
-
-
|
|
67
|
+
- name: IN_09
|
|
68
68
|
boneio_input: IN_09
|
|
69
69
|
actions:
|
|
70
70
|
single:
|
|
71
71
|
- action: output
|
|
72
72
|
pin: OUT_09
|
|
73
|
-
-
|
|
73
|
+
- name: IN_10
|
|
74
74
|
boneio_input: IN_10
|
|
75
75
|
actions:
|
|
76
76
|
single:
|
|
77
77
|
- action: output
|
|
78
78
|
pin: OUT_10
|
|
79
|
-
-
|
|
79
|
+
- name: IN_11
|
|
80
80
|
boneio_input: IN_11
|
|
81
81
|
actions:
|
|
82
82
|
single:
|
|
83
83
|
- action: output
|
|
84
84
|
pin: OUT_11
|
|
85
|
-
-
|
|
85
|
+
- name: IN_12
|
|
86
86
|
boneio_input: IN_12
|
|
87
87
|
actions:
|
|
88
88
|
single:
|
|
89
89
|
- action: output
|
|
90
90
|
pin: OUT_12
|
|
91
|
-
-
|
|
91
|
+
- name: IN_13
|
|
92
92
|
boneio_input: IN_13
|
|
93
93
|
actions:
|
|
94
94
|
single:
|
|
95
95
|
- action: output
|
|
96
96
|
pin: OUT_13
|
|
97
|
-
-
|
|
97
|
+
- name: IN_14
|
|
98
98
|
boneio_input: IN_14
|
|
99
99
|
actions:
|
|
100
100
|
single:
|
|
101
101
|
- action: output
|
|
102
102
|
pin: OUT_14
|
|
103
103
|
|
|
104
|
-
-
|
|
104
|
+
- name: IN_15
|
|
105
105
|
boneio_input: IN_15
|
|
106
106
|
actions:
|
|
107
107
|
single:
|
|
108
108
|
- action: output
|
|
109
109
|
pin: OUT_15
|
|
110
|
-
-
|
|
110
|
+
- name: IN_16
|
|
111
111
|
boneio_input: IN_16
|
|
112
112
|
actions:
|
|
113
113
|
single:
|
|
114
114
|
- action: output
|
|
115
115
|
pin: OUT_16
|
|
116
|
-
-
|
|
116
|
+
- name: IN_17
|
|
117
117
|
boneio_input: IN_17
|
|
118
118
|
actions:
|
|
119
119
|
single:
|
|
120
120
|
- action: output
|
|
121
121
|
pin: OUT_17
|
|
122
|
-
-
|
|
122
|
+
- name: IN_18
|
|
123
123
|
boneio_input: IN_18
|
|
124
124
|
actions:
|
|
125
125
|
single:
|
|
126
126
|
- action: output
|
|
127
127
|
pin: OUT_18
|
|
128
|
-
-
|
|
128
|
+
- name: IN_19
|
|
129
129
|
boneio_input: IN_19
|
|
130
130
|
actions:
|
|
131
131
|
single:
|
|
132
132
|
- action: output
|
|
133
133
|
pin: OUT_19
|
|
134
|
-
-
|
|
134
|
+
- name: IN_20
|
|
135
135
|
boneio_input: IN_20
|
|
136
136
|
actions:
|
|
137
137
|
single:
|
|
138
138
|
- action: output
|
|
139
139
|
pin: OUT_20
|
|
140
|
-
-
|
|
140
|
+
- name: IN_21
|
|
141
141
|
boneio_input: IN_21
|
|
142
142
|
actions:
|
|
143
143
|
single:
|
|
144
144
|
- action: output
|
|
145
145
|
pin: OUT_21
|
|
146
|
-
-
|
|
146
|
+
- name: IN_22
|
|
147
147
|
boneio_input: IN_22
|
|
148
148
|
actions:
|
|
149
149
|
single:
|
|
150
150
|
- action: output
|
|
151
151
|
pin: OUT_22
|
|
152
|
-
-
|
|
152
|
+
- name: IN_23
|
|
153
153
|
boneio_input: IN_23
|
|
154
154
|
actions:
|
|
155
155
|
single:
|
|
156
156
|
- action: output
|
|
157
157
|
pin: OUT_23
|
|
158
|
-
-
|
|
158
|
+
- name: IN_24
|
|
159
159
|
boneio_input: IN_24
|
|
160
160
|
actions:
|
|
161
161
|
single:
|
|
162
162
|
- action: output
|
|
163
163
|
pin: OUT_24
|
|
164
|
-
-
|
|
164
|
+
- name: IN_25
|
|
165
165
|
boneio_input: IN_25
|
|
166
|
-
-
|
|
166
|
+
- name: IN_26
|
|
167
167
|
boneio_input: IN_26
|
|
168
|
-
-
|
|
168
|
+
- name: IN_27
|
|
169
169
|
boneio_input: IN_27
|
|
170
|
-
-
|
|
170
|
+
- name: IN_28
|
|
171
171
|
boneio_input: IN_28
|
|
172
|
-
-
|
|
172
|
+
- name: IN_29
|
|
173
173
|
boneio_input: IN_29
|
|
174
|
-
-
|
|
174
|
+
- name: IN_30
|
|
175
175
|
boneio_input: IN_30
|
|
176
|
-
-
|
|
176
|
+
- name: IN_31
|
|
177
177
|
boneio_input: IN_31
|
|
178
|
-
-
|
|
178
|
+
- name: IN_32
|
|
179
179
|
boneio_input: IN_32
|
|
180
|
-
-
|
|
180
|
+
- name: IN_33
|
|
181
181
|
boneio_input: IN_33
|
|
182
|
-
-
|
|
182
|
+
- name: IN_34
|
|
183
183
|
boneio_input: IN_34
|
|
184
|
-
-
|
|
184
|
+
- name: IN_35
|
|
185
185
|
boneio_input: IN_35
|
|
186
|
-
-
|
|
186
|
+
- name: IN_36
|
|
187
187
|
boneio_input: IN_36
|
|
188
|
-
-
|
|
188
|
+
- name: IN_37
|
|
189
189
|
boneio_input: IN_37
|
|
190
|
-
-
|
|
190
|
+
- name: IN_38
|
|
191
191
|
boneio_input: IN_38
|
|
192
|
-
-
|
|
192
|
+
- name: IN_39
|
|
193
193
|
boneio_input: IN_39
|
|
194
|
-
-
|
|
194
|
+
- name: IN_40
|
|
195
195
|
boneio_input: IN_40
|
|
196
|
-
-
|
|
196
|
+
- name: IN_41
|
|
197
197
|
boneio_input: IN_41
|
|
198
|
-
-
|
|
198
|
+
- name: IN_42
|
|
199
199
|
boneio_input: IN_42
|
|
200
|
-
-
|
|
200
|
+
- name: IN_43
|
|
201
201
|
boneio_input: IN_43
|
|
202
|
-
-
|
|
202
|
+
- name: IN_44
|
|
203
203
|
boneio_input: IN_44
|
|
204
|
-
-
|
|
204
|
+
- name: IN_45
|
|
205
205
|
boneio_input: IN_45
|
|
206
|
-
-
|
|
206
|
+
- name: IN_46
|
|
207
207
|
boneio_input: IN_46
|
|
208
|
-
-
|
|
208
|
+
- name: IN_47
|
|
209
209
|
boneio_input: IN_47
|
|
210
210
|
# - id: IN_48
|
|
211
211
|
# boneio_input: IN_48
|