simo 2.0.5__py3-none-any.whl → 2.0.6__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.

Potentially problematic release.


This version of simo might be problematic. Click here for more details.

Files changed (165) hide show
  1. simo/__pycache__/settings.cpython-38.pyc +0 -0
  2. simo/__pycache__/urls.cpython-38.pyc +0 -0
  3. simo/core/__pycache__/admin.cpython-38.pyc +0 -0
  4. simo/core/__pycache__/api.cpython-38.pyc +0 -0
  5. simo/core/__pycache__/api_auth.cpython-38.pyc +0 -0
  6. simo/core/__pycache__/api_meta.cpython-38.pyc +0 -0
  7. simo/core/__pycache__/auto_urls.cpython-38.pyc +0 -0
  8. simo/core/__pycache__/autocomplete_views.cpython-38.pyc +0 -0
  9. simo/core/__pycache__/base_types.cpython-38.pyc +0 -0
  10. simo/core/__pycache__/context.cpython-38.pyc +0 -0
  11. simo/core/__pycache__/controllers.cpython-38.pyc +0 -0
  12. simo/core/__pycache__/events.cpython-38.pyc +0 -0
  13. simo/core/__pycache__/forms.cpython-38.pyc +0 -0
  14. simo/core/__pycache__/gateways.cpython-38.pyc +0 -0
  15. simo/core/__pycache__/managers.cpython-38.pyc +0 -0
  16. simo/core/__pycache__/middleware.cpython-38.pyc +0 -0
  17. simo/core/__pycache__/models.cpython-38.pyc +0 -0
  18. simo/core/__pycache__/permissions.cpython-38.pyc +0 -0
  19. simo/core/__pycache__/serializers.cpython-38.pyc +0 -0
  20. simo/core/__pycache__/socket_consumers.cpython-38.pyc +0 -0
  21. simo/core/__pycache__/tasks.cpython-38.pyc +0 -0
  22. simo/core/__pycache__/views.cpython-38.pyc +0 -0
  23. simo/core/admin.py +8 -10
  24. simo/core/api.py +2 -3
  25. simo/core/db_backend/__pycache__/__init__.cpython-38.pyc +0 -0
  26. simo/core/db_backend/__pycache__/base.cpython-38.pyc +0 -0
  27. simo/core/drf_braces/__pycache__/__init__.cpython-38.pyc +0 -0
  28. simo/core/drf_braces/__pycache__/utils.cpython-38.pyc +0 -0
  29. simo/core/drf_braces/fields/__pycache__/__init__.cpython-38.pyc +0 -0
  30. simo/core/drf_braces/fields/__pycache__/_fields.cpython-38.pyc +0 -0
  31. simo/core/drf_braces/fields/__pycache__/custom.cpython-38.pyc +0 -0
  32. simo/core/drf_braces/fields/__pycache__/mixins.cpython-38.pyc +0 -0
  33. simo/core/drf_braces/fields/__pycache__/modified.cpython-38.pyc +0 -0
  34. simo/core/drf_braces/serializers/__pycache__/__init__.cpython-38.pyc +0 -0
  35. simo/core/drf_braces/serializers/__pycache__/form_serializer.cpython-38.pyc +0 -0
  36. simo/core/forms.py +8 -6
  37. simo/core/migrations/__pycache__/0001_initial.cpython-38.pyc +0 -0
  38. simo/core/migrations/__pycache__/0002_load_icons.cpython-38.pyc +0 -0
  39. simo/core/migrations/__pycache__/0003_create_default_zones_and_categories.cpython-38.pyc +0 -0
  40. simo/core/migrations/__pycache__/0004_create_generic.cpython-38.pyc +0 -0
  41. simo/core/migrations/__pycache__/0005_component_subcomponents.cpython-38.pyc +0 -0
  42. simo/core/migrations/__pycache__/0006_alter_component_subcomponents.cpython-38.pyc +0 -0
  43. simo/core/migrations/__pycache__/0007_component_change_init_to.cpython-38.pyc +0 -0
  44. simo/core/migrations/__pycache__/0008_alter_component_change_init_to.cpython-38.pyc +0 -0
  45. simo/core/migrations/__pycache__/0009_auto_20220707_1404.cpython-38.pyc +0 -0
  46. simo/core/migrations/__pycache__/0010_historyaggregate.cpython-38.pyc +0 -0
  47. simo/core/migrations/__pycache__/0011_component_last_change.cpython-38.pyc +0 -0
  48. simo/core/migrations/__pycache__/0012_instance.cpython-38.pyc +0 -0
  49. simo/core/migrations/__pycache__/0013_auto_20231003_0754.cpython-38.pyc +0 -0
  50. simo/core/migrations/__pycache__/0014_zone_instance.cpython-38.pyc +0 -0
  51. simo/core/migrations/__pycache__/0015_auto_20231004_1113.cpython-38.pyc +0 -0
  52. simo/core/migrations/__pycache__/0016_auto_20231004_1113.cpython-38.pyc +0 -0
  53. simo/core/migrations/__pycache__/0017_auto_20231004_1313.cpython-38.pyc +0 -0
  54. simo/core/migrations/__pycache__/0018_auto_20231005_0622.cpython-38.pyc +0 -0
  55. simo/core/migrations/__pycache__/0019_alter_gateway_type.cpython-38.pyc +0 -0
  56. simo/core/migrations/__pycache__/0020_component_meta.cpython-38.pyc +0 -0
  57. simo/core/migrations/__pycache__/0021_auto_20231020_1041.cpython-38.pyc +0 -0
  58. simo/core/migrations/__pycache__/0026_category_instance.cpython-38.pyc +0 -0
  59. simo/core/migrations/__pycache__/0027_remove_component_tags.cpython-38.pyc +0 -0
  60. simo/core/migrations/__pycache__/0028_rename_subcomponents_component_slaves.cpython-38.pyc +0 -0
  61. simo/core/migrations/__pycache__/0029_auto_20240229_1331.cpython-38.pyc +0 -0
  62. simo/core/migrations/__pycache__/__init__.cpython-38.pyc +0 -0
  63. simo/core/models.py +30 -46
  64. simo/core/serializers.py +2 -3
  65. simo/core/templatetags/__pycache__/__init__.cpython-38.pyc +0 -0
  66. simo/core/templatetags/__pycache__/components_list.cpython-38.pyc +0 -0
  67. simo/core/utils/__pycache__/__init__.cpython-38.pyc +0 -0
  68. simo/core/utils/__pycache__/admin.cpython-38.pyc +0 -0
  69. simo/core/utils/__pycache__/config_values.cpython-38.pyc +0 -0
  70. simo/core/utils/__pycache__/easing.cpython-38.pyc +0 -0
  71. simo/core/utils/__pycache__/form_fields.cpython-38.pyc +0 -0
  72. simo/core/utils/__pycache__/form_widgets.cpython-38.pyc +0 -0
  73. simo/core/utils/__pycache__/formsets.cpython-38.pyc +0 -0
  74. simo/core/utils/__pycache__/helpers.cpython-38.pyc +0 -0
  75. simo/core/utils/__pycache__/logs.cpython-38.pyc +0 -0
  76. simo/core/utils/__pycache__/mixins.cpython-38.pyc +0 -0
  77. simo/core/utils/__pycache__/model_helpers.cpython-38.pyc +0 -0
  78. simo/core/utils/__pycache__/relay.cpython-38.pyc +0 -0
  79. simo/core/utils/__pycache__/serialization.cpython-38.pyc +0 -0
  80. simo/core/utils/__pycache__/type_constants.cpython-38.pyc +0 -0
  81. simo/core/utils/__pycache__/validators.cpython-38.pyc +0 -0
  82. simo/core/utils/type_constants.py +32 -11
  83. simo/fleet/__pycache__/admin.cpython-38.pyc +0 -0
  84. simo/fleet/__pycache__/api.cpython-38.pyc +0 -0
  85. simo/fleet/__pycache__/auto_urls.cpython-38.pyc +0 -0
  86. simo/fleet/__pycache__/controllers.cpython-38.pyc +0 -0
  87. simo/fleet/__pycache__/forms.cpython-38.pyc +0 -0
  88. simo/fleet/__pycache__/gateways.cpython-38.pyc +0 -0
  89. simo/fleet/__pycache__/managers.cpython-38.pyc +0 -0
  90. simo/fleet/__pycache__/models.cpython-38.pyc +0 -0
  91. simo/fleet/__pycache__/serializers.cpython-38.pyc +0 -0
  92. simo/fleet/__pycache__/socket_consumers.cpython-38.pyc +0 -0
  93. simo/fleet/__pycache__/utils.cpython-38.pyc +0 -0
  94. simo/fleet/__pycache__/views.cpython-38.pyc +0 -0
  95. simo/fleet/migrations/__pycache__/0025_auto_20240130_1334.cpython-38.pyc +0 -0
  96. simo/fleet/migrations/__pycache__/0026_rename_i2cinterface_scl_pin_and_more.cpython-38.pyc +0 -0
  97. simo/fleet/migrations/__pycache__/0027_auto_20240306_0802.cpython-38.pyc +0 -0
  98. simo/fleet/migrations/__pycache__/0028_remove_i2cinterface_scl_pin_no_and_more.cpython-38.pyc +0 -0
  99. simo/fleet/migrations/__pycache__/0029_alter_i2cinterface_scl_pin_and_more.cpython-38.pyc +0 -0
  100. simo/fleet/migrations/__pycache__/0030_colonelpin_label_alter_colonel_type.cpython-38.pyc +0 -0
  101. simo/fleet/migrations/__pycache__/0031_alter_colonel_type.cpython-38.pyc +0 -0
  102. simo/generic/__pycache__/__init__.cpython-38.pyc +0 -0
  103. simo/generic/__pycache__/app_widgets.cpython-38.pyc +0 -0
  104. simo/generic/__pycache__/base_types.cpython-38.pyc +0 -0
  105. simo/generic/__pycache__/controllers.cpython-38.pyc +0 -0
  106. simo/generic/__pycache__/forms.cpython-38.pyc +0 -0
  107. simo/generic/__pycache__/gateways.cpython-38.pyc +0 -0
  108. simo/generic/__pycache__/models.cpython-38.pyc +0 -0
  109. simo/generic/__pycache__/routing.cpython-38.pyc +0 -0
  110. simo/generic/__pycache__/socket_consumers.cpython-38.pyc +0 -0
  111. simo/generic/controllers.py +0 -7
  112. simo/generic/forms.py +0 -3
  113. simo/generic/gateways.py +0 -8
  114. simo/multimedia/__pycache__/__init__.cpython-38.pyc +0 -0
  115. simo/multimedia/__pycache__/admin.cpython-38.pyc +0 -0
  116. simo/multimedia/__pycache__/api.cpython-38.pyc +0 -0
  117. simo/multimedia/__pycache__/app_widgets.cpython-38.pyc +0 -0
  118. simo/multimedia/__pycache__/base_types.cpython-38.pyc +0 -0
  119. simo/multimedia/__pycache__/controllers.cpython-38.pyc +0 -0
  120. simo/multimedia/__pycache__/forms.cpython-38.pyc +0 -0
  121. simo/multimedia/__pycache__/models.cpython-38.pyc +0 -0
  122. simo/multimedia/__pycache__/serializers.cpython-38.pyc +0 -0
  123. simo/multimedia/migrations/__pycache__/0001_initial.cpython-38.pyc +0 -0
  124. simo/multimedia/migrations/__pycache__/0002_sound_length.cpython-38.pyc +0 -0
  125. simo/multimedia/migrations/__pycache__/0003_alter_sound_length.cpython-38.pyc +0 -0
  126. simo/multimedia/migrations/__pycache__/0004_auto_20231023_1055.cpython-38.pyc +0 -0
  127. simo/multimedia/migrations/__pycache__/__init__.cpython-38.pyc +0 -0
  128. simo/notifications/__pycache__/__init__.cpython-38.pyc +0 -0
  129. simo/notifications/__pycache__/admin.cpython-38.pyc +0 -0
  130. simo/notifications/__pycache__/api.cpython-38.pyc +0 -0
  131. simo/notifications/__pycache__/models.cpython-38.pyc +0 -0
  132. simo/notifications/__pycache__/serializers.cpython-38.pyc +0 -0
  133. simo/notifications/migrations/__pycache__/0001_initial.cpython-38.pyc +0 -0
  134. simo/notifications/migrations/__pycache__/0002_notification_instance.cpython-38.pyc +0 -0
  135. simo/notifications/migrations/__pycache__/__init__.cpython-38.pyc +0 -0
  136. simo/users/__pycache__/admin.cpython-38.pyc +0 -0
  137. simo/users/__pycache__/api.cpython-38.pyc +0 -0
  138. simo/users/__pycache__/auto_urls.cpython-38.pyc +0 -0
  139. simo/users/__pycache__/middleware.cpython-38.pyc +0 -0
  140. simo/users/__pycache__/models.cpython-38.pyc +0 -0
  141. simo/users/__pycache__/serializers.cpython-38.pyc +0 -0
  142. simo/users/__pycache__/sso_urls.cpython-38.pyc +0 -0
  143. simo/users/migrations/__pycache__/0001_initial.cpython-38.pyc +0 -0
  144. simo/users/migrations/__pycache__/0002_componentpermission.cpython-38.pyc +0 -0
  145. simo/users/migrations/__pycache__/0003_create_roles_and_system_user.cpython-38.pyc +0 -0
  146. simo/users/migrations/__pycache__/0004_user_secret_key.cpython-38.pyc +0 -0
  147. simo/users/migrations/__pycache__/0005_permissionsrole_instance.cpython-38.pyc +0 -0
  148. simo/users/migrations/__pycache__/0006_auto_20231003_0850.cpython-38.pyc +0 -0
  149. simo/users/migrations/__pycache__/0007_auto_20231003_1228.cpython-38.pyc +0 -0
  150. simo/users/migrations/__pycache__/0008_auto_20231003_1229.cpython-38.pyc +0 -0
  151. simo/users/migrations/__pycache__/0009_remove_user_role.cpython-38.pyc +0 -0
  152. simo/users/migrations/__pycache__/0010_auto_20231004_1313.cpython-38.pyc +0 -0
  153. simo/users/migrations/__pycache__/0011_auto_20231004_1313.cpython-38.pyc +0 -0
  154. simo/users/migrations/__pycache__/0012_alter_userinstancerole_unique_together.cpython-38.pyc +0 -0
  155. simo/users/migrations/__pycache__/0013_remove_user_roles.cpython-38.pyc +0 -0
  156. simo/users/migrations/__pycache__/0014_user_roles.cpython-38.pyc +0 -0
  157. simo/users/migrations/__pycache__/0015_remove_user_at_home.cpython-38.pyc +0 -0
  158. simo/users/migrations/__pycache__/0016_auto_20231005_1050.cpython-38.pyc +0 -0
  159. simo/users/migrations/__pycache__/0025_rename_name_fingerprint_type_and_more.cpython-38.pyc +0 -0
  160. simo/users/migrations/__pycache__/__init__.cpython-38.pyc +0 -0
  161. {simo-2.0.5.dist-info → simo-2.0.6.dist-info}/METADATA +1 -1
  162. {simo-2.0.5.dist-info → simo-2.0.6.dist-info}/RECORD +165 -77
  163. {simo-2.0.5.dist-info → simo-2.0.6.dist-info}/LICENSE.md +0 -0
  164. {simo-2.0.5.dist-info → simo-2.0.6.dist-info}/WHEEL +0 -0
  165. {simo-2.0.5.dist-info → simo-2.0.6.dist-info}/top_level.txt +0 -0
