|
LightHub 4.6.0
Open-source smart home controller firmware
|
#include "owTerm.h"#include <Arduino.h>#include "utils.h"#include "options.h"#include "main.h"#include "aJSON.h"Functions | |
| void | owSearch () |
| Triggers a 1-Wire device search/update. | |
| bool | zero (const uint8_t *addr, uint8_t len) |
| char * | getReadableNote (aJsonObject *owObj) |
| void | processTemp (aJsonObject *owObj, float currentTemp) |
| int | owUpdate () |
| Scans the 1-Wire bus and logs the devices it finds. | |
| int | owSetup () |
| Initializes the 1-Wire bus and the temperature sensors, and applies the configured resolution. | |
| int | sensors_loop (void) |
| void | owLoop () |
| Periodic poll: reads each configured sensor and publishes its temperature to the item's /val subtopic. | |
| void | setupOwIdle (void(*ptr)()) |
| Registers an idle callback invoked between 1-Wire operations. | |
Variables | |
| aJsonObject * | owArr |
| aJsonObject * | dev2Check = NULL |
| OneWire * | oneWire = NULL |
| 1-Wire bus handle (DS2482 bridge or software pin driver). | |
| DallasTemperature * | sensors = NULL |
| DallasTemperature manager on top of the 1-Wire bus. | |
| unsigned long | owTimer = 0 |
| char * getReadableNote | ( | aJsonObject * | owObj | ) |
| void owLoop | ( | ) |
Periodic poll: reads each configured sensor and publishes its temperature to the item's /val subtopic.
| void owSearch | ( | ) |
Triggers a 1-Wire device search/update.
| int owSetup | ( | ) |
Initializes the 1-Wire bus and the temperature sensors, and applies the configured resolution.
| int owUpdate | ( | ) |
Scans the 1-Wire bus and logs the devices it finds.
| void processTemp | ( | aJsonObject * | owObj, |
| float | currentTemp ) |
| int sensors_loop | ( | void | ) |
owUpdate(); //every check circle - scan for new devices
| void setupOwIdle | ( | void(* | ptr )() | ) |
Registers an idle callback invoked between 1-Wire operations.
| ptr | Function to call while the bus is idle. |
| bool zero | ( | const uint8_t * | addr, |
| uint8_t | len ) |
| aJsonObject* dev2Check = NULL |
| OneWire* oneWire = NULL |
1-Wire bus handle (DS2482 bridge or software pin driver).
|
extern |
| unsigned long owTimer = 0 |
| DallasTemperature* sensors = NULL |
DallasTemperature manager on top of the 1-Wire bus.