Download the PHP package shob01/foxess without Composer

On this page you can find all versions of the php package shob01/foxess. 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 foxess

Access FoxEss Cloud Api using PHP classes

Implementation of PHP classes to access FoxEss Cloud data via FoxEss Open API. The official Open API documentation also mentions some restrictions every user should be aware of.

As of today the provided classes are restricted to single inverter installations. The simple reasons for this are that this configuration meets my personal requirements and I would not be able to test for environments with multiple inverters.

Please be aware that this is the result of a hobby project, that I developed in my spare time. I am a professional software developer (C/C++, Databases, ABAP OO), but this is my first bigger project using PHP. I am also not very experienced in Web development and using github. I would really appreciate any helpful hints and tipps regarding dos and don'ts and/or best practice.

Install

Quick start

Copy the file .env.example to .env in your document root directory and fill in your FoxEss configuration data.

Start the PHP internal web server in your document root directory:

Open this URL in your browser: http://localhost:8000/vendor/shob01/foxess/examples/Test.php

Usage example

This little example shows how to read production report data for current month, today and current hour. Additionally, todays min, max, current and trend value for SoC (State of charge), Inverter and Battery Temperation will be obtained as well.

You can find this DashboardData.php and some more example codes in the examples directory. There is also a respecting HTML file for each example code, showing the execution output.

Output

Configuration / Dependency Injection Container

There are serveral options to configure how things are done. I implemented a very simple DI Container that is used to control configurable dependencies. The DI Container is setup in the PHP code dependencies.php


- `Config::class` defines where the FoxEss configuration data is coming from. 
    There are already two ready implemented classes available:

    - `ConfigDotEnv`: (default) reads the data from a .env file and makes the entries available as local 
        environment variables.
    - `ConfigFile`: reads the data from a json file.
    <p/>
- `IRequester::class` defines Request and Response handling. I am using GuzzleHttp, but this can be replaced 
    by anything that is implementing `\Psr\Http\Message\ResponseInterface`. Just implement your own version 
    of `IRequester` interface.

- `TZ` defines the timezone that is used for requesting data and also in some output features like 
    `HtmlTableDataFormatter` and `ResultDataTable`class. See [W3 schools PHP Supported Timezones](https://www.w3schools.com/php/php_ref_timezones.asp) for details.

All versions of foxess with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.7
vlucas/phpdotenv Version ^5.5
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 shob01/foxess contains the following files

Loading the files please wait ....