@@ -208,13 +208,9 @@ class Thermostat(ControllerBase):
208
208
  heater = Component.objects.filter(
209
209
  pk=self.component.config.get('heater')
210
210
  ).first()
211
- if heater:
212
- heater.prepare_controller()
213
211
  cooler = Component.objects.filter(
214
212
  pk=self.component.config.get('cooler')
215
213
  ).first()
216
- if cooler:
217
- cooler.prepare_controller()
218
214
 
219
215
  if not temperature_sensor or not temperature_sensor.alive:
220
216
  print(f"No temperature sensor on {self.component}!")
@@ -720,7 +716,6 @@ class Watering(ControllerBase):
720
716
  switch = Component.objects.get(pk=contour_data['switch'])
721
717
  except Component.DoesNotExist:
722
718
  continue
723
- switch.prepare_controller()
724
719
  if run:
725
720
  if switch.timer_engaged():
726
721
  switch.stop_timer()
@@ -845,7 +840,6 @@ class Watering(ControllerBase):
845
840
  switch = Component.objects.get(pk=contour_data['switch'])
846
841
  except Component.DoesNotExist:
847
842
  continue
848
- switch.prepare_controller()
849
843
  if switch.timer_engaged():
850
844
  switch.stop_timer()
851
845
  switch.turn_off()
