Code Monkey home page Code Monkey logo

laravel-dashboard-youless-tile's Introduction

Youless Tile

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

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.

laravel-dashboard-youless-tile's People

Contributors

xibel avatar

Watchers

 avatar

laravel-dashboard-youless-tile's Issues

Support v2 of dashboard

Hi,

we've released v2 our dashboard. The only change are the updated requirements: we now require Laravel v8 and Livewire v2.

Could you please tag a new release of your tile?

In most cases these are the things you need to do:

  • update the requirement in the composer.json of your tile to spatie/laravel-dashboard": "^2.0
  • tag a new release. Personally, I would opt for a major release, so you can still do bug fixes on the v1 of your tile.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.