{"id":937,"date":"2023-10-06T05:15:55","date_gmt":"2023-10-06T05:15:55","guid":{"rendered":"https:\/\/iotmanager.org\/?page_id=937"},"modified":"2024-02-08T21:02:04","modified_gmt":"2024-02-08T21:02:04","slug":"compilling","status":"publish","type":"page","link":"https:\/\/iotmanager.org\/en\/instructions\/compilling\/","title":{"rendered":"Download, compile, and flash"},"content":{"rendered":"<p>Since IoTmanager ver4 is constantly changing on a daily basis, you can install an up-to-date, relatively stable binary build at the address on this site&nbsp;<a href=\"https:\/\/iotmanager.org\/en\/install\/\">follow this link<\/a>.<\/p>\n\n\n\n<p>If you are an active tester, know what Platformio and VSCode are, and want to customize the system for yourself, and maybe even change something in the code, then the following information is for you.<br>The current version for testers is available at&nbsp;<a href=\"https:\/\/github.com\/IoTManagerProject\/IoTManager\/tree\/ver4dev\">Project&#039;s Github<\/a>&nbsp;and also on&nbsp;<a href=\"https:\/\/github.com\/biveraxe\/IoTManager\/tree\/ver4dev\">Github Developers<\/a>, where there are versions that are not yet merged with the main project, if you participate as an active project tester.<br>This page was created thanks to the efforts of a friend from our community @AEV_LAB<\/p>\n\n\n\n<p>And so we download and unpack everything to the catalog. It is very good if there are no Cyrillic characters in the entire path starting from the root, this can save you a lot of time and nerves.<br>If you are reading and don&#039;t understand why to download and why not to set up synchronization with git, go to the other pages of this wiki, you have long outgrown this one.<\/p>\n\n\n\n<p>Compilation is performed in&nbsp;<a href=\"https:\/\/code.visualstudio.com\/\">VS Code<\/a>. For initial compilation scripts, Python is required. It must be present on your system and located in the path variable. After opening the directory in VSCode, edit the MyProfile.json file. Thus, you will specify all the settings of your home network, time zone, mqtt broker, if used, you can leave what is there for the test.<\/p>\n\n\n\n<p>Also at this stage, you can choose which modules and sensors will be available in this build. After editing, don&#039;t forget to save the file to commit your changes. In the next step, run the file in the VS Code terminal window PrepareProject.py, which will load modules and sensors into the firmware. This is exactly what Python is for. If you want to rebuild an assembly, change network settings, or add\/remove sensors or modules, also run this file. When PrepareProject.py works, data from MyProfile.json will be written in the appropriate place of the build. This makes it easier for beginners to build.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-20.png\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"553\" src=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-20.png\" alt=\"\" class=\"wp-image-938\" srcset=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-20.png 1024w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-20-600x324.png 600w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-20-300x162.png 300w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-20-768x415.png 768w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-20-18x10.png 18w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>The sequence is shown in the figure below:<\/p>\n\n\n\n<ul>\n<li>Opening the file&nbsp;<strong>myProfile.json<\/strong><\/li>\n\n\n\n<li>Editing network settings, time zone, and mqtt<\/li>\n\n\n\n<li>If we use ESP32, then we replace it with [env: esp32_4mb] in the appropriate place.<\/li>\n\n\n\n<li>The same applies to the esp8266_1mb_ota, esp8266_1mb, esp8285_1mb_ota and esp8285_1mb_ota chips.<\/li>\n\n\n\n<li>If necessary, use true and false to specify which modules and sensors we want in this build. Here everything is simple, we will turn on more, more memory will be used.<\/li>\n\n\n\n<li>Saving the file<\/li>\n\n\n\n<li>Run it in the terminal&nbsp;<strong>PrepareProject.py<\/strong>&nbsp;(right-click on this file and select Run Python File in Terminal)<\/li>\n\n\n\n<li>Click the alien icon (platformio) to display the compilation menu<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-21.png\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"555\" src=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-21.png\" alt=\"\" class=\"wp-image-939\" srcset=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-21.png 1024w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-21-600x325.png 600w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-21-300x163.png 300w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-21-768x416.png 768w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-21-18x10.png 18w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Compilation and firmware consists of assembling the firmware itself, at which point all the system modules are assembled and the created binary file is uploaded to ESP8266 or ESP32.<br>You must compile and flash the firmware itself and also the file system.<br><\/p>\n\n\n\n<p>If the script works successfully PrepareProject.py a pop-up message appears, as shown below. If this doesn&#039;t happen, you probably don&#039;t have python installed or it&#039;s not in the search paths.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-22.png\"><img decoding=\"async\" loading=\"lazy\" width=\"515\" height=\"182\" src=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-22.png\" alt=\"\" class=\"wp-image-940\" srcset=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-22.png 515w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-22-300x106.png 300w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-22-18x6.png 18w\" sizes=\"(max-width: 515px) 100vw, 515px\" \/><\/a><\/figure>\n\n\n\n<p>The process of compiling and filling the firmware and file system:<\/p>\n\n\n\n<ol>\n<li>Compiling the firmware<\/li>\n\n\n\n<li>Upload the firmware to ESP<\/li>\n\n\n\n<li>Compiling the file system<\/li>\n\n\n\n<li>Upload the file system to ESP<\/li>\n<\/ol>\n\n\n\n<p>If you did everything correctly, the compilation should pass without errors, if they appear, try scrolling through and analyzing them. Most likely, VSCode will highlight problem areas with yellow or red wavy lines and scrolling will show details and numbers of problem lines in the corresponding files. Often the problem is in the Cyrillic alphabet in the path or in the code, such characters as (a, o, k, etc.) often fall into the wrong layout. If it doesn&#039;t work out then contact the telegram group&nbsp;<a href=\"https:\/\/t.me\/IoTmanager\">https:\/\/t.me\/IoTmanager<\/a>, try to indicate in the message what version you are building, what you changed, and give the errors that came out.<br>If VSCode is experiencing problems with detecting and filling the firmware, check if the module is connected correctly and if there are any open terminal programs on your computer. On some modules, it is necessary to close GPIO0 to ground before flashing, if this is not implemented on the module. Also, on some modules, you need to restart it between loading the firmware and the file system.<br>The sequence of filling the firmware and file system is not important and sometimes it is even recommended to fill the file system first.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-23.png\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"554\" src=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-23.png\" alt=\"\" class=\"wp-image-941\" srcset=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-23.png 1024w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-23-600x325.png 600w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-23-300x162.png 300w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-23-768x416.png 768w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-23-18x10.png 18w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Bywet that in&nbsp;<strong>PROJECT TASKS<\/strong>&nbsp;there is no item&nbsp;<strong>Platform<\/strong>&nbsp;and its daughter items for working with the file system. Try to build the firmware first by clicking&nbsp;<strong>Build<\/strong>&nbsp;and update the project by clicking on the board version a couple of times. If this does not help, you can do everything via the command line. Log in to the Terminal by clicking on the icon with a square and an angle bracket inside at the bottom. Insert commands for your board and press Enter.<\/p>\n\n\n\n<p>Erase Flash:<\/p>\n\n\n\n<p><strong>platformio run &#8212;target erase &#8212;environment esp32_4mb<\/strong><\/p>\n\n\n\n<p>Build Filesystem Image:<\/p>\n\n\n\n<p><strong>platformio run &#8212;target buildfs &#8212;environment esp32_4mb<\/strong><\/p>\n\n\n\n<p>Upload Filesystem Image:<\/p>\n\n\n\n<p><strong>platformio run -t uploadfs &#8212;environment esp32_4mb<\/strong><\/p>\n\n\n\n<p>and you can continue with the others as well<\/p>\n\n\n\n<p>Build:<\/p>\n\n\n\n<p><strong>platformio run &#8212;environment esp32_4mb<\/strong><\/p>\n\n\n\n<p>Upload and Monitor:<\/p>\n\n\n\n<p><strong>platformio run &#8212;target upload &#8212;target monitor &#8212;environment esp32_4mb<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-24.png\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"588\" src=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-24.png\" alt=\"\" class=\"wp-image-942\" srcset=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-24.png 1024w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-24-600x345.png 600w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-24-300x172.png 300w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-24-768x441.png 768w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-24-18x10.png 18w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Sometimes Platformio can&#039;t flash your board because it can&#039;t see it.<\/p>\n\n\n\n<p>Log in to the Terminal and enter<\/p>\n\n\n\n<p><strong>pio device list<\/strong><\/p>\n\n\n\n<p>to see that the card is connected<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-25.png\"><img decoding=\"async\" loading=\"lazy\" width=\"739\" height=\"205\" src=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-25.png\" alt=\"\" class=\"wp-image-943\" srcset=\"https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-25.png 739w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-25-600x166.png 600w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-25-300x83.png 300w, https:\/\/iotmanager.org\/wp-content\/uploads\/2023\/10\/image-25-18x5.png 18w\" sizes=\"(max-width: 739px) 100vw, 739px\" \/><\/a><\/figure>\n\n\n\n<p>After successful compilation and firmware, go to the device&nbsp;<a href=\"http:\/\/ip_your_device\/\">http:\/\/ip_your_device<\/a>. If you did everything correctly and registered your wi-fi network and password, then the IP address should be issued by your router. You can find it either on your router or in the terminal window.<br>If you missed this step for some reason, you will create an IoTmanager Wi-Fi access point with the admin|admin login parameters.<br>If you don&#039;t see the IoTmanager devices and access points, but an access point named ESP***** appears , then for some reason the file system is not flashed, try re-flashing it.<\/p>","protected":false},"excerpt":{"rendered":"<p>\u0422\u0430\u043a \u043a\u0430\u043a IotManager ver4 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0438 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e, \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0431\u0438\u043d\u0430\u0440\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 \u043d\u0430 \u044d\u0442\u043e\u043c \u0441\u0430\u0439\u0442\u0435&nbsp;\u043f\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435. \u0415\u0441\u043b\u0438 \u0412\u044b \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0442\u0435\u0441\u0442\u0435\u0440, \u0437\u043d\u0430\u0435\u0442\u0435 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Platformio \u0438 VsCode \u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043e\u0434 \u0441\u0435\u0431\u044f, \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u0447\u0442\u043e-\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432 \u043a\u043e\u0434\u0435 \u0434\u0430\u043b\u0435\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0412\u0430\u0441.\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0435\u0440\u043e\u0432 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430&nbsp;Github \u043f\u0440\u043e\u0435\u043a\u0442\u0430&nbsp;\u0438 &#8230; <a title=\"Download, compile, and flash\" class=\"read-more\" href=\"https:\/\/iotmanager.org\/en\/instructions\/compilling\/\" aria-label=\"More on \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0430\">Read more<\/a><\/p>","protected":false},"author":6,"featured_media":0,"parent":388,"menu_order":-20,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/pages\/937"}],"collection":[{"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/comments?post=937"}],"version-history":[{"count":2,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/pages\/937\/revisions"}],"predecessor-version":[{"id":1010,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/pages\/937\/revisions\/1010"}],"up":[{"embeddable":true,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/pages\/388"}],"wp:attachment":[{"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/media?parent=937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}