@@ -1077,7 +1071,6 @@ class AlarmClock(ControllerBase):
1077
1071
  print(f"Reverse event {event['uid']}!")
1078
1072
  comp = Component.objects.filter(id=event['component']).first()
1079
1073
  if comp:
1080
- comp.prepare_controller()
1081
1074
  if forward:
1082
1075
  action_name = 'play_action'
1083
1076
  else:
simo/generic/forms.py CHANGED
@@ -202,7 +202,6 @@ class AlarmGroupConfigForm(BaseComponentForm):
202
202
  "Can not cover self. Please remove - [%s]" % str(check_cmp)
203
203
  )
204
204
  if comp.base_type == 'alarm-group':
205
- comp.prepare_controller()
206
205
  self.recurse_check_alarm_groups(
207
206
  comp.get_children(), check_cmp
208
207
  )
@@ -227,7 +226,6 @@ class AlarmGroupConfigForm(BaseComponentForm):
227
226
  c.save(update_fields=('config',))
228
227
  if obj.id:
229
228
  comp = Component.objects.get(id=obj.id)
230
- comp.prepare_controller()
231
229
  comp.refresh_status()
232
230
  return obj
233
231
 
@@ -512,7 +510,6 @@ class AlarmClockEventForm(forms.Form):
512
510
  if not self.cleaned_data.get('play_action'):
