simo 2.1.7__py3-none-any.whl → 2.1.8__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/generic/controllers.py +2 -2
- simo/generic/gateways.py +21 -14
- {simo-2.1.7.dist-info → simo-2.1.8.dist-info}/METADATA +1 -1
- {simo-2.1.7.dist-info → simo-2.1.8.dist-info}/RECORD +8 -8
- {simo-2.1.7.dist-info → simo-2.1.8.dist-info}/LICENSE.md +0 -0
- {simo-2.1.7.dist-info → simo-2.1.8.dist-info}/WHEEL +0 -0
- {simo-2.1.7.dist-info → simo-2.1.8.dist-info}/entry_points.txt +0 -0
- {simo-2.1.7.dist-info → simo-2.1.8.dist-info}/top_level.txt +0 -0
simo/generic/controllers.py
CHANGED
|
@@ -322,7 +322,7 @@ class Thermostat(ControllerBase):
|
|
|
322
322
|
).first()
|
|
323
323
|
|
|
324
324
|
if not temperature_sensor or not temperature_sensor.alive:
|
|
325
|
-
|
|
325
|
+
self.component.error_msg = "No temperature sensor"
|
|
326
326
|
self.component.alive = False
|
|
327
327
|
self.component.save()
|
|
328
328
|
return
|
|
@@ -355,7 +355,7 @@ class Thermostat(ControllerBase):
|
|
|
355
355
|
|
|
356
356
|
if mode in ('auto', 'heater'):
|
|
357
357
|
if (not heater or not heater.alive) and mode == 'heater':
|
|
358
|
-
|
|
358
|
+
self.component.error_msg = "No heater"
|
|
359
359
|
self.component.alive = False
|
|
360
360
|
self.component.save()
|
|
361
361
|
return
|
simo/generic/gateways.py
CHANGED
|
@@ -304,25 +304,32 @@ class GenericGatewayHandler(BaseObjectCommandsGatewayHandler):
|
|
|
304
304
|
mqtt_client.subscribe(command.get_topic())
|
|
305
305
|
|
|
306
306
|
def on_mqtt_message(self, client, userdata, msg):
|
|
307
|
-
|
|
307
|
+
print("Mqtt message: ", msg.payload)
|
|
308
|
+
from simo.generic.controllers import (
|
|
309
|
+
Script, Blinds, AlarmGroup, Gate
|
|
310
|
+
)
|
|
308
311
|
payload = json.loads(msg.payload)
|
|
309
312
|
component = get_event_obj(payload, Component)
|
|
310
313
|
if not component:
|
|
311
314
|
return
|
|
315
|
+
try:
|
|
316
|
+
if isinstance(component.controller, Script):
|
|
317
|
+
if payload.get('set_val') == 'start':
|
|
318
|
+
self.start_script(component)
|
|
319
|
+
elif payload.get('set_val') == 'stop':
|
|
320
|
+
self.stop_script(component)
|
|
321
|
+
return
|
|
322
|
+
elif component.controller_uid == Blinds.uid:
|
|
323
|
+
self.control_blinds(component, payload.get('set_val'))
|
|
324
|
+
elif component.controller_uid == AlarmGroup.uid:
|
|
325
|
+
self.control_alarm_group(component, payload.get('set_val'))
|
|
326
|
+
elif component.controller_uid == Gate:
|
|
327
|
+
self.control_gate(component, payload.get('set_val'))
|
|
328
|
+
else:
|
|
329
|
+
component.controller.set(payload.get('set_val'))
|
|
330
|
+
except Exception:
|
|
331
|
+
print(traceback.format_exc(), file=sys.stderr)
|
|
312
332
|
|
|
313
|
-
if isinstance(component.controller, Script):
|
|
314
|
-
if payload.get('set_val') == 'start':
|
|
315
|
-
print("START THIS SCRIPT!!!", component)
|
|
316
|
-
self.start_script(component)
|
|
317
|
-
elif payload.get('set_val') == 'stop':
|
|
318
|
-
self.stop_script(component)
|
|
319
|
-
return
|
|
320
|
-
elif component.controller_uid == Blinds.uid:
|
|
321
|
-
self.control_blinds(component, payload.get('set_val'))
|
|
322
|
-
elif component.controller_uid == AlarmGroup.uid:
|
|
323
|
-
self.control_alarm_group(component, payload.get('set_val'))
|
|
324
|
-
elif component.controller_uid == Gate:
|
|
325
|
-
self.control_gate(component, payload.get('set_val'))
|
|
326
333
|
|
|
327
334
|
def start_script(self, component):
|
|
328
335
|
print("START SCRIPT %s" % str(component))
|
|
@@ -10299,9 +10299,9 @@ simo/fleet/templates/fleet/controllers_info/button.md,sha256=GIuxqG617174NEtpPeC
|
|
|
10299
10299
|
simo/generic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10300
10300
|
simo/generic/app_widgets.py,sha256=E_pnpA1hxMIhenRCrHoQ5cik06jm2BAHCkl_eo-OudU,1264
|
|
10301
10301
|
simo/generic/base_types.py,sha256=djymox_boXTHX1BTTCLXrCH7ED-uAsV_idhaDOc3OLI,409
|
|
10302
|
-
simo/generic/controllers.py,sha256=
|
|
10302
|
+
simo/generic/controllers.py,sha256=fgjsEtc4tJx3VaZ4R6HcrYQ0JosarR7JKKEar7ip5HI,58245
|
|
10303
10303
|
simo/generic/forms.py,sha256=IAfDtmEk1-CP0JBoetOD_ahLm64nK41GOUXjmbUzNtY,29550
|
|
10304
|
-
simo/generic/gateways.py,sha256=
|
|
10304
|
+
simo/generic/gateways.py,sha256=FAGShbPuO88Ww8f5KxUwsMvvowK2d6BWsC4o3706y7Y,18354
|
|
10305
10305
|
simo/generic/models.py,sha256=92TACMhJHadAg0TT9GnARO_R3_Sl6i-GGjhG_x7YdFI,7391
|
|
10306
10306
|
simo/generic/routing.py,sha256=elQVZmgnPiieEuti4sJ7zITk1hlRxpgbotcutJJgC60,228
|
|
10307
10307
|
simo/generic/socket_consumers.py,sha256=NfTQGYtVAc864IoogZRxf_0xpDPM0eMCWn0SlKA5P7Y,1751
|
|
@@ -10502,9 +10502,9 @@ simo/users/templates/invitations/expired_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCe
|
|
|
10502
10502
|
simo/users/templates/invitations/expired_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10503
10503
|
simo/users/templates/invitations/taken_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10504
10504
|
simo/users/templates/invitations/taken_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10505
|
-
simo-2.1.
|
|
10506
|
-
simo-2.1.
|
|
10507
|
-
simo-2.1.
|
|
10508
|
-
simo-2.1.
|
|
10509
|
-
simo-2.1.
|
|
10510
|
-
simo-2.1.
|
|
10505
|
+
simo-2.1.8.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
|
|
10506
|
+
simo-2.1.8.dist-info/METADATA,sha256=nWipQhTgzmOkBqv6OOGUYMoptAirTzYtomh-xD-4x_c,1847
|
|
10507
|
+
simo-2.1.8.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
|
|
10508
|
+
simo-2.1.8.dist-info/entry_points.txt,sha256=SJBxiDpH7noO0STxVI_eRIsGR-nLgdXXeqCDe8cXlbM,65
|
|
10509
|
+
simo-2.1.8.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
|
|
10510
|
+
simo-2.1.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|