LightHub 4.6.0
Open-source smart home controller firmware
Loading...
Searching...
No Matches
in_hdc1080 Class Reference

HDC1080 temperature / humidity sensor input (IN_HDC1080 = 6). More...

#include <in_ccs811_hdc1080.h>

Inheritance diagram for in_hdc1080:

Public Member Functions

 in_hdc1080 (Input *_in)
int Setup () override
int Poll (short cause) override
Public Member Functions inherited from abstractIn
 abstractIn (Input *_in)
Public Member Functions inherited from abstractCh
 abstractCh ()
virtual ~abstractCh ()
virtual int Stop ()
virtual int Status ()
virtual void setStatus (uint8_t status)

Protected Member Functions

void printSerialNumber ()
Protected Member Functions inherited from abstractIn
int publish (long value, const char *subtopic=NULL)
int publish (float value, const char *subtopic=NULL)
int publish (char *value, const char *subtopic=NULL)
Protected Member Functions inherited from abstractCh
int publishTopic (const char *topic, long value, const char *subtopic=NULL)
int publishTopic (const char *topic, float value, const char *subtopic=NULL)
int publishTopic (const char *topic, const char *value, const char *subtopic=NULL, const char *suffix=NULL)

Additional Inherited Members

Protected Attributes inherited from abstractIn
Input * in
 Pointer to the Input (config entry) this driver is attached to.
friend Input

Detailed Description

HDC1080 temperature / humidity sensor input (IN_HDC1080 = 6).

Reads the humidity/temperature sensor over I2C at the fixed address 0x40. Polls on the slow polling cycle, resets the I2C bus on a read glitch, publishes the readings on the input "in" section and routes the humidity value to the "hum" key of the input object:

  • /T - temperature (Celsius);
  • /H - relative humidity (percent).

The measured humidity/temperature are also forwarded to the CCS811 sensor (when present) via setEnvironmentalData().

Constructor & Destructor Documentation

◆ in_hdc1080()

in_hdc1080::in_hdc1080 ( Input * _in)
inline

Member Function Documentation

◆ Poll()

int in_hdc1080::Poll ( short cause)
overridevirtual

Periodic poll hook.

Parameters
cause- POLLING_SLOW/POLLING_FAST/POLLING_INT/POLLING_1S

Reimplemented from abstractCh.

◆ printSerialNumber()

void in_hdc1080::printSerialNumber ( )
protected

◆ Setup()

int in_hdc1080::Setup ( )
overridevirtual

Initialize hardware and reserve resources.

Returns
0 on success.

Implements abstractCh.


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