boneIO 0.8.0.dev6__py3-none-any.whl → 0.8.0.dev8__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boneIO
3
- Version: 0.8.0dev6
3
+ Version: 0.8.0dev8
4
4
  Summary: Python App for BoneIO
5
5
  License: GNU General Public License v3.0
6
6
  Author-email: Paweł Szafer <pszafer@gmail.com>
@@ -5,27 +5,30 @@ boneio/cover.py,sha256=EfO1DAOGTPQykfgJHzg1WqPs0U8b1AnD2NMI-sLZccM,8444
5
5
  boneio/example_config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  boneio/example_config/adc.yaml,sha256=GKNpl2t7ebsH57UhJlJioXNuBflsL6eO4JMnyYwZrFs,168
7
7
  boneio/example_config/binary_sensor.yaml,sha256=4oErCX-5t6e9e0KVo5GkkFplKkgKs0st-wTmyiCZNzM,286
8
+ boneio/example_config/binary_sensor_v_0_7.yaml,sha256=uaIDVV7t4drhlBDu_IK-ZK1DiMqqCP9tCi_HfS7KP5I,185
8
9
  boneio/example_config/config.yaml,sha256=7QOFD5P8wJYJrpA2qOwNM975ZKgeO7oKZphgJCP589k,397
9
10
  boneio/example_config/cover.yaml,sha256=rs7lv3vIEgAb3q96RKsJL7VMRsEvSNHG848dzZzSKsI,150
10
11
  boneio/example_config/event.yaml,sha256=9TMKXGLTAz4umSJCiMs53ReFmhY84LtmEPnanIIw-uY,2692
11
12
  boneio/example_config/event_all.yaml,sha256=9TMKXGLTAz4umSJCiMs53ReFmhY84LtmEPnanIIw-uY,2692
13
+ boneio/example_config/event_v_0_7.yaml,sha256=n78Hsdq03zNSKICZ9muL5p3ZJQLCKU1juDVC1oCRNXw,4819
12
14
  boneio/example_config/led32x4A.yaml,sha256=YkcZ5XH2JF9Oa3pAmrYM5wsE8qQODCHcjYH47AEQpUI,3392
13
15
  boneio/example_config/output24x16A.yaml,sha256=BTtHToRgz-U_rMMDbmHkM4wQxHakdzInb3zKMkOkj4w,1691
14
16
  boneio/example_config/output24x16A_v0.3.yaml,sha256=XkI4rHn_XdX37xG02-wHieZzSHKiKN5mtnyfRE24NII,1713
17
+ boneio/example_config/output32x10A.yaml,sha256=A4uzkZLSkC66Ck6bWkdMbnT0gQUByU8qi0muAgpOn40,2318
15
18
  boneio/example_config/output32x5A.yaml,sha256=G2Pb6qL8mXs6MliIM1roAanPag9ozRe3McYYuFsiBc0,2403
16
19
  boneio/fonts/danube__.ttf,sha256=KBRPUcGvmroCjrWC8zK4MulUb9lV8R0lXkOY7lNnQWc,19372
17
20
  boneio/group/__init__.py,sha256=eUN51J6nU1MdQfcl6JQ2AQwkP6K91mR9caDZyZ18rig,80
18
- boneio/group/output.py,sha256=qvNxd5xOWDyqpP6eRuyd2XMPAwjPgxIzVltaA7r-RPU,1992
21
+ boneio/group/output.py,sha256=LFGECDfaHrpG_B_cu7x9An-9U3n3oJ50Xeq2TQi1Is0,2654
19
22
  boneio/helper/__init__.py,sha256=-dv_Wxk1cK9zyx3JEp7TdMJZkZ1_TU7N9k5gM_jXLqA,2118
20
23
  boneio/helper/async_updater.py,sha256=oJkuWAepR66gY38W1WAMAa3r8uYy9cEbbDS8o_JGktQ,1018
21
24
  boneio/helper/click_timer.py,sha256=Gu8sEi1S8GG42SYbfaMju7WXFhnnil9gYfirLZX7kJk,1315
22
25
  boneio/helper/config.py,sha256=5cDnJ7usJDlUvXv8K2rSWEx30OFcU2k1U1vUEjO69WY,2431
23
- boneio/helper/events.py,sha256=f4JDMMkyp0lWz9w8ABZ_hlKyAbJWtYHGnGTs2vv4vac,8648
26
+ boneio/helper/events.py,sha256=ttb2_xOgyTXPIZv4ywJ2udCdqYLIVejBo7ATqsm7OQQ,8818
24
27
  boneio/helper/exceptions.py,sha256=vyYSUojwB7OttOPUjbxeHFM7C_o5ZQmRUcZ_vYpxYYI,717
25
28
  boneio/helper/filter.py,sha256=8jgSbHDaInEVlAPd7nrahnFYsi1y6C2fmI0yn55XzK0,935
26
29
  boneio/helper/gpio.py,sha256=q2r2uklPWePuuekPO63kVfoaQdkvNObUJ3ktwsHgOB0,4771
27
30
  boneio/helper/ha_discovery.py,sha256=B2t1cfOfKWys4EM1H7OxvOaYL8H_v18CTuHCEVP2w2c,7107
28
- boneio/helper/loader.py,sha256=mkvM6Fg_4xHI079iiWFcUQFW1w8819AXAkiBja0vKxo,17473
31
+ boneio/helper/loader.py,sha256=3MVgTLp1NlYbQ0nCw-MfF1nSvcwb-VXGUbgXIdg84VM,17496
29
32
  boneio/helper/logger.py,sha256=zyF_Vk3o2eSHuXypJhNzK99eZgkWDWybuB5KcJgurDs,1801
30
33
  boneio/helper/mqtt.py,sha256=1YgwO0RjkarN5qS5HS5rONf4H3_m3ak7tT_hHm-HeOQ,931
31
34
  boneio/helper/oled.py,sha256=f0XYbaFstUbJ6ISmFe1vQCnmNVMctQWtnStNdROrblc,351