513
511
  return self.cleaned_data
514
512
  component = self.cleaned_data.get('component')
515
- component.prepare_controller()
516
513
  if not hasattr(component, self.cleaned_data['play_action']):
517
514
  self.add_error(
518
515
  'play_action',
simo/generic/gateways.py CHANGED
@@ -175,7 +175,6 @@ class GenericGatewayHandler(BaseObjectCommandsGatewayHandler):
175
175
  ):
176
176
  tz = pytz.timezone(thermostat.zone.instance.timezone)
177
177
  timezone.activate(tz)
178
- thermostat.prepare_controller()
179
178
  thermostat.evaluate()
180
179
 
181
180
  def watch_alarm_clocks(self):
@@ -185,7 +184,6 @@ class GenericGatewayHandler(BaseObjectCommandsGatewayHandler):
185
184
  ):
186
185
  tz = pytz.timezone(alarm_clock.zone.instance.timezone)
187
186
  timezone.activate(tz)
188
- alarm_clock.prepare_controller()
189
187
  alarm_clock.tick()
190
188
 
191
189
  def watch_scripts(self):
@@ -194,7 +192,6 @@ class GenericGatewayHandler(BaseObjectCommandsGatewayHandler):
194
192
  controller_uid=Script.uid,
195
193
  config__autostart=True
