BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
BeeeOn::TabuLumenSmartLite Class Reference

The class represents Tabu Lumen TL 100S Smart Light. It allows to control all its modules. More...

#include <TabuLumenSmartLite.h>

Inheritance diagram for BeeeOn::TabuLumenSmartLite:
BeeeOn::BLESmartDevice BeeeOn::PollableDevice BeeeOn::Loggable

Public Types

typedef Poco::SharedPtr
< TabuLumenSmartLite
Ptr
 
- Public Types inherited from BeeeOn::BLESmartDevice
typedef Poco::SharedPtr
< BLESmartDevice
Ptr
 
- Public Types inherited from BeeeOn::PollableDevice
typedef Poco::SharedPtr
< PollableDevice
Ptr
 

Public Member Functions

 TabuLumenSmartLite (const MACAddress &address, const Poco::Timespan &timeout, const RefreshTime &refresh, const HciInterface::Ptr hci)
 
std::list< ModuleTypemoduleTypes () const override
 
std::string productName () const override
 
std::string vendor () const override
 
void requestModifyState (const ModuleID &moduleID, const double value) override
 Modifies the device module given by moduleID to a given value. More...
 
- Public Member Functions inherited from BeeeOn::BLESmartDevice
 BLESmartDevice (const MACAddress &address, const Poco::Timespan &timeout, const RefreshTime &refresh, const HciInterface::Ptr hci)
 
DeviceID id () const override
 
RefreshTime refresh () const override
 Regular period telling how often to call the method PollableDevice::poll(). The refresh must contain a valid time.
 
MACAddress macAddress () const
 
virtual void pair (Poco::SharedPtr< HciInterface::WatchCallback > callback)
 When the device supports processing of advertising data, it should call a watch() on the given HciInterface in this method and a unwatch() in the destructor. When the method is re-called it do not have any effect.
 
virtual bool pollable () const
 Returns true if the device is pollable, otherwise false.
 
void poll (Distributor::Ptr distributor) override
 Perform polling for data and ship them via the given distributor.
 
virtual SensorData parseAdvertisingData (const std::vector< unsigned char > &data) const
 Transforms advertising data to SensorData. More...
 

Static Public Member Functions

static bool match (const std::string &modelID)
 

Protected Member Functions

void modifyStatus (const int64_t value, const HciInterface::Ptr hci)
 
void modifyBrightness (const int64_t value, const HciInterface::Ptr hci)
 
void modifyColor (const int64_t value, const HciInterface::Ptr hci)
 
void writeData (const std::vector< unsigned char > &data, const HciInterface::Ptr hci) const
 
std::vector< uint8_t > authorizationMessage () const
 Returns authorization message that must be sent to the device after connection so that it can be manipulated with the device.
 
void encryptMessage (std::vector< uint8_t > &data) const
 
void decryptMessage (std::vector< uint8_t > &data) const
 
- Protected Member Functions inherited from BeeeOn::Loggable
void setupLogger (Poco::Logger *logger=0) const
 
Poco::Logger & logger () const
 
 Loggable (const ClassInfo &info)
 
 Loggable (const std::type_info &info)
 

Additional Inherited Members

- Static Protected Member Functions inherited from BeeeOn::Loggable
static Poco::Logger & forMethod (const char *name)
 
static Poco::Logger & forClass (const ClassInfo &info)
 
static Poco::Logger & forClass (const std::type_info &info)
 
template<typename T >
static Poco::Logger & forInstance (const T *i)
 
static void configureSimple (Poco::Logger &logger, const std::string &level)
 
static void logException (Poco::Logger &logger, const Poco::Message::Priority priority, const Poco::Exception &e, const char *file, size_t line)
 
- Protected Attributes inherited from BeeeOn::BLESmartDevice
DeviceID m_deviceId
 
MACAddress m_address
 
Poco::Timespan m_timeout
 
RefreshTime m_refresh
 
HciInterface::Ptr m_hci
 

Detailed Description

The class represents Tabu Lumen TL 100S Smart Light. It allows to control all its modules.

Member Function Documentation

void TabuLumenSmartLite::encryptMessage ( std::vector< uint8_t > &  data) const
protected

Encrypting and decrypting message is taken from https://github.com/mrquincle/luminosi/blob/master/web.js

void TabuLumenSmartLite::requestModifyState ( const ModuleID moduleID,
const double  value 
)
overridevirtual

Modifies the device module given by moduleID to a given value.

Exceptions
IOExceptionin case of communication failure.
NotImplementedExceptionif the device does not support modification of its state.

Reimplemented from BeeeOn::BLESmartDevice.


The documentation for this class was generated from the following files: