boneIO 0.6.0.dev1__tar.gz → 0.6.0.dev2__tar.gz

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.
Files changed (79) hide show
  1. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/PKG-INFO +1 -1
  2. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/manager.py +22 -11
  3. boneIO-0.6.0.dev2/boneio/version.py +2 -0
  4. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/pyproject.toml +1 -1
  5. boneIO-0.6.0.dev1/boneio/version.py +0 -2
  6. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/LICENSE +0 -0
  7. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/README.md +0 -0
  8. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/__init__.py +0 -0
  9. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/bonecli.py +0 -0
  10. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/const.py +0 -0
  11. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/cover.py +0 -0
  12. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/example_config/__init__.py +0 -0
  13. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/example_config/adc.yaml +0 -0
  14. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/example_config/config.yaml +0 -0
  15. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/example_config/cover.yaml +0 -0
  16. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/example_config/input.yaml +0 -0
  17. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/example_config/led32x4A.yaml +0 -0
  18. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/example_config/output24x16A.yaml +0 -0
  19. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/example_config/output32x5A.yaml +0 -0
  20. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/fonts/danube__.ttf +0 -0
  21. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/__init__.py +0 -0
  22. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/async_updater.py +0 -0
  23. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/config.py +0 -0
  24. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/events.py +0 -0
  25. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/exceptions.py +0 -0
  26. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/filter.py +0 -0
  27. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/gpio.py +0 -0
  28. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/ha_discovery.py +0 -0
  29. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/loader.py +0 -0
  30. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/logger.py +0 -0
  31. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/mqtt.py +0 -0
  32. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/oled.py +0 -0
  33. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/onewire/W1ThermSensor.py +0 -0
  34. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/onewire/__init__.py +0 -0
  35. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/onewire/ds2482.py +0 -0
  36. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/onewire/onewire.py +0 -0
  37. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/queue.py +0 -0
  38. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/state_manager.py +0 -0
  39. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/stats.py +0 -0
  40. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/timeperiod.py +0 -0
  41. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/util.py +0 -0
  42. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/helper/yaml_util.py +0 -0
  43. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/input/__init__.py +0 -0
  44. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/input/gpio.py +0 -0
  45. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/modbus.py +0 -0
  46. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/mqtt_client.py +0 -0
  47. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/oled.py +0 -0
  48. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/relay/__init__.py +0 -0
  49. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/relay/basic.py +0 -0
  50. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/relay/gpio.py +0 -0
  51. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/relay/mcp.py +0 -0
  52. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/relay/pca.py +0 -0
  53. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/runner.py +0 -0
  54. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/schema/actions.yaml +0 -0
  55. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/schema/actions_sensor.yaml +0 -0
  56. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/schema/actions_switch.yaml +0 -0
  57. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/schema/filters.yaml +0 -0
  58. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/schema/filters_adc.yaml +0 -0
  59. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/schema/id.yaml +0 -0
  60. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/schema/schema.yaml +0 -0
  61. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/schema/temp_unit.yaml +0 -0
  62. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/schema/update_interval.yaml +0 -0
  63. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/sensor/__init__.py +0 -0
  64. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/sensor/adc.py +0 -0
  65. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/sensor/gpio.py +0 -0
  66. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/sensor/modbus/__init__.py +0 -0
  67. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/sensor/modbus/dts1964_3f.json +0 -0
  68. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/sensor/modbus/pt100.json +0 -0
  69. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/sensor/modbus/r4dcb08.json +0 -0
  70. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/sensor/modbus/sdm120.json +0 -0
  71. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/sensor/modbus/sdm630.json +0 -0
  72. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/sensor/modbus/sofar.json +0 -0
  73. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/sensor/temp/__init__.py +0 -0
  74. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/sensor/temp/dallas.py +0 -0
  75. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/sensor/temp/lm75.py +0 -0
  76. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/boneio/sensor/temp/mcp9808.py +0 -0
  77. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/tests/32_5_config.yaml +0 -0
  78. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/tests/bandit.yaml +0 -0
  79. {boneIO-0.6.0.dev1 → boneIO-0.6.0.dev2}/tests/relay_32_5.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boneIO
3
- Version: 0.6.0dev1
3
+ Version: 0.6.0dev2
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>
@@ -46,7 +46,7 @@ from boneio.helper import (
46
46
  ha_button_availabilty_message,
47
47
  ha_light_availabilty_message,
48
48
  ha_switch_availabilty_message,
49
- ha_led_availabilty_message
49
+ ha_led_availabilty_message,
50
50
  )
51
51
  from boneio.helper.config import ConfigHelper
52
52
  from boneio.helper.events import EventBus
@@ -69,12 +69,14 @@ from w1thermsensor.errors import KernelModuleLoadError
69
69
  _LOGGER = logging.getLogger(__name__)
70
70
 
71
71
  AVAILABILITY_FUNCTION_CHOOSER = {
72
- LIGHT: ha_light_availabilty_message,
73
- LED: ha_led_availabilty_message,
72
+ LIGHT: ha_light_availabilty_message,
73
+ LED: ha_led_availabilty_message,
74
74
  }
75
75
 
76
+
76
77
  class Manager:
77
78
  """Manager to communicate MQTT with GPIO inputs and outputs."""
79
+
78
80
  def __init__(
79
81
  self,
80
82
  send_message: Callable[[str, Union[str, dict], bool], None],
@@ -129,9 +131,9 @@ class Manager:
129
131
  self.grouped_outputs = create_mcp23017(
130
132
  manager=self, mcp23017=mcp23017, i2cbusio=self._i2cbusio
131
133
  )
132
- self.grouped_outputs.update(create_pca9685(
133
- manager=self, pca9685=pca9685, i2cbusio=self._i2cbusio
134
- ))
134
+ self.grouped_outputs.update(
135
+ create_pca9685(manager=self, pca9685=pca9685, i2cbusio=self._i2cbusio)
136
+ )
135
137
 
136
138
  self._configure_adc(adc_list=adc_list)
137
139
 
@@ -154,7 +156,9 @@ class Manager:
154
156
  id=out.id,
155
157
  name=out.name,
156
158
  ha_type=LIGHT if out.output_type == LED else out.output_type,
157
- availability_msg_func=AVAILABILITY_FUNCTION_CHOOSER.get(out.output_type, ha_switch_availabilty_message)
159
+ availability_msg_func=AVAILABILITY_FUNCTION_CHOOSER.get(
160
+ out.output_type, ha_switch_availabilty_message
161
+ ),
158
162
  )
159
163
  self._loop.call_soon_threadsafe(
160
164
  self._loop.call_later,
@@ -435,13 +439,16 @@ class Manager:
435
439
  if not device:
436
440
  continue
437
441
  relay = self._output.get(device.replace(" ", ""))
438
- if relay:
439
- getattr(relay, action_definition["action_output"])()
442
+ action = relay_actions.get(action_definition["action_output"])
443
+ if relay and action:
444
+ getattr(relay, action)()
440
445
  elif action_definition[ACTION] == MQTT:
441
446
  action_topic = action_definition.get(TOPIC)
442
447
  action_payload = action_definition.get("action_mqtt_msg")
443
448
  if action_topic and action_payload:
444
- self.send_message(topic=action_topic, payload=action_payload)
449
+ self.send_message(
450
+ topic=action_topic, payload=action_payload, retain=False
451
+ )
445
452
  elif action_definition[ACTION] == COVER:
446
453
  device = action_definition.get(PIN)
447
454
  if not device:
@@ -515,7 +522,11 @@ class Manager:
515
522
  _LOGGER.debug("Target device not found %s.", device_id)
516
523
  elif msg_type == RELAY and command == SET_BRIGHTNESS:
517
524
  target_device = self._output.get(device_id)
518
- if target_device and target_device.output_type != NONE and message is not '':
525
+ if (
526
+ target_device
527
+ and target_device.output_type != NONE
528
+ and message is not ""
529
+ ):
519
530
  target_device.set_brightness(int(message))
520
531
  else:
521
532
  _LOGGER.debug("Target device not found %s.", device_id)
@@ -0,0 +1,2 @@
1
+ # flake8: noqa
2
+ __version__ = "0.6.0dev2"
@@ -28,7 +28,7 @@ dependencies = [
28
28
  "adafruit-circuitpython-pca9685>=3.4.6",
29
29
  ]
30
30
  requires-python = ">=3.7"
31
- version = "0.6.0dev1"
31
+ version = "0.6.0dev2"
32
32
 
33
33
  [project.license]
34
34
  text = "GNU General Public License v3.0"
@@ -1,2 +0,0 @@
1
- # flake8: noqa
2
- __version__ = "0.6.0dev1"
File without changes
File without changes
File without changes
File without changes
File without changes