simo 2.8.9__py3-none-any.whl → 2.8.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/core/events.py CHANGED
@@ -132,6 +132,8 @@ class OnChangeMixin:
132
132
  self.refresh_from_db()
133
133
 
134
134
  no_args = len(inspect.getfullargspec(self._on_change_function).args)
135
+ if inspect.ismethod(self._on_change_function):
136
+ no_args -= 1
135
137
  args = []
136
138
  if no_args > 0:
137
139
  args = [self]
@@ -106,10 +106,12 @@ def create_instance_defaults(sender, instance, created, **kwargs):
106
106
  # Create default User permission roles
107
107
 
108
108
  PermissionsRole.objects.create(
109
- instance=instance, name="Admin", is_owner=True, is_superuser=True
109
+ instance=instance, name="Admin", is_owner=True, is_superuser=True,
110
+ can_manage_users = True
110
111
  )
111
112
  PermissionsRole.objects.create(
112
- instance=instance, name="Owner", is_owner=True, is_default=True
113
+ instance=instance, name="Owner",
114
+ is_owner=True, is_default=True, can_manage_users=True
113
115
  )
114
116
  PermissionsRole.objects.create(
115
117
  instance=instance, name="Guest", is_owner=False
simo/fleet/models.py CHANGED
@@ -276,9 +276,9 @@ def after_colonel_save(sender, instance, created, *args, **kwargs):
276
276
  if instance.type == 'game-changer':
277
277
  # occupy ports immediately
278
278
  Interface.objects.create(colonel=instance, no=1, type='i2c')
279
- Interface.objects.create(colonel=instance, no=2)
279
+ Interface.objects.create(colonel=instance, no=2, type='dali')
280
280
  elif instance.type == 'game-changer-mini':
281
- # only create interfaces, but do not ocuupy ports
281
+ # only create interfaces, but do not occupy ports
282
282
  Interface.objects.create(colonel=instance, no=1)
283
283
  Interface.objects.create(colonel=instance, no=2)
284
284
 
@@ -195,25 +195,14 @@ class FleetConsumer(AsyncWebsocketConsumer):
195
195
  self.colonel.minor_upgrade_available
196
196
  )
197
197
 
198
- await asyncio.sleep(2)
199
-
200
198
  # Default pinging system sometimes get's lost somewhere,
201
199
  # therefore we use our own to ensure connection and understand if
202
200
  # colonel is connected or not
203
201
 
204
- await self.send_data({'command': 'ping'})
205
- ping_start = time.time()
206
- await asyncio.sleep(0.1)
207
-
208
- while ping_start > self.last_seen:
209
- if time.time() - ping_start > 3:
210
- def disconnect_socket():
211
- self.colonel.socket_connected = False
212
- self.colonel.save(update_fields=['socket_connected'])
213
- await sync_to_async(disconnect_socket, thread_sensitive=True)()
214
- break
215
- await asyncio.sleep(0.1)
202
+ if time.time() - self.last_seen > 2:
203
+ await self.send_data({'command': 'ping'})
216
204
 
205
+ await asyncio.sleep(2)
217
206
 
218
207
 
219
208
  async def firmware_update(self, to_version):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: simo
3
- Version: 2.8.9
3
+ Version: 2.8.11
4
4
  Summary: Smart Home Supremacy
5
5
  Author-email: Simanas Venčkauskas <simanas@simo.io>
6
6
  Project-URL: Homepage, https://simo.io
@@ -100,7 +100,7 @@ simo/core/base_types.py,sha256=WypW8hTfzveuTQtruGjLYAGQZIuczxTlW-SdRk3iQug,666
100
100
  simo/core/context.py,sha256=LKw1I4iIRnlnzoTCuSLLqDX7crHdBnMo3hjqYvVmzFc,1557
101
101
  simo/core/controllers.py,sha256=P4D0Tw1_t0CGM3JzRRMdyW9941xxrMsJVwikJz62ffE,37928
