simo 2.1.4__py3-none-any.whl → 2.1.5__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/api_auth.py CHANGED
@@ -41,7 +41,3 @@ class IsAuthenticated(SessionAuthentication):
41
41
 
42
42
  def authenticate_header(self, request):
43
43
  return "None"
44
-
45
-
46
-
47
-
Binary file
simo/fleet/forms.py CHANGED
@@ -146,7 +146,7 @@ class ColonelComponentForm(BaseComponentForm):
146
146
  continue
147
147
  if pin_instances[i].colonel != self.cleaned_data['colonel']:
148
148
  formset_errors[i] = {
149
- 'pin': f"{pin_instances[i]} must be from the same Colonel!"
149
+ 'input': f"{pin_instances[i]} must be from the same Colonel!"
150
150
  }
151
151
  elif pin_instances[i].occupied_by \
152
152
  and pin_instances[i].occupied_by != self.instance:
@@ -51,7 +51,7 @@ def copy_template(to_directory='/etc/SIMO'):
51
51
  'base_dir': to_directory
52
52
  }, autoescape=False)
53
53
  template_dir = os.path.join(
54
- os.path.dirname(simo.__file__), '_hub_template'
54
+ os.path.dirname(simo.__file__), 'management', '_hub_template'
55
55
  )
56
56
  prefix_length = len(template_dir) + 1
57
57
  for root, dirs, files in os.walk(template_dir):
@@ -82,8 +82,16 @@ def copy_template(to_directory='/etc/SIMO'):
82
82
  else:
83
83
  os.makedirs(os.path.join(root, dirname), exist_ok=True)
84
84
 
85
+ manage_py_path = os.path.join(to_directory, 'hub', 'manage.py')
86
+ st = os.stat(manage_py_path)
87
+ os.chmod(manage_py_path, st.st_mode | 0o111)
88
+
85
89
 
86
90
  def install():
91
+ # this must be performed on a host machine before simo could be installed.
92
+ #
93
+ # apt install python3-pip libpq-dev python3-dev -y
94
+
87
95
  simo_directory = '/etc/SIMO'
88
96
  installed_flag_file_path = os.path.join(simo_directory, 'is_installed.json')
89
97
  HUB_DIR = os.path.join(simo_directory, 'hub')
@@ -166,6 +174,7 @@ def install():
166
174
  f'{simo_directory}/hub/supervisor.conf',
167
175
  '/etc/supervisor/conf.d/SIMO.conf'
168
176
  )
177
+ os.makedirs('/var/log/simo')
169
178
  status = subprocess.call(['supervisorctl', 'update', 'all'])
170
179
  if status != 0:
171
180
  sys.exit("INSTALLATION FAILED! Unable to start supervisord")
@@ -213,10 +222,10 @@ def install():
213
222
  with open('/etc/ssh/sshd_config', 'r') as ssh_conf:
214
223
  line = ssh_conf.readline()
215
224
  while line:
216
- if 'PasswordAuthentication' in line:
217
- new_ssh_conf += 'PasswordAuthentication no'
218
- else:
219
- new_ssh_conf += line
225
+ if line.startswitn('PasswordAuthentication'):
226
+ line.replace(' yes', ' no')
227
+ new_ssh_conf += line
228
+
220
229
  line = ssh_conf.readline()
221
230
  with open('/etc/ssh/sshd_config', 'w') as ssh_conf:
222
231
  ssh_conf.write(new_ssh_conf)
@@ -263,17 +272,22 @@ def install():
263
272
  timeshift_conf['schedule_monthly'] = "true"
264
273
  timeshift_conf['schedule_weekly'] = "true"
265
274
  timeshift_conf['schedule_daily'] = "true"
275
+ timeshift_conf['exclude'] = []
266
276
 
267
- # Must be copied to /etc/timeshift.json to work
268
- with open('/etc/timeshift.json', 'w') as conf_f:
277
+ # Must be copied to /etc/timeshift/timeshift.json to work
278
+ with open('/etc/timeshift/timeshift.json', 'w') as conf_f:
269
279
  conf_f.write(json.dumps(timeshift_conf))
270
280
 
271
- status = subprocess.call([
272
- '/usr/bin/timeshift', '--create',
273
- '--comments', '"Initial backup"', '--tags', 'M'
274
- ])
275
- if status != 0:
276
- print("Unable to start TimeShift")
281
+ # status = subprocess.call([
282
+ # '/usr/bin/timeshift', '--create',
283
+ # '--comments', '"Initial backup"', '--tags', 'M'
284
+ # ])
285
+ # if status != 0:
286
+ # print("Unable to start TimeShift")
287
+
288
+
289
+ step += 1
290
+ print("%d.__________ PUT UP INSTALL COMPLETE FLAG! _____________________" % step)
277
291
 
278
292
  with open(installed_flag_file_path, 'w') as f:
