Download the PHP package omlet/smartcoop-sdk without Composer

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

Omlet PHP SDK

This SDK is designed to facilitate seamless authentication with Omlet and provide interaction with devices. With our SDK, developers can easily retrieve device information, and execute actions tailored to their devices and groups.

Introduction

Getting Started

Overview

To use this SDK the user will already be registered with omlet as you will use the same email and password credentials to authenticate. We will go through the steps for including this SDK in your application and how to interact with your devices.

Installation

To install the SmartCoop SDK, ensure you have Composer installed on your system. Then, create or navigate to your project directory and execute the following command:

From the root of your project, now run:

Once installed you will use your email and password to generate an API key that will be used subsequently for all interactions.

Authentication

Create API Key

To generate an API key you'll need to login to the developer console with the email and password that use for the App. Once logged in navigate to "API Keys" and click "Generate Key". Take note of this key.

Create a .env file in your project root and then copy the contents of env.example into it. Use the token generated above for API_KEY

Omlet

Overview

The Omlet object offers the ability to retrieve all of your devices, get a single device, create a group handler and create a user handler.

Creating an Instance

Retrieving Devices

These functions will return a Device Handler that will allow you to interact with individual devices.

Create a Group

Retrieving Groups

Retrieving the User

Device Handler

The Device Handler offers a way to interact with a specific device and also see the Device data.

Device Data

The Device Handler will hold a configuration of the device. You can access each of the attributes through getter methods.

Device Actions

Device actions are used to interact with the device. A list of available actions is present on the device data. We can perform actions on the device by retrieving one from the list:

The action object contains a description of the action. To perform an action, filter out the action you want to perform, such as opening the door and pass it to the action function

Updating Device Configuration

To update the devices configuration, we will need to interact with the Configuration object.

This object will give you the current configuration of your device. You can then use setter methods to change the values.

For example, if we want to change the time that your device door opens:

Group Handler

The Group Handler offers a way to interact with a specific group and also see the group data.

Group Data

The Group Handler will hold a data object with group information, users, admins and devices belonging to the group

Update Group Name

We can update a single groups name.

Delete Group

We can remove the group associated with the handler.

Invite User

We can invite users to the current group by email and specify their access.

Remove User

We can remove users from the group by their email address.

Update User Access

We can update the users access level by their email address.

User Handler

The User Handler offers a way to interact with features for the authenticated user.

User Data

The User Handler will hold a data object with users information and invites.

Accept Invite

We can accept an invite by retrieving one from the data objects invites array"

Reject Invite

We can reject an invite by retrieving one from the data objects invites array:

Types

We have the following data types that we use response and request from the Omlet API

Action

The Action object provides the following details

Methods

Configuration

The Configuration object will give you an overview of the current configuration of the device after retrieval

Methods

Configuration Connectivity

The Configuration Connectivity object provides the following details

Methods

Configuration Door

The Configuration Door object provides the following details

Methods

Configuration General

The Configuration General object provides the following details

Methods

Configuration Light

The Configuration Light object provides the following details

Methods

Device

The Device object represents an individual SmartCoop device.

Methods

Group

The Group object represents a group the user belongs to.

Methods

Group Subset

Methods:

Group User

Methods

State

The State object will give you an overview of the current state of the device after retrieval

Methods

State Connectivity

The State Connectivity object provides the following details

Methods

State Door

The State Door object provides the following details

Methods

State General

The State General object provides the following details

Methods

State Light

The State Light object provides the following details

Methods

User

The User object represents the authenticated user.

Methods:


All versions of smartcoop-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
phpunit/phpunit Version ^10.0
guzzlehttp/guzzle Version ^7.0
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 omlet/smartcoop-sdk contains the following files

Loading the files please wait ....