102
102
  simo/core/dynamic_settings.py,sha256=bUs58XEZOCIEhg1TigR3LmYggli13KMryBZ9pC7ugAQ,1872
103
- simo/core/events.py,sha256=YkTtkhJJ1MlSarTZ8qhZYMB3ZI7e5-7sK9A0SgVNQYA,4768
103
+ simo/core/events.py,sha256=Ek3fLl-NSfFyQw9mH8y_WlZtsG0BCRQJcLm2HMes_0I,4848
104
104
  simo/core/filters.py,sha256=6wbn8C2WvKTTjtfMwwLBp2Fib1V0-DMpS4iqJd6jJQo,2540
105
105
  simo/core/form_fields.py,sha256=b4wZ4n7OO0m0_BPPS9ILVrwBvhhjUB079YrroveFUWA,5222
106
106
  simo/core/forms.py,sha256=D56T38VIdqWXHJ3fW4_jQdxX40YOR8l7ynfWSm8Q1W0,22011
@@ -112,7 +112,7 @@ simo/core/models.py,sha256=brZPs8clR49VKm_Uo1wgPgCbjkS0fTLvzz3rROBeob4,23211
112
112
  simo/core/permissions.py,sha256=Ef4NO7QwwDd3Z-v61R0BeCBXxTOJz9qBvzRTIB5tHwI,2943
113
113
  simo/core/routing.py,sha256=X1_IHxyA-_Q7hw1udDoviVP4_FSBDl8GYETTC2zWTbY,499
114
114
  simo/core/serializers.py,sha256=adqe8oYP5f7hGFXcxa-Zmce2KOwy3hZOaWE3MaAFtpM,23157
115
- simo/core/signal_receivers.py,sha256=eBz-K81W150mavnVzVPU6z8VU_BCqX33O066Xwo8gXw,6578
115
+ simo/core/signal_receivers.py,sha256=GijhDPB_9TLL2cCedAh5KceqnCXGCnfHpi549uqWyiY,6642
116
116
  simo/core/socket_consumers.py,sha256=UlxV9OvTUUXaoKKYT3-qf1TyGxyOPxIpFH5cPFepH1o,9584
117
117
  simo/core/storage.py,sha256=_5igjaoWZAiExGWFEJMElxUw55DzJG1jqFty33xe8BE,342
118
118
  simo/core/tasks.py,sha256=-yBjOPILEnKRga-6MK-hBpEINQcY5mpwZwUWiDpqISs,17091
@@ -146,7 +146,7 @@ simo/core/__pycache__/controllers.cpython-312.pyc,sha256=BjN6TuuqdShWbEFHdZXSdZF
146
146
  simo/core/__pycache__/controllers.cpython-38.pyc,sha256=LtrQQ8egOIOuQbAckeM-z8OfbzS4W8VQ3vBnryAm3iU,32086
147
147
  simo/core/__pycache__/dynamic_settings.cpython-312.pyc,sha256=WUZ6XF4kZb6zPf541PkKmiQaBIw-r5C6F3EUUZiTEnE,3331
148
148
  simo/core/__pycache__/dynamic_settings.cpython-38.pyc,sha256=wGpnscX1DxFpRl54MQURhjz2aD3NJohSzw9JCFnzh2Y,2384
149
- simo/core/__pycache__/events.cpython-312.pyc,sha256=XMi5fRd97IFEH5wwCJEqUMPtpv_0xJgWr4wqjT7SasU,8900
149
+ simo/core/__pycache__/events.cpython-312.pyc,sha256=ERSBnzbKOHREhaEiqCplvOhgPp5o75unRu18i53EvQk,9011
150
150
  simo/core/__pycache__/events.cpython-38.pyc,sha256=1y8YaZsiDkBOeIWzH7SQz4holmMG_RLlMWi8kuSZcoE,5280
