micrOSDevToolKit 2.9.8__py3-none-any.whl → 2.9.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 micrOSDevToolKit might be problematic. Click here for more details.
- micrOS/release_info/micrOS_ReleaseInfo/system_analysis_sum.json +21 -21
- micrOS/source/LM_espnow.py +27 -1
- micrOS/source/LM_oled_ui.py +1 -1
- micrOS/source/LM_system.py +4 -4
- micrOS/source/Notify.py +4 -0
- micrOS/source/Server.py +1 -1
- micrOS/source/Shell.py +3 -3
- micrOS/source/Tasks.py +1 -1
- micrOS/source/Time.py +7 -8
- micrOS/source/__pycache__/Common.cpython-312.pyc +0 -0
- micrOS/source/__pycache__/Logger.cpython-312.pyc +0 -0
- micrOS/source/__pycache__/Server.cpython-312.pyc +0 -0
- micrOS/source/micrOSloader.py +0 -1
- micrOS/source/urequests.py +14 -7
- {micrOSDevToolKit-2.9.8.data → micrOSDevToolKit-2.9.11.data}/scripts/devToolKit.py +10 -0
- {micrOSDevToolKit-2.9.8.dist-info → micrOSDevToolKit-2.9.11.dist-info}/METADATA +66 -21
- {micrOSDevToolKit-2.9.8.dist-info → micrOSDevToolKit-2.9.11.dist-info}/RECORD +57 -50
- {micrOSDevToolKit-2.9.8.dist-info → micrOSDevToolKit-2.9.11.dist-info}/WHEEL +1 -1
- toolkit/DevEnvOTA.py +13 -9
- toolkit/DevEnvUSB.py +6 -5
- toolkit/MicrOSDevEnv.py +19 -5
- toolkit/WebRepl.py +73 -0
- toolkit/dashboard_apps/BackupRestore.py +20 -35
- toolkit/dashboard_apps/CCTDemo.py +12 -17
- toolkit/dashboard_apps/CCTTest.py +20 -24
- toolkit/dashboard_apps/CamStream.py +2 -6
- toolkit/dashboard_apps/CatGame.py +14 -16
- toolkit/dashboard_apps/Dimmer.py +11 -21
- toolkit/dashboard_apps/GetVersion.py +11 -19
- toolkit/dashboard_apps/MicrophoneTest.py +1 -6
- toolkit/dashboard_apps/NeoEffectsDemo.py +28 -34
- toolkit/dashboard_apps/NeopixelTest.py +20 -25
- toolkit/dashboard_apps/PresenceTest.py +2 -8
- toolkit/dashboard_apps/RGBTest.py +20 -24
- toolkit/dashboard_apps/RoboArm.py +24 -32
- toolkit/dashboard_apps/SED_test.py +10 -14
- toolkit/dashboard_apps/SensorsTest.py +61 -0
- toolkit/dashboard_apps/SystemTest.py +151 -77
- toolkit/dashboard_apps/Template_app.py +11 -23
- toolkit/dashboard_apps/_app_base.py +34 -0
- toolkit/dashboard_apps/uLightDemo.py +15 -24
- toolkit/lib/Repository.py +64 -0
- toolkit/lib/micrOSClient.py +16 -11
- toolkit/micrOSlint.py +3 -3
- toolkit/simulator_lib/__pycache__/aioespnow.cpython-312.pyc +0 -0
- toolkit/simulator_lib/aioespnow.py +28 -0
- toolkit/socketClient.py +0 -1
- toolkit/workspace/precompiled/LM_espnow.py +27 -1
- toolkit/workspace/precompiled/LM_oled_ui.mpy +0 -0
- toolkit/workspace/precompiled/LM_system.mpy +0 -0
- toolkit/workspace/precompiled/Notify.mpy +0 -0
- toolkit/workspace/precompiled/Shell.mpy +0 -0
- toolkit/workspace/precompiled/Time.mpy +0 -0
- toolkit/workspace/precompiled/micrOSloader.mpy +0 -0
- toolkit/workspace/precompiled/urequests.mpy +0 -0
- toolkit/dashboard_apps/AirQualityBME280.py +0 -36
- toolkit/dashboard_apps/AirQualityDHT22_CO2.py +0 -36
- {micrOSDevToolKit-2.9.8.dist-info → micrOSDevToolKit-2.9.11.dist-info}/LICENSE +0 -0
- {micrOSDevToolKit-2.9.8.dist-info → micrOSDevToolKit-2.9.11.dist-info}/top_level.txt +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"Time.py": [
|
|
4
|
-
9.
|
|
4
|
+
9.16,
|
|
5
5
|
7
|
|
6
6
|
],
|
|
7
7
|
"micrOSloader.py": [
|
|
8
|
-
|
|
8
|
+
7.33,
|
|
9
9
|
1
|
|
10
10
|
],
|
|
11
11
|
"Hooks.py": [
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
0
|
|
34
34
|
],
|
|
35
35
|
"Shell.py": [
|
|
36
|
-
9.
|
|
36
|
+
9.11,
|
|
37
37
|
1
|
|
38
38
|
],
|
|
39
39
|
"Notify.py": [
|
|
40
|
-
8.
|
|
40
|
+
8.46,
|
|
41
41
|
3
|
|
42
42
|
],
|
|
43
43
|
"Types.py": [
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
0
|
|
90
90
|
],
|
|
91
91
|
"urequests.py": [
|
|
92
|
-
|
|
92
|
+
8.99,
|
|
93
93
|
5
|
|
94
94
|
],
|
|
95
95
|
"LM_roboarm.py": [
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
0
|
|
110
110
|
],
|
|
111
111
|
"LM_oled_ui.py": [
|
|
112
|
-
9.
|
|
112
|
+
9.02,
|
|
113
113
|
0
|
|
114
114
|
],
|
|
115
115
|
"LM_system.py": [
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
0
|
|
130
130
|
],
|
|
131
131
|
"LM_oled.py": [
|
|
132
|
-
9.
|
|
132
|
+
9.09,
|
|
133
133
|
4
|
|
134
134
|
],
|
|
135
135
|
"LM_tinyrgb.py": [
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
0
|
|
166
166
|
],
|
|
167
167
|
"LM_oled_sh1106.py": [
|
|
168
|
-
8.
|
|
168
|
+
8.54,
|
|
169
169
|
2
|
|
170
170
|
],
|
|
171
171
|
"LM_haptic.py": [
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
0
|
|
178
178
|
],
|
|
179
179
|
"LM_neopixel.py": [
|
|
180
|
-
7.
|
|
180
|
+
7.43,
|
|
181
181
|
2
|
|
182
182
|
],
|
|
183
183
|
"LM_cct.py": [
|
|
@@ -229,11 +229,11 @@
|
|
|
229
229
|
0
|
|
230
230
|
],
|
|
231
231
|
"LM_sound_event.py": [
|
|
232
|
-
8.
|
|
232
|
+
8.46,
|
|
233
233
|
0
|
|
234
234
|
],
|
|
235
235
|
"LM_oledui.py": [
|
|
236
|
-
8.
|
|
236
|
+
8.16,
|
|
237
237
|
0
|
|
238
238
|
],
|
|
239
239
|
"LM_espnow.py": [
|
|
@@ -245,11 +245,11 @@
|
|
|
245
245
|
0
|
|
246
246
|
],
|
|
247
247
|
"LM_OV2640.py": [
|
|
248
|
-
9.
|
|
248
|
+
9.11,
|
|
249
249
|
0
|
|
250
250
|
],
|
|
251
251
|
"LM_rgb.py": [
|
|
252
|
-
8.
|
|
252
|
+
8.75,
|
|
253
253
|
1
|
|
254
254
|
],
|
|
255
255
|
"LM_distance.py": [
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
4
|
|
274
274
|
],
|
|
275
275
|
"LM_trackball.py": [
|
|
276
|
-
8.
|
|
276
|
+
8.31,
|
|
277
277
|
1
|
|
278
278
|
],
|
|
279
279
|
"LM_dashboard_be.py": [
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
2
|
|
306
306
|
],
|
|
307
307
|
"LM_i2s_mic.py": [
|
|
308
|
-
8.
|
|
308
|
+
8.3,
|
|
309
309
|
2
|
|
310
310
|
],
|
|
311
311
|
"LM_sdcard.py": [
|
|
@@ -315,11 +315,11 @@
|
|
|
315
315
|
},
|
|
316
316
|
"summary": {
|
|
317
317
|
"core": [
|
|
318
|
-
|
|
318
|
+
3367,
|
|
319
319
|
23
|
|
320
320
|
],
|
|
321
321
|
"load": [
|
|
322
|
-
|
|
322
|
+
9087,
|
|
323
323
|
55
|
|
324
324
|
],
|
|
325
325
|
"core_dep": [
|
|
@@ -328,10 +328,10 @@
|
|
|
328
328
|
],
|
|
329
329
|
"load_dep": [
|
|
330
330
|
true,
|
|
331
|
-
|
|
331
|
+
5
|
|
332
332
|
],
|
|
333
|
-
"core_score": 9.
|
|
334
|
-
"load_score": 8.
|
|
335
|
-
"version": "2.9.
|
|
333
|
+
"core_score": 9.09,
|
|
334
|
+
"load_score": 8.21,
|
|
335
|
+
"version": "2.9.9-0"
|
|
336
336
|
}
|
|
337
337
|
}
|
micrOS/source/LM_espnow.py
CHANGED
|
@@ -1,23 +1,49 @@
|
|
|
1
1
|
import Espnow
|
|
2
2
|
|
|
3
3
|
def load():
|
|
4
|
+
"""
|
|
5
|
+
Initialize ESPNOW protocal
|
|
6
|
+
"""
|
|
4
7
|
return Espnow.initialize()
|
|
5
8
|
|
|
6
|
-
def send(peer, msg='
|
|
9
|
+
def send(peer, msg='modules'):
|
|
10
|
+
"""
|
|
11
|
+
Send message to peer (by mac address)
|
|
12
|
+
:param peer: mac address of espnow device
|
|
13
|
+
:param msg: message string/load module call
|
|
14
|
+
"""
|
|
7
15
|
return Espnow.espnow_send(peer, msg)
|
|
8
16
|
|
|
9
17
|
def start_server():
|
|
18
|
+
"""
|
|
19
|
+
Start ESPNOW server/listener
|
|
20
|
+
- this can receive espnow messages
|
|
21
|
+
- it includes Load Module execution logic (beta)
|
|
22
|
+
"""
|
|
10
23
|
return Espnow.espnow_server()
|
|
11
24
|
|
|
12
25
|
def stats():
|
|
26
|
+
"""
|
|
27
|
+
Get ESPNOW stats
|
|
28
|
+
"""
|
|
13
29
|
return Espnow.stats()
|
|
14
30
|
|
|
15
31
|
def add_peer(peer):
|
|
32
|
+
"""
|
|
33
|
+
Add ESPNOW peer to known hosts
|
|
34
|
+
- It is needed before first send(...)
|
|
35
|
+
"""
|
|
16
36
|
now = Espnow.initialize()
|
|
17
37
|
return Espnow.add_peer(now, peer)
|
|
18
38
|
|
|
19
39
|
def mac_address():
|
|
40
|
+
"""
|
|
41
|
+
Get ESPNOW compatible mac address
|
|
42
|
+
"""
|
|
20
43
|
return Espnow.mac_address()
|
|
21
44
|
|
|
22
45
|
def help():
|
|
46
|
+
"""
|
|
47
|
+
[beta] ESPNOW sender/receiver with LM execution
|
|
48
|
+
"""
|
|
23
49
|
return 'load', 'send <peer> "ping"', 'start_server', 'add_peer <peer>', 'stats', 'mac_address'
|
micrOS/source/LM_oled_ui.py
CHANGED
|
@@ -159,7 +159,7 @@ class PageUI:
|
|
|
159
159
|
if pin:
|
|
160
160
|
pin_obj = Pin(pin, Pin.IN, Pin.PULL_DOWN)
|
|
161
161
|
# [IRQ] - event type setup
|
|
162
|
-
pin_obj.irq(trigger=Pin.
|
|
162
|
+
pin_obj.irq(trigger=Pin.IRQ_FALLING, handler=callback)
|
|
163
163
|
|
|
164
164
|
_set("js_right", lambda pin: self.control('next'))
|
|
165
165
|
_set("js_left", lambda pin: self.control('prev'))
|
micrOS/source/LM_system.py
CHANGED
|
@@ -124,18 +124,18 @@ def sun(refresh=False):
|
|
|
124
124
|
return Sun.TIME
|
|
125
125
|
|
|
126
126
|
|
|
127
|
-
def setclock(year, month, mday, hour,
|
|
127
|
+
def setclock(year, month, mday, hour, minute, sec):
|
|
128
128
|
"""
|
|
129
129
|
Set Localtime + RTC Clock manually
|
|
130
130
|
:param year
|
|
131
131
|
:param month
|
|
132
132
|
:param mday
|
|
133
133
|
:param hour
|
|
134
|
-
:param
|
|
134
|
+
:param minute
|
|
135
135
|
:param sec
|
|
136
136
|
:return: localtime
|
|
137
137
|
"""
|
|
138
|
-
set_time(year, month, mday, hour,
|
|
138
|
+
set_time(year, month, mday, hour, minute, sec)
|
|
139
139
|
return localtime()
|
|
140
140
|
|
|
141
141
|
|
|
@@ -242,7 +242,7 @@ def help(widgets=False):
|
|
|
242
242
|
(widgets=True) list of widget json for UI generation
|
|
243
243
|
"""
|
|
244
244
|
return resolve(('info', 'TEXTBOX top', 'gclean', 'heartbeat', 'clock',
|
|
245
|
-
'setclock year month mday hour
|
|
245
|
+
'setclock year month mday hour minute sec',
|
|
246
246
|
'ntp', 'rssi', 'list_stations', 'pinmap key="dhtpin"/None', 'alarms clean=False',
|
|
247
247
|
'notifications enable=<None,True,False>',
|
|
248
248
|
'sun refresh=False', 'ifconfig', 'memory_usage',
|
micrOS/source/Notify.py
CHANGED
|
@@ -32,6 +32,10 @@ class Notify:
|
|
|
32
32
|
return True
|
|
33
33
|
raise Exception("Subscribe error, Notify parent missing")
|
|
34
34
|
|
|
35
|
+
@staticmethod
|
|
36
|
+
def send_msg(text, reply_to=None, chat_id=None):
|
|
37
|
+
raise NotImplementedError("Child class must implement send_msg method")
|
|
38
|
+
|
|
35
39
|
@staticmethod
|
|
36
40
|
def message(text, reply_to=None, chat_id=None):
|
|
37
41
|
"""
|
micrOS/source/Server.py
CHANGED
|
@@ -114,7 +114,7 @@ class Client:
|
|
|
114
114
|
console_write("[Client] NoCon: response>dev/nul")
|
|
115
115
|
|
|
116
116
|
def send(self, response):
|
|
117
|
-
# Implement in child class - synchronous send (all) method
|
|
117
|
+
# Optional - Implement in child class - synchronous send (all) method
|
|
118
118
|
pass
|
|
119
119
|
|
|
120
120
|
async def close(self):
|
micrOS/source/Shell.py
CHANGED
|
@@ -25,7 +25,7 @@ from Debug import errlog_add
|
|
|
25
25
|
|
|
26
26
|
class Shell:
|
|
27
27
|
__slots__ = ['__devfid', '__auth_mode', '__hwuid', '__auth_ok', '__conf_mode']
|
|
28
|
-
MICROS_VERSION = '2.9.
|
|
28
|
+
MICROS_VERSION = '2.9.9-0'
|
|
29
29
|
|
|
30
30
|
def __init__(self):
|
|
31
31
|
"""
|
|
@@ -46,8 +46,8 @@ class Shell:
|
|
|
46
46
|
errlog_add(f"[ERR] micrOS version export failed (config): {e}")
|
|
47
47
|
|
|
48
48
|
async def a_send(self, msg):
|
|
49
|
-
""" Must be defined by
|
|
50
|
-
|
|
49
|
+
""" Must be defined by child class... """
|
|
50
|
+
raise NotImplementedError("Child class must implement a_send method")
|
|
51
51
|
|
|
52
52
|
def reset(self):
|
|
53
53
|
"""Reset shell state"""
|
micrOS/source/Tasks.py
CHANGED
|
@@ -415,7 +415,7 @@ class Manager:
|
|
|
415
415
|
#################################################################
|
|
416
416
|
def exec_builtins(func):
|
|
417
417
|
"""
|
|
418
|
-
Module execution built-in commands and modifiers
|
|
418
|
+
[Decorator] Module execution built-in commands and modifiers
|
|
419
419
|
- modules - show active modules list
|
|
420
420
|
- task kill ... - task termination
|
|
421
421
|
show ... - task output dump
|
micrOS/source/Time.py
CHANGED
|
@@ -24,17 +24,17 @@ class Sun:
|
|
|
24
24
|
BOOTIME = None # Initialize BOOTIME: Not SUN, but for system uptime
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
def set_time(year, month, mday, hour,
|
|
27
|
+
def set_time(year, month, mday, hour, minute, sec):
|
|
28
28
|
"""
|
|
29
29
|
Set Localtime + RTC Clock manually + update BOOTIME/uptime
|
|
30
30
|
https://docs.micropython.org/en/latest/library/machine.RTC.html
|
|
31
31
|
"""
|
|
32
32
|
# Make time from tuple to sec
|
|
33
|
-
time_sec = mktime((year, month, mday, hour,
|
|
33
|
+
time_sec = mktime((year, month, mday, hour, minute, sec, 0, 0))
|
|
34
34
|
# Set localtime
|
|
35
35
|
localtime(time_sec)
|
|
36
36
|
# Set RTC
|
|
37
|
-
RTC().datetime((year, month, mday, 0, hour,
|
|
37
|
+
RTC().datetime((year, month, mday, 0, hour, minute, sec, 0))
|
|
38
38
|
# (re)set uptime when settime - normally at boot time
|
|
39
39
|
if Sun.BOOTIME is None:
|
|
40
40
|
Sun.BOOTIME = time()
|
|
@@ -95,19 +95,18 @@ def __sun_cache(mode):
|
|
|
95
95
|
"""
|
|
96
96
|
if mode == 's':
|
|
97
97
|
# SAVE CACHE
|
|
98
|
-
temp = {}
|
|
99
98
|
try:
|
|
100
99
|
with open('sun.pds', 'w') as f:
|
|
101
|
-
for k, v in Sun.TIME.items()
|
|
102
|
-
|
|
103
|
-
f.write(';'.join([f'{k}:{"-".join(v)}' for k, v in temp.items()]))
|
|
100
|
+
cache = {k:tuple([str(t) for t in v]) for k, v in Sun.TIME.items()}
|
|
101
|
+
f.write(';'.join([f'{k}:{"-".join(v)}' for k, v in cache.items()]))
|
|
104
102
|
except:
|
|
105
103
|
errlog_add("[ERR] Cannot write sun cache")
|
|
106
104
|
return
|
|
107
105
|
try:
|
|
108
106
|
# RESTORE CACHE
|
|
109
107
|
with open('sun.pds', 'r') as f:
|
|
110
|
-
buff = {data.split(':')[0]: data.split(':')[1].split('-')
|
|
108
|
+
buff = {data.split(':')[0]: data.split(':')[1].split('-')
|
|
109
|
+
for data in f.read().strip().split(';')}
|
|
111
110
|
for k, v in buff.items():
|
|
112
111
|
Sun.TIME[k] = tuple([int(e) for e in v])
|
|
113
112
|
except:
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
micrOS/source/micrOSloader.py
CHANGED
micrOS/source/urequests.py
CHANGED
|
@@ -116,7 +116,7 @@ def _parse_response(response):
|
|
|
116
116
|
# micropython HTTP request #
|
|
117
117
|
#############################################
|
|
118
118
|
|
|
119
|
-
def request(method, url, data=None, json=None, headers=None, sock_size=256, jsonify=False):
|
|
119
|
+
def request(method:str, url:str, data:str=None, json=None, headers:dict=None, sock_size=256, jsonify=False):
|
|
120
120
|
"""
|
|
121
121
|
Micropython syncronous HTTP request function for REST API handling
|
|
122
122
|
:param method: GET/POST
|
|
@@ -181,7 +181,7 @@ def request(method, url, data=None, json=None, headers=None, sock_size=256, json
|
|
|
181
181
|
# async micropython HTTP request #
|
|
182
182
|
#############################################
|
|
183
183
|
|
|
184
|
-
async def arequest(method, url, data=None, json=None, headers=None, sock_size=256, jsonify=False):
|
|
184
|
+
async def arequest(method:str, url:str, data:str=None, json=None, headers:dict=None, sock_size=256, jsonify=False):
|
|
185
185
|
"""
|
|
186
186
|
Micropython asynchronous HTTP request function for REST API handling
|
|
187
187
|
:param method: GET/POST
|
|
@@ -221,7 +221,12 @@ async def arequest(method, url, data=None, json=None, headers=None, sock_size=25
|
|
|
221
221
|
except Exception as e:
|
|
222
222
|
status_code = 500
|
|
223
223
|
# https://github.com/micropython/micropython/blob/8785645a952c03315dbf93667b5f7c7eec49762f/cc3200/simplelink/include/device.h
|
|
224
|
-
|
|
224
|
+
if "-104" == str(e):
|
|
225
|
+
body = "[WARN] arequest: ASSOC_REJECT"
|
|
226
|
+
elif "ECONNABORTED" in str(e):
|
|
227
|
+
body = f"[WARN] arequest: {e}"
|
|
228
|
+
else:
|
|
229
|
+
body = f"[ERR] arequest: {e}"
|
|
225
230
|
errlog_add(body)
|
|
226
231
|
finally:
|
|
227
232
|
if writer:
|
|
@@ -234,14 +239,16 @@ async def arequest(method, url, data=None, json=None, headers=None, sock_size=25
|
|
|
234
239
|
# Implement http get/post functions #
|
|
235
240
|
#############################################
|
|
236
241
|
|
|
237
|
-
def get(url, headers=
|
|
242
|
+
def get(url:str, headers:dict=None, sock_size=256, jsonify=False):
|
|
238
243
|
"""
|
|
239
244
|
GENERIC HTTP GET FUNCTION
|
|
240
245
|
"""
|
|
246
|
+
if headers is None:
|
|
247
|
+
headers = {}
|
|
241
248
|
return request('GET', url, headers=headers, sock_size=sock_size, jsonify=jsonify)
|
|
242
249
|
|
|
243
250
|
|
|
244
|
-
def post(url, data=None, json=None, headers=
|
|
251
|
+
def post(url:str, data=None, json=None, headers:dict=None, sock_size=256, jsonify=False):
|
|
245
252
|
"""
|
|
246
253
|
GENERIC HTTP POST FUNCTION
|
|
247
254
|
:param data: string body (handle bare string as data for POST method)
|
|
@@ -250,14 +257,14 @@ def post(url, data=None, json=None, headers={}, sock_size=256, jsonify=False):
|
|
|
250
257
|
return request('POST', url, data=data, json=json, headers=headers, sock_size=sock_size, jsonify=jsonify)
|
|
251
258
|
|
|
252
259
|
|
|
253
|
-
async def aget(url, headers=
|
|
260
|
+
async def aget(url:str, headers:dict=None, sock_size=256, jsonify=False):
|
|
254
261
|
"""
|
|
255
262
|
GENERIC ASYNC HTTP GET FUNCTION
|
|
256
263
|
"""
|
|
257
264
|
return await arequest('GET', url, headers=headers, sock_size=sock_size, jsonify=jsonify)
|
|
258
265
|
|
|
259
266
|
|
|
260
|
-
async def apost(url, data=None, json=None, headers=
|
|
267
|
+
async def apost(url, data=None, json=None, headers:dict=None, sock_size=256, jsonify=False):
|
|
261
268
|
"""
|
|
262
269
|
GENERIC ASYNC HTTP POST FUNCTION
|
|
263
270
|
:param data: string body (handle bare string as data for POST method)
|
|
@@ -35,6 +35,11 @@ try:
|
|
|
35
35
|
except Exception as e:
|
|
36
36
|
print(f"Optional dependency missing in macroScript: {e}")
|
|
37
37
|
macroScript = None
|
|
38
|
+
try:
|
|
39
|
+
from toolkit.WebRepl import open_webrepl
|
|
40
|
+
except Exception as e:
|
|
41
|
+
print(f"Optional dependency missing in WebRepl: {e}")
|
|
42
|
+
open_webrepl = None
|
|
38
43
|
|
|
39
44
|
|
|
40
45
|
def arg_parse():
|
|
@@ -70,6 +75,7 @@ def arg_parse():
|
|
|
70
75
|
dev_group.add_argument("-gw", "--gateway", action="store_true", help="Start micrOS Gateway rest-api server, Env. vars: API_AUTH='username:password' (optional), GATEWAYIP needed for container deployment only.")
|
|
71
76
|
dev_group.add_argument("-v", "--version", action="store_true", help="Get micrOS version - repo + connected device.")
|
|
72
77
|
dev_group.add_argument("-lint", "--linter", action="store_true", help="Run micrOS system linter (pylint+)")
|
|
78
|
+
dev_group.add_argument("-webrepl", "--open_webrepl", action="store_true", help="(beta) Open webrepl in default browser, micropython repl + file transfers (built-in)")
|
|
73
79
|
dev_group.add_argument("--light", action="store_true", help="Skip optional dependency deployments (low level param: add this as first argument always)")
|
|
74
80
|
|
|
75
81
|
toolkit_group = parser.add_argument_group("Toolkit development")
|
|
@@ -293,6 +299,10 @@ if __name__ == "__main__":
|
|
|
293
299
|
if micrOSlint is not None:
|
|
294
300
|
sys.exit(micrOSlint.main(verbose=False))
|
|
295
301
|
|
|
302
|
+
if cmd_args.open_webrepl:
|
|
303
|
+
if open_webrepl is not None:
|
|
304
|
+
open_webrepl()
|
|
305
|
+
|
|
296
306
|
if cmd_args.macro:
|
|
297
307
|
if macroScript is None:
|
|
298
308
|
print("macroScript not available :(")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: micrOSDevToolKit
|
|
3
|
-
Version: 2.9.
|
|
3
|
+
Version: 2.9.11
|
|
4
4
|
Summary: Development and deployment environment for micrOS, the diy micropython automation OS (IoT)
|
|
5
5
|
Home-page: https://github.com/BxNxM/micrOS
|
|
6
6
|
Author: Marcell Ban
|
|
@@ -19,12 +19,21 @@ Requires-Dist: pylint
|
|
|
19
19
|
Requires-Dist: pyserial
|
|
20
20
|
Requires-Dist: resources
|
|
21
21
|
Requires-Dist: flask
|
|
22
|
-
Requires-Dist:
|
|
22
|
+
Requires-Dist: flask_restful
|
|
23
23
|
Requires-Dist: numpy
|
|
24
24
|
Requires-Dist: json2html
|
|
25
25
|
Requires-Dist: requests
|
|
26
26
|
Requires-Dist: Flask-BasicAuth
|
|
27
27
|
Requires-Dist: soundfile
|
|
28
|
+
Dynamic: author
|
|
29
|
+
Dynamic: author-email
|
|
30
|
+
Dynamic: description
|
|
31
|
+
Dynamic: description-content-type
|
|
32
|
+
Dynamic: home-page
|
|
33
|
+
Dynamic: license
|
|
34
|
+
Dynamic: project-url
|
|
35
|
+
Dynamic: requires-dist
|
|
36
|
+
Dynamic: summary
|
|
28
37
|
|
|
29
38
|
#  micrOS
|
|
30
39
|
|
|
@@ -78,6 +87,7 @@ Access rest api over browser: `http://<nodename>.local`
|
|
|
78
87
|
2. micrOS Installer [link](https://github.com/BxNxM/micrOS/#installing-micros-with-devtoolkit-esp32-and-more)
|
|
79
88
|
3. micrOS Tutorials [link](https://github.com/BxNxM/micrOS/#micros-video-tutorials)
|
|
80
89
|
4. micrOS System and features [link](https://github.com/BxNxM/micrOS/#micros-framework-features)
|
|
90
|
+
5. Built-in app modules: [link](https://htmlpreview.github.io/?https://github.com/BxNxM/micrOS/blob/master/micrOS/client/sfuncman/sfuncman.html)
|
|
81
91
|
5. Pin mapping - GPIO [link](https://github.com/BxNxM/micrOS/#device-pinouts-for-wiring)
|
|
82
92
|
6. micrOS Node configuration [link](https://github.com/BxNxM/micrOS/#micros-node-configuration-parameters-with-description)
|
|
83
93
|
7. micrOS create custom Load Modules: [link](./APPLICATION_GUIDE.md)
|
|
@@ -116,14 +126,6 @@ Link for python 3.9+ [download](https://www.python.org/downloads/release/python-
|
|
|
116
126
|
> Note: **Allow extend system path** with that python version (installation parameter) </br>
|
|
117
127
|
> On **Windows**: RUN AS ADMINISTARTOR
|
|
118
128
|
|
|
119
|
-
### 1.2 Install git
|
|
120
|
-
|
|
121
|
-
Link for git [download](https://git-scm.com/downloads)
|
|
122
|
-
|
|
123
|
-
> Git is a distributed version control system that helps developers track changes, collaborate on code, and manage project history efficiently.
|
|
124
|
-
|
|
125
|
-
It is needed to be able to download webrepl client (automatic), that is used for OverTheAir file transfers and other features.
|
|
126
|
-
|
|
127
129
|
----------------------------------------
|
|
128
130
|
|
|
129
131
|
### 2. Install micrOS devToolKit GUI
|
|
@@ -370,7 +372,7 @@ LogicalPin lookup tables:
|
|
|
370
372
|
- [raspberryPicoW](./micrOS/source/IO_rp2.py) - reset needed after ota update (webrepl limitation)
|
|
371
373
|
- `IO_*.py` [etc.](./micrOS/source)
|
|
372
374
|
|
|
373
|
-
> Note: Good idea to use costant variable for pin map declaration, check the files for more info, These files are also precompiled automatically into byte
|
|
375
|
+
> Note: Good idea to use costant variable for pin map declaration, check the files for more info, These files are also precompiled automatically into byte streams -> `.mpy`
|
|
374
376
|
|
|
375
377
|

|
|
376
378
|
|
|
@@ -485,29 +487,71 @@ Official [DockerHub](https://hub.docker.com/repository/docker/bxnxm/micros-gatew
|
|
|
485
487
|
|
|
486
488
|
## FUTURE RELEASE PLANS
|
|
487
489
|
|
|
488
|
-
Version **3.0.0-0**
|
|
490
|
+
Version **3.0.0-0** `micrOS-Autonomous`
|
|
489
491
|
|
|
490
492
|
```
|
|
491
493
|
Core:
|
|
492
|
-
- Async SSL/TLS integration (micropython 1.22+ required)
|
|
493
|
-
- urequest module async redesign for rest clients
|
|
494
|
-
- LM_telegram (Notify) + server (listener - chatbot)
|
|
495
|
-
|
|
496
|
-
-
|
|
497
|
-
- ??? New intercon syntax ???:
|
|
494
|
+
- (1) Async SSL/TLS integration (micropython 1.22+ required) [DONE]
|
|
495
|
+
- urequest module async redesign for rest clients [OK]
|
|
496
|
+
- LM_telegram (Notify) + server (listener - chatbot) [OK]
|
|
497
|
+
- (2) ESP-NOW (peer-to-peer communication) integration into InterCon [PoC][TODO]
|
|
498
|
+
- (3) New intercon syntax - command level integration: [TODO]
|
|
498
499
|
- rgb toggle >>RingLight.local
|
|
499
500
|
- similar as: intercon sendcmd host="RingLight.local" cmd="rgb toggle"
|
|
501
|
+
- (4) Create multi level project structure (curret is flat fs) [TODO] FS
|
|
502
|
+
- New micrOS FS structure:
|
|
503
|
+
- Note:
|
|
504
|
+
- On device (boot) micrOS Hooks.py/os_dir_fs_hook (check+correct) [Phase1-FS:TODO]
|
|
505
|
+
- DevToolKit USB & OTA feature adaptation [Phase2-FS:TODO]
|
|
506
|
+
- os_dir_fs_handler (usb+webrepl) features
|
|
507
|
+
|
|
508
|
+
- root fs (stays untouched (approx.: 24)): /
|
|
509
|
+
- micrOS.py (core)
|
|
510
|
+
- Config.py (core)
|
|
511
|
+
- Tasks.py (core)
|
|
512
|
+
- Shell.py (core)
|
|
513
|
+
- Web.py (core)
|
|
514
|
+
- Server.py (core)
|
|
515
|
+
- node_config,json (core config)
|
|
516
|
+
- etc... (core)
|
|
517
|
+
|
|
518
|
+
- module folder - mip complient: /lib
|
|
519
|
+
- LM_* (approx.: 54)
|
|
520
|
+
- IO_* (approx.: 5)
|
|
521
|
+
- *.py/.mpy (driver)
|
|
522
|
+
- Dynamic/Runtime (approx.: 0-8):
|
|
523
|
+
- *.pds (LM app cache - persistent data storage)
|
|
524
|
+
- *.dat (Common datalogger output)
|
|
525
|
+
|
|
526
|
+
- web folder: /web
|
|
527
|
+
- *.html
|
|
528
|
+
- *.js
|
|
529
|
+
- *.css
|
|
530
|
+
|
|
531
|
+
- (5) Proper mip installer support (/lib) [TODO]
|
|
532
|
+
- Note: Autonomous package management over wifi (github)
|
|
533
|
+
- pacman download
|
|
534
|
+
- pacman ls
|
|
535
|
+
- pacman dirtree
|
|
536
|
+
- pacman ...
|
|
500
537
|
```
|
|
501
538
|
|
|
502
|
-
Version **3.1.0-0**
|
|
539
|
+
Version **3.1.0-0** `micrOS-SecurePower`
|
|
503
540
|
|
|
504
541
|
```
|
|
505
542
|
Core:
|
|
506
543
|
- Async socket servers with SSL/TLS integration (with auth.)
|
|
507
544
|
- WebCli (https?), ShellCli (ssocket/sterminal) and InterCon
|
|
545
|
+
- Low power mode with ESPNOW + (AP mode?)
|
|
546
|
+
- Remote controller / Sensor UseCase
|
|
547
|
+
- --- client mode (fyi: normally micrOS operates in server mode)
|
|
548
|
+
- Intercon-Wire (?)
|
|
549
|
+
- Idea of wired message communication protocol same as Intercon-Shell/Intercon-espnow
|
|
550
|
+
- Possible HW protocols: i2c / onewire / uart BUT it should support bidirectional message transfers
|
|
551
|
+
- Goal: CoProcessor easy integration feature - Arduino env support
|
|
508
552
|
```
|
|
509
553
|
|
|
510
|
-
Version **4.0.0-0**
|
|
554
|
+
Version **4.0.0-0** `micrOS-???`
|
|
511
555
|
|
|
512
556
|
```
|
|
513
557
|
Core:
|
|
@@ -515,6 +559,7 @@ Version **4.0.0-0**
|
|
|
515
559
|
- Network
|
|
516
560
|
- wifi (defualt, current interfaces)
|
|
517
561
|
- Study of BLE (Shell)
|
|
562
|
+
- Com. (wifi/now/ble...lora?/etc?.) as plugin architecture (?)
|
|
518
563
|
- Low power mode (with BLE) and soft-sleep / deep-sleep
|
|
519
564
|
```
|
|
520
565
|
|