Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uegmobile/arduinootaserverbundle
This Symfony bundle provides a HTTP Server to manage OTA for Arduino with ESP8266 wifi chip
https://github.com/uegmobile/arduinootaserverbundle
arduino esp32 esp8266 ota-server symfony
Last synced: 2 months ago
JSON representation
This Symfony bundle provides a HTTP Server to manage OTA for Arduino with ESP8266 wifi chip
- Host: GitHub
- URL: https://github.com/uegmobile/arduinootaserverbundle
- Owner: UEGMobile
- License: mit
- Created: 2016-09-21T20:01:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-18T10:34:33.000Z (about 6 years ago)
- Last Synced: 2024-10-02T08:05:43.391Z (3 months ago)
- Topics: arduino, esp32, esp8266, ota-server, symfony
- Language: PHP
- Homepage:
- Size: 7.62 MB
- Stars: 8
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ArduinoOTAServerBundle
==================[![Latest Stable Version](https://poser.pugx.org/uegmobile/arduino-ota-server-bundle/v/stable)](https://packagist.org/packages/uegmobile/arduino-ota-server-bundle)
[![Total Downloads](https://poser.pugx.org/uegmobile/arduino-ota-server-bundle/downloads)](https://packagist.org/packages/uegmobile/arduino-ota-server-bundle)
[![Latest Unstable Version](https://poser.pugx.org/uegmobile/arduino-ota-server-bundle/v/unstable)](https://packagist.org/packages/uegmobile/arduino-ota-server-bundle)
[![License](https://poser.pugx.org/uegmobile/arduino-ota-server-bundle/license)](https://packagist.org/packages/uegmobile/arduino-ota-server-bundle)The **ArduinoOTAServerBundle** provides a HTTP Server to manage OTA
for Arduino with ESP8266 wifi chip.Documentation
-------------This 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
Include in version 2:
- New 'Program' Entity
- New 'ArduinoOTAServerService' Service
- New concole commands
Since v.1.2.0 compatible with [Arduino core for ESP32 WiFi chip] (https://github.com/espressif/arduino-esp32).
For documentation, see:
Resources/doc/
Installation
------------Step 1: Download the Bundle
---------------------------Open a command console, enter your project directory and execute the
following command to download the latest stable version of this bundle:$ composer require uegmobile/arduino-ota-server-bundle
This command requires you to have Composer installed globally, as explained
in the `installation chapter`_ of the Composer documentation.Step 2: Enable the Bundle
-------------------------Then, enable the bundle by adding it to the list of registered bundles
in the ``app/AppKernel.php`` file of your project:container->get('arduino_ota_server_service');
ArduinoOTAServerService public methods to get entities are:
- public function getProgram(string $programId): ?OTAProgram
- public function getDevice(string $deviceId): ?OTADeviceMac
- public function getBinary(string $binaryId): ?OTABinaryArduinoOTAServerService public methods to search entities are:
- public function searchPrograms(string $programName = null, int $page = 1, int $limit = 10, array $sort = []): ?Pagerfanta
- public function searchDevices(string $deviceMAC = null, int $page = 1, int $limit = 10, array $sort = []): ?Pagerfanta
- public function searchBinaries(string $binaryName = null, string $binaryVersion = null, string $userAgent = null, string $sdkVersion = null, int $page = 1, int $limit = 10,array $sort = []): ?PagerfantaArduinoOTAServerService public methods to register entities are:
- public function registerProgram(string $programName): OTAProgram
- public function registerDevice(string $deviceMAC, OTAProgram $program, string $mode = OTADeviceMac::MODE_ALPHA): OTADeviceMAC
- public function registerBinary(string $binaryName, string $binaryVersion, string $userAgent, string $sdkVersion, $binaryFile): OTABinaryArduinoOTAServerService public methods to update entities are:
- public function updateProgram($programId, $programName = null, $binaryAlpha = null, $binaryBeta = null, $binaryProd = null): OTAProgram
- public function updateDevice($deviceId, OTAProgram $program = null, string $mode = OTADeviceMac::MODE_ALPHA, bool $active = null): OTADeviceMACArduinoOTAServerService public method to get OTA binary is:
- public function searchBinaryByMACAddress(string $MACAddress): ?OTABinary
Configure arduino
------------------------See section https://github.com/esp8266/Arduino/blob/master/doc/ota_updates/readme.md#http-server
void upgrade_firmware(){
Serial.println("upgrade_firmware...");t_httpUpdate_return ret = ESPhttpUpdate.update(CLOUD_SERVER_IP,
CLOUD_SERVER_PORT,
"/app_dev.php/aotaserver/updateBinary",
FIRMWARE_VERSION);
switch(ret) {
case HTTP_UPDATE_FAILED:
Serial.println("[update] Update failed.");
break;
case HTTP_UPDATE_NO_UPDATES:
Serial.println("[update] Update no Update.");
break;
case HTTP_UPDATE_OK:
Serial.println("[update] Update ok."); // may not called we reboot the ESP
break;
}
Serial.println("upgrade_firmware...done! ");
}License
-------This bundle is released under the MIT license.