151
151
  simo/core/__pycache__/filters.cpython-312.pyc,sha256=-vgZ2km1A2q4Un1i30fgHT-6rROgso7HJyd7ct2coJI,3640
152
152
  simo/core/__pycache__/filters.cpython-38.pyc,sha256=WBBDwcDQwOmgbrRhyUxenSN80rU4Eq9jQ6RcrRGCP_o,2440
@@ -10414,10 +10414,10 @@ simo/fleet/controllers.py,sha256=HV6onYd11YAc_f_8NFHAbv5IJZUEd1bDGTRMQtfFe-g,289
10414
10414
  simo/fleet/forms.py,sha256=VcqATlX-omZruUgUC2fJpeLNUGSR-szmf36_M3aa5dg,66850
10415
10415
  simo/fleet/gateways.py,sha256=C7dyapWDlJ5erYPNLkSoH50I8kj0lIXicSno0_CrdXc,5783
10416
10416
  simo/fleet/managers.py,sha256=ZNeHFSkF5kzsl9E1DCBevOW6kXJlD6kw0LU4B-JMOG8,828
10417
- simo/fleet/models.py,sha256=lPiIurCNK--4mPFsg_QLo6GHbpYfE8Aju_G4VAKsRLM,17895
10417
+ simo/fleet/models.py,sha256=F4RjcI7PZFKOI4U2JqC2L8xwLsn5LeMTb-7EXmrN6B4,17908
10418
10418
  simo/fleet/routing.py,sha256=cofGsVWXMfPDwsJ6HM88xxtRxHwERhJ48Xyxc8mxg5o,149
10419
10419
  simo/fleet/serializers.py,sha256=PQnjp7LaEpMts-om2OPV5XOU9ut6KFWiePPDCXK0M98,2679
10420
- simo/fleet/socket_consumers.py,sha256=fFsnpAvItGT1tYbkAkpTxBjG5v0cT-o-fmQRM9S1wsg,19630
10420
+ simo/fleet/socket_consumers.py,sha256=938ZF1gCaGLV9X1rzlG4xScZ61zxmxVXxmKI3B_YisI,19175
10421
10421
  simo/fleet/tasks.py,sha256=VSY0cMFIs7Ocjz0_HwRLp-yaDdBl1T8U9T-7b8Ggegc,1308
10422
10422
  simo/fleet/utils.py,sha256=wNJvURzLP3-aho3D3rfg07N9kWCaMIw5gOsmeeO9Nlg,4740
10423
10423
  simo/fleet/views.py,sha256=3F8im6BsSOaK3KEuBNESE4sDbS_dWHYaOdhTR4cCLjE,5189
@@ -10933,9 +10933,9 @@ simo/users/templates/invitations/expired_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCe
10933
10933
  simo/users/templates/invitations/expired_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10934
10934
  simo/users/templates/invitations/taken_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10935
10935
  simo/users/templates/invitations/taken_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10936
- simo-2.8.9.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
10937
- simo-2.8.9.dist-info/METADATA,sha256=OfOi51AIAYPieYx4Q2xWSE2j04nlW_U7PHkheouo6Xo,2005
10938
- simo-2.8.9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
10939
- simo-2.8.9.dist-info/entry_points.txt,sha256=S9PwnUYmTSW7681GKDCxUbL0leRJIaRk6fDQIKgbZBA,135
10940
- simo-2.8.9.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
10941
- simo-2.8.9.dist-info/RECORD,,
10936
+ simo-2.8.11.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
10937
+ simo-2.8.11.dist-info/METADATA,sha256=iwAoRklwyL-hJn8Sk8NFoxzLttoLDaNGox_8m4pQygQ,2006
10938
+ simo-2.8.11.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
10939
+ simo-2.8.11.dist-info/entry_points.txt,sha256=S9PwnUYmTSW7681GKDCxUbL0leRJIaRk6fDQIKgbZBA,135
10940
+ simo-2.8.11.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
10941
+ simo-2.8.11.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (75.8.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5