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

The class represents a standalone device Conrad Power meter switch. It allows to communicate with the device via Conrad interface. More...

#include <PowerMeterSwitch.h>

Inheritance diagram for BeeeOn::PowerMeterSwitch:
BeeeOn::ConradDevice BeeeOn::Loggable

Public Types

typedef Poco::SharedPtr
< PowerMeterSwitch
Ptr
 
- Public Types inherited from BeeeOn::ConradDevice
typedef Poco::SharedPtr
< ConradDevice
Ptr
 

Public Member Functions

 PowerMeterSwitch (const DeviceID &id, const RefreshTime &refresh)
 
void requestModifyState (const ModuleID &moduleID, const double value, FHEMClient::Ptr fhemClient) override
 
SensorData parseMessage (const Poco::JSON::Object::Ptr message) override
 Parses the message from Conrad interface and creates from it SensorData. More...
 
- Public Member Functions inherited from BeeeOn::ConradDevice
 ConradDevice (const DeviceID &id, const RefreshTime &refresh, const std::string &productName, const std::list< ModuleType > &moduleTypes)
 
DeviceID id () const
 
RefreshTime refreshTime () const
 
std::list< ModuleTypemoduleTypes () const
 
std::string vendor () const
 
std::string productName () const
 

Static Public Attributes

static const std::string PRODUCT_NAME = "HM-Es-PMSw1-PI"
 
- Static Public Attributes inherited from BeeeOn::ConradDevice
static const std::string VENDOR_NAME = "Conrad"
 

Additional Inherited Members

- Static Public Member Functions inherited from BeeeOn::ConradDevice
static std::string constructFHEMDeviceId (const DeviceID &id)
 Returns FHEM device id constructed from a given DeviceID.
 
- Protected Member Functions inherited from BeeeOn::ConradDevice
bool isNumber (const std::string &s)
 Returns true or false depending if the string is number or not.
 
- 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)
 
- 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::ConradDevice
const DeviceID m_deviceId
 
RefreshTime m_refresh
 
std::string m_productName
 
std::list< ModuleTypem_moduleTypes
 

Detailed Description

The class represents a standalone device Conrad Power meter switch. It allows to communicate with the device via Conrad interface.

Member Function Documentation

SensorData PowerMeterSwitch::parseMessage ( const Poco::JSON::Object::Ptr  message)
overridevirtual

Parses the message from Conrad interface and creates from it SensorData.

Message example: { "channels" : { "Main" : "CMDs_done", "Pwr" : "32.6", "SenF" : "50.02", "SenI" : "0", "SenPwr" : "0", "SenU" : "239.4", "Sw" : "off" }, "dev" : "HM_38D649", "event" : "message", "model" : "HM-ES-PMSW1-PL", "raw" : "A1478845E38D6490000008001460000000000095A02", "rssi" : -35.5, "serial" : "MEQ0106579", "type" : "powerMeter" }

Implements BeeeOn::ConradDevice.


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