@@ -37,20 +40,20 @@ boneio/helper/pcf8575.py,sha256=qeNYLqV5foDEQCyAz1WRQRi1CYYxtbPIha06Z5TyZVQ,311
37
40
  boneio/helper/queue.py,sha256=7fE7d344-BEW8sljN40wmqsbBr4kPLvz4ShBjkT04p8,1066
38
41
  boneio/helper/sensor/ina_219_smbus.py,sha256=eXp2epjUgsqaXamTSWSn3LMow5X_YxAxdREaWD7N3mk,6170
39
42
  boneio/helper/state_manager.py,sha256=6OeqJsLQPCyQhhmFlNxCd80cTYLnKb02L4AZ1ZFFVBE,2616
40
- boneio/helper/stats.py,sha256=Ard04Z0WpkV7U6hgv1Uf4KxkjIde5iIW8W2cqRGXZyg,6731
43
+ boneio/helper/stats.py,sha256=oWxKC3EjuL2hzvLk4qBIN_KskoXIcELQOyOpR02J79w,7850
41
44
  boneio/helper/timeperiod.py,sha256=xpg9oe30Z5WiLDQPq3EBKKScejOnN47NhcpeFvDd3bY,5806
42
45
  boneio/helper/util.py,sha256=DyppBTE2zTWoxVpl83Kb4SpJLEqOOSEkxXEITCrwnfk,938
43
46
  boneio/helper/yaml_util.py,sha256=aaXMwXC2JoDYkBMcZkkB8nic3QOyGOhxPTRxWvMf3G4,11334
44
47
  boneio/input/__init__.py,sha256=8Hcps-wCCl6bCAMoEmDJecR-Q9giFL29AvG1ZGe0dZw,200
45
- boneio/input/gpio.py,sha256=mqmce4P_dNzmNHqNNiNAmKeeZKbbKtPUtQ6zd8-R-9I,2438
48
+ boneio/input/gpio.py,sha256=3Eh_3ko0RkTKqq7pKlgTROJeaSYgt05NkfeGoWudqfY,2674
46
49
  boneio/input/gpio_new.py,sha256=gpPfDr39B8FVUyh9XHtLgVQr4glMGFBgQsyIMzXDPaw,2822
47
- boneio/manager.py,sha256=06smEmgB9UDWUjCvy2l_lEHFyONU6N6ppW_dOiRv-wM,29866
50
+ boneio/manager.py,sha256=leMDXrmyHmlndgt_GdlkvKnFRaUDZI8uDzCr8yLvcY8,29869
48
51
  boneio/modbus/__init__.py,sha256=yeHIxZ0_u7eCL7CqScvob5Utcru6Iza0LEtTagEtNtw,116
49
- boneio/modbus/client.py,sha256=SDZBGpQVRJ_WLeOD6E0_HbuIymc3DDyKfTn9JZRPSRs,5849
52
+ boneio/modbus/client.py,sha256=-TMFQPVWWTlzS1HG1QVX4QwpfwSIxf0cgFOv3_gu7so,5851
50
53
  boneio/modbus/cwt.json,sha256=JwkQuRZFA03C3o9RgryMuCaYoCwM4RkiakEB6dkKgxE,886
51
54
  boneio/modbus/dts1964_3f.json,sha256=WABph_2X4OgMidSM28vw4dLd9ZByRoiUP-RqE0UMpR8,8810
52
55
  boneio/modbus/modbuscli.py,sha256=VJKI85HRD7Usi0x4pSMS9GzuhYfLCx8qVjNsHuao0Is,6231
53
- boneio/modbus/orno-or-we-517.json,sha256=PtaG0B_uNLCemN2vrIXFS4Kzt6JBVoGCYhNMG-1wZhg,505
56
+ boneio/modbus/orno-or-we-517.json,sha256=w4kPFD8Wtr6Vv5BbGuvCiTHflo71FOxwp3fY8gZN2pQ,842
54
57
  boneio/modbus/pt100.json,sha256=bzKNYDc3lMto94Ut8gutVIsHytQiMobwFCkonOiMegs,526
55
58
  boneio/modbus/r4dcb08.json,sha256=uoQ5EGiFVY_uhYlOWYyFLCXpWxgtEB4SRAAkgON9ii8,2550
56
59
  boneio/modbus/sdm120.json,sha256=4sueFfSw7G6a77gdIUhbfJvE-MNVJFOeVbRvHDw5Rvk,4145
@@ -74,21 +77,21 @@ boneio/schema/actions_switch.yaml,sha256=cDgSi12k4S-TWADQ20Fy9NvYKOXnm7YkyMaWpPy
74
77
  boneio/schema/filters.yaml,sha256=WopX1SmCZsSZXNiGccLoi7uMCsUpdbs0eVfsAjmbay4,286
75
78
  boneio/schema/filters_adc.yaml,sha256=3e0ts92MoFKOnfGOOn6WYIHxu0-tnZe9OjAjN9m7hiI,304
76
79
  boneio/schema/id.yaml,sha256=vHI_6dxkJwoiGp5ien_pPpyaWA1F06eirTgfWMyWa1E,75
77
- boneio/schema/schema.yaml,sha256=C7_7cXyIVQqj4DkaUBxg7tpTYVvSi66_yU9d3mu-P_o,18440
80
+ boneio/schema/schema.yaml,sha256=Chcsh1kHMxhE_cx-T3GWpfXWmSZANhzyNQa-Qw4PKoY,18658
78
81
  boneio/schema/temp_unit.yaml,sha256=m32VGz9RTW92Lz08l9n6RftkcVNZquOGPPr5mc3eZVc,65
79
82
  boneio/schema/update_interval.yaml,sha256=L_YLddAZdybcdO-T57Qhlv1GaWIVDwhvH-GadD1oOIo,133
80
83
  boneio/sensor/__init__.py,sha256=Ztj-xzey-SWrEdVEozcwFsZSuEmJW8STVaf_vPMWiVc,619
81
84
  boneio/sensor/adc.py,sha256=tCUdr3KN5uSbgXiwhNXbMjeNkO2CzPYhIOncHR5_LD0,1328
