{"id":14971050,"url":"https://github.com/bxnxm/micros","last_synced_at":"2026-04-01T23:54:21.545Z","repository":{"id":38895722,"uuid":"106599127","full_name":"BxNxM/micrOS","owner":"BxNxM","description":"micrOS - mini automation OS for DIY projects. ","archived":false,"fork":false,"pushed_at":"2025-03-24T21:11:25.000Z","size":279115,"stargazers_count":115,"open_issues_count":0,"forks_count":22,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T12:08:43.169Z","etag":null,"topics":["asyncio","diy","docker","esp-micropython","esp32","esp32camera","i2c-sensors","interrupts","iot-platform","ledcontrol","micropython","mq135","plugin-architecture","python","servo-controller","socket","telnet","webserver","wifi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BxNxM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-11T19:21:48.000Z","updated_at":"2025-03-25T21:53:14.000Z","dependencies_parsed_at":"2023-12-21T12:05:26.349Z","dependency_job_id":"64c43bcc-97d8-4e02-9e34-54dd26fb6f14","html_url":"https://github.com/BxNxM/micrOS","commit_stats":{"total_commits":1234,"total_committers":8,"mean_commits":154.25,"dds":0.02998379254457051,"last_synced_commit":"dd81dc124dc193046231d3b5bcef09c741557e39"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BxNxM%2FmicrOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BxNxM%2FmicrOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BxNxM%2FmicrOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BxNxM%2FmicrOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BxNxM","download_url":"https://codeload.github.com/BxNxM/micrOS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248552963,"owners_count":21123346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","diy","docker","esp-micropython","esp32","esp32camera","i2c-sensors","interrupts","iot-platform","ledcontrol","micropython","mq135","plugin-architecture","python","servo-controller","socket","telnet","webserver","wifi"],"created_at":"2024-09-24T13:44:38.920Z","updated_at":"2026-04-01T23:54:21.501Z","avatar_url":"https://github.com/BxNxM.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![LOGO](./media/logo_mini.png?raw=true) micrOS\n\n\u003e **\"The mini yet powerful operating system for DIY projects.\"**\n\n![telnet](https://img.shields.io/badge/wifi-telnet-blue) ![esp32S2](https://img.shields.io/badge/esp32-S2-olive) ![tinypico](https://img.shields.io/badge/esp32-tinypico-olive) ![esp32S3](https://img.shields.io/badge/esp32-S3-olive) ![esp32S3](https://img.shields.io/badge/esp32-S3_RAM-olive) ![PYQT](https://img.shields.io/badge/esp32-PYQT-olive) ![raspberry-pico-w](https://img.shields.io/badge/raspberry-pico_W-critical) ![espCAM-esp-s](https://img.shields.io/badge/esp32-CAM_OV2640-olive) ![esp32-c3](https://img.shields.io/badge/esp32-C3_RISCV-olive) ![OTA](https://img.shields.io/badge/ota-update-blue) ![GPIO](https://img.shields.io/badge/gpio-i2c-success) ![clock](https://img.shields.io/badge/rtc-ntp-success) ![async](https://img.shields.io/badge/async-task_manager-success) ![irq](https://img.shields.io/badge/hardware-IRQs-success) ![socket](https://img.shields.io/badge/socket-STA_or_AP-blue) ![cron](https://img.shields.io/badge/scheduling-cron-success) ![stable](https://img.shields.io/badge/stabile-master_HEAD-success) ![stable](https://img.shields.io/badge/micropython-OS-gold)\u003cbr/\u003e\n\n\nThanks for ![GitHub stars](https://img.shields.io/github/stars/BxNxM/micrOS), follow us on:\n\n[![Instagram](https://img.shields.io/badge/Instagram-%40micros_framework-%23E4405F?logo=instagram\u0026logoColor=white)](https://www.instagram.com/micros_framework/)\n[![YouTube](https://img.shields.io/badge/YouTube-micrOS_framework-red?logo=youtube\u0026logoColor=white)](https://www.youtube.com/channel/UChRlJw7OYAoKroC-Mi75joA)\n[![Facebook](https://img.shields.io/badge/Facebook-micrOS_framework-%231877F2?logo=facebook\u0026logoColor=white)](https://www.facebook.com/Micros-Framework-103501302140755)\n[![Thingiverse](https://img.shields.io/badge/Thingiverse-micrOS_3Dprints-%231489FF?logo=thingiverse\u0026logoColor=white)](https://www.thingiverse.com/micros_framework/designs)\n[![DockerHub](https://img.shields.io/badge/DockerHub-micrOS%20Gateway-blue)](https://hub.docker.com/r/bxnxm/micros-gateway)\u003cbr/\u003e\n\n[![PyPI Version](https://img.shields.io/pypi/v/micrOSDevToolKit)](https://pypi.org/project/micrOSDevToolKit/)\n\n\n**micrOS** is a [micropython](http://micropython.org) based mini **application** execution **platform** with ShellCli (socket) and WebCli (http) **servers** and several **other** embedded **features**. \n\u003e It uses direct wifi connection to access the exposed functionalities.\u003cbr/\u003e\n\nIn case of any technical comments or requests, please use [![GitHub Discussions](https://img.shields.io/badge/GitHub-Discussions-green?logo=github\u0026style=flat)](https://github.com/BxNxM/micrOS/discussions).\n\n![MICROSVISUALIZATION](./media/micrOS_welcome.png?raw=true)\n[![SHORTCUTS](./media/micrOS_shortcuts.png)](https://www.icloud.com/shortcuts/898c2a8033d64ff0b7aadc46ee491a35)\u003cbr/\u003e\nExample shortcut (usage of the API): [link](https://www.icloud.com/shortcuts/fab936abb34b45b5bda4c9f7abb256e9)\u003cbr/\u003e\nAccess rest api over browser: `http://\u003cnodename\u003e.local`\n\n----------------------------------------\n----------------------------------------\n\n📲 💻 ShellCli: Generic session-based communication API \u003cbr/\u003e\n📲 WebCli: Apple shortcuts compatible **REST API** and **http homepage** \u003cbr/\u003e\n\u0026nbsp;\u0026nbsp; ✉️ Expose upython module functions - telnet **TCP/IP** and **REST API** \u003cbr/\u003e\n⚙️ 📝 Device initialization from user config \u003cbr/\u003e\n🧩  Codeless end user experience via phone client \u003cbr/\u003e\n⚠️  No external server or service required for client-device communication \u003cbr/\u003e\n\u0026nbsp;\u0026nbsp; ⚠️ 🛡 Works on Local Network (WiFi-WLAN) \u003cbr/\u003e\n🛠 Easy to create custom application(s) aka create your own Load Modules: \u003cbr/\u003e\n🦾 Built-in scheduling (IRQs):\u003cbr/\u003e\n\u0026nbsp;\u0026nbsp; - Time stamp based \u003cbr/\u003e\n\u0026nbsp;\u0026nbsp; - Geolocation based clock setup + time tags: sunset, sunrise \u003cbr/\u003e\n\u0026nbsp;\u0026nbsp; - Simple periodic \u003cbr/\u003e\n🔄 Async **task manager** - start (\u0026/\u0026\u0026) / list / kill / show \u003cbr/\u003e\n\n🚀🎈Lightweight and high performance core system that leaves you space 😎\n\n## ◉ Shortcuts:\n1. micrOS Client Application [link](https://github.com/BxNxM/micrOS/#micros-client-application)\n2. micrOS Installer [link](https://github.com/BxNxM/micrOS/#installing-micros-with-devtoolkit-esp32-and-more)\n3. micrOS Tutorials [link](https://github.com/BxNxM/micrOS/#micros-video-tutorials)\n4. micrOS System and features [link](https://github.com/BxNxM/micrOS/#micros-framework-features)\n5. Built-in app modules: [link](https://htmlpreview.github.io/?https://github.com/BxNxM/micrOS/blob/master/micrOS/client/sfuncman/sfuncman.html)\n5. Pin mapping - GPIO [link](https://github.com/BxNxM/micrOS/#device-pinouts-for-wiring)\n6. micrOS Node configuration [link](https://github.com/BxNxM/micrOS/#micros-node-configuration-parameters-with-description)\n7. micrOS create custom Load Modules: [link](./APPLICATION_GUIDE.md)\n8. micrOS Gateway server with Prometheus\u0026Grafana: [link](https://github.com/BxNxM/micrOS/#micros-gateway-in-docker)\n9. Release notes: [link](https://github.com/BxNxM/micrOS/#relese-note)\n\n----------------------------------------\n----------------------------------------\n\n## micrOS Client Application\n\n[![AppStore](./media/store/AppStoreBadge.svg)](https://apps.apple.com/hu/app/micros-client/id1562342296) \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; [![AppStore](./media/store/GooglePlayBadge.png)](https://play.google.com/store/apps/details?id=com.BMT.micrOSClient)\n\n----------------------------------------\n----------------------------------------\n\n## Installing micrOS with DevToolKit #ESP32 and more\n**macOS / Windows / Linux to install any esp32 board**\n\n[![pypi](./media/pipy.png)](https://pypi.org/project/micrOSDevToolKit/)\n\nEnd-to-End solution for deployment, update, monitor and develop micrOS boards.\n\nI would suggest to use micrOS GUI as a primary interface for micrOS development kit, but you can use cli as well if you prefer.\n\n\u003e Note: The main purpose of the USB deployment scripts to install micropython on the board and put all micrOS resources from `micrOs/toolkit/workspace/precompiled` to the connected board.\n\n\u003cbr/\u003e\n\n## 1. Prerequisites\n\n### 1.1 Install python3.9+\n\nLink for python 3.9+ [download](https://www.python.org/downloads/release/python-390/)\n\n\u003e Note: **Allow extend system path** with that python version (installation parameter) \u003c/br\u003e\n\u003e On **Windows**: RUN AS ADMINISTARTOR\n\n----------------------------------------\n\n### 2. Install micrOS devToolKit GUI\n\n#### On macOS/Linux\n\n\u0026nbsp;Open **command line** on mac, press: `commnd+space` + type: `terminal` + press: `enter`\n\n##### Download and install **micrOS devToolKit** python package:\n\n```bash\npip3 install --upgrade pip; pip3 install micrOSDevToolKit\n```\n\n\u003e Later on you can **update** the package with\n\n```bash\npip3 install --upgrade micrOSDevToolKit\n```\n\n----------------------------------------\n\u003cbr/\u003e\n\n#### On Windows:\n\n##### Download and install **micrOS devToolKit** python package:\n\nOpen Windows **PowerShell**, press `windows+R` + type: `powershell` + press `enter`\n\nCopy the following lines to the PowerShell and press enter.\n\n```bash\npython -m pip install --upgrade pip\npython -m pip install micrOSDevToolKit\n```\n\nLater on you can **update** the package with\n\n```bash\npython -m pip install --upgrade micrOSDevToolKit\n```\n\n----------------------------------------\n\u003cbr/\u003e\n\n### 3. Start micrOS devToolKit GUI\n\nCopy the following command to the command line and press enter to start.\n\n**```devToolKit.py```**\n\nIt will open a graphical user interface for micrOS device management, like usb deploy, update, OTA operations, test executions, etc...\n\n----------------------------------------\n\n![MICROSVISUALIZATION](./media/micrOSToolkit.png?raw=true)\n\n- Example\n\n```\n1. Select BOARD TYPE\n2. Click on [Deploy (USB)] button -\u003e presss YES\n```\n\nIt will install your board via USB with default settings. **Continue with micrOS Client app...**\n\n\u003e Note: At the first USB deployment, devToolKit will ask to install **SerialUSB driver** and it will open the driver installer as well, please follow the steps and install the necessary driver.\n\n\n```\n╔╗ ╔╗                  ╔═══╗╔╗ ╔╗╔═╗ ╔╗       ╔═══╗\n║║ ║║                  ║╔══╝║║ ║║║║╚╗║║       ╚╗╔╗║\n║╚═╝║╔══╗ ╔╗╔╗╔══╗     ║╚══╗║║ ║║║╔╗╚╝║    ╔═╗ ║║║║\n║╔═╗║╚ ╗║ ║╚╝║║╔╗║     ║╔══╝║║ ║║║║╚╗║║    ╚═╝ ║║║║\n║║ ║║║╚╝╚╗╚╗╔╝║║═╣    ╔╝╚╗  ║╚═╝║║║ ║║║    ╔═╗╔╝╚╝║\n╚╝ ╚╝╚═══╝ ╚╝ ╚══╝    ╚══╝  ╚═══╝╚╝ ╚═╝    ╚═╝╚═══╝\n```\n\n----------------------------------------\n\n## micrOS Projects\n\n\n[![RingLamp](./media/projects/RingLamp.gif?raw=true)](https://youtu.be/BlQzAnFtpLk)\n\n![RoboArm](./media/projects/RoboArm.gif?raw=true)\n\n![RGB_CCT](./media/projects/RGB_CCT.gif?raw=true)\n\n----------------------------------------\n----------------------------------------\n\n\n## micrOS Video Tutorials\n\n[![YoutubeChannel](./media/YoutubeChannel.png)](https://www.youtube.com/channel/UChRlJw7OYAoKroC-Mi75joA)\n\n----------------------------------------\n\u003cbr/\u003e\n\n## micrOS System, message-function visualization\n\n![MICROSVISUALIZATION](./media/micrOS.gif?raw=true)\n\n\u003eNote: micrOS development kit contains command line interface for socket communication. Example: `devToolKit.py --connect`\n\n----------------------------------------\n\n## micrOS Framework Features💡\n\n![MICROSARCHITECTURE](./media/micrOSArchitecture.png?raw=true)\n\n- 🕯**micrOS loader** - starts micrOS or WEBREPL(update / recovery modes)\n\t- **OTA update** - push update over wifi (webrepl automation) / monitor update and auto restart node\n- 📄**Config handling** - user config - **node_config.json**\n    - ⏳**Boot phase** - preload Load Module(s)\n        - For pinout and last state initialization - based on node_config `boothook`\n        - Example values: `rgb load; neopixel load`\n        - Comments `#` can be used: `#rgb load; neopixel load`, excellect for experimentation.\n    - 📡**Network handling** - based on node_config \n        - STA / AP network modes, `nwmd`\n        - NTP + UTC aka clock setup\n          - API: [ip-api.com](http://ip-api.com/json/?fields=lat,lon,timezone,offset)\n        - Static IP configuration, `devip`\n        - dhcp hostname setup, `devfid`.local\n        - system `uptime` measurement\n    - ⚙️**Scheduling / External events** - Interrupt callback - based on node_config \n        - Time based\n            - ⌛️simple LM task pool execution `timirq` \u0026 `timirqcbf`\n                - `Timer(0)`\n                - Comments `#` can be used in `timirqcbf`\n            - 🗓cron [time stump!LM task] pool execution `cron` \u0026 `crontasks`\n                - `Timer(1)` \n                - timestamp: `WD:H:M:S!LM FUNC`, ranges: `0-6:0-23:0-59:0-59!LM FUNC`\n                    - example: `*:8:0:0!rgb rgb r=10 g=60 b=100; etc.`, it will set rgb color on analog rgb periphery at 8am every day.\n                    - `WD: 0...6` 0=Monday, 6=Sunday\n                        - optional **range handling**: 0-2 means Monday to Wednesday\n                - tag: `sunset` / `sunrise`\n                    - example: `sunset!rgb rgb r=10 g=60 b=100; etc.`, it will set rgb color on analog rgb periphery at every sunset, every day.\n                    - optional minute offset (+/-): sunrise+30\n                - Comments cannot be used in `crontasks`! No multiple commands in this mode!\n\n                - API: [api.sunrise-sunset.org](https://api.sunrise-sunset.org/json?lat={lat}\u0026lng={lon}\u0026date=today\u0026formatted=0)\n        - 💣Event based\n            - Set trigger event `irqX`\n                - Trigger up/down/both `irqX_trig`\n                - With LM callback function `irqX_cbf`\n                - Comments `#` can be used in `irqX_cbf`\n            - `X` can be = 1, 2, 3 or 4\n\n\n- ⚙️**[L]oad [M]odule** aka **application** execution\n\t- Lot of built-in functions (table below)\n\t- Create your own module with 3 easy steps\n\t\t- Create a python file, naming convention: `LM_\u003cyour_app_name\u003e.py`\n\t\t\t- Replace `\u003cyour_app_name\u003e` for anything you prefer!\n\t\t- Write python functions, you can call any function from that module...\n\t\t- Upload modul with \"drag\u0026Drop\" devToolKit GUI `devToolKit.py`\n\n- 📨**ShellCli** - wireless communication interface with the nodes\n\t- **System commands**: `help, version, reboot, modules, webrepl, webrepl --update, etc.`\n\t\t- After `webrepl --update` command the micrOS system reboots and waits for ota update in webrepl mode about 20 seconds.\n\t- **Config handling** SET/GET/DUMP - **node_config.json**\n\t\t- enter configuration mode: `conf`\n\t\t- Print out all parameters and values: `dump`\n\t\t- exit configuration mode:`noconf`\n\t- **LM** - Load Module function execution (application modules)\n\t\t- Example: `system info`\n- 🖇**microIO** pinout handling - lookuptables for each board\n\t- Predefined pinout modules for esp32, tinyPico\n\t- Create your pinout based on `IO_esp32.py`, naming convencion: `IO_\u003cname\u003e.py`\n\t- To activate your custom pinout set `cstmpmap` config parameter to `\u003cname\u003e`\n\t- HINT: to get pin number you can get it by pin label, like: `system pinamp`\n\n- 🔄 **Task manager** aka **Async LM jobs**\n\t- Capable of execute [L]oad [M]odules in the background \n\t- Invoke with single execution `\u0026` or for loop execution `\u0026\u0026`\n\t- Example:\n\t\t- In loop: `system heartbeat \u0026\u0026`\n\t\t\t- Loop frequency conrol: `system heartbeat \u0026\u00261000`, it will execute every sec \n\t\t- Single call: `system heartbeat \u0026`\n\t\t\t- Delayed execution (ms): `system heartbeat \u00261000`, waits 1 sec before execution.\n\t- Stop task: `task kill system.heartbeat`\n\t- Show task live ouput: `task show system.heartbeat`\n\n\n⌘ DevToolKit CLI feature:\n\n- Socket client python plugin - interactive - non interactive mode\n\n----------------------\n\n### Boards and suggestions\n\nThere are multiple types of MCU-s (esp32, esp32s3, etc.) available to order, **BUT** to be able to enable **more features** (~2 Load Modules) and **full capable WebUI** interface you need to have more then **190-210kb** of ram (basic boards)(ℹ️).\n\nThere is a solution ✅, additinal psram: **~2-4-8Mb** boards are available. It used to name as **psram** or **spiram**, even there is a type **octo-psram**, so check it before buy!!! Psram needs to be **supported on micropython** side as well !!!\n\n**Suggestions - 🔮futureproof hardware:**\n\n**`esp32s3`**: Very fast new espressif module that supports psram detection, so you can freely select any module with this MCU with additinal ram, and micros will work with the best performance, typical ram sizes: **2Mb** (more then enough for everage usage), **4-8Mb** (capacble of image and sound processing tasks and load all GPIO-s 🚀)\n\n**`esp32s3-octo`** Same sa normal psram, just uses 8 pins to connect to the MCU, basically faster...\n\n**`tinypico`** excellet hardware, bit pricy, with 4Mb of ram.\n\n**`esp32cam`** it has a custom image and attached 8Mb of ram.\n\nSo prefer boards with more psram 2Mb-8Mb, **minumum requirement for the full flatched setup ~400kb** but smallest psram is **2Mb**, in practive:\n\n- max measured 4Mb is 3.2% 128kb - oled_ui and lot of things loaded...\n- camera stream can use about 50% of ram, that means about 2Mb of ram usage.\n\nℹ️ With basic 190-210kb of ram you can use the system with ShellCli with no issue, just webUI dashboard cannot be load due to memory limitations..., **under 140kb of system ram the system not reliable**, so these boards are not supported.\n\n\u003e Note:\n\n**`esp32`** also can be totally fine with ShellCli, WebCli and 1 load module or multiple modules based on module size... just can be limited by the available memory soonor the later ... (WebCli javascript, htmls are quite small but can be few tens of kilobytes, also multiple async tasks in the background can take same, and roughly around 80% of memory usage system can be instable and restarts.) **So if you have a spare one try out micrOS with a range of features :)**\n\n----------------------\n\n## Built in periphery support\n\n`#Sensors / inputes` `#Actuators / outputs`\n\n[![pheriphery-io-preview](./media/pheriphery-io-preview.png)](https://htmlpreview.github.io/?https://github.com/BxNxM/micrOS/blob/master/micrOS/client/sfuncman/sfuncman.html)\n\n[[CLICK] Show micrOS Load Module functions](https://htmlpreview.github.io/?https://github.com/BxNxM/micrOS/blob/master/micrOS/client/sfuncman/sfuncman.html)\u003c/br\u003e\n\n----------------------------------------\n\n## Device Pinouts for wiring\n\n### Logical pin association handling\n\n[micrOS/source/microIO.py](./micrOS/source/microIO.py)\n\nLogicalPin lookup tables:\n\n- [tinypico](./micrOS/source/IO_tinypico.py)\n- [esp32](./micrOS/source/IO_esp32.py)\n- [esp32s2](./micrOS/source/IO_esp32s2.py)\n- [esp32s3](./micrOS/source/IO_esp32s3.py)\n- [raspberryPicoW](./micrOS/source/IO_rp2.py) - reset needed after ota update (webrepl limitation)\n- `IO_*.py` [etc.](./micrOS/source)\n\n\u003e 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 -\u003e `.mpy`\n\n![MicrOStinyPicopinout](./media/NodeMCUPinOutTinyPico.png?raw=true)\n\nGENERAL CONTROLLER CONCEPT: [microPLC](./media/microPLC.png)\n\n\n![MicrOSESP23pinout](./media/NodeMCUPinOutESP32.png?raw=true)\n\n\n![MicrOSESP23S2pinout](./media/NodeMCUPinOutESP32S2_mini.png?raw=true)\n\n\n![PYQT_PinOutESP32pinout](./media/PYQT_PinOutESP32.png?raw=true)\n\n----------------------------------------\n\n## micrOS **node configuration**, parameters with description\n\nThese parameters controlls micrOS core functionalities, so you can define an entire system by setting your custom configurations via these values.\n\n### Basic parameters:\n\n|      Config keys    |   Default value and type    | Reboot required |              Description                     |\n| :-----------------: | :-------------------------: | :-------------: | ----------------------------------------- |\n|   **`devfid`**      |    `node01`  `\u003cstr\u003e`        |       Yes       | Device friendly \"unique\" ID - (1) defines AccessPoint (AP) network name and (2) in Station (STA) network mode the DHCP device name for IP address resolve also (3) this is the ShellCli prompt.\n|   **`staessid`**    |   `your_wifi_name` `\u003cstr\u003e`  |       Yes       | Wifi router name to connect (for STA default connection mode). You can list multiple wifi names separated with `;`\n|   **`stapwd`**      | `your_wifi_passwd` `\u003cstr\u003e`  |       Yes       | Wifi router password (for STA default connection mode). You can list multiple wifi passwords separated with `;` connected in order to `staessid` wifi names.\n|   **`appwd`**       |   `ADmin123`  `\u003cstr\u003e`       |       Yes       | Device system password.: Used in AP password (access point mode) + webrepl password + micrOS auth\n| **`boothook`**      |    `n/a` `\u003cstr\u003e`            |      Yes        | Add Load Module execution(s) to the boot sequence. Separator `;`. Examples: `rgb load; cct load` but you can call any load module function here if you want to run it at boot time.\n| **`webui`**         |       `False`  `bool`       |      Yes        | Launch http rest server on port 80 (in parallel with micrOS shell on port 9008 aka `socport`). It has 2 endpoints: / aka main page (index.html) and /rest aka rest (json) interface for load module execution. Example: `\u003cdevfid\u003e.local` or `\u003cdevfid\u003e.local/rest` + optional parameters: `/rgb/toggle`. **Apple shortcuts compatible**\n| | |\n| **`cron`**          |     `False`  `\u003cbool\u003e`       |       Yes       | Enable timestamp based Load Module execution aka Cron scheduler (linux terminology), Timer(1) hardware interrupt enabler.\n| **`crontasks`**     |     `n/a`  `\u003cstr\u003e`          |       Yes       | Cron scheduler input, task format: `WD:H:M:S!module function` e.g.: `1:8:0:0!system heartbeat`, task separator in case of multiple tasks: `;`. [WD:0-6, H:0-23, M:0-59, S:0-59] in case of each use: `*`. Instead `WD:H:M:S` you can use suntime tags: `sunset`, `sunrise`, optional offset: `sunset+-\u003cminutes\u003e`, `sunrise+-\u003cminutes\u003e`, example: `sunset-30!system heartbeat`. Range of days: WD can be conrete day number or range like: 0-2 means Monday to Wednesday.\n| | |\n| **`irq1`**          |     `False`  `\u003cbool\u003e`       |      Yes        | External event interrupt enabler - Triggers when desired signal state detected - button press happens / motion detection / etc.\n| **`irq1_cbf`**      |     `n/a`  `\u003cstr\u003e`          |      Yes        | `irq1` enabled, calls the given Load Modules, e.x.: `module function optional_parameter(s)` when external trigger happens.\n| **`irq1_trig`**     |     `n/a`   `\u003cstr\u003e`         |      Yes        | Sets trigger mode for external irq, signal phase detection, values `up` (default: `n/a`) or `down` or `both`.\n| **`irq2`**          |     `False`  `\u003cbool\u003e`       |      Yes        | External event interrupt enabler - Triggers when desired signal state detected - button press happens / motion detection / etc.\n| **`irq2_cbf`**      |     `n/a`  `\u003cstr\u003e`          |      Yes        | `irq2` enabled, calls the given Load Modules, e.x.: `module function optional_parameter(s)` when external trigger happens.\n| **`irq2_trig`**     |     `n/a`   `\u003cstr\u003e`         |      Yes        | Sets trigger mode for external irq, signal phase detection, values `up` (default: `n/a`) or `down` or `both`.\n| **`irq3`**          |     `False`  `\u003cbool\u003e`       |      Yes        | External event interrupt enabler - Triggers when desired signal state detected - button press happens / motion detection / etc.\n| **`irq3_cbf`**      |     `n/a`  `\u003cstr\u003e`          |      Yes        | `irq3` enabled, calls the given Load Modules, e.x.: `module function optional_parameter(s)` when external trigger happens.\n| **`irq3_trig`**     |     `n/a`   `\u003cstr\u003e`         |      Yes        | Sets trigger mode for external irq, signal phase detection, values `up` (default: `n/a`) or `down` or `both`.\n| **`irq4`**          |     `False`  `\u003cbool\u003e`       |      Yes        | External event interrupt enabler - Triggers when desired signal state detected - button press happens / motion detection / etc.\n| **`irq4_cbf`**      |     `n/a`  `\u003cstr\u003e`          |      Yes        | `irq4` enabled, calls the given Load Modules, e.x.: `module function optional_parameter(s)` when external trigger happens.\n| **`irq4_trig`**     |     `n/a`   `\u003cstr\u003e`         |      Yes        | Sets trigger mode for external irq, signal phase detection, values `up` (default: `n/a`) or `down` or `both`.\n| **`irq_prell_ms`**  |      `300`   `\u003cint\u003e`        |      Yes        | \"Prell\": contact recurrence (hw property), for fake event filtering... :D Time window to ignore external IRQ events in ms.\n| | |\n| **`timirq`**        |     `False`  `\u003cbool\u003e`       |       Yes       | Timer(0) interrupt enabler - background \"subprocess\" like execution, timer based infinite loop for the LoadModule execution.\n| **`timirqcbf`**     |      `n/a`   `\u003cstr\u003e`        |      Yes        | if `timirq` enabled, calls the given Load Module(s), e.x.: `module function optional_parameter(s)`, task separator: `;`\n| **`timirqseq`**     |    `1000`   `\u003cint\u003e`         |      Yes        | Timer interrupt period in ms, default: `3000` ms (for `timirq` infinite loop timer value)\n| | |\n| **`telegram`**      |      `n/a`  `str`           |      No          | `TELEGRAM_BOT_TOKEN` to enable micrOS Notifications. **Hint**, to create bot with botfather: [click](https://blog.devgenius.io/how-to-set-up-your-telegram-bot-using-botfather-fd1896d68c02). After enabling this, send `/ping` to telegram chat for chat ID sync.\n\n### Advanced parameter options:\n\n|       Config keys   |   Default value and type    | Reboot required |               Description                      |\n| :-----------------: | :-------------------------: | :-------------: | ---------------------------------------- |\n| **`utc`**           |     `60`   `\u003cint\u003e`          |       Yes       | NTP-RTC - timezone setup (UTC in minute) - it is automatically calibrated in STA mode based on geolocation.\n| **`cstmpmap`**      |      `n/a`  `\u003cstr\u003e`          |      Yes       | Default (`n/a`), select pinmap automatically based on platform (`IO_\u003cplatform\u003e`). Manual control / customization of application pins, syntax: `pin_map_name; pin_name:pin_number; ` etc. [1][optional] `pin_map_name` represented as `IO_\u003cpin_map_name\u003e.py/.mpy` file on device. [2+][optinal] `dht:22` overwrite individual existing load module pin(s). Hint: `\u003cmodule\u003e pinmap()` to get app pins, example: `neopixel pinmap()`\n| **`boostmd`**       |      `True`  `\u003cbool\u003e`       |      Yes        | boost mode - set up cpu frequency low or high 16Mhz-24MHz (depends on the board).\n| **`aioqueue`**      |    `3` `\u003cint\u003e`              |       Yes       | System async queue controller (resource limiter).: `#1` Set asyc task queue limit (for soft tasks: `\u0026`). Furthermore `#2` Socker server-s (webCli, ShellCli) client number limiter. 3 means: 3 cooperative connection (queue) shared by webCli and shellCli. It can be increased based on available resources.\n| | |\n| **`devip`**         |      `n/a`  `\u003cstr\u003e`         |    Yes(N/A)      | Device IP address, (first stored IP in STA mode will be the device static IP on the network), you can set specific static IP address here.\n| **`nwmd`**          |     `n/a`  `\u003cstr\u003e`          |      Yes        | Prefered network mode - `AP` or `STA`, default is `STA`.\n| **`soctout`**       |   `30`      `\u003cint\u003e`         |      Yes        | Socket server connection timeout. If user is passive for `soctout` sec, and new connection incoming, then close passive connection. So it is time limit per connection in the `aioqueue`.\n| **`socport`**       |    `9008`  `\u003cint\u003e`          |      Yes        | Socket server service port (should not be changed due to client and API inconpatibility).\n| **`auth`**          |     `False` `\u003cbool\u003e`        |       Yes       | Enables socket password authentication, password: `appwd`. Passwordless functions: `hello`, `version`, `exit`. **WARNING** OTA upade not supported in this mode (yet).\n| | |\n| **`dbg`**\t         |     `True`    `\u003cbool\u003e`      |       Yes       | Debug mode - enable micrOS system printout, server info, etc. + progress LED.\n| **`hwuid`**         |      `n/a`  `\u003cstr\u003e`         |      N/A        | USED BY SYSTEM (state storage) - hardware address - dev uid\n| **`guimeta`**       |      `n/a`  `str`           |      No         | USED BY micrOS Client (state storage) - stores - offloaded parameter type in config. Clinet widget meta data storage.\n\n\u003e Note: Default empty value: `n/a` in case of string parameter.\n\u003e Note: Cron is only available on devices with Timer(**1**): esp32\n\n----------------------------------------\n----------------------------------------\n\n# Networking - automatic network modes\n\n![MICROSNWMODES](./media/micrOSNetworking.png?raw=true)\n\n# micrOS Gateway in docker\n\n![MICROSVISUALIZATION](./media/micrOS_gateway.png?raw=true)\n\nWith prometheus database.\nCheck the micrOS Gateway docker [README](./env/docker/README.md) for details.\n\nResources:\n\n\u003e modify `prometheus.yml` regarding what sensors on which endpoint do you want to scrapre data from.\n\n* [docker-compose](./env/docker/docker-compose.yaml)\n* [prometheus config](./env/docker/prometheus.yml)\n\n```bash\ncd ./env/docker\ndocker-compose -p gateway up -d\n```\n\nOfficial [DockerHub](https://hub.docker.com/repository/docker/bxnxm/micros-gateway/general)\n\n# micrOS Customization\n\n[![app_templates](./media/app_templates.png?raw=true)](./APPLICATION_GUIDE.md)\n\n----------------------------------------\n----------------------------------------\n\n\n## FUTURE RELEASE PLANS\n\nVersion **3.0.0-0** `micrOS-Autonomous`\n\n```\n    Core:\n    - (1) Async SSL/TLS integration (micropython 1.22+ required)                [DONE]\n        - urequest module async redesign for rest clients                       [OK]\n            - LM_telegram (Notify) + server (listener - chatbot)                [OK]\n    - (2) ESP-NOW (peer-to-peer communication) integration into InterCon        [PoC:OK][TODO]\n    - (3) New intercon syntax - command level integration:                      [DONE]\n    \t- rgb toggle \u003e\u003eRingLight.local\n    \t- similar as (obsolete): intercon sendcmd host=\"RingLight.local\" cmd=\"rgb toggle\"\n    - (4) Create multi level project structure (curret is flat fs)               [TODO?] FS\n\t\t- New micrOS FS structure:\n\t\t\t- Note:\n\t\t\t\t- On device (boot) micrOS Hooks.py/os_dir_fs_hook (check+correct)  [Phase1-FS:TODO]\n\t\t\t\t- DevToolKit USB \u0026 OTA feature adaptation                          [Phase2-FS:TODO]\n\t\t\t\t\t- os_dir_fs_handler (usb+webrepl) features\n\n\t\t\t- root fs (stays untouched (approx.: 24)): /\n\t\t\t\t- micrOS.py (core)\n\t\t\t\t- Config.py (core)\n\t\t\t\t- Tasks.py (core)\n\t\t\t\t- Shell.py (core)\n\t\t\t\t- Web.py (core)\n\t\t\t\t- Server.py (core)\n\t\t\t\t- node_config,json (core config)\n\t\t\t\t- etc... (core)\n\n\t\t\t- module folder - mip complient: /lib\n\t\t\t\t- LM_* (approx.: 54)\n\t\t\t\t- IO_* (approx.: 5)\n\t\t\t\t- *.py/.mpy (driver)\n\t\t\t\t- Dynamic/Runtime (approx.: 0-8):\n\t\t\t\t\t- *.pds (LM app cache - persistent data storage)\n\t\t\t\t\t- *.dat (Common datalogger output)\n\n\t\t\t- web folder: /web\n\t\t\t\t- *.html\n\t\t\t\t- *.js\n\t\t\t\t- *.css\n\n\t\t\t- /logs\n\t\t\t\t- still there (created runtime) \n\n\t\t- (5) Proper mip installer support (/lib)                                [TODO]\n\t\t\t- Note: Autonomous package management over wifi (github) \n\t\t\t\t- pacman download\n\t\t\t\t- pacman ls\n\t\t\t\t- pacman dirtree\n\t\t\t\t- pacman ...\n```\n\nVersion **3.1.0-0** `micrOS-SecurePower`\n\n```\n    Core:\n    - Async socket servers with SSL/TLS integration (with auth.)\n        - WebCli (https?), ShellCli (ssocket/sterminal) and InterCon\n    - Low power mode with ESPNOW + (AP mode?)\n    \t- Remote controller / Sensor UseCase\n    \t- --- client mode (fyi: normally micrOS operates in server mode) \n    - Intercon-Wire (?)\n    \t- Idea of wired message communication protocol same as Intercon-Shell/Intercon-espnow\n    \t- Possible HW protocols: i2c / onewire / uart BUT it should support bidirectional message transfers\n    \t- Goal: CoProcessor easy integration feature - Arduino env support \n```\n\nVersion **4.0.0-0** `micrOS-???`\n\n```\n    Core:\n    - Network stack redesign\n        - Network\n            - wifi (defualt, current interfaces)\n            - Study of BLE (Shell)\n            - Com. (wifi/now/ble...lora?/etc?.) as plugin architecture (?)\n    - Low power mode (with BLE) and soft-sleep / deep-sleep\n```\n\n\n|  VERSION (TAG) |    RELEASE INFO    |  MICROS CORE MEMORY USAGE  |  SUPPORTED DEVICE(S) | APP PROFILES | Load Modules  |     NOTE       |\n| :----------: | :----------------: | :------------------------:   |  :-----------------: | :------------: | :------------:| -------------- |\n|  **v0.1.0-0** | [release_Info-0.1.0-0](./micrOS/release_info/micrOS_ReleaseInfo/release_0.1.0-0_note.md)| **78,4%** 29 776 byte | esp8266 | [App Profiles](./micrOS/release_info/node_config_profiles/) | [LM manual](./micrOS/client/sfuncman/sfuncman_0.1.0-0.json)| Stable Core with applications - first release\n|  **v0.4.0-0** | [release_Info-0.4.0-0](./micrOS/release_info/micrOS_ReleaseInfo/release_0.4.0-0_note_esp8266.md)| **81,0%** 30768 byte | esp8266 | [App Profiles](./micrOS/release_info/node_config_profiles/) | [LM manual](./micrOS/client/sfuncman/sfuncman_0.4.0-0.json)| micrOS multi device support with finalized core and so more. OTA update feature.\n|  **v0.4.0-0** | [release_Info-0.4.0-0](./micrOS/release_info/micrOS_ReleaseInfo/release_0.4.0-0_note_esp32.md)| **47,1%** 52 416 byte | esp32 | [App Profiles](./micrOS/release_info/node_config_profiles/) | [LM manual](./micrOS/client/sfuncman/sfuncman_0.4.0-0.json)| *micrOS multi device support with finalized core and advanced task scheduler based on time, and and so more. OTA update feature.*\n|  **v1.0.0-0** | [release_Info-1.0.0-0](./micrOS/release_info/micrOS_ReleaseInfo/release_1.0.0-0_note_esp32.md)| **47,9%** 53 280 byte | esp32 | [App Profiles](./micrOS/release_info/node_config_profiles/) | [LM manual](./micrOS/client/sfuncman/sfuncman_1.0.0-0.json)| Release of v1 micrOS, timer and event based irqs, cron task scheduling, realtime communication, multiple device support. OTA, etc.\n|  **v1.2.2-0** | [release_Info-1.2.2-0](./micrOS/release_info/micrOS_ReleaseInfo/release_1.2.2-0_note_esp32.md)|  **48,6%** 54 032 byte | esp32 | [App Profiles](./micrOS/release_info/node_config_profiles/) | [LM manual](./micrOS/client/sfuncman/sfuncman_1.2.2-0.json)| Public Release of v1 micrOS, timer and event based irqs, cron task scheduling, realtime communication, multiple device support. OTA update, thread from socket shell (beta) etc.\n|  **v light-1.3.0-0** | - |  - | **esp8266** | [lightweight branch](https://github.com/BxNxM/micrOS/tree/lightweight)| - |remove esp8266 due to memory limitation - BUT still supported with limited functionalities on **`lightweight`** branch. Hint: Change branch on github and download zip file, then start micrOSDevToolKit dashboard GUI\n|  **v 1.5.0-1** | [release_Info-1.5.0-1](./micrOS/release_info/micrOS_ReleaseInfo/release_1.5.0-1_note_esp32.md) |  **58,2%** 64 704 byte | esp32 (tinyPico) | [App Profiles](./micrOS/release_info/node_config_profiles/) | [LM manual](./micrOS/client/sfuncman/sfuncman_1.5.0-1.json) | Advanced Timer IRQ based scheduling (cron \u0026 timirq), Geolocation based timing features, External IRQs with 4 channel (event filtering), finalized light controls, Device-Device comminucation support, etc.\n|  **v 1.21.0-4** | [release_Info-1.21.0-4](./micrOS/release_info/micrOS_ReleaseInfo/release_1.21.0-4_note_esp32.md) |  **57.3%** 63 728 byte | esp32 (tinyPico, esp32s2, esp32s3) | [App Profiles](./micrOS/release_info/node_config_profiles/) | [LM manual](./micrOS/client/sfuncman/sfuncman_1.21.0-4.json) | Full async core system with advanced task management and device to device communication, task scheduling and much more ... with more then 30 application/pheriphery support.\n|  **v 2.0.0-0** | [release_Info-2.0.0-0](./micrOS/release_info/micrOS_ReleaseInfo/release_2.0.0-0_note_esp32.md) |  **45.4%** 68.7 kb | esp32 (tinyPico, esp32s2, esp32s3) | [App Profiles](./micrOS/release_info/node_config_profiles/) | [LM manual](./micrOS/client/sfuncman/sfuncman_2.0.0-0.json) | Optimizations, WebCli with web frontends, Camera support. Micropython 1.21 async maxed out :D\n|  **v 2.6.0-0** | [release_Info-2.6.0-0](./micrOS/release_info/micrOS_ReleaseInfo/release_2.6.0-0_note_esp32.md) |  **48.3%** 72.6 kb  | esp32 (tinyPico, esp32s2, esp32s3) | [App Profiles](./micrOS/release_info/node_config_profiles/) | [LM manual](./micrOS/client/sfuncman/sfuncman_2.6.0-0.json) | WebCli http server enhancements. New webapps: dashboard. Core system official interface finalization towards Load Modules: Common.py, Types.py (frontend generation), microIO.py (pinout handling).\n\n----------------------------------------\n----------------------------------------\n\n\n## Developer Quick guide\n\nNote:\n\n\u003e Secure Core (OTA static modules) (GUI): `boot.py`, `micrOSloader.mpy`, `Network.mpy`, `ConfigHandler.mpy`, `Debug.mpy`\n\n\n#### Erase device \u0026 Deploy micropython \u0026 Install micrOS \n\nGo to micrOS repo, where the `devToolKit.py` located.\n\n```bash\ndevToolKit.py --make\n```\n\u003e Note: Follow the steps :)\n\n\nSearch and Connect to the device\n\n```\ndevToolKit.py -s -c\n```\n\n----------------------------------------\n\n**User commands**\n\n```\ndevToolKit.py -h\n\noptional arguments:\n  -h, --help            show this help message and exit\n\nBase commands:\n  -m, --make            Erase \u0026 Deploy \u0026 Precompile (micrOS) \u0026 Install (micrOS)\n  -r, --update          Update/redeploy connected (usb) micrOS. - node config will be restored\n  -s, --search_devices  Search devices on connected wifi network.\n  -o, --OTA             OTA (OverTheArir update with webrepl)\n  -c, --connect         Connect via socketclinet\n  -p CONNECT_PARAMETERS, --connect_parameters CONNECT_PARAMETERS\n                        Parameters for connection in non-interactivve mode.\n  -a APPLICATIONS, --applications APPLICATIONS\n                        List/Execute frontend applications. [list]\n  -stat, --node_status  Show all available micrOS devices status data.\n  -cl, --clean          Clean user connection data: device_conn_cache.json\n```\n\n**Search devices**\n\n```\ndevToolKit.py --search_devices\n\nor\n\ndevToolKit.py -s\n```\n\n**List discovered devices with status updates**\n\n```\ndevToolKit.py -stat\n\nor\n\ndevToolKit.py --node_status\n```\n\nOutput:\n\n```\n       [ UID ]                [ FUID ]\t\t[ IP ]\t\t[ STATUS ]\t[ VERSION ]\t[COMM SEC]\n__localhost__                 __simulator__     127.0.0.1\tOFFLINE\t\t\u003cn/a\u003e\t\tn/a\nmicr\u003cID\u003eOS            TinyDevBoard      10.0.1.72\tONLINE\t\t1.16.2-2\t\t0.072\nmicr\u003cID\u003eOS            LivingKitchen     10.0.1.200\tONLINE\t\t1.16.2-2\t\t0.076\nmicr\u003cID\u003eOS            RoboArm           10.0.1.232\tONLINE\t\t1.15.4-0\t\t0.072\nmicr\u003cID\u003eS            Cabinet           10.0.1.204\tONLINE\t\t1.16.2-2\t\t0.074\nmicr\u003cID\u003e4OS            TestBird          10.0.1.179\tONLINE\t\t1.16.2-1\t\t0.083\nmicr\u003cID\u003eOS            RingLamp          10.0.1.75\tONLINE\t\t1.16.2-2\t\t0.099\nmicr\u003cID\u003eOS            CatFeeder         10.0.1.111\tOFFLINE\t\t\u003cn/a\u003e\t\tn/a\nmicr\u003cID\u003eOS            ImpiGamePro       10.0.1.23\tOFFLINE\t\t\u003cn/a\u003e\t\tn/a\nmicr\u003cID\u003eS            micrOSPublic02    10.0.1.47\tONLINE\t\t1.16.2-2\t\t0.101\nmicr\u003cID\u003ecOS            micrOSPublic01    10.0.1.197\tONLINE\t\t1.16.2-2\t\t0.099\nmicr\u003cID\u003ecOS            experipurple      10.0.1.94\tOFFLINE\t\t\u003cn/a\u003e\t\tn/a\n```\n\n**Other Developer commands**\n\n```\nDevelopment \u0026 Deployment \u0026 Connection:\n  -f, --force_update    Force mode for -r/--update and -o/--OTA\n  -e, --erase           Erase device\n  -d, --deploy          Deploy micropython\n  -i, --install         Install micrOS on micropython\n  -l, --list_devs_n_bins\n                        List connected devices \u0026 micropython binaries.\n  -ls, --node_ls        List micrOS node filesystem content.\n  -u, --connect_via_usb\n                        Connect via serial port - usb\n  -b, --backup_node_config\n                        Backup usb connected node config.\n  -sim, --simulate      start micrOS on your computer in simulated mode\n  -cc, --cross_compile_micros\n                        Cross Compile micrOS system [py -\u003e mpy]\n  -gw, --gateway        Start micrOS Gateway rest-api server\n  -v, --version         Get micrOS version - repo + connected device.\n```\n\n## Socket terminal example - non interactive\n\n### Identify device\n\n```\ndevToolKit.py -c -p '--dev slim01 hello'\nLoad MicrOS device cache: /Users/bnm/Documents/NodeMcu/MicrOs/tools/device_conn_cache.json\nActivate MicrOS device connection address\n[i]         FUID        IP               UID\n[0] Device: slim01 - 10.0.1.73 - 0x500x20x910x680xc0xf7\nDevice was found: slim01\nhello:slim01:0x500x20x910x680xc0xf7\n```\n\n### Get help\n\n```bash\ndevToolKit.py -c -p '--dev BedLamp help'\n\n[MICROS]   - built-in shell commands\n   hello   - hello msg - for device identification\n   version - returns micrOS version\n   exit    - exit from shell socket prompt\n   reboot  - system soft reboot (vm), hard reboot (hw): reboot -h\n   webrepl - start webrepl, for file transfers use with --update\n[CONF] Configure mode - built-in shell commands\n  conf       - Enter conf mode\n    dump       - Dump all data\n    key        - Get value\n    key value  - Set value\n  noconf     - Exit conf mode\n[TASK] postfix: \u0026x - one-time,  \u0026\u0026x - periodic, x: wait ms [x min: 20ms]\n  task list         - list tasks with \u003ctag\u003es\n  task kill \u003ctag\u003e   - stop task\n  task show \u003ctag\u003e   - show task output\n[EXEC] Command mode (LMs):\n   help lm  - list ALL LoadModules\n   cct\n      help\n   co2\n      help\n   dht22\n        help\n   robustness\n             help\n   system\n         help\n```\n \n### Embedded config handler\n \n```  \ndevToolKit.py -c -p '--dev BedLamp conf \u003ca\u003e dump'\n  \n  staessid  :        \u003cyour-wifi-passwd\u003e\n  devip     :        10.0.1.204\n  version   :        1.11.0-1\n  devfid    :        BedLamp\n  cron      :        True\n  cronseq   :        3000\n  soctout   :        10\n  irq2_cbf  :        n/a\n  stapwd    :        \u003cyour-wifi-name\u003e\n  dbg       :        False\n  irq2      :        False\n  irq1      :        False\n  irq1_cbf  :        n/a\n  appwd     :        ADmin123\n  irq2_trig :        n/a\n  hwuid     :        micr7c9ebd623ff8OS\n  crontasks :        sunset!cct toggle True;*:0:30:0!cct toggle False;*:5:0:0!cct toggle False\n  timirq    :        True\n  irq3      :        False\n  irq3_cbf  :        n/a\n  irq4      :        False\n  irq4_cbf  :        n/a\n  irq4_trig :        n/a\n  nwmd      :        STA\n  timirqcbf :        system ha_sta\n  irq_prell_ms:      300\n  boothook  :        cct load\n  aioqueue  :        3\n  auth      :        False\n  timirqseq :        60000\n  utc       :        60\n  boostmd   :        True\n  socport   :        9008\n  irq3_trig :        n/a\n  irq1_trig :        n/a\n  guimeta   :        ...\n  cstmpmap  :        n/a\n```\n\n### Load Modules - User defined functions\n\n```\ndevToolKit.py -c -p '--dev BedLamp system info'\n\nCPU clock: 24 [MHz]\nMem usage: 71.0 %\nFS usage: 14.6 %\nupython: v1.19.1 on 2022-06-18\nboard: ESP32 module with ESP32\nmac: 7c:9e:bd:62:3f:f8\nuptime: 0 1:29:19\n```\n\n## SocketClient\n\n### Config:\n\nmicrOS/toolkit/user_data/device_conn_cache.json\n\n```json\n{\n    \"__devuid__\": [\n        \"192.168.4.1\",\n        9008,\n        \"__device_on_AP__\"\n    ],\n    \"__localhost__\": [\n        \"127.0.0.1\",\n        9008,\n        \"__simulator__\"\n    ],\n    \"micr500291863428OS\": [\n        \"10.0.1.72\",\n        9008,\n        \"BedLamp\"\n    ]\n}\n```\n\n#### Interactive mode\n\n```\ndevToolKit.py -c \nor\ndevToolKit.py -connect\n\n[i]         FUID        IP               UID\n[0] Device: __device_on_AP__ - 192.168.4.1 - __devuid__\n[1] Device: __simulator__ - 127.0.0.1 - __localhost__\n[2] Device: BedLamp - 10.0.1.72 - micr500291863428OS\n\nChoose a device index: 5\nDevice was selected: ['10.0.1.204', 9008, 'Cabinet']\nBedLamp $ help\n[MICROS]   - built-in shell commands\n   hello   - hello msg - for device identification\n   version - returns micrOS version\n   exit    - exit from shell socket prompt\n   reboot  - system soft reboot (vm), hard reboot (hw): reboot -h\n   webrepl - start webrepl, for file transfers use with --update\n[CONF] Configure mode - built-in shell commands\n  conf       - Enter conf mode\n    dump       - Dump all data\n    key        - Get value\n    key value  - Set value\n  noconf     - Exit conf mode\n[TASK] postfix: \u0026x - one-time,  \u0026\u0026x - periodic, x: wait ms [x min: 20ms]\n  task list         - list tasks with \u003ctag\u003es\n  task kill \u003ctag\u003e   - stop task\n  task show \u003ctag\u003e   - show task output\n[EXEC] Command mode (LMs):\n   help lm  - list ALL LoadModules\n   cct\n      help\n   co2\n      help\n   dht22\n        help\n   robustness\n             help\n   system\n         help\nBedLamp $  exit\nBye!\n\n```\n\n## Project structure\n\n### micrOS resources library\n\n#### micrOS Core\n\n```\nCore micrOS resources\n1\t154\tTime.py                  (mlint: True)\t(pylint: 9.17)\t(ref.: 6)\n2\t104\tmicrOSloader.py          (mlint: True)\t(pylint: 7.59)\t(ref.: 1)\n3\t50\tHooks.py                 (mlint: True)\t(pylint: 9.68)\t(ref.: 1)\n4\t418\tServer.py                (mlint: True)\t(pylint: 9.29)\t(ref.: 4)\n5\t454\tTasks.py                 (mlint: True)\t(pylint: 9.71)\t(ref.: 13)\n6\t185\tConfig.py                (mlint: True)\t(pylint: 9.44)\t(ref.: 13)\n7\t9\treset.py                 (mlint: True)\t(pylint: 8.75)\t(ref.: 0)\n8\t225\tShell.py                 (mlint: True)\t(pylint: 9.61)\t(ref.: 1)\n9\t179\tNotify.py                (mlint: True)\t(pylint: 9.55)\t(ref.: 2)\n10\t77\tTypes.py                 (mlint: True)\t(pylint: 9.69)\t(ref.: 11)\n11\t157\tCommon.py                (mlint: True)\t(pylint: 9.1)\t(ref.: 24)\n12\t153\tInterConnect.py          (mlint: True)\t(pylint: 9.4)\t(ref.: 1)\n13\t177\tDebug.py                 (mlint: True)\t(pylint: 8.72)\t(ref.: 22)\n14\t164\tNetwork.py               (mlint: True)\t(pylint: 9.71)\t(ref.: 10)\n15\t183\tScheduler.py             (mlint: True)\t(pylint: 9.61)\t(ref.: 1)\n16\t113\tmicroIO.py               (mlint: True)\t(pylint: 9.08)\t(ref.: 38)\n17\t49\tmicrOS.py                (mlint: True)\t(pylint: 9.3)\t(ref.: 1)\n18\t113\tInterrupts.py            (mlint: True)\t(pylint: 9.05)\t(ref.: 2)\n19\t15\tmain.py                  (mlint: True)\t(pylint: 8.89)\t(ref.: 0)\n20\t117\turequests.py             (mlint: True)\t(pylint: 8.9)\t(ref.: 4)\n\nSUM CODE LINES (WITH COMMENTS, WITHOUT EMPTY LINES): 3096\n```\n\n#### micrOS Load Modules\n\n```\nmicrOS Load Module resources\n1\t231\tLM_roboarm.py            (mlint: True)\t(pylint: 9.11)\t(ref.: 0)\n2\t122\tLM_stepper.py            (mlint: True)\t(pylint: 8.9)\t(ref.: 1)\n3\t118\tLM_genIO.py              (mlint: True)\t(pylint: 7.26)\t(ref.: 1)\n4\t498\tLM_oled_ui.py            (mlint: False)\t(pylint: 8.83)\t(ref.: 0)\n5\t190\tLM_system.py             (mlint: True)\t(pylint: 7.57)\t(ref.: 3)\n6\t63\tLM_robustness.py         (mlint: True)\t(pylint: 7.5)\t(ref.: 0)\n7\t115\tLM_co2.py                (mlint: True)\t(pylint: 8.42)\t(ref.: 3)\n8\t34\tLM_rest.py               (mlint: False)\t(pylint: 7.0)\t(ref.: 0)\n9\t266\tLM_oled.py               (mlint: True)\t(pylint: 9.23)\t(ref.: 3)\n10\t72\tLM_tinyrgb.py            (mlint: True)\t(pylint: 7.95)\t(ref.: 0)\n11\t96\tLM_aht10.py              (mlint: True)\t(pylint: 8.73)\t(ref.: 0)\n12\t293\tLM_bme280.py             (mlint: True)\t(pylint: 8.03)\t(ref.: 0)\n13\t37\tLM_ph_sensor.py          (mlint: True)\t(pylint: 5.79)\t(ref.: 0)\n14\t241\tLM_buzzer.py             (mlint: True)\t(pylint: 8.83)\t(ref.: 0)\n15\t199\tLM_switch.py             (mlint: True)\t(pylint: 8.56)\t(ref.: 2)\n16\t113\tLM_servo.py              (mlint: True)\t(pylint: 7.73)\t(ref.: 4)\n17\t53\tLM_rgbcct.py             (mlint: True)\t(pylint: 8.62)\t(ref.: 0)\n18\t284\tLM_oled_sh1106.py        (mlint: True)\t(pylint: 8.79)\t(ref.: 1)\n19\t150\tLM_ld2410.py             (mlint: True)\t(pylint: 9.07)\t(ref.: 0)\n20\t273\tLM_neopixel.py           (mlint: True)\t(pylint: 7.59)\t(ref.: 2)\n21\t274\tLM_cct.py                (mlint: True)\t(pylint: 8.83)\t(ref.: 1)\n22\t38\tLM_L9110_DCmotor.py      (mlint: True)\t(pylint: 7.69)\t(ref.: 0)\n23\t256\tLM_neoeffects.py         (mlint: True)\t(pylint: 6.91)\t(ref.: 0)\n24\t30\tLM_i2c.py                (mlint: True)\t(pylint: 5.71)\t(ref.: 0)\n25\t69\tLM_dht22.py              (mlint: True)\t(pylint: 8.0)\t(ref.: 0)\n26\t59\tLM_L298N_DCmotor.py      (mlint: True)\t(pylint: 8.78)\t(ref.: 0)\n27\t37\tLM_esp32.py              (mlint: True)\t(pylint: 4.38)\t(ref.: 0)\n28\t56\tLM_pet_feeder.py         (mlint: True)\t(pylint: 7.88)\t(ref.: 0)\n29\t82\tLM_rencoder.py           (mlint: True)\t(pylint: 8.92)\t(ref.: 0)\n30\t247\tLM_keychain.py           (mlint: False)\t(pylint: 9.14)\t(ref.: 0)\n31\t69\tLM_dht11.py              (mlint: True)\t(pylint: 8.0)\t(ref.: 0)\n32\t74\tLM_telegram.py           (mlint: False)\t(pylint: 8.94)\t(ref.: 0)\n33\t177\tLM_OV2640.py             (mlint: False)\t(pylint: 9.06)\t(ref.: 0)\n34\t249\tLM_rgb.py                (mlint: True)\t(pylint: 8.66)\t(ref.: 1)\n35\t62\tLM_distance.py           (mlint: True)\t(pylint: 8.14)\t(ref.: 0)\n36\t313\tLM_VL53L0X.py            (mlint: True)\t(pylint: 9.07)\t(ref.: 0)\n37\t107\tLM_light_sensor.py       (mlint: True)\t(pylint: 8.94)\t(ref.: 0)\n38\t12\tLM_rp2w.py               (mlint: True)\t(pylint: 4.44)\t(ref.: 0)\n39\t190\tLM_presence.py           (mlint: True)\t(pylint: 8.75)\t(ref.: 4)\n40\t29\tLM_dashboard_be.py       (mlint: True)\t(pylint: 6.5)\t(ref.: 0)\n41\t170\tLM_dimmer.py             (mlint: True)\t(pylint: 8.22)\t(ref.: 0)\n42\t66\tLM_demo.py               (mlint: False)\t(pylint: 8.21)\t(ref.: 0)\n43\t105\tLM_lmpacman.py           (mlint: True)\t(pylint: 8.38)\t(ref.: 0)\n44\t176\tLM_gameOfLife.py         (mlint: True)\t(pylint: 9.29)\t(ref.: 2)\n45\t58\tLM_catgame.py            (mlint: True)\t(pylint: 8.46)\t(ref.: 0)\n46\t43\tLM_ds18.py               (mlint: True)\t(pylint: 5.0)\t(ref.: 2)\n47\t250\tLM_i2s_mic.py            (mlint: False)\t(pylint: 8.71)\t(ref.: 1)\n48\t34\tLM_sdcard.py             (mlint: True)\t(pylint: 7.88)\t(ref.: 0)\n\nSUM CODE LINES (WITH COMMENTS, WITHOUT EMPTY LINES): 6822\n```\n\n\u003e LM (Load Modules) - Application logic - accessable over socket server as a command\n\n### micrOS devToolkit resources\n\n#### DevToolKit Dashboard apps\n\n\u003e You can easly copy the `Template_app.py`, and create a new socket based app.\n[Template_app.py](https://github.com/BxNxM/micrOS/blob/master/toolkit/dashboard_apps/Template_app.py)\n\n```\nmicrOS/toolkit/dashboard_apps\n│   ├── AirQualityBME280_app.py\n│   ├── AirQualityDHT22_CO2_app.py\n│   ├── AnalogCCT_app.py\n│   ├── AnalogRGB_app.py\n│   ├── CatGame_app.py\n│   ├── Dimmer_app.py\n│   ├── GetVersion_app.py\n│   ├── GetVersion_app.pyc\n│   ├── NeopixelTest_app.py\n│   ├── RoboArm_app.py\n│   ├── SysCheck_app.py\n│   ├── Template_app.py\n```\n\n#### Stored connection data and default node configs\n\n```\nmicrOS/toolkit/user_data\n│   ├── device_conn_cache.json        \u003c- connection cache\n│   └── node_config_archive\n│       ├── BigRGB-node_config.json\n│       ├── Chillight-node_config.json\n│       ├── Kapcsolo230-node_config.json\n│       ├── LampController-node_config.json\n│       ├── MeasureNode-node_config.json\n│       ├── MrGreen-node_config.json\n│       ├── RingLamp-node_config.json\n│       └── test-node_config.json\n```\n\n#### Virtaulenv for development and stored USB-Serial drivers\n\n```\nmicrOS/env/\n├── __init__.py\n├── driver_cp210x\n│   ├── CP210x_Universal_Windows_Driver\n│   └── macOS_VCP_Driver\n├── requirements.txt\n└── venv\n    ├── bin\n    ├── include\n    ├── lib\n    └── pyvenv.cfg\n```\n\n#### Precompiled resources for easy install\n\n```\nmicrOS/toolkit/workspace/precompiled\n    │   ├── BgJob.mpy\n    │   ├── Common.mpy\n    │   ├── ConfigHandler.mpy\n    │   ├── Debug.mpy\n    │   ├── Hooks.mpy\n    │   ├── InterConnect.mpy\n    │   ├── InterpreterCore.mpy\n    │   ├── InterpreterShell.mpy\n    │   ├── InterruptHandler.mpy\n    │   ├── LM_L298N_DCmotor.mpy\n    │   ├── LM_L9110_DCmotor.py\n    │   ├── LM_VL53L0X.py\n    │   ├── LM_bme280.mpy\n    │   ├── LM_buzzer.mpy\n    │   ├── LM_catgame.py\n    │   ├── LM_cct.mpy\n    │   ├── LM_co2.mpy\n    │   ├── LM_dht11.mpy\n    │   ├── LM_dht22.mpy\n    │   ├── LM_dimmer.mpy\n    │   ├── LM_distance_HCSR04.py\n    │   ├── LM_ds18.mpy\n    │   ├── LM_esp32.py\n    │   ├── LM_genIO.mpy\n    │   ├── LM_i2c.py\n    │   ├── LM_light_sensor.mpy\n    │   ├── LM_neoeffects.mpy\n    │   ├── LM_neopixel.mpy\n    │   ├── LM_oled.mpy\n    │   ├── LM_oled_ui.mpy\n    │   ├── LM_pet_feeder.py\n    │   ├── LM_ph_sensor.py\n    │   ├── LM_rgb.mpy\n    │   ├── LM_roboarm.mpy\n    │   ├── LM_robustness.py\n    │   ├── LM_servo.mpy\n    │   ├── LM_stepper.mpy\n    │   ├── LM_switch.mpy\n    │   ├── LM_system.mpy\n    │   ├── LM_tinyrgb.mpy\n    │   ├── IO_esp32.mpy\n    │   ├── IO_tinypico.mpy\n    │   ├── LogicalPins.mpy\n    │   ├── Network.mpy\n    │   ├── Scheduler.mpy\n    │   ├── SocketServer.mpy\n    │   ├── Time.mpy\n    │   ├── TinyPLed.mpy\n    │   ├── boot.py\n    │   ├── micrOS.mpy\n    │   ├── micrOSloader.mpy\n    │   └── reset.mpy\n```\n\n\u003e Note: From the `micrOS/source/` by default the LMs are not compiling, to extend complied LM list add LM explicitly to the following file:\n\n```\nmicrOs/toolkit/LM_to_compile.dat\n```\n\n----------------------------------------\n\n## HINTS\n\n- Save **screen** console buffer (**output**)\nPress `ctrl + A :` and type `hardcopy -h \u003cfilename\u003e`\n\n- Create callgraph: [pycallgraph](http://pycallgraph.slowchop.com/en/master/)\n\n- Convert PNG/JPG-s to GIF: `convert -delay 60 ./*.png mygif.gif`\n\n- **micrOS core and Load Module source code info**:\n\n```bash\ndevToolKit.py -lint\nOR\ndevToolKit.py --linter\n```\n\n### micrOS gateway - Linux service template\n\n\u003e [BETA] service setup tool: `toolkit/helper_scripts/linux_service/make.bash`\n\n- Prerequisite: install micrOS devtoolkit **PiP package**\n\n- Create service: [micrOS gateway service](https://domoticproject.com/creating-raspberry-pi-service/)\n\n- [1] create `micros-gw.service` file:\n\n```bash\n[Unit]\nDescription=micrOS gateway REST API service\nAfter=network-online.target\n\n[Service]\nEnvironment=\"API_AUTH=\u003cusr_name\u003e:\u003cpassword\u003e\"  \u003c-- replace\nExecStart=/usr/bin/python3 -m devToolKit -gw  \u003c-- check (depends on deployment) OR /bin/bash\nWorkingDirectory=/home/gateway                \u003c-- replace\nStandardOutput=inherit\nStandardError=inherit\nRestart=always\nUser=\u003cuser\u003e                                   \u003c-- replace\n\n[Install]\nWantedBy=multi-user.target\n```\n\n- [2] copy service to `sudo cp micros-gw.service /lib/systemd/system/`\n\n- [3] start service: `sudo systemctl start micros-gw.service`\n\n- [4] enable service at bootup: `sudo systemctl enable micros-gw.service`\n\n- [5] show service state: `sudo systemctl status micros-gw.service`\n\n\n### GIT\n\n- Add git tag: `git tag -a vX.Y.Z-K -m \"tag message\"`\n\n- Publish tags: `git push origin --tags`\n\n- Pretty git view: `git log --pretty=oneline`\n\n- File change list: `git diff --name-only fbb4875609a3c0ee088b6a118ebf9f8a500be0fd HEAD | grep 'mpy-MicrOS'`\n\n- GitHub embed youtube link: `https://github.com/itskeshav/Add-youtube-link-in-Readme.md`\n\n- Git history visualization with Gource\n\n```bash\ngource \\\n    --highlight-users \\\n    --hide filenames \\\n    --file-idle-time 0 \\\n    --max-files 0 \\\n    --seconds-per-day 0.01 \\\n    --auto-skip-seconds 1 \\\n    --title \"micrOS Evolution\" \\\n    --output-ppm-stream - \\\n    | ffmpeg -y -r 30 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 output.mp4\n```\n\ngit push -u origin master\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbxnxm%2Fmicros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbxnxm%2Fmicros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbxnxm%2Fmicros/lists"}