{"id":15493400,"url":"https://github.com/uegmobile/arduinootaserverbundle","last_synced_at":"2025-07-16T04:32:54.393Z","repository":{"id":57074726,"uuid":"68853035","full_name":"UEGMobile/ArduinoOTAServerBundle","owner":"UEGMobile","description":"This Symfony bundle provides a HTTP Server to manage OTA for Arduino with ESP8266 wifi chip","archived":false,"fork":false,"pushed_at":"2018-12-18T10:34:33.000Z","size":7986,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-03T08:05:49.342Z","etag":null,"topics":["arduino","esp32","esp8266","ota-server","symfony"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UEGMobile.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-21T20:01:20.000Z","updated_at":"2022-01-27T11:44:41.000Z","dependencies_parsed_at":"2022-09-21T08:41:51.741Z","dependency_job_id":null,"html_url":"https://github.com/UEGMobile/ArduinoOTAServerBundle","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UEGMobile%2FArduinoOTAServerBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UEGMobile%2FArduinoOTAServerBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UEGMobile%2FArduinoOTAServerBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UEGMobile%2FArduinoOTAServerBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UEGMobile","download_url":"https://codeload.github.com/UEGMobile/ArduinoOTAServerBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250312017,"owners_count":21409940,"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":["arduino","esp32","esp8266","ota-server","symfony"],"created_at":"2024-10-02T08:06:15.035Z","updated_at":"2025-04-22T19:47:07.912Z","avatar_url":"https://github.com/UEGMobile.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"ArduinoOTAServerBundle\n==================\n\n[![Latest Stable Version](https://poser.pugx.org/uegmobile/arduino-ota-server-bundle/v/stable)](https://packagist.org/packages/uegmobile/arduino-ota-server-bundle)\n[![Total Downloads](https://poser.pugx.org/uegmobile/arduino-ota-server-bundle/downloads)](https://packagist.org/packages/uegmobile/arduino-ota-server-bundle)\n[![Latest Unstable Version](https://poser.pugx.org/uegmobile/arduino-ota-server-bundle/v/unstable)](https://packagist.org/packages/uegmobile/arduino-ota-server-bundle)\n[![License](https://poser.pugx.org/uegmobile/arduino-ota-server-bundle/license)](https://packagist.org/packages/uegmobile/arduino-ota-server-bundle)\n\nThe **ArduinoOTAServerBundle** provides a HTTP Server to manage OTA \nfor Arduino with ESP8266 wifi chip.\n\nDocumentation\n-------------\n\nThis plugin is developer for [Arduino core for ESP8266 WiFi chip](https://github.com/esp8266/Arduino/). See section https://github.com/esp8266/Arduino/tree/master/doc/ota_updates#http-server\n\nInclude in version 2:\n\n- New 'Program' Entity\n\n- New 'ArduinoOTAServerService' Service\n\n- New concole commands\n\nSince v.1.2.0 compatible with  [Arduino core for ESP32 WiFi chip] (https://github.com/espressif/arduino-esp32).\n\n\nFor documentation, see:\n\n    Resources/doc/\n\nInstallation\n------------\n\nStep 1: Download the Bundle\n---------------------------\n\nOpen a command console, enter your project directory and execute the\nfollowing command to download the latest stable version of this bundle:\n\n    $ composer require uegmobile/arduino-ota-server-bundle\n\nThis command requires you to have Composer installed globally, as explained\nin the `installation chapter`_ of the Composer documentation.\n\nStep 2: Enable the Bundle\n-------------------------\n\nThen, enable the bundle by adding it to the list of registered bundles\nin the ``app/AppKernel.php`` file of your project:\n\n    \u003c?php\n    // app/AppKernel.php\n\n    // ...\n    class AppKernel extends Kernel\n    {\n        public function registerBundles()\n        {\n            $bundles = array(\n                // ...\n                new UEGMobile\\ArduinoOTAServerBundle\\UEGMobileArduinoOTAServerBundle(),\n            );\n\n            // ...\n        }\n\n        // ...\n    }\n\nStep 3: Register the Routes\n---------------------------\n\nImport the routing definition in ``routing.yml``:\n\n    # app/config/routing.yml\n    UEGMobileArduinoOTAServerBundle:\n      resource: \"@UEGMobileArduinoOTAServerBundle/Resources/config/routing.yml\"\n      prefix:   /aotaserver\n\nStep 4: Update Database Model\n---------------------------\n\nRun doctrine commands to update your database model:\n\n    $ php app/console doctrine:migrations:diff (Symonfy 2.*)\n    $ php bin/console doctrine:migrations:diff (Symonfy 3.*)\n\n    $ php app/console doctrine:migrations:migrate (Symonfy 2.*)\n    $ php bin/console doctrine:migrations:migrate (Symonfy 3.*)\n\nIMPORTANT NOTE: Upgrades to v2.0.0 needs some tasks:\n\n    - create and execute doctrine migrations.\n    - register one program (see register program console command)\n    - update devices and set program and mode (see update device console command)\n\nNOTE: Upgrades to v1.2.0 from previous versions require run doctrine commands again.\n\nUsage\n-----\n\nRegister programs with Symfony console commands\n---------------------------------------\n\n* Register new program to be available in OTA server\n\n    $ php bin/console aotaserver:register:program porgramName \n\nExample:\n\n    $ php bin/console aotaserver:register:program \"Program A\"\n    Register Program \"Program A\" with id X done!\n\n* List all programs availables in OTA server\n\n    $ php bin/console aotaserver:list:program\n\nExample:\n\n    $ php bin/console aotaserver:list:program\n    +----+-----------------+------------------+------------------+------------------+\n    | Id | Binary Name     | Alpha            | Beta             | Prod             |\n    +----+-----------------+------------------+------------------+------------------+\n    | 1  | Program A       | (none)           | (none)           | (none)           |\n    +----+-----------------+------------------+------------------+------------------+\n\nRegister binaries with Symfony console commands\n---------------------------------------\n\n* Register new binary to be available in OTA server\n\n    $ php bin/console aotaserver:register:binary binaryName binaryVersion userAgent sdkVersion binaryPath\n\nExample:\n\n    $ php bin/console aotaserver:register:binary binary.1.bin 1.0.0 ESP8266-http-Update '1.5.3(aec24ac9)' arduino.1.2.02.bin\n    Register arduino.1.2.02.bin done!\n\n* List all binaries availables in OTA server\n\n    $ php bin/console aotaserver:list:binary\n\nExample:\n\n    $ php bin/console aotaserver:list:binary\n    +----+--------------+---------------------+-----------------+\n    | Id | Binary Name  | User-Agent          | SDK Version     |\n    +----+--------------+---------------------+-----------------+\n    | 1  | binary.1.bin | ESP8266-http-Update | 1.5.3(aec24ac9) |\n    +----+--------------+---------------------+-----------------+\n\n\nRegister device with Symfony console commands\n---------------------------------------\n\n* Register new device to be available in OTA server\n\n    $ php bin/console aotaserver:register:device mac programId mode\n\nExample:\n\n    $ php bin/console aotaserver:register:device '5C:CF:7F:8C:54:12' 1 BETA\n    Register 5C:CF:7F:8C:54:12 with id X done!\n\n* List all devices availables in OTA server\n\n    $ php bin/console aotaserver:list:device\n\nExample:\n\n    $ php app/console aotaserver:list:device\n    +----+-------------------+--------+---------------+-------+\n    | Id | MAC Address       | Active | Program       | Mode  |\n    +----+-------------------+--------+---------------+-------+\n    | 11 | 5C:CF:7F:8C:54:12 | N      | 1 - Program A | BETA  |\n    +----+-------------------+--------+---------------+-------+\n\nUpdate device with Symfony console commands\n---------------------------------------\n\n* Update configuration device and set Beta, Alpha or Prod Mode in OTA server\n\n    $ php bin/console aotaserver:update:device deviceId programId mode active\n\nExample:\n\n    $ php bin/console aotaserver:update:device 1 1 BETA\n    Updated 12:23:44:55:66 with id 1 done!\n\n\nUpdate device with Symfony console commands\n---------------------------------------\n\n* Update configuration device and set Beta, Alpha or Prod Mode in OTA server\n\n    $ php bin/console aotaserver:update:device deviceId programId mode active\n\nExample:\n\n    $ php bin/console aotaserver:update:device 1 1 BETA\n    Updated 12:23:44:55:66 with id 1 done!\n\n\n\nUpdate program with Symfony console commands\n---------------------------------------\n\n* Update name progam in OTA server\n\n    $ php bin/console aotaserver:update:program programId name\n\nExample:\n\n    $ php bin/console aotaserver:update:program 1 \"New program name\"\n    Updated New program name with id 1 done!\n\nControl entities from a Service\n---------------------------------------\n\nThe ArduinoOTAServerService is available from the container:\n\n    $arduinoOTAServerService = $this-\u003econtainer-\u003eget('arduino_ota_server_service');\n\nArduinoOTAServerService public methods to get entities are:\n\n- public function getProgram(string $programId): ?OTAProgram \n- public function getDevice(string $deviceId): ?OTADeviceMac  \n- public function getBinary(string $binaryId): ?OTABinary\n\nArduinoOTAServerService public methods to search entities are:\n\n- public function searchPrograms(string $programName = null, int $page = 1, int $limit = 10, array $sort = []): ?Pagerfanta\n- public function searchDevices(string $deviceMAC = null, int $page = 1, int $limit = 10, array $sort = []): ?Pagerfanta \n- public function searchBinaries(string $binaryName = null, string $binaryVersion = null, string $userAgent = null, string $sdkVersion = null, int $page = 1, int $limit = 10,array $sort = []): ?Pagerfanta\n\nArduinoOTAServerService public methods to register entities are:\n\n- public function registerProgram(string $programName): OTAProgram\n- public function registerDevice(string $deviceMAC, OTAProgram $program, string $mode = OTADeviceMac::MODE_ALPHA): OTADeviceMAC\n- public function registerBinary(string $binaryName, string $binaryVersion, string $userAgent, string $sdkVersion, $binaryFile): OTABinary \n\nArduinoOTAServerService public methods to update entities are:\n\n- public function updateProgram($programId, $programName = null, $binaryAlpha = null, $binaryBeta = null, $binaryProd = null): OTAProgram\n- public function updateDevice($deviceId, OTAProgram $program = null, string $mode = OTADeviceMac::MODE_ALPHA, bool $active = null): OTADeviceMAC\n\nArduinoOTAServerService public method to get OTA binary is:\n\n- public function searchBinaryByMACAddress(string $MACAddress): ?OTABinary\n\nConfigure arduino\n------------------------\n\nSee section https://github.com/esp8266/Arduino/blob/master/doc/ota_updates/readme.md#http-server\n\n    void upgrade_firmware(){\n        Serial.println(\"upgrade_firmware...\");\n\n        t_httpUpdate_return ret = ESPhttpUpdate.update(CLOUD_SERVER_IP, \n            CLOUD_SERVER_PORT, \n            \"/app_dev.php/aotaserver/updateBinary\",\n            FIRMWARE_VERSION);\n            \n        switch(ret) {\n            case HTTP_UPDATE_FAILED:\n                Serial.println(\"[update] Update failed.\");\n                break;\n            case HTTP_UPDATE_NO_UPDATES:\n                Serial.println(\"[update] Update no Update.\");\n                break;\n            case HTTP_UPDATE_OK:\n                Serial.println(\"[update] Update ok.\"); // may not called we reboot the ESP\n                break;\n        }\n        Serial.println(\"upgrade_firmware...done!  \");\n    }\n\nLicense\n-------\n\nThis bundle is released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuegmobile%2Farduinootaserverbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuegmobile%2Farduinootaserverbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuegmobile%2Farduinootaserverbundle/lists"}