simo 2.10.7__py3-none-any.whl → 2.10.11__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__/__init__.cpython-312.pyc +0 -0
- simo/__pycache__/asgi.cpython-312.pyc +0 -0
- simo/__pycache__/celeryc.cpython-312.pyc +0 -0
- simo/__pycache__/conf.cpython-312.pyc +0 -0
- simo/__pycache__/settings.cpython-312.pyc +0 -0
- simo/__pycache__/urls.cpython-312.pyc +0 -0
- simo/automation/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/automation/__pycache__/app_widgets.cpython-312.pyc +0 -0
- simo/automation/__pycache__/controllers.cpython-312.pyc +0 -0
- simo/automation/__pycache__/forms.cpython-312.pyc +0 -0
- simo/automation/__pycache__/gateways.cpython-312.pyc +0 -0
- simo/automation/__pycache__/helpers.cpython-312.pyc +0 -0
- simo/automation/__pycache__/models.cpython-312.pyc +0 -0
- simo/automation/__pycache__/serializers.cpython-312.pyc +0 -0
- simo/automation/__pycache__/state.cpython-312.pyc +0 -0
- simo/automation/migrations/__pycache__/0001_initial.cpython-312.pyc +0 -0
- simo/automation/migrations/__pycache__/0002_update_helpers_in_scripts.cpython-312.pyc +0 -0
- simo/automation/migrations/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/automation/templates/automations/__pycache__/auto_away.cpython-312.pyc +0 -0
- simo/automation/templates/automations/__pycache__/auto_state_script.cpython-312.pyc +0 -0
- simo/automation/templates/automations/__pycache__/phones_sleep_script.cpython-312.pyc +0 -0
- simo/backups/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/backups/__pycache__/admin.cpython-312.pyc +0 -0
- simo/backups/__pycache__/dynamic_settings.cpython-312.pyc +0 -0
- simo/backups/__pycache__/models.cpython-312.pyc +0 -0
- simo/backups/__pycache__/tasks.cpython-312.pyc +0 -0
- simo/backups/migrations/__pycache__/0001_initial.cpython-312.pyc +0 -0
- simo/backups/migrations/__pycache__/0002_backuplog_backup_level_backup_size.cpython-312.pyc +0 -0
- simo/backups/migrations/__pycache__/0003_alter_backuplog_options_alter_backup_size.cpython-312.pyc +0 -0
- simo/backups/migrations/__pycache__/0004_alter_backup_options_alter_backuplog_options_and_more.cpython-312.pyc +0 -0
- simo/backups/migrations/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/__pycache__/admin.cpython-312.pyc +0 -0
- simo/core/__pycache__/api.cpython-312.pyc +0 -0
- simo/core/__pycache__/api_auth.cpython-312.pyc +0 -0
- simo/core/__pycache__/api_meta.cpython-312.pyc +0 -0
- simo/core/__pycache__/app_widgets.cpython-312.pyc +0 -0
- simo/core/__pycache__/apps.cpython-312.pyc +0 -0
- simo/core/__pycache__/auto_urls.cpython-312.pyc +0 -0
- simo/core/__pycache__/autocomplete_views.cpython-312.pyc +0 -0
- simo/core/__pycache__/base_types.cpython-312.pyc +0 -0
- simo/core/__pycache__/context.cpython-312.pyc +0 -0
- simo/core/__pycache__/controllers.cpython-312.pyc +0 -0
- simo/core/__pycache__/dynamic_settings.cpython-312.pyc +0 -0
- simo/core/__pycache__/events.cpython-312.pyc +0 -0
- simo/core/__pycache__/filters.cpython-312.pyc +0 -0
- simo/core/__pycache__/form_fields.cpython-312.pyc +0 -0
- simo/core/__pycache__/forms.cpython-312.pyc +0 -0
- simo/core/__pycache__/gateways.cpython-312.pyc +0 -0
- simo/core/__pycache__/loggers.cpython-312.pyc +0 -0
- simo/core/__pycache__/managers.cpython-312.pyc +0 -0
- simo/core/__pycache__/middleware.cpython-312.pyc +0 -0
- simo/core/__pycache__/models.cpython-312.pyc +0 -0
- simo/core/__pycache__/permissions.cpython-312.pyc +0 -0
- simo/core/__pycache__/routing.cpython-312.pyc +0 -0
- simo/core/__pycache__/serializers.cpython-312.pyc +0 -0
- simo/core/__pycache__/signal_receivers.cpython-312.pyc +0 -0
- simo/core/__pycache__/socket_consumers.cpython-312.pyc +0 -0
- simo/core/__pycache__/storage.cpython-312.pyc +0 -0
- simo/core/__pycache__/tasks.cpython-312.pyc +0 -0
- simo/core/__pycache__/todos.cpython-312.pyc +0 -0
- simo/core/__pycache__/types.cpython-312.pyc +0 -0
- simo/core/__pycache__/views.cpython-312.pyc +0 -0
- simo/core/__pycache__/widgets.cpython-312.pyc +0 -0
- simo/core/controllers.py +2 -2
- simo/core/db_backend/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/db_backend/__pycache__/base.cpython-312.pyc +0 -0
- simo/core/drf_braces/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/drf_braces/__pycache__/mixins.cpython-312.pyc +0 -0
- simo/core/drf_braces/__pycache__/models.cpython-312.pyc +0 -0
- simo/core/drf_braces/__pycache__/parsers.cpython-312.pyc +0 -0
- simo/core/drf_braces/__pycache__/renderers.cpython-312.pyc +0 -0
- simo/core/drf_braces/__pycache__/utils.cpython-312.pyc +0 -0
- simo/core/drf_braces/fields/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/drf_braces/fields/__pycache__/_fields.cpython-312.pyc +0 -0
- simo/core/drf_braces/fields/__pycache__/custom.cpython-312.pyc +0 -0
- simo/core/drf_braces/fields/__pycache__/mixins.cpython-312.pyc +0 -0
- simo/core/drf_braces/fields/__pycache__/modified.cpython-312.pyc +0 -0
- simo/core/drf_braces/forms/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/drf_braces/forms/__pycache__/fields.cpython-312.pyc +0 -0
- simo/core/drf_braces/forms/__pycache__/serializer_form.cpython-312.pyc +0 -0
- simo/core/drf_braces/serializers/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/drf_braces/serializers/__pycache__/enforce_validation_serializer.cpython-312.pyc +0 -0
- simo/core/drf_braces/serializers/__pycache__/form_serializer.cpython-312.pyc +0 -0
- simo/core/drf_braces/serializers/__pycache__/swapping.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/__pycache__/test_mixins.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/__pycache__/test_parsers.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/__pycache__/test_renderers.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/__pycache__/test_utils.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/fields/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/fields/__pycache__/test_custom.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/fields/__pycache__/test_fields.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/fields/__pycache__/test_mixins.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/fields/__pycache__/test_modified.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/forms/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/forms/__pycache__/test_fields.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/forms/__pycache__/test_serializer_form.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/serializers/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/serializers/__pycache__/test_enforce_validation_serializer.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/serializers/__pycache__/test_form_serializer.cpython-312.pyc +0 -0
- simo/core/drf_braces/tests/serializers/__pycache__/test_swapping.cpython-312.pyc +0 -0
- simo/core/management/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/management/__pycache__/update.cpython-312.pyc +0 -0
- simo/core/management/_hub_template/hub/__pycache__/asgi.cpython-312.pyc +0 -0
- simo/core/management/_hub_template/hub/__pycache__/celeryc.cpython-312.pyc +0 -0
- simo/core/management/_hub_template/hub/__pycache__/manage.cpython-312.pyc +0 -0
- simo/core/management/_hub_template/hub/__pycache__/settings.cpython-312.pyc +0 -0
- simo/core/management/_hub_template/hub/__pycache__/urls.cpython-312.pyc +0 -0
- simo/core/management/_hub_template/hub/__pycache__/wsgi.cpython-312.pyc +0 -0
- simo/core/management/commands/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/management/commands/__pycache__/gateways_manager.cpython-312.pyc +0 -0
- simo/core/management/commands/__pycache__/on_http_start.cpython-312.pyc +0 -0
- simo/core/management/commands/__pycache__/run_gateway.cpython-312.pyc +0 -0
- simo/core/migrations/0050_componenthistory_alive.py +18 -0
- simo/core/migrations/__pycache__/0001_initial.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0002_load_icons.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0003_create_default_zones_and_categories.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0004_create_generic.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0005_component_subcomponents.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0006_alter_component_subcomponents.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0007_component_change_init_to.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0008_alter_component_change_init_to.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0009_auto_20220707_1404.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0010_historyaggregate.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0011_component_last_change.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0012_instance.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0013_auto_20231003_0754.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0014_zone_instance.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0015_auto_20231004_1113.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0016_auto_20231004_1113.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0017_auto_20231004_1313.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0018_auto_20231005_0622.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0019_alter_gateway_type.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0020_component_meta.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0021_auto_20231020_1041.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0022_auto_20231221_0735.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0023_auto_20231229_1352.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0024_alter_instance_device_report_history_days.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0025_auto_20240122_1321.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0026_category_instance.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0027_remove_component_tags.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0028_rename_subcomponents_component_slaves.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0029_auto_20240229_1331.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0030_alter_instance_timezone.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0031_auto_20240429_1231.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0032_auto_20240506_0834.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0033_auto_20240509_0821.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0034_component_error_msg.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0035_remove_instance_share_location.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0036_auto_20240521_0823.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0037_auto_20240606_1057.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0038_remove_instance_cover_image_and_more.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0039_instance_is_active_alter_instance_timezone.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0040_alter_instance_name.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0041_alter_instance_slug.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0042_alter_instance_timezone.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0043_alter_category_instance_alter_instance_timezone_and_more.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0044_alter_gateway_type.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0045_alter_instance_device_report_history_days_and_more.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0046_component_value_translation_alter_gateway_type.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0047_alter_component_value_translation.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0048_publicfile_privatefile.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0049_alter_gateway_type.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/0050_componenthistory_alive.cpython-312.pyc +0 -0
- simo/core/migrations/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/models.py +3 -1
- simo/core/serializers.py +2 -2
- simo/core/tasks.py +0 -1
- simo/core/templates/admin/component_history.html +18 -2
- simo/core/templates/core/__pycache__/value_translation.cpython-312.pyc +0 -0
- simo/core/templatetags/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/templatetags/__pycache__/components_list.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/admin.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/api.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/cache.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/config_values.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/converters.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/easing.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/form_fields.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/form_widgets.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/formsets.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/helpers.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/json.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/logs.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/mixins.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/model_helpers.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/operations.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/relay.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/serialization.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/type_constants.cpython-312.pyc +0 -0
- simo/core/utils/__pycache__/validators.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/admin.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/api.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/apps.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/auto_urls.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/base_types.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/ble.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/controllers.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/custom_dali_operations.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/forms.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/gateways.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/managers.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/models.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/routing.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/serializers.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/socket_consumers.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/tasks.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/utils.cpython-312.pyc +0 -0
- simo/fleet/__pycache__/views.cpython-312.pyc +0 -0
- simo/fleet/api.py +5 -2
- simo/fleet/controllers.py +136 -38
- simo/fleet/forms.py +177 -207
- simo/fleet/gateways.py +34 -4
- simo/fleet/migrations/0052_colonelpin_interface.py +18 -0
- simo/fleet/migrations/0053_auto_20250507_0713.py +24 -0
- simo/fleet/migrations/0054_auto_20250507_1256.py +36 -0
- simo/fleet/migrations/__pycache__/0001_initial.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0002_auto_20220422_0743.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0003_auto_20220422_0752.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0004_auto_20220422_0818.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0005_auto_20220428_0900.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0006_rename_mac_colonel_uid.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0007_colonel_socket_connected.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0008_i2cinterface.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0009_i2cinterface_name.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0010_auto_20220602_0746.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0011_i2cinterface_freq.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0012_colonel_logs_stream.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0013_alter_colonel_last_seen.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0014_auto_20220614_0659.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0015_auto_20220614_0754.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0016_auto_20220704_0840.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0017_alter_colonel_secret.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0018_colonel_instance.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0019_auto_20231006_0749.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0020_instanceoptions.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0021_auto_20231006_0819.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0022_remove_colonel_secret.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0023_colonel_is_authorized.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0024_colonel_pwm_frequency.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0025_auto_20240130_1334.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0026_rename_i2cinterface_scl_pin_and_more.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0027_auto_20240306_0802.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0028_remove_i2cinterface_scl_pin_no_and_more.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0029_alter_i2cinterface_scl_pin_and_more.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0030_colonelpin_label_alter_colonel_type.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0031_alter_colonel_type.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0032_auto_20240415_0736.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0033_auto_20240415_0736.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0034_auto_20240418_0735.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0035_auto_20240514_0855.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0036_auto_20240605_0702.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0037_alter_colonelpin_options_alter_colonelpin_no_and_more.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0038_alter_colonel_type.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0039_auto_20241016_1047.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0040_alter_colonel_pwm_frequency.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0041_alter_colonel_instance_and_more.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0042_auto_20241120_1028.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0043_auto_20241203_0930.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0044_auto_20241210_0707.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0045_alter_colonel_type_customdalidevice.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0046_delete_customdalidevice.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0047_customdalidevice.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0048_remove_customdalidevice_colonel_and_more.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0049_alter_customdalidevice_interface.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0050_customdalidevice_uid.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0051_customdalidevice_components.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0052_colonelpin_interface.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0053_auto_20250507_0713.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/0054_auto_20250507_1256.cpython-312.pyc +0 -0
- simo/fleet/migrations/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/fleet/models.py +96 -34
- simo/fleet/serializers.py +2 -2
- simo/fleet/utils.py +126 -0
- simo/generic/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/generic/__pycache__/app_widgets.cpython-312.pyc +0 -0
- simo/generic/__pycache__/base_types.cpython-312.pyc +0 -0
- simo/generic/__pycache__/controllers.cpython-312.pyc +0 -0
- simo/generic/__pycache__/forms.cpython-312.pyc +0 -0
- simo/generic/__pycache__/gateways.cpython-312.pyc +0 -0
- simo/generic/__pycache__/models.cpython-312.pyc +0 -0
- simo/generic/__pycache__/routing.cpython-312.pyc +0 -0
- simo/generic/__pycache__/socket_consumers.cpython-312.pyc +0 -0
- simo/generic/__pycache__/tasks.cpython-312.pyc +0 -0
- simo/generic/migrations/__pycache__/0001_initial.cpython-312.pyc +0 -0
- simo/generic/migrations/__pycache__/0002_auto_20241126_0726.cpython-312.pyc +0 -0
- simo/generic/migrations/__pycache__/0003_auto_20250409_1404.cpython-312.pyc +0 -0
- simo/generic/migrations/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/multimedia/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/multimedia/__pycache__/admin.cpython-312.pyc +0 -0
- simo/multimedia/__pycache__/api.cpython-312.pyc +0 -0
- simo/multimedia/__pycache__/app_widgets.cpython-312.pyc +0 -0
- simo/multimedia/__pycache__/auto_urls.cpython-312.pyc +0 -0
- simo/multimedia/__pycache__/base_types.cpython-312.pyc +0 -0
- simo/multimedia/__pycache__/controllers.cpython-312.pyc +0 -0
- simo/multimedia/__pycache__/forms.cpython-312.pyc +0 -0
- simo/multimedia/__pycache__/models.cpython-312.pyc +0 -0
- simo/multimedia/__pycache__/serializers.cpython-312.pyc +0 -0
- simo/multimedia/__pycache__/views.cpython-312.pyc +0 -0
- simo/multimedia/migrations/__pycache__/0001_initial.cpython-312.pyc +0 -0
- simo/multimedia/migrations/__pycache__/0002_sound_length.cpython-312.pyc +0 -0
- simo/multimedia/migrations/__pycache__/0003_alter_sound_length.cpython-312.pyc +0 -0
- simo/multimedia/migrations/__pycache__/0004_auto_20231023_1055.cpython-312.pyc +0 -0
- simo/multimedia/migrations/__pycache__/0005_remove_sound_slug_sound_date_uploaded.cpython-312.pyc +0 -0
- simo/multimedia/migrations/__pycache__/0006_remove_sound_length_sound_duration.cpython-312.pyc +0 -0
- simo/multimedia/migrations/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/notifications/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/notifications/__pycache__/admin.cpython-312.pyc +0 -0
- simo/notifications/__pycache__/api.cpython-312.pyc +0 -0
- simo/notifications/__pycache__/models.cpython-312.pyc +0 -0
- simo/notifications/__pycache__/serializers.cpython-312.pyc +0 -0
- simo/notifications/__pycache__/utils.cpython-312.pyc +0 -0
- simo/notifications/migrations/__pycache__/0001_initial.cpython-312.pyc +0 -0
- simo/notifications/migrations/__pycache__/0002_notification_instance.cpython-312.pyc +0 -0
- simo/notifications/migrations/__pycache__/0003_alter_notification_instance.cpython-312.pyc +0 -0
- simo/notifications/migrations/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/notifications/serializers.py +1 -1
- simo/users/__pycache__/__init__.cpython-312.pyc +0 -0
- simo/users/__pycache__/admin.cpython-312.pyc +0 -0
- simo/users/__pycache__/api.cpython-312.pyc +0 -0
- simo/users/__pycache__/apps.cpython-312.pyc +0 -0
- simo/users/__pycache__/auth_backends.cpython-312.pyc +0 -0
- simo/users/__pycache__/auto_urls.cpython-312.pyc +0 -0
- simo/users/__pycache__/dynamic_settings.cpython-312.pyc +0 -0
- simo/users/__pycache__/managers.cpython-312.pyc +0 -0
- simo/users/__pycache__/middleware.cpython-312.pyc +0 -0
- simo/users/__pycache__/models.cpython-312.pyc +0 -0
- simo/users/__pycache__/permissions.cpython-312.pyc +0 -0
- simo/users/__pycache__/serializers.cpython-312.pyc +0 -0
- simo/users/__pycache__/sso_urls.cpython-312.pyc +0 -0
- simo/users/__pycache__/sso_views.cpython-312.pyc +0 -0
- simo/users/__pycache__/tasks.cpython-312.pyc +0 -0
- simo/users/__pycache__/utils.cpython-312.pyc +0 -0
- simo/users/__pycache__/views.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0001_initial.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0002_componentpermission.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0003_create_roles_and_system_user.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0004_user_secret_key.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0005_permissionsrole_instance.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0006_auto_20231003_0850.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0007_auto_20231003_1228.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0008_auto_20231003_1229.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0009_remove_user_role.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0010_auto_20231004_1313.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0011_auto_20231004_1313.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0012_alter_userinstancerole_unique_together.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0013_remove_user_roles.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0014_user_roles.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0015_remove_user_at_home.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0016_auto_20231005_1050.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0017_auto_20231221_0735.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0018_user_is_god.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0019_auto_20231221_1155.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0020_rename_is_god_user_is_master.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0021_alter_permissionsrole_instance.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0022_userdevicereportlog_instance.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0023_auto_20240105_0719.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0024_fingerprint.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0025_rename_name_fingerprint_type_and_more.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0026_fingerprint_name.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0027_permissionsrole_can_manage_components.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0028_auto_20240506_1146.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0029_alter_instanceuser_instance.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0030_userdevice_users.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0031_auto_20240923_1115.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0032_remove_userdevice_user_alter_userdevice_users.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0033_alter_user_ssh_key.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0034_instanceuser_last_seen_location_and_more.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0035_instanceuser_last_seen_speed_kmh_and_more.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0036_instanceuser_phone_on_charge_user_phone_on_charge.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0037_rename_last_seen_location_datetime_instanceuser_last_seen_and_more.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0038_userdevicereportlog_at_home_and_more.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0039_auto_20241117_1039.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0040_userdevicereportlog_location_smoothed_and_more.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0041_userdevicereportlog_speed_kmh_received.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0042_remove_userdevicereportlog_location_smoothed_and_more.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0043_userdevicereportlog_avg_speed_kmh.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/0044_permissionsrole_is_person.cpython-312.pyc +0 -0
- simo/users/migrations/__pycache__/__init__.cpython-312.pyc +0 -0
- {simo-2.10.7.dist-info → simo-2.10.11.dist-info}/METADATA +1 -1
- {simo-2.10.7.dist-info → simo-2.10.11.dist-info}/RECORD +388 -338
- {simo-2.10.7.dist-info → simo-2.10.11.dist-info}/WHEEL +1 -1
- {simo-2.10.7.dist-info → simo-2.10.11.dist-info}/entry_points.txt +0 -0
- {simo-2.10.7.dist-info → simo-2.10.11.dist-info}/licenses/LICENSE.md +0 -0
- {simo-2.10.7.dist-info → simo-2.10.11.dist-info}/top_level.txt +0 -0
|
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
|
simo/fleet/api.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import json
|
|
1
2
|
from django.db.models import Count
|
|
2
3
|
from django.utils.translation import gettext_lazy as _
|
|
3
4
|
from rest_framework import viewsets
|
|
@@ -66,12 +67,14 @@ class ColonelsViewSet(InstanceMixin, viewsets.ModelViewSet):
|
|
|
66
67
|
@action(detail=True, methods=['post'])
|
|
67
68
|
def move_to(self, request, pk, *args, **kwargs):
|
|
68
69
|
colonel = self.get_object()
|
|
70
|
+
data = json.loads(request.body)
|
|
71
|
+
|
|
69
72
|
target = Colonel.objects.annotate(
|
|
70
73
|
components_count=Count('components')
|
|
71
74
|
).filter(
|
|
72
|
-
pk=
|
|
75
|
+
pk=data.get('target'), instance=self.instance,
|
|
73
76
|
components_count=0, type=colonel.type
|
|
74
|
-
)
|
|
77
|
+
).first()
|
|
75
78
|
if not target:
|
|
76
79
|
raise APIValidationError(_('Invalid target.'), code=400)
|
|
77
80
|
colonel.move_to(target)
|
simo/fleet/controllers.py
CHANGED
|
@@ -23,7 +23,7 @@ from .gateways import FleetGatewayHandler
|
|
|
23
23
|
from .forms import (
|
|
24
24
|
ColonelPinChoiceField,
|
|
25
25
|
ColonelBinarySensorConfigForm, ColonelButtonConfigForm,
|
|
26
|
-
ColonelSwitchConfigForm, ColonelPWMOutputConfigForm,
|
|
26
|
+
ColonelSwitchConfigForm, ColonelPWMOutputConfigForm, DC10VConfigForm,
|
|
27
27
|
ColonelNumericSensorConfigForm, ColonelRGBLightConfigForm,
|
|
28
28
|
ColonelDHTSensorConfigForm, DS18B20SensorConfigForm,
|
|
29
29
|
BME680SensorConfigForm, MCP9808SensorConfigForm, ENS160SensorConfigForm,
|
|
@@ -164,6 +164,11 @@ class BME680Sensor(DHTSensor):
|
|
|
164
164
|
config_form = BME680SensorConfigForm
|
|
165
165
|
name = "BME68X Climate Sensor (I2C)"
|
|
166
166
|
|
|
167
|
+
def _get_occupied_pins(self):
|
|
168
|
+
return [
|
|
169
|
+
self.component.config['i2c_interface'] + 100,
|
|
170
|
+
]
|
|
171
|
+
|
|
167
172
|
|
|
168
173
|
|
|
169
174
|
class MCP9808TempSensor(FleeDeviceMixin, BaseNumericSensor):
|
|
@@ -180,6 +185,11 @@ class MCP9808TempSensor(FleeDeviceMixin, BaseNumericSensor):
|
|
|
180
185
|
return 'F'
|
|
181
186
|
return 'C'
|
|
182
187
|
|
|
188
|
+
def _get_occupied_pins(self):
|
|
189
|
+
return [
|
|
190
|
+
self.component.config['i2c_interface'] + 100,
|
|
191
|
+
]
|
|
192
|
+
|
|
183
193
|
def _prepare_for_set(self, value):
|
|
184
194
|
if self.component.zone.instance.units_of_measure == 'imperial':
|
|
185
195
|
return round((value[0][1] * 9 / 5) + 32, 1)
|
|
@@ -198,6 +208,11 @@ class ENS160AirQualitySensor(FleeDeviceMixin, BaseMultiSensor):
|
|
|
198
208
|
["AQI (UBA)", 0, ""]
|
|
199
209
|
]
|
|
200
210
|
|
|
211
|
+
def _get_occupied_pins(self):
|
|
212
|
+
return [
|
|
213
|
+
self.component.config['i2c_interface'] + 100,
|
|
214
|
+
]
|
|
215
|
+
|
|
201
216
|
def get_co2(self):
|
|
202
217
|
try:
|
|
203
218
|
for entry in self.component.value:
|
|
@@ -299,7 +314,7 @@ class FadeMixin:
|
|
|
299
314
|
|
|
300
315
|
|
|
301
316
|
class PWMOutput(FadeMixin, FleeDeviceMixin, BasicOutputMixin, BaseDimmer):
|
|
302
|
-
name = "Dimmer"
|
|
317
|
+
name = "AC/DC Dimmer | PWM Driver"
|
|
303
318
|
config_form = ColonelPWMOutputConfigForm
|
|
304
319
|
|
|
305
320
|
def _prepare_for_send(self, value):
|
|
@@ -329,7 +344,7 @@ class PWMOutput(FadeMixin, FleeDeviceMixin, BasicOutputMixin, BaseDimmer):
|
|
|
329
344
|
|
|
330
345
|
def _prepare_for_set(self, pwm_value):
|
|
331
346
|
conf = self.component.config
|
|
332
|
-
duty_max = 1023 -
|
|
347
|
+
duty_max = 1023 - conf.get('device_min', 0) * 0.01 * 1023
|
|
333
348
|
duty_min = 1023 - conf.get('device_max', 100) * 0.01 * 1023
|
|
334
349
|
|
|
335
350
|
if pwm_value > duty_max:
|
|
@@ -337,7 +352,7 @@ class PWMOutput(FadeMixin, FleeDeviceMixin, BasicOutputMixin, BaseDimmer):
|
|
|
337
352
|
elif pwm_value < duty_min:
|
|
338
353
|
value = conf.get('min', 0)
|
|
339
354
|
else:
|
|
340
|
-
pwm_amplitude =duty_max - duty_min
|
|
355
|
+
pwm_amplitude = duty_max - duty_min
|
|
341
356
|
relative_value = (pwm_value - duty_min) / pwm_amplitude
|
|
342
357
|
val_amplitude = conf.get('max', 100) - conf.get('min', 0)
|
|
343
358
|
value = conf.get('min', 0) + val_amplitude * relative_value
|
|
@@ -347,47 +362,61 @@ class PWMOutput(FadeMixin, FleeDeviceMixin, BasicOutputMixin, BaseDimmer):
|
|
|
347
362
|
return round(value, 3)
|
|
348
363
|
|
|
349
364
|
|
|
350
|
-
class
|
|
351
|
-
name = "0 -
|
|
352
|
-
config_form =
|
|
353
|
-
default_value_units = '
|
|
365
|
+
class DC10VDriver(FadeMixin, FleeDeviceMixin, BasicOutputMixin, BaseDimmer):
|
|
366
|
+
name = "0 - 10V Driver"
|
|
367
|
+
config_form = DC10VConfigForm
|
|
368
|
+
default_value_units = '%'
|
|
354
369
|
|
|
355
370
|
def _prepare_for_send(self, value):
|
|
356
371
|
conf = self.component.config
|
|
357
|
-
if value >= conf.get('max',
|
|
358
|
-
value = conf.get('max',
|
|
372
|
+
if value >= conf.get('max', 100):
|
|
373
|
+
value = conf.get('max', 100)
|
|
359
374
|
elif value < conf.get('min', 0):
|
|
360
375
|
value = conf.get('min', 0)
|
|
361
376
|
|
|
362
|
-
if value >= conf.get('max',
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
377
|
+
if value >= conf.get('max', 100):
|
|
378
|
+
if conf.get('inverse') == True:
|
|
379
|
+
pwm_value = 0
|
|
380
|
+
else:
|
|
381
|
+
pwm_value = 1023
|
|
382
|
+
elif value <= conf.get('min', 0):
|
|
383
|
+
if conf.get('inverse') == True:
|
|
384
|
+
pwm_value = 1023
|
|
385
|
+
else:
|
|
386
|
+
pwm_value = 0
|
|
366
387
|
else:
|
|
367
|
-
val_amplitude = conf.get('max',
|
|
388
|
+
val_amplitude = conf.get('max', 100) - conf.get('min', 0)
|
|
368
389
|
val_relative = value / val_amplitude
|
|
369
390
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
391
|
+
if conf.get('inverse') == True:
|
|
392
|
+
duty_max = 1023 - conf.get('device_min', 0) / 10 * 1023
|
|
393
|
+
duty_min = 1023 - conf.get('device_max', 10) / 10 * 1023
|
|
394
|
+
pwm_amplitude = duty_max - duty_min
|
|
395
|
+
pwm_value = duty_min + pwm_amplitude * val_relative
|
|
396
|
+
pwm_value = duty_max - pwm_value + duty_min
|
|
397
|
+
else:
|
|
398
|
+
duty_max = conf.get('device_max', 10) / 10 * 1023
|
|
399
|
+
duty_min = conf.get('device_min', 0) / 10 * 1023
|
|
400
|
+
pwm_amplitude = duty_max - duty_min
|
|
401
|
+
pwm_value = duty_min + pwm_amplitude * val_relative
|
|
375
402
|
|
|
376
403
|
return pwm_value
|
|
377
404
|
|
|
378
405
|
def _prepare_for_set(self, pwm_value):
|
|
379
406
|
conf = self.component.config
|
|
380
|
-
|
|
381
|
-
|
|
407
|
+
if conf.get('inverse') == True:
|
|
408
|
+
pwm_value = 1023 - pwm_value
|
|
409
|
+
duty_max = conf.get('device_max', 10) / 10 * 1023
|
|
410
|
+
duty_min = conf.get('device_min', 0) / 10 * 1023
|
|
382
411
|
|
|
383
412
|
if pwm_value > duty_max:
|
|
384
|
-
value = conf.get('max',
|
|
413
|
+
value = conf.get('max', 100)
|
|
385
414
|
elif pwm_value < duty_min:
|
|
386
415
|
value = conf.get('min', 0)
|
|
387
416
|
else:
|
|
388
417
|
pwm_amplitude = duty_max - duty_min
|
|
389
418
|
relative_value = (pwm_value - duty_min) / pwm_amplitude
|
|
390
|
-
val_amplitude = conf.get('max',
|
|
419
|
+
val_amplitude = conf.get('max', 100) - conf.get('min', 0)
|
|
391
420
|
value = conf.get('min', 0) + val_amplitude * relative_value
|
|
392
421
|
|
|
393
422
|
return round(value, 3)
|
|
@@ -855,13 +884,13 @@ class AirQualitySensor(FleeDeviceMixin, BaseMultiSensor):
|
|
|
855
884
|
|
|
856
885
|
def _receive_from_device(self, value, *args, **kwargs):
|
|
857
886
|
aqi = 5
|
|
858
|
-
if value <
|
|
887
|
+
if value < 2000:
|
|
859
888
|
aqi = 4
|
|
860
|
-
if value <
|
|
889
|
+
if value < 800:
|
|
861
890
|
aqi = 3
|
|
862
|
-
if value <
|
|
891
|
+
if value < 400:
|
|
863
892
|
aqi = 2
|
|
864
|
-
if value <
|
|
893
|
+
if value < 200:
|
|
865
894
|
aqi = 1
|
|
866
895
|
value = [
|
|
867
896
|
["TVOC", value, "ppb"],
|
|
@@ -968,10 +997,14 @@ class RoomZonePresenceSensor(FleeDeviceMixin, BaseBinarySensor):
|
|
|
968
997
|
config_form = BaseComponentForm
|
|
969
998
|
name = "Room zone presence"
|
|
970
999
|
discovery_msg = _(
|
|
971
|
-
"
|
|
972
|
-
"
|
|
973
|
-
"
|
|
974
|
-
"
|
|
1000
|
+
"Your body is a a live space marker now! Your movements are being recorded.<br>"
|
|
1001
|
+
"Whenever you hear a beep, new space blob is being included.<br>"
|
|
1002
|
+
"Move vigorously in the zone where you want presence to be detected until "
|
|
1003
|
+
"you hear no more beeps.<br> "
|
|
1004
|
+
"Green color of a sensor indicates, "
|
|
1005
|
+
"that the space you are currently in is "
|
|
1006
|
+
"already included.<br>"
|
|
1007
|
+
"Tip: Dance! :)"
|
|
975
1008
|
)
|
|
976
1009
|
|
|
977
1010
|
@classmethod
|
|
@@ -991,10 +1024,10 @@ class RoomZonePresenceSensor(FleeDeviceMixin, BaseBinarySensor):
|
|
|
991
1024
|
command='discover', type=self.uid.split('.')[-1],
|
|
992
1025
|
).publish()
|
|
993
1026
|
else:
|
|
1027
|
+
from .custom_dali_operations import Frame
|
|
994
1028
|
dali_device = CustomDaliDevice.objects.filter(
|
|
995
1029
|
id=form_cleaned_data['device'][5:]
|
|
996
1030
|
).first()
|
|
997
|
-
from .custom_dali_operations import Frame
|
|
998
1031
|
frame = Frame(40, bytes(bytearray(5)))
|
|
999
1032
|
frame[8:11] = 15 # command to custom dali device
|
|
1000
1033
|
frame[12:15] = 0 # action to perform: start room zone discovery
|
|
@@ -1008,6 +1041,11 @@ class RoomZonePresenceSensor(FleeDeviceMixin, BaseBinarySensor):
|
|
|
1008
1041
|
form = cls.add_form(
|
|
1009
1042
|
controller_uid=cls.uid, data=started_with
|
|
1010
1043
|
)
|
|
1044
|
+
from simo.core.middleware import introduce_instance
|
|
1045
|
+
introduce_instance(form.data['zone'].instance)
|
|
1046
|
+
form = cls.add_form(
|
|
1047
|
+
controller_uid=cls.uid, data=started_with
|
|
1048
|
+
)
|
|
1011
1049
|
form.is_valid()
|
|
1012
1050
|
if form.cleaned_data['device'].startswith('wifi'):
|
|
1013
1051
|
form.instance.alive = False
|
|
@@ -1020,15 +1058,17 @@ class RoomZonePresenceSensor(FleeDeviceMixin, BaseBinarySensor):
|
|
|
1020
1058
|
id=new_component.config['colonel']
|
|
1021
1059
|
), command='finalize',
|
|
1022
1060
|
data={
|
|
1061
|
+
'permanent_id': new_component.id,
|
|
1023
1062
|
'comp_config': {
|
|
1024
|
-
'type':
|
|
1063
|
+
'type': cls.uid.split('.')[-1],
|
|
1025
1064
|
'family': new_component.controller.family,
|
|
1026
|
-
'config': json.loads(json.dumps(new_component.config))
|
|
1065
|
+
'config': json.loads(json.dumps(new_component.config)),
|
|
1027
1066
|
}
|
|
1028
1067
|
}
|
|
1029
1068
|
).publish()
|
|
1030
1069
|
else:
|
|
1031
1070
|
from simo.core.models import Component
|
|
1071
|
+
from .custom_dali_operations import Frame
|
|
1032
1072
|
dali_device = CustomDaliDevice.objects.filter(
|
|
1033
1073
|
id=form.cleaned_data['device'][5:]
|
|
1034
1074
|
).first()
|
|
@@ -1049,12 +1089,70 @@ class RoomZonePresenceSensor(FleeDeviceMixin, BaseBinarySensor):
|
|
|
1049
1089
|
)
|
|
1050
1090
|
form.instance.config['slot'] = free_slots.pop()
|
|
1051
1091
|
new_component = form.save()
|
|
1052
|
-
from .custom_dali_operations import Frame
|
|
1053
1092
|
frame = Frame(40, bytes(bytearray(5)))
|
|
1054
1093
|
frame[8:11] = 15 # command to custom dali device
|
|
1055
1094
|
frame[12:15] = 1 # action to perform: stop room zone discovery
|
|
1056
1095
|
frame[16:18] = new_component.config['slot']
|
|
1057
1096
|
dali_device.transmit(frame)
|
|
1058
1097
|
|
|
1059
|
-
|
|
1060
|
-
|
|
1098
|
+
return new_component
|
|
1099
|
+
|
|
1100
|
+
def repaint(self):
|
|
1101
|
+
"""Repaint included 3D space"""
|
|
1102
|
+
if self.component.config['device'].startswith('wifi'):
|
|
1103
|
+
GatewayObjectCommand(
|
|
1104
|
+
self.component.gateway, Colonel(
|
|
1105
|
+
id=self.component.config['colonel']
|
|
1106
|
+
), command='call', method='repaint', id=self.component.id
|
|
1107
|
+
).publish()
|
|
1108
|
+
else:
|
|
1109
|
+
dali_device = CustomDaliDevice.objects.filter(
|
|
1110
|
+
id=self.component.config['device'][5:]
|
|
1111
|
+
).first()
|
|
1112
|
+
from .custom_dali_operations import Frame
|
|
1113
|
+
frame = Frame(40, bytes(bytearray(5)))
|
|
1114
|
+
frame[8:11] = 15 # command to custom dali device
|
|
1115
|
+
frame[12:15] = 3 # action to perform: repaint
|
|
1116
|
+
frame[16:18] = self.component.config['slot']
|
|
1117
|
+
dali_device.transmit(frame)
|
|
1118
|
+
|
|
1119
|
+
def finish_repaint(self):
|
|
1120
|
+
"""Finish repainting of 3D space"""
|
|
1121
|
+
if self.component.config['device'].startswith('wifi'):
|
|
1122
|
+
GatewayObjectCommand(
|
|
1123
|
+
self.component.gateway, Colonel(
|
|
1124
|
+
id=self.component.config['colonel']
|
|
1125
|
+
), command='call', method='finish_repaint',
|
|
1126
|
+
id=self.component.id
|
|
1127
|
+
).publish()
|
|
1128
|
+
else:
|
|
1129
|
+
dali_device = CustomDaliDevice.objects.filter(
|
|
1130
|
+
id=self.component.config['device'][5:]
|
|
1131
|
+
).first()
|
|
1132
|
+
from .custom_dali_operations import Frame
|
|
1133
|
+
frame = Frame(40, bytes(bytearray(5)))
|
|
1134
|
+
frame[8:11] = 15 # command to custom dali device
|
|
1135
|
+
frame[12:15] = 4 # action to perform: finish repaint
|
|
1136
|
+
frame[16:18] = self.component.config['slot']
|
|
1137
|
+
dali_device.transmit(frame)
|
|
1138
|
+
|
|
1139
|
+
def cancel_repaint(self):
|
|
1140
|
+
"""Finish repainting of 3D space"""
|
|
1141
|
+
if self.component.config['device'].startswith('wifi'):
|
|
1142
|
+
GatewayObjectCommand(
|
|
1143
|
+
self.component.gateway, Colonel(
|
|
1144
|
+
id=self.component.config['colonel']
|
|
1145
|
+
), command='call', method='cancel_repaint',
|
|
1146
|
+
id=self.component.id
|
|
1147
|
+
).publish()
|
|
1148
|
+
else:
|
|
1149
|
+
dali_device = CustomDaliDevice.objects.filter(
|
|
1150
|
+
id=self.component.config['device'][5:]
|
|
1151
|
+
).first()
|
|
1152
|
+
from .custom_dali_operations import Frame
|
|
1153
|
+
frame = Frame(40, bytes(bytearray(5)))
|
|
1154
|
+
frame[8:11] = 15 # command to custom dali device
|
|
1155
|
+
frame[12:15] = 5 # action to perform: cancel repaint
|
|
1156
|
+
frame[16:18] = self.component.config['slot']
|
|
1157
|
+
dali_device.transmit(frame)
|
|
1158
|
+
|