82
85
  boneio/sensor/gpio.py,sha256=8m07tW1xDsrhBM2dZ9_VvmvYRn-5hLQVTTUhPlKg1rg,1199
83
86
  boneio/sensor/gpio_new.py,sha256=m54agOF2gUh3aoC6f8WpCPAmBRADvqlKeWLqwlon9fg,1223
84
- boneio/sensor/ina219.py,sha256=kBwaCjY63CNFj1mRZ2EEtm2BrMZ6BW4ahjAD2LT-0jo,3439
87
+ boneio/sensor/ina219.py,sha256=mIvu-nIfpfrSi_sn7FBYS8n3y2AkGsXBO_OLAy3tQ48,3518
85
88
  boneio/sensor/temp/__init__.py,sha256=JLNH6Nc78ezleftnIYylIcNtKIm0rdqetbPZLsuCgDc,1844
86
89
  boneio/sensor/temp/dallas.py,sha256=xrvd1LNBh1fRcjz_yd_9S29Lv26ItVtLCmhZgVQWJos,2485
87
90
  boneio/sensor/temp/lm75.py,sha256=-mpOv78429plRPBp9s09Ljz1x2Bdxuagalqz40vlAKE,243
88
91
  boneio/sensor/temp/mcp9808.py,sha256=yAh5yJzZLGTqa39xV4fyqsruj7oy3niOZAUV2W6eyCM,271