196
194
  ).exclude(value='running'):
197
- script.prepare_controller()
198
195
  self.start_script(script)
199
196
 
200
197
  def watch_watering(self):
@@ -202,7 +199,6 @@ class GenericGatewayHandler(BaseObjectCommandsGatewayHandler):
202
199
  for watering in Component.objects.filter(controller_uid=Watering.uid):
203
200
  tz = pytz.timezone(watering.zone.instance.timezone)
204
201
  timezone.activate(tz)
205
- watering.prepare_controller()
206
202
  if watering.value['status'] == 'running_program':
207
203
  watering.set_program_progress(
208
204
  watering.value['program_progress'] + 1
@@ -333,11 +329,9 @@ class GenericGatewayHandler(BaseObjectCommandsGatewayHandler):
333
329
  open_switch = Component.objects.get(
334
330
  pk=blinds.config['open_switch']
335
331
  )
336
- open_switch.prepare_controller()
337
332
  close_switch = Component.objects.get(
338
333
  pk=blinds.config['close_switch']
339
334
  )
340
- close_switch.prepare_controller()
341
335
  except:
342
336
  return
343
337
 
@@ -406,7 +400,6 @@ class GenericGatewayHandler(BaseObjectCommandsGatewayHandler):
406
400
  alarm_group.save()
407
401
 
408
402
  for pk, other_group in other_alarm_groups.items():
409
- other_group.prepare_controller()
410
403
  other_group.refresh_status()
411
404
 
412
405
 
@@ -416,7 +409,6 @@ class GenericGatewayHandler(BaseObjectCommandsGatewayHandler):
416
409
  ).first()
417
410
  if not switch:
418
411
  return
419
- switch.prepare_controller()
420
412
 
421
413
  if gate.config.get('action_method') == 'click':
422
414
  switch.click()
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: simo
3
- Version: 2.0.5
3
+ Version: 2.0.6
4
4
  Summary: Smart Home on Steroids!
5
5
  Author-email: Simanas Venčkauskas <simanas@simo.io>
6
6
  Project-URL: Homepage, https://simo.io