BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
The class represents Sonoff SC device. The class allows to process the messages from the Sonoff SC with the custom firmware (https://github.com/xbedna62/SonoffSC_firmware.git). Its modules are temperature, humidity, noise, dust and light. More...
#include <SonoffSC.h>
Public Types | |
typedef Poco::SharedPtr< SonoffSC > | Ptr |
Public Types inherited from BeeeOn::SonoffDevice | |
typedef Poco::SharedPtr < SonoffDevice > | Ptr |
Public Member Functions | |
SonoffSC (const DeviceID &id, const RefreshTime &refresh) | |
SensorData | parseMessage (const MqttMessage &message) override |
Parses the MQTT message from the Sonoff SC and creates from it SensorData. More... | |
Public Member Functions inherited from BeeeOn::SonoffDevice | |
SonoffDevice (const DeviceID &id, const RefreshTime &refresh, const std::string &productName, const std::list< ModuleType > &moduleTypes) | |
DeviceID | id () const |
RefreshTime | refreshTime () const |
std::list< ModuleType > | moduleTypes () const |
std::string | vendor () const |
std::string | productName () const |
Poco::Timestamp | lastSeen () const |
Static Public Attributes | |
static const std::string | PRODUCT_NAME = "SC" |
Static Public Attributes inherited from BeeeOn::SonoffDevice | |
static const std::string | VENDOR_NAME = "Sonoff" |
Additional Inherited Members | |
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::SonoffDevice | |
const DeviceID | m_deviceId |
RefreshTime | m_refresh |
std::string | m_productName |
std::list< ModuleType > | m_moduleTypes |
Poco::Timestamp | m_lastSeen |
The class represents Sonoff SC device. The class allows to process the messages from the Sonoff SC with the custom firmware (https://github.com/xbedna62/SonoffSC_firmware.git). Its modules are temperature, humidity, noise, dust and light.
|
overridevirtual |
Parses the MQTT message from the Sonoff SC and creates from it SensorData.
Example of MQTT message: { temperature: 20, humidity: 50, noise: 30, dust: 2.35, light: 60 }
Implements BeeeOn::SonoffDevice.