89
- boneio/version.py,sha256=1NCo7RHSIyBYszEK8cGeZU4LqthyHFjN78my_Sn7334,41
90
- boneIO-0.8.0.dev6.dist-info/entry_points.txt,sha256=Igl1SMDEWwMg144bwRz28UOCb80hdxomC99QJ3u6qC0,46
91
- boneIO-0.8.0.dev6.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
92
- boneIO-0.8.0.dev6.dist-info/METADATA,sha256=FGB7NvhSyQHQi2VR4nqKQw-ISbKpkxPesG8YRrwwmes,1801
93
- boneIO-0.8.0.dev6.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
94
- boneIO-0.8.0.dev6.dist-info/RECORD,,
92
+ boneio/version.py,sha256=kohMs-Riwj-UAibQEHZq5p9eZISaEAIlNcuJ0QrkGFg,41
93
+ boneIO-0.8.0.dev8.dist-info/entry_points.txt,sha256=Igl1SMDEWwMg144bwRz28UOCb80hdxomC99QJ3u6qC0,46
94
+ boneIO-0.8.0.dev8.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
95
+ boneIO-0.8.0.dev8.dist-info/METADATA,sha256=ooHB3DwTlfrhH1xux3m_XC-puIs6nVCLX00ZW7Gff0I,1801
96
+ boneIO-0.8.0.dev8.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
97
+ boneIO-0.8.0.dev8.dist-info/RECORD,,
@@ -0,0 +1,11 @@
1
+ #- id: IN_02
2
+ # pin: P8_38
3
+ # gpio_mode: gpio_pu
4
+ # detection_type: new
5
+ - id: IN_26
6
+ detection_type: new
7
+ pin: P8_7
8
+ actions:
9
+ pressed:
10
+ - action: output
11
+ pin: OUT_26
@@ -0,0 +1,292 @@
1
+ - id: IN_01
2
+ pin: P8_37
3
+ gpio_mode: gpio_pu
4
+ detection_type: new
5
+ actions:
6
+ single:
7
+ - action: output
8
+ pin: OUT_01
9
+ - id: IN_02
10
+ pin: P8_38
11
+ gpio_mode: gpio_pu
12
+ actions:
13
+ single:
14
+ - action: output
15
+ pin: OUT_02
16
+ - id: IN_03
17
+ pin: P8_39
18
+ detection_type: new
19
+ actions:
20
+ single:
21
+ - action: output
22
+ pin: OUT_03
23
+ - id: IN_04
24
+ pin: P8_40
25
+ detection_type: new
26
+ actions:
27
+ single:
28
+ - action: output
29
+ pin: OUT_04
30
+ - id: IN_05
31
+ pin: P8_41
32
+ detection_type: new
33
+ actions:
34
+ single:
35
+ - action: output
36
+ pin: OUT_05
37
+ - id: IN_06
38
+ pin: P8_42
39
+ detection_type: new
40
+ actions:
41
+ single:
42
+ - action: output
43
+ pin: OUT_06
44
+ - id: IN_07
45
+ detection_type: new
46
+ pin: P8_43
47
+ actions:
48
+ single:
49
+ - action: output
50
+ pin: OUT_07
51
+ - id: IN_08
52
+ pin: P8_44
53
+ detection_type: new
54
+ actions:
55
+ single:
56
+ - action: output
57
+ pin: OUT_08
58
+ - id: IN_09
59
+ pin: P8_45
60
+ detection_type: new
61
+ gpio_mode: gpio_pu
62
+ actions:
63
+ single:
64
+ - action: output
65
+ pin: OUT_09
66
+ - id: IN_10
67
+ pin: P8_46
68
+ gpio_mode: gpio_pu
69
+ detection_type: new
70
+ actions:
71
+ single:
72
+ - action: output
73
+ pin: OUT_10
74
+ - id: IN_11
75
+ pin: P9_42
76
+ detection_type: new
77
+ actions:
78
+ single:
79
+ - action: output
80
+ pin: OUT_11
81
+ - id: IN_12
82
+ detection_type: new
83
+ pin: P9_31
84
+ actions:
85
+ single:
86
+ - action: output
87
+ pin: OUT_12
88
+ # double:
89
+ # - action: mqtt
90
+ # topic: beagle2/cmd/relay/OUT_12/set
91
+ # action_mqtt_msg: 'toggle'
92
+ - id: IN_13
93
+ detection_type: new
94
+ pin: P9_30
95
+ actions:
96
+ single:
97
+ - action: output
98
+ pin: OUT_13
99
+ # long:
100
+ # - action: mqtt
101
+ # topic: beagle2/cmd/relay/OUT_13/set
102
+ # action_mqtt_msg: 'toggle'
103
+ - id: IN_14
104
+ detection_type: new
105
+ pin: P9_29
106
+ actions:
107
+ single:
108
+ - action: output
109
+ pin: OUT_14
110
+
111
+ - id: IN_15
112
+ detection_type: new
113
+ pin: P9_28
114
+ actions:
115
+ single:
116
+ - action: output
117
+ pin: OUT_15
118
+ - id: IN_16
119
+ detection_type: new
120
+ pin: P9_27
121
+ actions:
122
+ single:
123
+ - action: output
124
+ pin: OUT_16
125
+ - id: IN_17
126
+ detection_type: new
127
+ pin: P9_25
128
+ actions:
129
+ single:
130
+ - action: output
131
+ pin: OUT_17
132
+ - id: IN_18
133
+ detection_type: new
134
+ pin: P9_23
135
+ actions:
136
+ single:
137
+ - action: output
138
+ pin: OUT_18
139
+ - id: IN_19
140
+ detection_type: new
141
+ pin: P9_22
142
+ gpio_mode: gpio_pu
143
+ actions:
144
+ single:
145
+ - action: output
146
+ pin: OUT_19
147
+ - id: IN_20
148
+ detection_type: new
149
+ pin: P9_21
150
+ gpio_mode: gpio_pu
151
+ actions:
152
+ single:
153
+ - action: output
154
+ pin: OUT_20
155
+ - id: IN_21
156
+ detection_type: new
157
+ pin: P9_18
158
+ actions:
159
+ single:
160
+ - action: output
161
+ pin: OUT_21
162
+ - id: IN_22
163
+ detection_type: new
164
+ pin: P9_17
165
+ actions:
166
+ single:
167
+ - action: output
168
+ pin: OUT_22
169
+ - id: IN_23
170
+ detection_type: new
171
+ pin: P9_16
172
+ actions:
173
+ single:
174
+ - action: output
175
+ pin: OUT_23
176
+ - id: IN_24
177
+ detection_type: new
178
+ pin: P9_15
179
+ actions:
180
+ single:
181
+ - action: output
182
+ pin: OUT_24
183
+ - id: IN_25
184
+ detection_type: new
185
+ pin: P9_14
186
+ actions:
187
+ single:
188
+ - action: output
189
+ pin: OUT_25
190
+
191
+ #- id: IN_26_binary_sensor!
192
+ # detection_type: new
193
+ # pin: P8_07
194
+
195
+ - id: IN_27
196
+ detection_type: new
197
+ pin: P8_8
198
+ actions:
199
+ single:
200
+ - action: output
201
+ pin: OUT_27
202
+ - id: IN_28
203
+ detection_type: new
204
+ pin: P8_9
205
+ actions:
206
+ single:
207
+ - action: output
208
+ pin: OUT_28
209
+ - id: IN_29
210
+ detection_type: new
211
+ pin: P8_36
212
+ gpio_mode: gpio_pu
213
+ actions:
214
+ single:
215
+ - action: output
216
+ pin: OUT_29
217
+ - id: IN_30
218
+ detection_type: new
219
+ pin: P8_35
220
+ gpio_mode: gpio_pu
221
+ actions:
222
+ single:
223
+ - action: output
224
+ pin: OUT_30
225
+ - id: IN_31
226
+ detection_type: new
227
+ pin: P8_34
228
+ gpio_mode: gpio_pu
229
+ actions:
230
+ single:
231
+ - action: output
232
+ pin: OUT_31
233
+ - id: IN_32
234
+ detection_type: new
235
+ pin: P8_33
236
+ gpio_mode: gpio_pu
237
+ actions:
238
+ single:
239
+ - action: output
240
+ pin: OUT_32
241
+ - id: IN_33
242
+ detection_type: new
243
+ pin: P8_32
244
+ gpio_mode: gpio_pu
245
+ - id: IN_34
246
+ detection_type: new
247
+ pin: P8_31
248
+ - id: IN_35
249
+ detection_type: new
250
+ pin: P8_30
251
+ - id: IN_36
252
+ detection_type: new
253
+ pin: P8_29
254
+ - id: IN_37
255
+ detection_type: new
256
+ pin: P8_28
257
+ - id: IN_38
258
+ detection_type: new
259
+ pin: P8_27
260
+ - id: IN_39
261
+ detection_type: new
262
+ pin: P8_26
263
+ - id: IN_40
264
+ detection_type: new
265
+ pin: P8_19
266
+ - id: IN_41
267
+ detection_type: new
268
+ pin: P8_18
269
+ - id: IN_42
270
+ detection_type: new
271
+ pin: P8_17
272
+ - id: IN_43
273
+ detection_type: new
274
+ pin: P8_16
275
+ - id: IN_44
276
+ detection_type: new
277
+ pin: P8_15
278
+ - id: IN_45
279
+ detection_type: new
280
+ pin: P8_14
281
+ - id: IN_46
282
+ detection_type: new
283
+ pin: P8_13
284
+ - id: IN_47
285
+ detection_type: new
286
+ pin: P8_12
287
+ - id: IN_48
288
+ detection_type: new
289
+ pin: P8_11
290
+ - id: IN_49
291
+ detection_type: new
292
+ pin: P8_10
@@ -0,0 +1,192 @@
1
+ # config to Relay board 32x10 v0.4
2
+ - id: OUT_01
3
+ kind: mcp
4
+ mcp_id: mcp2
5
+ pin: 7
6
+ output_type: light
7
+
8
+ - id: OUT_02
9
+ kind: mcp
10
+ mcp_id: mcp2
11
+ pin: 6
12
+ output_type: light
13
+
14
+ - id: OUT_03
15
+ kind: mcp
16
+ mcp_id: mcp2
17
+ pin: 5
18
+ output_type: light
19
+
20
+ - id: OUT_04
21
+ kind: mcp
22
+ mcp_id: mcp2
23
+ pin: 4
24
+ output_type: light
25
+
26
+ - id: OUT_05
27
+ kind: mcp
28
+ mcp_id: mcp2
29
+ pin: 3
30
+ output_type: light
31
+
32
+ - id: OUT_06
33
+ kind: mcp
34
+ mcp_id: mcp2
35
+ pin: 2
36
+ output_type: light
37
+
38
+ - id: OUT_07
39
+ kind: mcp
40
+ mcp_id: mcp2
41
+ pin: 1
42
+ output_type: light
43
+
44
+ - id: OUT_08
45
+ kind: mcp
46
+ mcp_id: mcp2
47
+ pin: 0
48
+ output_type: light
49
+
50
+ - id: OUT_09
51
+ kind: mcp
52
+ mcp_id: mcp1
53
+ pin: 7
54
+ output_type: light
55
+
56
+ - id: OUT_10
57
+ kind: mcp
58
+ mcp_id: mcp1
59
+ pin: 6
60
+ output_type: light
61
+
62
+ - id: OUT_11
63
+ kind: mcp
64
+ mcp_id: mcp1
65
+ pin: 5
66
+ output_type: light
67
+
68
+ - id: OUT_12
69
+ kind: mcp
70
+ mcp_id: mcp1
71
+ pin: 4
72
+ output_type: light
73
+
74
+ - id: OUT_13
75
+ kind: mcp
76
+ mcp_id: mcp1
77
+ pin: 3
78
+ output_type: light
79
+
80
+ - id: OUT_14
81
+ kind: mcp
82
+ mcp_id: mcp1
83
+ pin: 2
84
+ output_type: light
85
+
86
+ - id: OUT_15
87
+ kind: mcp
88
+ mcp_id: mcp1
89
+ pin: 1
90
+ output_type: light
91
+
92
+ - id: OUT_16
93
+ kind: mcp
94
+ mcp_id: mcp1
95
+ pin: 0
96
+ output_type: light
97
+
98
+ - id: OUT_17
99
+ kind: mcp
100
+ mcp_id: mcp2
101
+ pin: 8
102
+ output_type: light
103
+
104
+ - id: OUT_18
105
+ kind: mcp
106
+ mcp_id: mcp2
107
+ pin: 9
108
+ output_type: light
109
+
110
+ - id: OUT_19
111
+ kind: mcp
112
+ mcp_id: mcp2
113
+ pin: 10
114
+ output_type: light
115
+
116
+ - id: OUT_20
117
+ kind: mcp
118
+ mcp_id: mcp2
119
+ pin: 11
120
+ output_type: light
121
+
122
+ - id: OUT_21
123
+ kind: mcp
124
+ mcp_id: mcp2
125
+ pin: 12
126
+ output_type: light
127
+
128
+ - id: OUT_22
129
+ kind: mcp
130
+ mcp_id: mcp2
131
+ pin: 13
132
+ output_type: light
133
+
134
+ - id: OUT_23
135
+ kind: mcp
136
+ mcp_id: mcp2
137
+ pin: 14
138
+ output_type: light
139
+
140
+ - id: OUT_24
141
+ kind: mcp
142
+ mcp_id: mcp2
143
+ pin: 15
144
+ output_type: light
145
+
146
+ - id: OUT_25
147
+ kind: mcp
148
+ mcp_id: mcp1
149
+ pin: 8
150
+ output_type: light
151
+
152
+ - id: OUT_26
153
+ kind: mcp
154
+ mcp_id: mcp1
155
+ pin: 9
156
+ output_type: light
157
+
158
+ - id: OUT_27
159
+ kind: mcp
160
+ mcp_id: mcp1
161
+ pin: 10
162
+ output_type: light
163
+
164
+ - id: OUT_28
165
+ kind: mcp
166
+ mcp_id: mcp1
167
+ pin: 11
168
+ output_type: light
169
+
170
+ - id: OUT_29
171
+ kind: mcp
172
+ mcp_id: mcp1
173
+ pin: 12
174
+ output_type: light
175
+
176
+ - id: OUT_30
177
+ kind: mcp
178
+ mcp_id: mcp1
179
+ pin: 13
180
+ output_type: light
181
+
182
+ - id: OUT_31
183
+ kind: mcp
184
+ mcp_id: mcp1
185
+ pin: 14
186
+ output_type: light
187
+
188
+ - id: OUT_32
189
+ kind: mcp
190
+ mcp_id: mcp1
191
+ pin: 15
192
+ output_type: light
boneio/group/output.py CHANGED
@@ -1,4 +1,5 @@
1
1
  """Group output module."""
