Download the PHP package daedaloslabs/filament-shelly without Composer

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

Filament Shelly

Latest Version on Packagist Tests

Show live Shelly sensor values as stat widgets on any Filament page: a pool thermometer on the dashboard, a fridge's humidity on an inventory page, a pump's power draw on a maintenance resource.

Add as many sensors as you want from a settings page, choose each sensor's type, then decide per stat on which pages it appears. You don't have to write a widget or touch your pages.

Filament Shelly

Features

Requirements

Installation

The install command publishes and runs the migration, which creates the shelly_accounts and shelly_sensors tables. If you'd rather do it by hand:

Multi-tenant apps (one database per tenant): move the published migration into your tenant migrations folder. Each tenant then gets its own Shelly account and sensors.

Register the plugin in your panel provider:

If your panel uses a custom theme, you don't need to change anything. The plugin only uses Filament's own components.

Usage

  1. Open Shelly sensors in the panel navigation.
  2. Copy the server and authorization cloud key from the Shelly app or control.shelly.cloud: User settings → Authorization cloud key.
  3. Click Add sensor, then enter a name and the Device ID (device → Settings → Device information) and pick a type.
  4. Under Show each stat on, choose the pages where each stat should appear. Leave a stat empty to hide it.
  5. Click Test to confirm that the device answers, then Save.

The stats appear at the top of the chosen pages and refresh on their own.

Settings page

Dashboard with Shelly stats

Custom sensors

Choose Custom and add one row per stat, with a label, a dot path inside the device status, and an optional unit:

Label Status path Unit
Pool water temperature:100.tC °C
Pump power switch:0.apower W
WiFi signal wifi.rssi dBm

Not sure which path to use? Click Test on the sensor. The notification lists the device's components (temperature:100, switch:0, wifi, …).

Configuration

All options are optional:

Placing the widget by hand

The stats are injected automatically through a render hook. To place them yourself instead, for example between other widgets, add the widget to a page and pass that page's class:

If you place it by hand, set ->renderHook() to a hook your page doesn't render, or the stats will show twice.

Adding a sensor type

A sensor type tells the plugin which metrics a device reports and where to find them in the status JSON. Extend SensorType:

Then register it:

Metric options:

Argument Meaning
key Stable id, used to store the placement.
label Stat label.
paths Candidate dot paths into the status. The first non-null one wins.
unit Appended to the value.
icon Any Blade icon name.
decimals Rounds numbers. null shows the raw value. Default 1.
format fn (mixed $value): string for full control.

How requests are kept low

Testing

Changelog

See CHANGELOG.

Credits

License

The MIT License (MIT). See License File.


All versions of filament-shelly with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^5.0
spatie/laravel-package-tools Version ^1.16
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 daedaloslabs/filament-shelly contains the following files

Loading the files please wait ...