Releases: arjenhiemstra/IthoEcoFanRFT
Version 3.0.0
Add RF send support for different types of itho remotes (RFT Auto, RFT DF/QF, RFT CO2, RFT RV, RFT PIR, RFT Auto-N)
use:
rf.updateRFDeviceType(RemoteType, RemoteIndex); //to set remote type
Possible remote types:
UNSETTYPE
RFTCVE
RFTAUTO
RFTAUTON
DEMANDFLOW
RFTRV
RFTCO2
RFTPIR
ORCON15LF01
RFT AutoN currently only supported in legacy mode
Version 2.2.1
Version 2.2.1
documentation pending
Version 2.1.0
Version 2.1.0:
Add support to receive and monitor itho RF-RFT and RF-RV remotes.
Add possibility to join devices (by join command or manually) to the lib and keep track of commands and values (co2, humidity, temp, battery)
New lib functions:
Manually add devices to the known devices list by ID:
bool addRFDevice(uint8_t byte0, uint8_t byte1, uint8_t byte2);
bool addRFDevice(uint32_t ID);
Manually remove devices to the known devices list by ID:
bool removeRFDevice(uint8_t byte0, uint8_t byte1, uint8_t byte2);
bool removeRFDevice(uint32_t ID);
Check if device is known by ID:
bool checkRFDevice(uint8_t byte0, uint8_t byte1, uint8_t byte2);
bool checkRFDevice(uint32_t ID);
Allow (true/false) if devices are able to register by sending a join command (standard value: true):
void setBindAllowed(bool input);
Get join allowed status:
bool getBindAllowed();
Allow (true/false) if all received itho remote commands are handled (standard value: true, for backwards compatibility)
void setAllowAll(bool input);
Get allowed all devices status:
bool getAllowAll();
Get reference to struct which contains all remotes and last known data (co2, temp etc.)
const struct ithoRFDevices &getRFdevices() const;
Sample code to walk to data and create a JSON:
DynamicJsonDocument doc(2000);
JsonObject root = doc.to<JsonObject>();
const ithoRFDevices &rfDevices = rf.getRFdevices();
for (auto& item : rfDevices.device) {
if (item.deviceId != 0) {
char buf[10];
snprintf(buf, sizeof(buf), "%02X,%02X,%02X", item.deviceId >> 16 & 0xFF, item.deviceId >> 8 & 0xFF, item.deviceId & 0xFF);
JsonObject nested = root.createNestedObject(buf);
nested["lastcmd"] = item.lastCommand;
if (item.co2 != 0xEFFF) {
nested["co2"] = item.co2;
}
if (item.temp != 0xEFFF) {
nested["temp"] = item.temp;
}
if (item.hum != 0xEFFF) {
nested["hum"] = item.hum;
}
if (item.dewpoint != 0xEFFF) {
nested["dewpoint"] = item.dewpoint;
}
if (item.battery != 0xEFFF) {
nested["battery"] = item.battery;
}
}
}
Example resulting JSON:
{"E0,58,45":{"lastcmd":4},"52,4E,9A":{"lastcmd":0},"97,95,A1":{"lastcmd":0,"temp":2079,"hum":52,"dewpoint":1062},"97,28,ED":{"lastcmd":0,"co2":1033}}
Version 2.0.2
fix: Restore ithoFull command
fix: Change arduino.h to Arduino.h
fix: change typo 0, 5 to 0.5
Version 2.0.1
Improve support for remote RFT AUTO C02 (536-0150)
Version 2.0.0
Complete rework of the itho packet section, cleanup and easier to understand, improved stability
-
Library structure is preserved, should be a drop in replacement (apart from device id)
-
Decode incoming messages to direct usable decimals without further bit-shifting
-
DeviceID is now 3 bytes long and can be set during runtime
-
Counter2 is now the decimal sum of all bytes in decoded form from deviceType up to the last byte before counter2 subtracted from zero.
-
Encode outgoing messages in itho compatible format
-
Added ICACHE_RAM_ATTR to 'void ITHOcheck()' for ESP8266/ESP32 compatibility
-
Trigger on the falling edge and simplified ISR routine for more robust packet handling
-
Move SYNC word from 171,170 further down the message to 179,42,163,42 to filter out more non-itho messages in CC1101 hardware
Tested on ESP8266 & ESP32