Download the PHP package uegmobile/arduino-ota-server-bundle without Composer

On this page you can find all versions of the php package uegmobile/arduino-ota-server-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package arduino-ota-server-bundle

ArduinoOTAServerBundle

Latest Stable Version Total Downloads Latest Unstable Version License

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. See section https://github.com/esp8266/Arduino/tree/master/doc/ota_updates#http-server

Include in version 2:

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:

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new UEGMobile\ArduinoOTAServerBundle\UEGMobileArduinoOTAServerBundle(),
        );

        // ...
    }

    // ...
}

Step 3: Register the Routes

Import the routing definition in routing.yml:

# app/config/routing.yml
UEGMobileArduinoOTAServerBundle:
  resource: "@UEGMobileArduinoOTAServerBundle/Resources/config/routing.yml"
  prefix:   /aotaserver

Step 4: Update Database Model

Run doctrine commands to update your database model:

$ php app/console doctrine:migrations:diff (Symonfy 2.*)
$ php bin/console doctrine:migrations:diff (Symonfy 3.*)

$ php app/console doctrine:migrations:migrate (Symonfy 2.*)
$ php bin/console doctrine:migrations:migrate (Symonfy 3.*)

IMPORTANT NOTE: Upgrades to v2.0.0 needs some tasks:

- create and execute doctrine migrations.
- register one program (see register program console command)
- update devices and set program and mode (see update device console command)

NOTE: Upgrades to v1.2.0 from previous versions require run doctrine commands again.

Usage

Register programs with Symfony console commands

Example:

$ php bin/console aotaserver:register:program "Program A"
Register Program "Program A" with id X done!

Example:

$ php bin/console aotaserver:list:program
+----+-----------------+------------------+------------------+------------------+
| Id | Binary Name     | Alpha            | Beta             | Prod             |
+----+-----------------+------------------+------------------+------------------+
| 1  | Program A       | (none)           | (none)           | (none)           |
+----+-----------------+------------------+------------------+------------------+

Register binaries with Symfony console commands

Example:

$ php bin/console aotaserver:register:binary binary.1.bin 1.0.0 ESP8266-http-Update '1.5.3(aec24ac9)' arduino.1.2.02.bin
Register arduino.1.2.02.bin done!

Example:

$ php bin/console aotaserver:list:binary
+----+--------------+---------------------+-----------------+
| Id | Binary Name  | User-Agent          | SDK Version     |
+----+--------------+---------------------+-----------------+
| 1  | binary.1.bin | ESP8266-http-Update | 1.5.3(aec24ac9) |
+----+--------------+---------------------+-----------------+

Register device with Symfony console commands

Example:

$ php bin/console aotaserver:register:device '5C:CF:7F:8C:54:12' 1 BETA
Register 5C:CF:7F:8C:54:12 with id X done!

Example:

$ php app/console aotaserver:list:device
+----+-------------------+--------+---------------+-------+
| Id | MAC Address       | Active | Program       | Mode  |
+----+-------------------+--------+---------------+-------+
| 11 | 5C:CF:7F:8C:54:12 | N      | 1 - Program A | BETA  |
+----+-------------------+--------+---------------+-------+

Update device with Symfony console commands

Example:

$ php bin/console aotaserver:update:device 1 1 BETA
Updated 12:23:44:55:66 with id 1 done!

Update device with Symfony console commands

Example:

$ php bin/console aotaserver:update:device 1 1 BETA
Updated 12:23:44:55:66 with id 1 done!

Update program with Symfony console commands

Example:

$ php bin/console aotaserver:update:program 1 "New program name"
Updated New program name with id 1 done!

Control entities from a Service

The ArduinoOTAServerService is available from the container:

$arduinoOTAServerService = $this->container->get('arduino_ota_server_service');

ArduinoOTAServerService public methods to get entities are:

ArduinoOTAServerService public methods to search entities are:

ArduinoOTAServerService public methods to register entities are:

ArduinoOTAServerService public methods to update entities are:

ArduinoOTAServerService public method to get OTA binary is:

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.


All versions of arduino-ota-server-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
psr/log Version ^1.0
symfony/symfony Version ^2.3|~3.0
symfony/assetic-bundle Version ^2.8
doctrine/orm Version ~2.2,>=2.2.3
doctrine/doctrine-bundle Version ~1.2
doctrine/doctrine-migrations-bundle Version ^1.1
monolog/monolog Version ~1.18
friendsofsymfony/rest-bundle Version ^1.7|~2.0
mmoreram/simple-doctrine-mapping Version ^1.0
pagerfanta/pagerfanta Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package uegmobile/arduino-ota-server-bundle contains the following files

Loading the files please wait ....