279
293
  f.write(json.dumps(True))
@@ -284,4 +298,4 @@ def install():
284
298
 
285
299
 
286
300
  if __name__ == "__main__":
287
- sys.exit(init())
301
+ sys.exit(install())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: simo
3
- Version: 2.1.4
3
+ Version: 2.1.5
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
@@ -15,7 +15,7 @@ simo/__pycache__/wsgi.cpython-38.pyc,sha256=TpRxO7VM_ql31hbKphVdanydC5RI1nHB4l0Q
15
15
  simo/core/__init__.py,sha256=_s2TjJfQImsMrTIxqLAx9AZie1Ojmm6sCHASdl3WLGU,50
16
16
  simo/core/admin.py,sha256=Gb1lSyvFtYj2oC5lA7j3VqU6zlqlncx5R-_XJbb8Wdk,17927
17
17
  simo/core/api.py,sha256=HSokv9CZCCr0WHSzo5TBXe2BF5-EnTZHPnShlzN86ms,25706
18
- simo/core/api_auth.py,sha256=_3hG4e1eLKrcRnSAOB_xTL6cwtOJ2_7JS7GZU_iqTgA,1251
18
+ simo/core/api_auth.py,sha256=vCxvczA8aWNcW0VyKs5WlC_ytlqeGP_H_hkKUNVkCwM,1247
19
19
  simo/core/api_meta.py,sha256=0leq4qdAELwACL7-9V_LCkuzu1VSEexys1b3iz0bsYM,3848
20
20
  simo/core/app_widgets.py,sha256=4Lh9FDzdkfh_mccJMe09dyRTT3Uqf9VXwbkurJ9E9oQ,2115
21
21
  simo/core/apps.py,sha256=CL4-BX6lYYGwq6hcXL-ozT7RTvy9hyfuiPCC_RfGIY0,267
@@ -48,7 +48,7 @@ simo/core/widgets.py,sha256=J9e06C6I22F6xKic3VMgG7WeX07glAcl-4bF2Mg180A,2827
48
48
  simo/core/__pycache__/__init__.cpython-38.pyc,sha256=ZJFM_XN0RmJMULQulgA_wFiOnEtsMoedcOWnXjH-Y8o,208
49
49
  simo/core/__pycache__/admin.cpython-38.pyc,sha256=Lqs-wHz-vxGEo7ApOk6nkpNwfxselcFHqAUozotdZU4,13231
50
50
  simo/core/__pycache__/api.cpython-38.pyc,sha256=hoCs0HvJFULzhDG4mwhTMMJt3hSDnMXJU_05FPK6dB4,20516
51
- simo/core/__pycache__/api_auth.cpython-38.pyc,sha256=5UTBr3rDMERAfc0OuOVDwGeQkt6Q7GLBtZJAMBse1sg,1712
51
+ simo/core/__pycache__/api_auth.cpython-38.pyc,sha256=6M9Cl_ha4y_Vf8Rv4GMYL8dcBCmp0KzYi6jn3SQTgys,1712
52
52
  simo/core/__pycache__/api_meta.cpython-38.pyc,sha256=Y59fGaKkyo_DJhhcDeRUUguy2OUb6f7_F6RbQRRp0vY,3023
53
53
  simo/core/__pycache__/app_widgets.cpython-38.pyc,sha256=vUCEAYqppjgRZYMs6pTuSxWWuZxreLygPuPBGw044dQ,3643
54
54
  simo/core/__pycache__/apps.cpython-38.pyc,sha256=S12d7zdc2m_93FeQ4gE6I3l_lh3GAe2Icf1Ra869Kzs,633
@@ -10186,7 +10186,7 @@ simo/fleet/auto_urls.py,sha256=UX66eR2ykMqFgfIllW-RTdjup5-FieCWl_BVm3CcXKg,702
10186
10186
  simo/fleet/base_types.py,sha256=wL9RVkHr0gA7HI1wZq0pruGEIgvQqpfnCL4cC3ywsvw,102
10187
10187
  simo/fleet/ble.py,sha256=eHA_9ABjbmH1vUVCv9hiPXQL2GZZSEVwfO0xyI1S0nI,1081
10188
10188
  simo/fleet/controllers.py,sha256=ounEUw51X6EYA8xDcGNIik1bDbw4JR3DOGr1FKo4hHs,28829
10189
- simo/fleet/forms.py,sha256=fdq30tA4mx-34eLQnHV1O0XFe3offN-BKcXmltww01k,54423
10189
+ simo/fleet/forms.py,sha256=CbrLN_gMCTo8u6fg0ovztkhdYEjHZmSr_3gzsDRMP84,54425
10190
10190
  simo/fleet/gateways.py,sha256=lKEJW0MgaOEiNnijH50DNSVChvaUT3TA3UurcI57P8k,5677
10191
10191
  simo/fleet/managers.py,sha256=XOpDOA9L-f_550TNSyXnJbun2EmtGz1TenVTMlUSb8E,807
