jonlynch/laravel-dashboard-meraki-tile

A package to display Meraki device and client status

v1.2 2024-10-09 21:33 UTC

This package is auto-updated.

Last update: 2024-11-09 22:12:57 UTC


README

Latest Version on Packagist Total Downloads

A tile to display the status of devices and clients from the Cisco Meraki cloud.

This tile can be used on the Laravel Dashboard.

Installation

You can install the package via composer:

$ composer require jonlynch/laravel-dashboard-meraki-tile

Usage

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

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

Add the config to the tiles sections of your config/dashboard.php

// in config/dashboard.php

return [
    // ...
    tiles => [
         'meraki' => [
            'api_key' => env('MERAKI_API_KEY'),
            'organisation_id' => env('MERAKI_ORG_ID'),
             'configurations' => [ // one for each device you are interested in
                [
                    'display_name' => 'Site 1',
                    'device_name' => 'Site 1', // as used in the Meraki Cloud
                    'client' => '00:0e:06:00:22:22',
                    'radio_link' => true // Add this if there is a radio link instead of Xtend
                ],
                [
                    'display_name' => 'Site 2',
                    'device_name' => 'Site 2', // as used in the Meraki Cloud
                    'client' => '00:0e:06:00:11:11',
                ],
                [
                    'display_name' => 'Site 3',
                    'device_name' => 'Site 3', // as used in the Meraki Cloud
                    'client' => '00:0e:06:00:11:12',
                    'sleeps' => true // add true if this repeater is expected to power down when not in use
                ]
            ]
        ]
    ]

In app\Console\Kernel.php you should schedule the JonLynch\MerakiTile\Commands\FetchMerakiDataCommand to run every minute.

// in app\Console\Kernel.php

protected function schedule(Schedule $schedule)
{
    $schedule->command(\JonLynch\MerakiTile\Commands\FetchMerakiDataCommand::class)->everyMinute();

}

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email :author_email instead of using the issue tracker.

Credits

License

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