2
+
2
3
  from __future__ import annotations
3
4
  import asyncio
4
5
  from typing import List
@@ -13,26 +14,46 @@ class OutputGroup(BasicRelay):
13
14
  self,
14
15
  members: List[BasicRelay],
15
16
  output_type: str = SWITCH,
16
- restored_state: bool = True,
17
+ restored_state: bool = False,
18
+ all_on_behaviour: bool = False,
17
19
  **kwargs,
18
20
  ) -> None:
19
21
  """Initialize cover class."""
20
22
  self._loop = asyncio.get_event_loop()
21
23
  super().__init__(
22
- **kwargs, output_type=output_type, restored_state=restored_state, topic_type="group"
24
+ **kwargs,
25
+ output_type=output_type,
26
+ restored_state=False,
27
+ topic_type="group",
23
28
  )
29
+ self._all_on_behaviour = all_on_behaviour
24
30
  self._group_members = [x for x in members if x.output_type != COVER]
25
31
  self._timer_handle = None
32
+ self.check_state()
33
+
26
34
  for member in self._group_members:
27
- self._event_bus.add_output_listener(member.id, self.event_listener)
35
+ self._event_bus.add_output_listener(
36
+ output_id=member.id,
37
+ group_id=self.id,
38
+ target=self.event_listener,
39
+ )
28
40
 
29
- async def event_listener(self, relay_id=None) -> None:
30
- """Listen for events called by children relays."""
31
- state = OFF
41
+ def check_state(self) -> None:
32
42
  for x in self._group_members:
33
43
  if x.state == ON:
