Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework of the itho packet section, cleanup and easier to understand, improved stability #11

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Commits on Feb 12, 2021

  1. Complete rework of the itho packet section, cleanup and easier to und…

    …erstand
    
       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 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
    arjenhiemstra committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    c94ff29 View commit details
    Browse the repository at this point in the history
  2. Readme update

    arjenhiemstra committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    bad0ba7 View commit details
    Browse the repository at this point in the history
  3. Add initReceive() to init()

    Implemented basic incoming message validity check
    arjenhiemstra committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    0a27b8f View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2021

  1. Sync bytes update

    reverted to 16 bits but a few byes further down the message than the original lib
    arjenhiemstra committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    1182326 View commit details
    Browse the repository at this point in the history
  2. CRC filter optional

    arjenhiemstra committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    8b28acc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0cd4297 View commit details
    Browse the repository at this point in the history
  4. Decode incoming data on even and odd bits for improved redundancy.

    The even bits are always the inverse of the odd bits, use this principle to improve stability of the itho command check
    arjenhiemstra committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    4abd9a0 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2021

  1. Improve support for remote RFT AUTO C02 (536-0150)

    Clean up some of the logging code
    arjenhiemstra committed Mar 21, 2021
    Configuration menu
    Copy the full SHA
    89f1a1a View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2021

  1. fix: Restore ithoFull command

    fix: Change arduino.h to Arduino.h
    fix: change typo 0, 5 to 0.5
    arjenhiemstra committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    e1e4590 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2021

  1. Version 2.1.0

    feat: Add support to receive and monitor itho RF-RFT and RF-RV remotes.
    feat: 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 is 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 allowed to join (standard value: true):
    void setBindAllowed(bool input);
    
    Get join allowed status:
    bool getBindAllowed();
    
    Receive and handle all devices (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}}
    ```
    arjenhiemstra committed Oct 16, 2021
    Configuration menu
    Copy the full SHA
    af22e30 View commit details
    Browse the repository at this point in the history
  2. Update README.md

    arjenhiemstra authored Oct 16, 2021
    Configuration menu
    Copy the full SHA
    cafa935 View commit details
    Browse the repository at this point in the history
  3. Update README.md

    arjenhiemstra authored Oct 16, 2021
    Configuration menu
    Copy the full SHA
    c4f8ae0 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2023

  1. Version 2.2.1

    - fix: bugs in example
    - fix: initialise buffers to known value
    - fix: includes
    - fix: command bytes matching to be more specific
    - fix: remove sprintf calls and replace them with snprintf
    - change: standby command removed and replaced by away command
    - feat: add support to receive different RF device types (RFT AUTO, RFT DF/QF, RFT CO2, RFT RV, preliminary Orcon support)
    - feat: add command to name logging function
    arjenhiemstra committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    d06fec9 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2024

  1. Update example

    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
    arjenhiemstra committed Feb 17, 2024
    Configuration menu
    Copy the full SHA
    d53a9e9 View commit details
    Browse the repository at this point in the history