xibel/laravel-dashboard-youless-tile

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

A tile for Laravel-Dashboard that displays statistics from a Youless LS120 energy reader

v2.0.0 2020-09-13 18:27 UTC

This package is auto-updated.

Last update: 2021-11-13 21:29:53 UTC


README

A tile for Laravel Dashboard that displays statistics from a Youless LS120 Energy Monitor. This tile can be used on the Laravel Dashboard from Spatie.

Impression

youless_tile.png

For more information about this package see my website Xibel-IT.

Install

Via Composer

$ composer require xibel/laravel-dashboard-youless-tile

Configuration

In the \config\dashboard.php config file, you must add this configuration in the tiles key:

return [
    // ...
    'tiles' => [
        'youless' => [
            'url' => env('YOULESS_URL'),
            'refresh_interval_in_seconds' => 10,
        ],
    ],
];

In app\Console\Kernel.php you should schedule the xibel\YoulessTile\Commands\FetchDataFromYoulessCommand to run every 1 minute.

protected function schedule(Schedule $schedule)
{
    // Youless tile
        $schedule->command(\xibel\YoulessTile\Commands\FetchDataFromYoulessCommand::class)->everyMinute();

}

To fetch data from your Youless at lease once, run 'php artisan schedule:run'. Use a tool like supervisor to keep the scheduler running.

In the .env file, you must add the 'YOULESS_URL' key and provide your Youless IP address or hostname:

YOULESS_URL=x.x.x.x

In your dashboard view you use the livewire:youless-summary-tile component.

<x-dashboard>
    <livewire:youless-tile position="a1" />
</x-dashboard>

Change log

Please see CHANGELOG for more version information.

Credits

License

The MIT License (MIT). Please see License File for more information.