10192
10192
  simo/fleet/models.py,sha256=U4q813VZmYUpgu7Iw4-z80LfHlkZziIqBKqkQzBA9WI,16304
@@ -10203,7 +10203,7 @@ simo/fleet/__pycache__/auto_urls.cpython-38.pyc,sha256=Tc6a6BCXHjijP8U2jE2ghlJwn
10203
10203
  simo/fleet/__pycache__/base_types.cpython-38.pyc,sha256=deyPwjpT6xZiFxBGFnj5b7R-lbdOTh2krgpJhrcGVhc,274
10204
10204
  simo/fleet/__pycache__/ble.cpython-38.pyc,sha256=Nrof9w7cm4OlpFWHeVnmvvanh2_oF9oQ3TknJiV93-0,1267
10205
10205
  simo/fleet/__pycache__/controllers.cpython-38.pyc,sha256=61dvQDl2nIuB4iaCzdBMwQnly_m0OvI7zteRS6sIm5U,23831
10206
- simo/fleet/__pycache__/forms.cpython-38.pyc,sha256=iC11rfQVEUhjqxIewYX5CoR4cqBXyNzbcmgzRk-TiKc,37436
10206
+ simo/fleet/__pycache__/forms.cpython-38.pyc,sha256=7B6NZnY6yS8qrmv5zlTa07iUYmdv4nW7PTpOVfRn3OY,37436
10207
10207
  simo/fleet/__pycache__/gateways.cpython-38.pyc,sha256=0RKVn0ndreVKhsrukqeLPSdMnRrsQ_W7yeVeBkRLfIk,5058
10208
10208
  simo/fleet/__pycache__/managers.cpython-38.pyc,sha256=8uz-xpUiqbGDgXIZ_XRZtFb-Tju6NGxflGg-Ee4Yo6k,1310
10209
10209
  simo/fleet/__pycache__/models.cpython-38.pyc,sha256=yudhmE7zhXN5t3b63N6TwAtBLC4OXiAZiNBzki3SuHI,13664
@@ -10337,7 +10337,7 @@ simo/generic/templates/generic/controllers_info/stateselect.md,sha256=T0w3vJg02W
10337
10337
  simo/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10338
10338
  simo/management/auto_update.py,sha256=4MDrJHdtC5LxEJM258Y0kc5yI4yloeKhDjh-S2BN-ZQ,2115
10339
10339
  simo/management/copy_template.py,sha256=Iehq57FYMzdHNp3LU4ue6rr6AkRiGeOthG7PoGWd88Q,2002
10340
- simo/management/install.py,sha256=IwSeullwXxATsL4cpLNmOgmVJASwLehopohp9Ua-064,9640
10340
+ simo/management/install.py,sha256=s9GqIRwLpli8g_utu2pZ0QGVSXSHFXbkY12S_R3MnVc,10127
10341
10341
  simo/management/on_http_start.py,sha256=ZDotfMQaCjksD5FFf3eZYgJS-gd_-7eZhYTHLaD-448,3312
10342
10342
  simo/management/__pycache__/__init__.cpython-38.pyc,sha256=ey9k5mPsmvAHRVf5Du6QUqy40LgBCAPN_B5EaR6h9Eg,164
10343
10343
  simo/management/__pycache__/on_http_start.cpython-38.pyc,sha256=ERfcMNz3QnqDJTJ4PwbmDfLgPCh5hrEcaedejARFkUQ,2864
@@ -10494,9 +10494,9 @@ simo/users/templates/invitations/expired_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCe
10494
10494
  simo/users/templates/invitations/expired_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10495
10495
  simo/users/templates/invitations/taken_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10496
10496
  simo/users/templates/invitations/taken_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10497
- simo-2.1.4.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
10498
- simo-2.1.4.dist-info/METADATA,sha256=BV3GcDw-Fy6Wx4aVwZIwJ6vS_Qwea0cVZbGor3xjYiE,1817
10499
- simo-2.1.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
10500
- simo-2.1.4.dist-info/entry_points.txt,sha256=SJBxiDpH7noO0STxVI_eRIsGR-nLgdXXeqCDe8cXlbM,65
10501
- simo-2.1.4.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
10502
- simo-2.1.4.dist-info/RECORD,,
10497
+ simo-2.1.5.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
10498
+ simo-2.1.5.dist-info/METADATA,sha256=sV13UwrNRCCV4LImcqM__PHth4pKToD1KXgItU6eMoY,1817
10499
+ simo-2.1.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
10500
+ simo-2.1.5.dist-info/entry_points.txt,sha256=SJBxiDpH7noO0STxVI_eRIsGR-nLgdXXeqCDe8cXlbM,65
10501
+ simo-2.1.5.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
10502
+ simo-2.1.5.dist-info/RECORD,,
File without changes