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.
- simo/__pycache__/settings.cpython-38.pyc +0 -0
- simo/__pycache__/urls.cpython-38.pyc +0 -0
- simo/core/__pycache__/admin.cpython-38.pyc +0 -0
- simo/core/__pycache__/api.cpython-38.pyc +0 -0
- simo/core/__pycache__/api_auth.cpython-38.pyc +0 -0
- simo/core/__pycache__/api_meta.cpython-38.pyc +0 -0
- simo/core/__pycache__/auto_urls.cpython-38.pyc +0 -0
- simo/core/__pycache__/autocomplete_views.cpython-38.pyc +0 -0
- simo/core/__pycache__/base_types.cpython-38.pyc +0 -0
- simo/core/__pycache__/context.cpython-38.pyc +0 -0
- simo/core/__pycache__/controllers.cpython-38.pyc +0 -0
- simo/core/__pycache__/events.cpython-38.pyc +0 -0
- simo/core/__pycache__/forms.cpython-38.pyc +0 -0
- simo/core/__pycache__/gateways.cpython-38.pyc +0 -0
- simo/core/__pycache__/managers.cpython-38.pyc +0 -0
- simo/core/__pycache__/middleware.cpython-38.pyc +0 -0
- simo/core/__pycache__/models.cpython-38.pyc +0 -0
- simo/core/__pycache__/permissions.cpython-38.pyc +0 -0
- simo/core/__pycache__/serializers.cpython-38.pyc +0 -0
- simo/core/__pycache__/socket_consumers.cpython-38.pyc +0 -0
- simo/core/__pycache__/tasks.cpython-38.pyc +0 -0
- simo/core/__pycache__/views.cpython-38.pyc +0 -0
- simo/core/admin.py +8 -10
- simo/core/api.py +2 -3
- simo/core/db_backend/__pycache__/__init__.cpython-38.pyc +0 -0
- simo/core/db_backend/__pycache__/base.cpython-38.pyc +0 -0
- simo/core/drf_braces/__pycache__/__init__.cpython-38.pyc +0 -0
- simo/core/drf_braces/__pycache__/utils.cpython-38.pyc +0 -0
- simo/core/drf_braces/fields/__pycache__/__init__.cpython-38.pyc +0 -0
- simo/core/drf_braces/fields/__pycache__/_fields.cpython-38.pyc +0 -0
- simo/core/drf_braces/fields/__pycache__/custom.cpython-38.pyc +0 -0
- simo/core/drf_braces/fields/__pycache__/mixins.cpython-38.pyc +0 -0
- simo/core/drf_braces/fields/__pycache__/modified.cpython-38.pyc +0 -0
- simo/core/drf_braces/serializers/__pycache__/__init__.cpython-38.pyc +0 -0
- simo/core/drf_braces/serializers/__pycache__/form_serializer.cpython-38.pyc +0 -0
- simo/core/forms.py +8 -6
- simo/core/migrations/__pycache__/0001_initial.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0002_load_icons.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0003_create_default_zones_and_categories.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0004_create_generic.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0005_component_subcomponents.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0006_alter_component_subcomponents.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0007_component_change_init_to.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0008_alter_component_change_init_to.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0009_auto_20220707_1404.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0010_historyaggregate.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0011_component_last_change.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0012_instance.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0013_auto_20231003_0754.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0014_zone_instance.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0015_auto_20231004_1113.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0016_auto_20231004_1113.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0017_auto_20231004_1313.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0018_auto_20231005_0622.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0019_alter_gateway_type.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0020_component_meta.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0021_auto_20231020_1041.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0026_category_instance.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0027_remove_component_tags.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0028_rename_subcomponents_component_slaves.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/0029_auto_20240229_1331.cpython-38.pyc +0 -0
- simo/core/migrations/__pycache__/__init__.cpython-38.pyc +0 -0
- simo/core/models.py +30 -46
- simo/core/serializers.py +2 -3
- simo/core/templatetags/__pycache__/__init__.cpython-38.pyc +0 -0
- simo/core/templatetags/__pycache__/components_list.cpython-38.pyc +0 -0
- simo/core/utils/__pycache__/__init__.cpython-38.pyc +0 -0
- simo/core/utils/__pycache__/admin.cpython-38.pyc +0 -0
- simo/core/utils/__pycache__/config_values.cpython-38.pyc +0 -0
- simo/core/utils/__pycache__/easing.cpython-38.pyc +0 -0
- simo/core/utils/__pycache__/form_fields.cpython-38.pyc +0 -0
- simo/core/utils/__pycache__/form_widgets.cpython-38.pyc +0 -0
- simo/core/utils/__pycache__/formsets.cpython-38.pyc +0 -0
- simo/core/utils/__pycache__/helpers.cpython-38.pyc +0 -0
- simo/core/utils/__pycache__/logs.cpython-38.pyc +0 -0
- simo/core/utils/__pycache__/mixins.cpython-38.pyc +0 -0
- simo/core/utils/__pycache__/model_helpers.cpython-38.pyc +0 -0
- simo/core/utils/__pycache__/relay.cpython-38.pyc +0 -0
- simo/core/utils/__pycache__/serialization.cpython-38.pyc +0 -0
- simo/core/utils/__pycache__/type_constants.cpython-38.pyc +0 -0
- simo/core/utils/__pycache__/validators.cpython-38.pyc +0 -0
- simo/core/utils/type_constants.py +32 -11
- simo/fleet/__pycache__/admin.cpython-38.pyc +0 -0
- simo/fleet/__pycache__/api.cpython-38.pyc +0 -0
- simo/fleet/__pycache__/auto_urls.cpython-38.pyc +0 -0
- simo/fleet/__pycache__/controllers.cpython-38.pyc +0 -0
- simo/fleet/__pycache__/forms.cpython-38.pyc +0 -0
- simo/fleet/__pycache__/gateways.cpython-38.pyc +0 -0
- simo/fleet/__pycache__/managers.cpython-38.pyc +0 -0
- simo/fleet/__pycache__/models.cpython-38.pyc +0 -0
- simo/fleet/__pycache__/serializers.cpython-38.pyc +0 -0
- simo/fleet/__pycache__/socket_consumers.cpython-38.pyc +0 -0
- simo/fleet/__pycache__/utils.cpython-38.pyc +0 -0
- simo/fleet/__pycache__/views.cpython-38.pyc +0 -0
- simo/fleet/migrations/__pycache__/0025_auto_20240130_1334.cpython-38.pyc +0 -0
- simo/fleet/migrations/__pycache__/0026_rename_i2cinterface_scl_pin_and_more.cpython-38.pyc +0 -0
- simo/fleet/migrations/__pycache__/0027_auto_20240306_0802.cpython-38.pyc +0 -0
- simo/fleet/migrations/__pycache__/0028_remove_i2cinterface_scl_pin_no_and_more.cpython-38.pyc +0 -0
- simo/fleet/migrations/__pycache__/0029_alter_i2cinterface_scl_pin_and_more.cpython-38.pyc +0 -0
- simo/fleet/migrations/__pycache__/0030_colonelpin_label_alter_colonel_type.cpython-38.pyc +0 -0
- simo/fleet/migrations/__pycache__/0031_alter_colonel_type.cpython-38.pyc +0 -0
- simo/generic/__pycache__/__init__.cpython-38.pyc +0 -0
- simo/generic/__pycache__/app_widgets.cpython-38.pyc +0 -0
- simo/generic/__pycache__/base_types.cpython-38.pyc +0 -0
- simo/generic/__pycache__/controllers.cpython-38.pyc +0 -0
- simo/generic/__pycache__/forms.cpython-38.pyc +0 -0
- simo/generic/__pycache__/gateways.cpython-38.pyc +0 -0
- simo/generic/__pycache__/models.cpython-38.pyc +0 -0
- simo/generic/__pycache__/routing.cpython-38.pyc +0 -0
- simo/generic/__pycache__/socket_consumers.cpython-38.pyc +0 -0
- simo/generic/controllers.py +0 -7
- simo/generic/forms.py +0 -3
- simo/generic/gateways.py +0 -8
- simo/multimedia/__pycache__/__init__.cpython-38.pyc +0 -0
- simo/multimedia/__pycache__/admin.cpython-38.pyc +0 -0
- simo/multimedia/__pycache__/api.cpython-38.pyc +0 -0
- simo/multimedia/__pycache__/app_widgets.cpython-38.pyc +0 -0
- simo/multimedia/__pycache__/base_types.cpython-38.pyc +0 -0
- simo/multimedia/__pycache__/controllers.cpython-38.pyc +0 -0
- simo/multimedia/__pycache__/forms.cpython-38.pyc +0 -0
- simo/multimedia/__pycache__/models.cpython-38.pyc +0 -0
- simo/multimedia/__pycache__/serializers.cpython-38.pyc +0 -0
- simo/multimedia/migrations/__pycache__/0001_initial.cpython-38.pyc +0 -0
- simo/multimedia/migrations/__pycache__/0002_sound_length.cpython-38.pyc +0 -0
- simo/multimedia/migrations/__pycache__/0003_alter_sound_length.cpython-38.pyc +0 -0
- simo/multimedia/migrations/__pycache__/0004_auto_20231023_1055.cpython-38.pyc +0 -0
- simo/multimedia/migrations/__pycache__/__init__.cpython-38.pyc +0 -0
- simo/notifications/__pycache__/__init__.cpython-38.pyc +0 -0
- simo/notifications/__pycache__/admin.cpython-38.pyc +0 -0
- simo/notifications/__pycache__/api.cpython-38.pyc +0 -0
- simo/notifications/__pycache__/models.cpython-38.pyc +0 -0
- simo/notifications/__pycache__/serializers.cpython-38.pyc +0 -0
- simo/notifications/migrations/__pycache__/0001_initial.cpython-38.pyc +0 -0
- simo/notifications/migrations/__pycache__/0002_notification_instance.cpython-38.pyc +0 -0
- simo/notifications/migrations/__pycache__/__init__.cpython-38.pyc +0 -0
- simo/users/__pycache__/admin.cpython-38.pyc +0 -0
- simo/users/__pycache__/api.cpython-38.pyc +0 -0
- simo/users/__pycache__/auto_urls.cpython-38.pyc +0 -0
- simo/users/__pycache__/middleware.cpython-38.pyc +0 -0
- simo/users/__pycache__/models.cpython-38.pyc +0 -0
- simo/users/__pycache__/serializers.cpython-38.pyc +0 -0
- simo/users/__pycache__/sso_urls.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0001_initial.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0002_componentpermission.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0003_create_roles_and_system_user.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0004_user_secret_key.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0005_permissionsrole_instance.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0006_auto_20231003_0850.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0007_auto_20231003_1228.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0008_auto_20231003_1229.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0009_remove_user_role.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0010_auto_20231004_1313.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0011_auto_20231004_1313.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0012_alter_userinstancerole_unique_together.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0013_remove_user_roles.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0014_user_roles.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0015_remove_user_at_home.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0016_auto_20231005_1050.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/0025_rename_name_fingerprint_type_and_more.cpython-38.pyc +0 -0
- simo/users/migrations/__pycache__/__init__.cpython-38.pyc +0 -0
- {simo-2.0.5.dist-info → simo-2.0.6.dist-info}/METADATA +1 -1
- {simo-2.0.5.dist-info → simo-2.0.6.dist-info}/RECORD +165 -77
- {simo-2.0.5.dist-info → simo-2.0.6.dist-info}/LICENSE.md +0 -0
- {simo-2.0.5.dist-info → simo-2.0.6.dist-info}/WHEEL +0 -0
- {simo-2.0.5.dist-info → simo-2.0.6.dist-info}/top_level.txt +0 -0
simo/generic/controllers.py
CHANGED
|
@@ -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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|