boneIO 0.9.0.dev13__py3-none-any.whl → 0.9.0.dev15__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/manager.py CHANGED
@@ -61,7 +61,7 @@ from boneio.helper import (
61
61
  )
62
62
  from boneio.helper.config import ConfigHelper
63
63
  from boneio.helper.events import EventBus
64
- from boneio.helper.exceptions import ModbusUartException, RestartRequestException
64
+ from boneio.helper.exceptions import ModbusUartException
65
65
  from boneio.helper.gpio import GpioBaseClass
66
66
  from boneio.helper.loader import (
67
67
  configure_binary_sensor,
@@ -187,7 +187,7 @@ class Manager:
187
187
  _name = _config.pop(ID)
188
188
  restore_state = _config.pop(RESTORE_STATE, False)
189
189
  _id = strip_accents(_name)
190
- out = configure_relay(
190
+ out = configure_relay( #grouped_output updated here.
191
191
  manager=self,
192
192
  state_manager=self._state_manager,
193
193
  topic_prefix=self._config_helper.topic_prefix,
@@ -871,8 +871,8 @@ class Manager:
871
871
 
872
872
  async def restart_request(self) -> None:
873
873
  _LOGGER.info("Restarting process. Systemd should restart it soon.")
874
- await self.event_bus.ask_stop()
875
- raise RestartRequestException
874
+ import os
875
+ os._exit(0) # Terminate the process
876
876
 
877
877
  @property
878
878
  def outputs(self) -> dict:
boneio/oled.py CHANGED
@@ -20,7 +20,7 @@ from boneio.helper import (
20
20
  setup_input,
21
21
  )
22
22
  from boneio.helper.events import EventBus, async_track_point_in_time, utcnow
23
- from boneio.models import InputState, SensorState
23
+ from boneio.models import InputState, OutputState, SensorState
24
24
 
25
25
  _LOGGER = logging.getLogger(__name__)
26
26
 
@@ -220,6 +220,8 @@ class Oled:
220
220
  and self._current_screen in self._grouped_outputs
221
221
  ):
222
222
  self._draw_output(data, draw)
223
+ for id in data.keys():
224
+ self._event_bus.add_event_listener(event_type="output", entity_id=id, listener_id=f"oled_{self._current_screen}", target=self._output_callback)
223
225
  elif self._current_screen == UPTIME:
224
226
  self._draw_uptime(data, draw)
225
227
  self._event_bus.add_event_listener(event_type="host", entity_id=f"{self._current_screen}_hoststats", listener_id=f"oled_{self._current_screen}", target=self._standard_callback)
@@ -242,15 +244,16 @@ class Oled:
242
244
  point_in_time=utcnow() + self._sleep_timeout.as_timedelta,
243
245
  )
244
246
 
247
+ async def _output_callback(self, event: OutputState):
248
+ if self._grouped_outputs and self._current_screen in self._grouped_outputs:
249
+ self.handle_data_update(type=self._current_screen)
250
+
245
251
  async def _standard_callback(self, event: SensorState):
246
252
  self.handle_data_update(type=UPTIME)
247
253
 
248
254
  async def _input_callback(self, event: InputState):
249
255
  self.handle_data_update(type="inputs")
250
256
 
251
- async def _output_callback(self, data):
252
- self.handle_data_update(type="outputs")
253
-
254
257
  def handle_data_update(self, type: str):
255
258
  """Callback to handle new data present into screen."""
256
259
  if not self._current_screen:
boneio/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  # flake8: noqa
2
- __version__ = "0.9.0dev13"
2
+ __version__ = "0.9.0dev15"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boneio
3
- Version: 0.9.0dev13
3
+ Version: 0.9.0dev15
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>
@@ -54,7 +54,7 @@ boneio/helper/yaml_util.py,sha256=0E3lST1sfXSlWcL8GoKOyiipkHdMbd9JJ20lgE9WN30,18
54
54
  boneio/input/__init__.py,sha256=8Hcps-wCCl6bCAMoEmDJecR-Q9giFL29AvG1ZGe0dZw,200
55
55
  boneio/input/gpio.py,sha256=vdQuvWlwV41mbLgLRi-z1vpmRj61HDsmbJrYUoCOHkM,2675
56
56
  boneio/input/gpio_new.py,sha256=Br2Lw5bci1_qb_UO63tJr4uBSjCkBvjGdzla4s1ctS8,3050
57
- boneio/manager.py,sha256=y2NQdbitpR2wAN947qV-aCKlz80TfSbLTZOon2Ns3QA,32874
57
+ boneio/manager.py,sha256=Q23nPRXT467HKP8EQAd0m8wruIa59ipxkDiVpeiVf6s,32864
58
58
  boneio/modbus/__init__.py,sha256=yeHIxZ0_u7eCL7CqScvob5Utcru6Iza0LEtTagEtNtw,116
59
59
  boneio/modbus/client.py,sha256=v_w6HOFH4e-CWcSjpyBojLhglIqJ6kPVXOLEDAEmsI0,8137
60
60
  boneio/modbus/cwt.json,sha256=PCn9t5wQkNCD8AqwXSoJ3cEm50bKAX4FmPw6fWCvLrg,908
@@ -78,7 +78,7 @@ boneio/models/__init__.py,sha256=RiXQsIBXKaS0LkZ085EppB99MIp-eKZZbQ8XpS2Urnk,118
78
78
  boneio/models/files.py,sha256=-L39YexEkfaXszjc1-3Nc7MBtGZljS8_Z1t8KHE__1o,294
79
79
  boneio/models/logs.py,sha256=0IELpySgOv5BxqLZr_Q4p9jPbFcC8N0yvVccZIbeW3g,192
80
80
  boneio/mqtt_client.py,sha256=QsrfoFkh027_ZwNeiPJOhJ96gP8-csH4Ez4OA1RNSK4,9689
81
- boneio/oled.py,sha256=9qafLp7DuGuti-5EucYzrdcXw-AxGIBU59hNtJZTt1Q,11147
81
+ boneio/oled.py,sha256=RAQInYUHyDq3Qe1VD03QBSiIz8UIzVfvh4h_t8aR4pU,11492
82
82
  boneio/relay/__init__.py,sha256=Cz6D37GKHxm8DiuPuxE2EMaey2wdUdJYVet_hfR0lzA,231
83
83
  boneio/relay/basic.py,sha256=oaSwSZhASfopmeyo8Ti1KRdw7o4w0CDAMw2fy9O2Jdc,5373
84
84
  boneio/relay/gpio.py,sha256=s64FBf6zlxciF57xJ6nrvy0t5Rie0uiXlwos0HL3RKM,1163
@@ -105,7 +105,7 @@ boneio/sensor/temp/__init__.py,sha256=XA0Jew4CJqyOCn06D6pXTELhT60885UaTxFdIqtXE-
105
105
  boneio/sensor/temp/dallas.py,sha256=qOhoZvBqgwDTy3Q7r1UUFbGoteUKMFsqpjBQgPm16rw,2690
106
106
  boneio/sensor/temp/lm75.py,sha256=-mpOv78429plRPBp9s09Ljz1x2Bdxuagalqz40vlAKE,243
107
107
  boneio/sensor/temp/mcp9808.py,sha256=yAh5yJzZLGTqa39xV4fyqsruj7oy3niOZAUV2W6eyCM,271
108
- boneio/version.py,sha256=uMOqK1lAhNpEthY3GYYK3iT9kZ6RmqRYb9s69I8R-u8,42
108
+ boneio/version.py,sha256=xT9Q98rUjudL921BM9gFT-2mV3amhLNn4d_87JvU_Q4,42
109
109
  boneio/webui/app.py,sha256=JG6oi0QcQua4jk8uYpSXoDyhMCiLxx3WRzs9PLLOIKo,33323
110
110
  boneio/webui/frontend-dist/assets/abap-BrgZPUOV.js,sha256=o-KiQdqDx6qAg2rOn7OyokL0WP-Rffnxk2Py5kMN0Fk,14409
111
111
  boneio/webui/frontend-dist/assets/apex-DyP6w7ZV.js,sha256=nm1bQzOU_JCzp8WFFKtYxrtJ50DvA-FGkoo_0Ala62g,4198
@@ -226,8 +226,8 @@ boneio/webui/schema/sensor.schema.json,sha256=OGRunW_aAOfp2q0IU1aD3WRO7wEFsSknCl
226
226
  boneio/webui/schema/web.schema.json,sha256=hoixKf8J51D-UxGawcnD1UsgQFY07bqCQNereTaaNqw,1342
227
227
  boneio/webui/web_server.py,sha256=CDB19_yZpStAnrbFjucE7AN8i_pShMXjAbBCmNwdaCE,5102
228
228
  boneio/webui/websocket_manager.py,sha256=K9KXIT0OvK_ILNmM5GIH1f7FiYkk0vTNM0iJQh5Jdfg,5365
229
- boneio-0.9.0.dev13.dist-info/entry_points.txt,sha256=Igl1SMDEWwMg144bwRz28UOCb80hdxomC99QJ3u6qC0,46
230
- boneio-0.9.0.dev13.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
231
- boneio-0.9.0.dev13.dist-info/METADATA,sha256=4s4D5PxjgUTbyWvITyDhN1E16GcDzU2pcT3cwKNY88k,1978
232
- boneio-0.9.0.dev13.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
233
- boneio-0.9.0.dev13.dist-info/RECORD,,
229
+ boneio-0.9.0.dev15.dist-info/entry_points.txt,sha256=Igl1SMDEWwMg144bwRz28UOCb80hdxomC99QJ3u6qC0,46
230
+ boneio-0.9.0.dev15.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
231
+ boneio-0.9.0.dev15.dist-info/METADATA,sha256=1_YJdlMnJ0wuPhLUtNkDiZr4p8W8BzOMVdol07YZquk,1978
232
+ boneio-0.9.0.dev15.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
233
+ boneio-0.9.0.dev15.dist-info/RECORD,,