34
- state = ON
35
- break
44
+ self._state = ON
45
+ return
46
+
47
+ async def event_listener(self, relay_id=None) -> None:
48
+ """Listen for events called by children relays."""
49
+ if self._all_on_behaviour:
50
+ state = (
51
+ ON if all(x.state == ON for x in self._group_members) else OFF
52
+ )
53
+ else:
54
+ state = (
55
+ ON if any(x.state == ON for x in self._group_members) else OFF
56
+ )
36
57
  if state != self._state or not relay_id:
37
58
  self._state = state
38
59
  self._loop.call_soon_threadsafe(self.send_state)
@@ -40,13 +61,19 @@ class OutputGroup(BasicRelay):
40
61
  async def async_turn_on(self) -> None:
41
62
  """Call turn on action."""
42
63
  await asyncio.gather(
43
- *[self._loop.run_in_executor(self.executor, x.turn_on) for x in self._group_members]
64
+ *[
65
+ self._loop.run_in_executor(self.executor, x.turn_on)
66
+ for x in self._group_members
67
+ ]
44
68
  )
45
69
 
46
70
  async def async_turn_off(self) -> None:
47
71
  """Call turn off action."""
48
72
  await asyncio.gather(
49
- *[self._loop.run_in_executor(self.executor, x.turn_off) for x in self._group_members]
73
+ *[
74
+ self._loop.run_in_executor(self.executor, x.turn_off)
75
+ for x in self._group_members
76
+ ]
50
77
  )
51
78
 
52
79
  @property
@@ -56,4 +83,6 @@ class OutputGroup(BasicRelay):
56
83
 
57
84
  def send_state(self) -> None:
58
85
  """Send state to Mqtt on action."""
59
- self._send_message(topic=self._send_topic, payload=self.payload(), retain=True)
86
+ self._send_message(
87
+ topic=self._send_topic, payload=self.payload(), retain=True
88
+ )
boneio/helper/events.py CHANGED
@@ -4,7 +4,7 @@ import logging
4
4
  import signal
5
5
  import time
6
6
  from datetime import datetime
7
- from typing import Any, Coroutine, List, Optional, Callable, Optional
7
+ from typing import Any, Coroutine, List, Optional, Callable
8
8
 
9
9
 
10
10
  from boneio.helper.util import callback
@@ -85,7 +85,9 @@ class EventBus:
85
85
  self._output_listeners = {}
86
86
  self._sigterm_listeners = []
87
87
  self._haonline_listeners = []
88
- self._timer_handle = _async_create_timer(self._loop, self._run_second_event)
88
+ self._timer_handle = _async_create_timer(
89
+ self._loop, self._run_second_event
90
+ )
89
91
  for signame in {"SIGINT", "SIGTERM"}:
