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

@@ -145,6 +145,25 @@ class FleetConsumer(AsyncWebsocketConsumer):
145
145
  'command': 'set_config', 'data': config
146
146
  }))
147
147
 
148
+ asyncio.create_task(self.watch_connection())
149
+
150
+ async def watch_connection(self):
151
+ while self.connected:
152
+ await sync_to_async(
153
+ self.colonel.refresh_from_db, thread_sensitive=True
154
+ )()
155
+
156
+ if self.colonel.firmware_auto_update \
157
+ and self.colonel.minor_upgrade_available:
158
+ await self.firmware_update(
159
+ self.colonel.minor_upgrade_available
160
+ )
161
+
162
+ await asyncio.sleep(10)
163
+ # Default pinging system sometimes get's lost somewhere,
164
+ # therefore we use our own to ensure connection
165
+ await self.send(json.dumps({'command': 'ping'}))
166
+
148
167
  async def firmware_update(self, to_version):
149
168
  print("Firmware update: ", str(self.colonel))
150
169
  await self.send(json.dumps({'command': 'ota_update', 'version': to_version}))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: simo
3
- Version: 1.7.3
3
+ Version: 1.7.4
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
@@ -10112,7 +10112,7 @@ simo/fleet/gateways.py,sha256=W87o1P8Nubf3_v1RNn134rivHCiYIHbj4Za4sRQzSqw,204
10112
10112
  simo/fleet/models.py,sha256=4SHPX7HuZBfNwSkoDFwJjgNQs3oaSbhw_j85cXAxkqE,10092
10113
10113
  simo/fleet/routing.py,sha256=cofGsVWXMfPDwsJ6HM88xxtRxHwERhJ48Xyxc8mxg5o,149
10114
10114
  simo/fleet/serializers.py,sha256=uz_OE_bMdlE_C28gnBpUP0P08FdZKvFP-hgRKvJRYT0,348
10115
- simo/fleet/socket_consumers.py,sha256=ClWTHkGhDTh3PFEHEfhj-2ije4abwP2qO6X_r0x9-mw,11054
10115
+ simo/fleet/socket_consumers.py,sha256=wt6aXI4YY7GFij0QfuqoGgTxkoIFn3aFD2DvXz6Y_v4,11746
10116
10116
  simo/fleet/tasks.py,sha256=QcMgXUE2V--CsNfzmbW35F-Q3b8D53-Q6twlWOow2Ig,704
10117
10117
  simo/fleet/utils.py,sha256=ZGxN94Wp472SEZRXVC6ZkUd2dmh_tMHc0qbMtoMfDRg,4511
10118
10118
  simo/fleet/views.py,sha256=1AwE_JC13n76JiM3cQ__8CgBidCoRFUbJN-Yaz1s4HQ,1198
@@ -10313,8 +10313,8 @@ simo/users/templates/invitations/expired_msg.html,sha256=3hTtUm-Cr1axOjlwAIKsSj9
10313
10313
  simo/users/templates/invitations/expired_suggestion.html,sha256=pT67ludJdeohrlF0QIzs4eqy1SI_oH2i6H0ecEIgaCg,100
10314
10314
  simo/users/templates/invitations/taken_msg.html,sha256=Dv1MaxVVmSdL20gri4Ei-K0aZ0OTmIdmO6a3l5MKwCs,445
10315
10315
  simo/users/templates/invitations/taken_suggestion.html,sha256=NCE2XQail0WQGW8v6y3BkQoM3IOWlh02z9XPEws659E,301
10316
- simo-1.7.3.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
10317
- simo-1.7.3.dist-info/METADATA,sha256=oMjXfazjbNEphDT3DJ5Wrj4aeMemBOgTRPqk-pA6_-M,1748
10318
- simo-1.7.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
10319
- simo-1.7.3.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
10320
- simo-1.7.3.dist-info/RECORD,,
10316
+ simo-1.7.4.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
10317
+ simo-1.7.4.dist-info/METADATA,sha256=mTGpYdlNate2rc64dXBjuxD3ob9oY35bwDpMMuFNbP0,1748
10318
+ simo-1.7.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
10319
+ simo-1.7.4.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
10320
+ simo-1.7.4.dist-info/RECORD,,
File without changes