simo 2.5.26__py3-none-any.whl → 2.5.27__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/core/middleware.py +2 -1
- simo/core/tasks.py +1 -5
- simo/fleet/socket_consumers.py +2 -5
- simo/generic/forms.py +1 -1
- {simo-2.5.26.dist-info → simo-2.5.27.dist-info}/METADATA +1 -1
- {simo-2.5.26.dist-info → simo-2.5.27.dist-info}/RECORD +10 -10
- {simo-2.5.26.dist-info → simo-2.5.27.dist-info}/LICENSE.md +0 -0
- {simo-2.5.26.dist-info → simo-2.5.27.dist-info}/WHEEL +0 -0
- {simo-2.5.26.dist-info → simo-2.5.27.dist-info}/entry_points.txt +0 -0
- {simo-2.5.26.dist-info → simo-2.5.27.dist-info}/top_level.txt +0 -0
simo/core/middleware.py
CHANGED
|
@@ -39,7 +39,8 @@ def get_current_instance(request=None):
|
|
|
39
39
|
).first()
|
|
40
40
|
if not instance:
|
|
41
41
|
del request.session['instance_id']
|
|
42
|
-
|
|
42
|
+
else:
|
|
43
|
+
introduce_instance(instance, request)
|
|
43
44
|
|
|
44
45
|
instance = getattr(_thread_locals, 'instance', None)
|
|
45
46
|
|
simo/core/tasks.py
CHANGED
|
@@ -231,7 +231,7 @@ def sync_with_remote():
|
|
|
231
231
|
weather_component.save()
|
|
232
232
|
|
|
233
233
|
if new_instance:
|
|
234
|
-
print(f"NEW INSTANCE:
|
|
234
|
+
print(f"NEW INSTANCE: {instance}")
|
|
235
235
|
print(f"Users data: {users_data}")
|
|
236
236
|
|
|
237
237
|
|
|
@@ -295,10 +295,6 @@ def sync_with_remote():
|
|
|
295
295
|
user.avatar_last_change = timezone.now()
|
|
296
296
|
user.save()
|
|
297
297
|
|
|
298
|
-
Instance.objects.all().exclude(
|
|
299
|
-
uid__in=instance_uids
|
|
300
|
-
).update(is_active=False)
|
|
301
|
-
|
|
302
298
|
|
|
303
299
|
|
|
304
300
|
@celery_app.task
|
simo/fleet/socket_consumers.py
CHANGED
|
@@ -13,7 +13,7 @@ import paho.mqtt.client as mqtt
|
|
|
13
13
|
from channels.generic.websocket import AsyncWebsocketConsumer
|
|
14
14
|
from asgiref.sync import sync_to_async
|
|
15
15
|
from simo.core.utils.model_helpers import get_log_file_path
|
|
16
|
-
from simo.core.middleware import introduce_instance
|
|
16
|
+
from simo.core.middleware import introduce_instance, drop_current_instance
|
|
17
17
|
from simo.core.utils.logs import capture_socket_errors
|
|
18
18
|
from simo.core.events import GatewayObjectCommand, get_event_obj
|
|
19
19
|
from simo.core.models import Gateway, Instance, Component
|
|
@@ -87,8 +87,6 @@ class FleetConsumer(AsyncWebsocketConsumer):
|
|
|
87
87
|
tz = await sync_to_async(get_tz, thread_sensitive=True)()
|
|
88
88
|
timezone.activate(tz)
|
|
89
89
|
|
|
90
|
-
introduce_instance(self.instance)
|
|
91
|
-
|
|
92
90
|
def get_colonel():
|
|
93
91
|
defaults={
|
|
94
92
|
'instance': self.instance,
|
|
@@ -240,7 +238,6 @@ class FleetConsumer(AsyncWebsocketConsumer):
|
|
|
240
238
|
}
|
|
241
239
|
|
|
242
240
|
def get_components(colonel):
|
|
243
|
-
introduce_instance(self.instance)
|
|
244
241
|
return list(
|
|
245
242
|
colonel.components.all().prefetch_related('slaves')
|
|
246
243
|
)
|
|
@@ -299,6 +296,7 @@ class FleetConsumer(AsyncWebsocketConsumer):
|
|
|
299
296
|
return config_data
|
|
300
297
|
|
|
301
298
|
def on_mqtt_message(self, client, userdata, msg):
|
|
299
|
+
drop_current_instance()
|
|
302
300
|
try:
|
|
303
301
|
payload = json.loads(msg.payload)
|
|
304
302
|
|
|
@@ -366,7 +364,6 @@ class FleetConsumer(AsyncWebsocketConsumer):
|
|
|
366
364
|
|
|
367
365
|
async def receive(self, text_data=None, bytes_data=None):
|
|
368
366
|
try:
|
|
369
|
-
introduce_instance(self.instance)
|
|
370
367
|
if text_data:
|
|
371
368
|
print(f"{self.colonel}: {text_data}")
|
|
372
369
|
data = json.loads(text_data)
|
simo/generic/forms.py
CHANGED
|
@@ -371,7 +371,7 @@ class ThermostatConfigForm(BaseComponentForm):
|
|
|
371
371
|
'temperature_sensor'
|
|
372
372
|
].base_type == MultiSensor.base_type else False
|
|
373
373
|
self.instance.config['user_config']['use_real_feel'] = \
|
|
374
|
-
self.cleaned_data
|
|
374
|
+
self.cleaned_data.get('use_real_feel', False)
|
|
375
375
|
return super().save(commit)
|
|
376
376
|
|
|
377
377
|
|
|
@@ -51,7 +51,7 @@ simo/core/forms.py,sha256=O40apPH7a4qX4WdCc10A1aoAaGWOpKqmjB8d-OhEKCo,21523
|
|
|
51
51
|
simo/core/gateways.py,sha256=m0eS3XjVe34Dge6xtoCq16kFWCKJcdQrT0JW0REqoq8,3715
|
|
52
52
|
simo/core/loggers.py,sha256=EBdq23gTQScVfQVH-xeP90-wII2DQFDjoROAW6ggUP4,1645
|
|
53
53
|
simo/core/managers.py,sha256=n-b3I4uXzfHKTeB1VMjSaMsDUxp8FegFJwnbV1IsWQ4,3019
|
|
54
|
-
simo/core/middleware.py,sha256=
|
|
54
|
+
simo/core/middleware.py,sha256=eUFf6iP-Snx_0TE3MoXsSwqrd5IjlukqZk2GQGStRCo,3385
|
|
55
55
|
simo/core/models.py,sha256=DXJXTtNdpn9yC4VArHp0yrhpRb7vGpwH2c-JvqLE56M,22784
|
|
56
56
|
simo/core/permissions.py,sha256=INQPrUAIM3WXCvd7e6cmYytKaak8fMEn7VooX-fIds0,3002
|
|
57
57
|
simo/core/routing.py,sha256=X1_IHxyA-_Q7hw1udDoviVP4_FSBDl8GYETTC2zWTbY,499
|
|
@@ -59,7 +59,7 @@ simo/core/serializers.py,sha256=WgksN1Ombv240nfQR_UtmKslTWM9vz9Y0yTdN5usiHU,2189
|
|
|
59
59
|
simo/core/signal_receivers.py,sha256=WYBRCFJhP83Ukd-Ipc1HlNyTXdTHD1rl0tV3uOKnYWY,8861
|
|
60
60
|
simo/core/socket_consumers.py,sha256=trRZvBGTJ7xIbfdmVvn7zoiWp_qssSkMZykDrI5YQyE,9783
|
|
61
61
|
simo/core/storage.py,sha256=_5igjaoWZAiExGWFEJMElxUw55DzJG1jqFty33xe8BE,342
|
|
62
|
-
simo/core/tasks.py,sha256=
|
|
62
|
+
simo/core/tasks.py,sha256=N0E9ps1n1d8xayYElGlm7GDudVEwpWfFjC8Aq9fP7TA,16407
|
|
63
63
|
simo/core/todos.py,sha256=eYVXfLGiapkxKK57XuviSNe3WsUYyIWZ0hgQJk7ThKo,665
|
|
64
64
|
simo/core/types.py,sha256=WJEq48mIbFi_5Alt4wxWMGXxNxUTXqfQU5koH7wqHHI,1108
|
|
65
65
|
simo/core/views.py,sha256=3SRZr00fyLQf8ja3U-9eekKt-ld5TvU1WQqUWprXfQ4,2390
|
|
@@ -10230,7 +10230,7 @@ simo/fleet/managers.py,sha256=ZNeHFSkF5kzsl9E1DCBevOW6kXJlD6kw0LU4B-JMOG8,828
|
|
|
10230
10230
|
simo/fleet/models.py,sha256=zPplx_v64nfKBmb-nCb74aCVtEeY3m3SjEy-VhbnydU,17511
|
|
10231
10231
|
simo/fleet/routing.py,sha256=cofGsVWXMfPDwsJ6HM88xxtRxHwERhJ48Xyxc8mxg5o,149
|
|
10232
10232
|
simo/fleet/serializers.py,sha256=X2M0DFKVaxM6JFGDsdg3S2nJlLIcBvbujidZdfxD88w,2169
|
|
10233
|
-
simo/fleet/socket_consumers.py,sha256=
|
|
10233
|
+
simo/fleet/socket_consumers.py,sha256=PwxGOqstI5wzglBHTvxosa9mwg8n3tWDQEPLb1vbxlc,18354
|
|
10234
10234
|
simo/fleet/tasks.py,sha256=AGq9BXFNAqkhOANsPvId8yjEbDtVCB3MRsi_AKDpgIM,821
|
|
10235
10235
|
simo/fleet/utils.py,sha256=wNJvURzLP3-aho3D3rfg07N9kWCaMIw5gOsmeeO9Nlg,4740
|
|
10236
10236
|
simo/fleet/views.py,sha256=jT3GcGv_JEj3dqyfHH2whCnGqwT8YEAuFxRgIX4Dk9w,3237
|
|
@@ -10341,7 +10341,7 @@ simo/generic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
10341
10341
|
simo/generic/app_widgets.py,sha256=TPRLj4hri2hBuY6mrdwBiv-01z2hDxZmsup-GDD9LrM,953
|
|
10342
10342
|
simo/generic/base_types.py,sha256=u3SlfpNYaCwkVBwomWgso4ODzL71ay9MhiAW-bxgnDU,341
|
|
10343
10343
|
simo/generic/controllers.py,sha256=i-xKQ5PrNKwCuO0dFaHHUaD5rF9lDnq18ziVSNBENao,50134
|
|
10344
|
-
simo/generic/forms.py,sha256=
|
|
10344
|
+
simo/generic/forms.py,sha256=tCbIZtbruBHjZRzulGXJQOjmxaGJ2uoKqjT1scScdDQ,29004
|
|
10345
10345
|
simo/generic/gateways.py,sha256=MxPQzgEnnXSG-t6rErHZQJACFWegCWGaME640UIGrA8,15783
|
|
10346
10346
|
simo/generic/models.py,sha256=Adq7ipWK-renxJlNW-SZnAq2oGEOwKx8EdUWaKnfcVQ,7597
|
|
10347
10347
|
simo/generic/routing.py,sha256=elQVZmgnPiieEuti4sJ7zITk1hlRxpgbotcutJJgC60,228
|
|
@@ -10561,9 +10561,9 @@ simo/users/templates/invitations/expired_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCe
|
|
|
10561
10561
|
simo/users/templates/invitations/expired_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10562
10562
|
simo/users/templates/invitations/taken_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10563
10563
|
simo/users/templates/invitations/taken_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10564
|
-
simo-2.5.
|
|
10565
|
-
simo-2.5.
|
|
10566
|
-
simo-2.5.
|
|
10567
|
-
simo-2.5.
|
|
10568
|
-
simo-2.5.
|
|
10569
|
-
simo-2.5.
|
|
10564
|
+
simo-2.5.27.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
|
|
10565
|
+
simo-2.5.27.dist-info/METADATA,sha256=iYNcZpbiLgJERBKWPk9fk0ZMXQqO7-pT2h-9B6N9YbE,1924
|
|
10566
|
+
simo-2.5.27.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
10567
|
+
simo-2.5.27.dist-info/entry_points.txt,sha256=S9PwnUYmTSW7681GKDCxUbL0leRJIaRk6fDQIKgbZBA,135
|
|
10568
|
+
simo-2.5.27.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
|
|
10569
|
+
simo-2.5.27.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|