90
92
  self._loop.add_signal_handler(
91
93
  getattr(signal, signame),
@@ -121,17 +123,19 @@ class EventBus:
121
123
  """Add sigterm listener."""
122
124
  self._sigterm_listeners.append(target)
123
125
 
124
- def add_output_listener(self, name, target):
126
+ def add_output_listener(self, output_id, group_id, target):
125
127
  """Add output listener."""
126
- self._output_listeners[name] = ListenerJob(target=target)
127
- return self._output_listeners[name]
128
-
128
+ if output_id not in self._output_listeners:
129
+ self._output_listeners[output_id] = {}
130
+ self._output_listeners[output_id][group_id] = ListenerJob(target=target)
131
+ return self._output_listeners[output_id]
132
+
129
133
  def trigger_output_event(self, event):
130
134
  asyncio.create_task(self.async_trigger_output_event(event=event))
131
-
135
+
132
136
  async def async_trigger_output_event(self, event):
133
- listener = self._output_listeners.get(event)
134
- if listener:
137
+ listeners = self._output_listeners.get(event, {})
138
+ for listener in listeners.values():
135
139
  await listener.target(event)
136
140
 
137
141
  def add_haonline_listener(self, target):
boneio/helper/loader.py CHANGED
@@ -15,7 +15,6 @@ from boneio.const import (
15
15
  DEVICE_CLASS,
16
16
  FILTERS,
17
17
  GPIO,
18
- PCA,
19
18
  ID,
20
19
  INIT_SLEEP,
21
20
  INPUT,
@@ -135,6 +134,8 @@ def create_temp_sensor(
135
134
  else:
136
135
  return
137
136
  name = config.get(ID)
137
+ if not name:
138
+ return
138
139
  id = name.replace(" ", "")
139
140
  try:
140
141
  temp_sensor = TempSensor(
boneio/helper/stats.py CHANGED
@@ -63,7 +63,7 @@ def get_network_info():
63
63
  for addr in addrs:
64
64
  if addr.family == socket.AF_INET:
65
65
  out["ip"] = addr.address
66
- out["mask"] = addr.netmask
66
+ out["mask"] = addr.netmask if addr.netmask is not None else ""
67
67
  elif addr.family == psutil.AF_LINK:
68
68
  out["mac"] = addr.address
69
69
  return out
@@ -139,7 +139,9 @@ class HostSensor(AsyncUpdater):
139
139
 
140
140
  async def async_update(self, time: datetime) -> None:
141
141
  self._state = self._update_function()
142
- self._loop.call_soon_threadsafe(partial(self._manager_callback, self._type))
142
+ self._loop.call_soon_threadsafe(
143
+ partial(self._manager_callback, self._type)
144
+ )
143
145
 
144
146
  @property
145
147
  def state(self) -> dict:
@@ -155,7 +157,7 @@ class HostData:
155
157
  self,
156
158
  output: dict,
157
159
  callback: Callable,
158
- temp_sensor: Callable[[LM75Sensor, MCP9808Sensor], None],
160
+ temp_sensor: Callable[[LM75Sensor, MCP9808Sensor], None] | None,
159
161
  ina219: INA219Class | None,
160
162
  manager: Manager,
161
163
  enabled_screens: List[str],
@@ -164,27 +166,68 @@ class HostData:
164
166
  self._hostname = socket.gethostname()
165
167
  self._temp_sensor = temp_sensor
166
168
  host_stats = {
167
- NETWORK: {"f": get_network_info, "update_interval": TimePeriod(seconds=60)},
169
+ NETWORK: {
170
+ "f": get_network_info,
171
+ "update_interval": TimePeriod(seconds=60),
172
+ },
168
173
  CPU: {"f": get_cpu_info, "update_interval": TimePeriod(seconds=5)},
169
- DISK: {"f": get_disk_info, "update_interval": TimePeriod(seconds=60)},
170
- MEMORY: {"f": get_memory_info, "update_interval": TimePeriod(seconds=10)},
171
- SWAP: {"f": get_swap_info, "update_interval": TimePeriod(seconds=60)},
174
+ DISK: {
175
+ "f": get_disk_info,
176
+ "update_interval": TimePeriod(seconds=60),
177
+ },
178
+ MEMORY: {
179
+ "f": get_memory_info,
180
+ "update_interval": TimePeriod(seconds=10),
181
+ },
182
+ SWAP: {
183
+ "f": get_swap_info,
184
+ "update_interval": TimePeriod(seconds=60),
185
+ },
172
186
  UPTIME: {
173
- "f": lambda: {
174
- "uptime": {"data": get_uptime(), "fontSize": "small", "row": 2, "col": 3},
175
- "MQTT": {"data": "CONN" if manager.mqtt_state else "DOWN", "fontSize": "small", "row": 3, "col": 60},
176
- "T": {
177
- "data": f"{self._temp_sensor.state} C",
187
+ "f": lambda: (
188
+ {
189
+ "uptime": {
190
+ "data": get_uptime(),
191
+ "fontSize": "small",
192
+ "row": 2,
193
+ "col": 3,
194
+ },
195
+ "MQTT": {
196
+ "data": "CONN" if manager.mqtt_state else "DOWN",
197
+ "fontSize": "small",
198
+ "row": 3,
199
+ "col": 60,
200
+ },
201
+ "T": {
202
+ "data": f"{self._temp_sensor.state} C",
203
+ "fontSize": "small",
204
+ "row": 3,
205
+ "col": 3,
206
+ },
207
+ }
208
+ if self._temp_sensor
209
+ else {
210
+ "uptime": {
211
+ "data": get_uptime(),
212
+ "fontSize": "small",
213
+ "row": 2,
214
+ "col": 3,
215
+ }
216
+ }
217
+ ),
218
+ "static": {
219
+ HOST: {
220
+ "data": self._hostname,
178
221
  "fontSize": "small",
179
- "row": 3,
180
- "col": 3
222
+ "row": 0,
223
+ "col": 3,
224
+ },
225
+ "ver": {
226
+ "data": __version__,
227
+ "fontSize": "small",
228
+ "row": 1,
229
+ "col": 3,
181
230
  },
182
- }
183
- if self._temp_sensor
184
- else {"uptime": {"data": get_uptime(), "fontSize": "small", "row": 2, "col": 3}},
185
- "static": {
186
- HOST: {"data": self._hostname, "fontSize": "small", "row": 0, "col": 3},
187
- "ver": {"data": __version__, "fontSize": "small", "row": 1, "col": 3},
188
231
  },
189
232
  "update_interval": TimePeriod(seconds=30),
190
233
  },
@@ -192,9 +235,12 @@ class HostData:
192
235
  if ina219 is not None:
193
236
  host_stats[INA219] = {
194
237
  "f": lambda: {
195
- *{sensor.device_class: sensor.state for sensor in ina219.sensors}
238
+ *{
239
+ sensor.device_class: sensor.state
240
+ for sensor in ina219.sensors.values()
241
+ }
196
242
  },
197
- "update_interval": TimePeriod(seconds=60)
243
+ "update_interval": TimePeriod(seconds=60),
198
244
  }
199
245
  self._data = {}
200
246
  for k, _v in host_stats.items():
boneio/input/gpio.py CHANGED
@@ -1,4 +1,5 @@
1
1
  """GpioEventButton to receive signals."""
2
+
2
3
  from __future__ import annotations
3
4
  import logging
4
5
  import asyncio
@@ -39,6 +40,12 @@ class GpioEventButton(GpioBaseClass):
39
40
  self._is_waiting_for_second_click = False
40
41
  if not self._state and not self._timer_long.is_waiting():
41
42
  self.press_callback(click_type=SINGLE, duration=None)
43
+ else:
44
+ _LOGGER.error(
45
+ "Thats why it's not working %s %s",
46
+ self._state,
47
+ self._timer_long.is_waiting(),
48
+ )
42
49
 
43
50
  async def _run(self) -> None:
44
51
  while True:
@@ -49,7 +56,7 @@ class GpioEventButton(GpioBaseClass):
49
56
  if state == self._state:
50
57
  return
51
58
  self._state = state
52
- if state: #is pressed?
59
+ if state: # is pressed?
53
60
  self._timer_long.start_timer()
54
61
  if self._timer_double.is_waiting():
55
62
  self._timer_double.reset()
@@ -59,8 +66,11 @@ class GpioEventButton(GpioBaseClass):
59
66
  self._timer_double.start_timer()
60
67
  self._is_waiting_for_second_click = True
61
68
 
62
- else: #is released?
63
- if not self._is_waiting_for_second_click and not self._double_click_ran:
69
+ else: # is released?
70
+ if (
71
+ not self._is_waiting_for_second_click
72
+ and not self._double_click_ran
73
+ ):
64
74
  if self._timer_long.is_waiting():
65
75
  self.press_callback(click_type=SINGLE, duration=None)
66
76
  self._timer_long.reset()
boneio/manager.py CHANGED
@@ -299,7 +299,7 @@ class Manager:
299
299
  if x in self._output:
300
300
  output = self._output[x]
301
301
  if output.output_type == COVER:
302
- _LOGGER.warn("You can't add cover output to group.")
302
+ _LOGGER.warning("You can't add cover output to group.")
303
303
  else:
304
304
  outputs.append(output)
305
305
  return outputs
boneio/modbus/client.py CHANGED
@@ -109,7 +109,7 @@ class Modbus:
109
109
  count: int = 2,
110
110
  method: str = "input",
111
111
  ) -> float | None:
112
- """Call sync. pymodbus."""
112
+ """Call read_registers and decode."""
113
113
  result = await self.read_registers(
114
114
  unit=unit, address=address, count=count, method=method
115
115
  )
@@ -127,7 +127,7 @@ class Modbus:
127
127
  count: int = 2, # number of registers to read
128
128
  method: str = "input", # type of register: input, holding
129
129
  ) -> ModbusResponse:
130
- """Call sync. pymodbus."""
130
+ """Call async pymodbus."""
131
131
  async with self._lock:
132
132
  if not self._pymodbus_connect():
133
133
  _LOGGER.error("Can't connect to Modbus.")
@@ -136,7 +136,7 @@ class Modbus:
136
136
  try:
137
137
  read_method = self._read_methods[method]
138
138
  _LOGGER.debug(
139
- "Multiple reading %s registers from %s with method %s from device %s.",
139
+ "Reading %s registers from %s with method %s from device %s.",
140
140
  count,
141
141
  address,
142
142
  method,
@@ -1,20 +1,36 @@
1
1
  {
2
- "model": "orno-or-we-517",
3
- "registers_base": [
2
+ "model": "orno-or-we-517",
3
+ "registers_base": [
4
+ {
5
+ "base": 14,
6
+ "length": 6,
7
+ "register_type": "holding",
8
+ "registers": [
4
9
  {
5
- "base": 14,
6
- "length": 4,
7
- "register_type": "holding",
8
- "registers": [
9
- {
10
- "name": "Napiecie_L1",
11
- "address": 14,
12
- "unit_of_measurement": "V",
13
- "state_class": "measurement",
14
- "device_class": "voltage",
15
- "return_type": "float32"
16
- }
17
- ]
10
+ "name": "Voltage_L1",
11
+ "address": 14,
12
+ "unit_of_measurement": "V",
13
+ "state_class": "measurement",
14
+ "device_class": "voltage",
15
+ "value_type": "FP32"
16
+ },
17
+ {
18
+ "name": "Voltage_L2",
19
+ "address": 16,
20
+ "unit_of_measurement": "V",
21
+ "state_class": "measurement",
22
+ "device_class": "voltage",
23
+ "value_type": "FP32"
24
+ },
25
+ {
26
+ "name": "Voltage_L3",
27
+ "address": 18,
28
+ "unit_of_measurement": "V",
29
+ "state_class": "measurement",
30
+ "device_class": "voltage",
31
+ "value_type": "FP32"
18
32
  }
19
- ]
33
+ ]
34
+ }
35
+ ]
20
36
  }
boneio/schema/schema.yaml CHANGED
@@ -432,6 +432,12 @@ output_group:
432
432
  required: True
433
433
  meta:
434
434
  label: List of outputs.
435
+ all_on_behaviour:
436
+ type: boolean
437
+ required: True
438
+ default: False
439
+ meta:
440
+ label: Behaviour if set true toggle when all outputs are on, otherwise if any is on then group is on.
435
441
  output_type:
436
442
  type: string
437
443
  required: True
boneio/sensor/ina219.py CHANGED
@@ -1,4 +1,5 @@
1
1
  """INA219 Black sensor."""
2
+
2
3
  from __future__ import annotations
3
4
  from datetime import datetime
4
5
  import logging
@@ -10,24 +11,24 @@ from boneio.helper.sensor.ina_219_smbus import INA219_I2C
10
11
 
11
12
  _LOGGER = logging.getLogger(__name__)
12
13
 
13
- unit_converter = {
14
- "current": "A",
15
- "power": "W",
16
- "voltage": "V"
17
- }
14
+ unit_converter = {"current": "A", "power": "W", "voltage": "V"}
18
15
 
19
16
 
20
17
  class INA219Sensor(BasicMqtt, Filter):
21
18
  """Represent singel value from INA219 as sensor."""
22
19
 
23
- def __init__(self, device_class: str, filters: list, state: float | None, **kwargs) -> None:
20
+ def __init__(
21
+ self, device_class: str, filters: list, state: float | None, **kwargs
22
+ ) -> None:
24
23
  super().__init__(topic_type=SENSOR, **kwargs)
25
24
  self._unit_of_measurement = unit_converter[device_class]
26
25
  self._device_class = device_class
27
26
  self._filters = filters
28
27
  self._raw_state = state
29
28
  self._state = (
30
- self._apply_filters(value=self._raw_state) if self._raw_state else None
29
+ self._apply_filters(value=self._raw_state)
30
+ if self._raw_state
31
+ else None
31
32
  )
32
33
 
33
34
  @property
@@ -41,18 +42,22 @@ class INA219Sensor(BasicMqtt, Filter):
41
42
  @property
42
43
  def state(self) -> float | None:
43
44
  return self._state
44
-
45
+
45
46
  @property
46
47
  def device_class(self) -> str:
47
48
  return self._device_class
48
-
49
+
49
50
  @property
50
51
  def unit_of_measurement(self) -> str:
51
52
  return self._unit_of_measurement
52
53
 
53
54
  def update(self, time: datetime) -> None:
54
55
  """Fetch temperature periodically and send to MQTT."""
55
- _state = self._apply_filters(value=self._raw_state) if self._raw_state else None
56
+ _state = (
57
+ self._apply_filters(value=self._raw_state)
58
+ if self._raw_state
59
+ else None
60
+ )
56
61
  if not _state:
57
62
  return
58
63
  self._state = _state
@@ -65,7 +70,9 @@ class INA219Sensor(BasicMqtt, Filter):
65
70
  class INA219(AsyncUpdater, Filter):
66
71
  """Represent INA219 sensors."""
67
72
 
68
- def __init__(self, address: int, id: str, sensors: list[dict] = [], **kwargs) -> None:
73
+ def __init__(
74
+ self, address: int, id: str, sensors: list[dict] = [], **kwargs
75
+ ) -> None:
69
76
  """Setup GPIO ADC Sensor"""
70
77
  self._loop = asyncio.get_event_loop()
71
78
  self._ina_219 = INA219_I2C(address=address)
boneio/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  # flake8: noqa
2
- __version__ = "0.8.0dev6"
2
+ __version__ = "0.8.0dev8"