GithubHelp home page GithubHelp logo

nistvan86 / espruino-cc1101-q7rf Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 369 KB

Use an ESP8266 and a TI CC1101 modem to control your Computherm/Delta Q7RF/Q8RF receiver equiped boiler.

JavaScript 4.59% TypeScript 95.41%
esp8266 iot espruino mqtt-smarthome cc1101

espruino-cc1101-q7rf's Introduction

Deprecated

This project is now deprecated and not maintained. It is superseded by the ESPHome custom component: https://github.com/nistvan86/q7rf-esphome


espruino-cc1101-q7rf

Use a NodeMCU (ESP8266) and a TI CC1101 modem to control your Computherm/Delta Q7RF/Q8RF receiver equiped boiler via MQTT.

Use this project at your own risk. I'm not responsible for any damage done. I haven't done any extensive testing with it. Bugs can cause unwanted behaviour and/or even damage your heating equipment, cause high heating bill, etc. Please be careful with testing. Reporting and/or fixing issues is always welcome.

Hardware

You need Espruino firmware version 2v04.76 or later. Get it from www.espruino.com and flash accordingly. A 4MB Flash equiped NodeMCU is required. If you use other boards, you might need to change the different pin settings in app.ts.

You need a CC1101 module which is tuned to 868 MHz. The chip on it's own can be configured for many targets, but the antenna design on the board needs to be tuned for the specific frequency in mind. I've used an extremely cheap $2 module from AliExpress which needed some cables and the antenna to be soldered.

CC1101 chip needs to be connected to the standard SPI pins of ESP8266 (secondary SPI PINs, the first set is used by the flash RAM module).

Connections:

alt text

alt text

NODEMCU               CC1101
============================
3.3V                  VCC
GND                   GND
D7 (GPIO13/HMOSI)     MOSI
D5 (GPIO14/HSCLK)     SCLK
D6 (GPIO12/HMISO)     MISO
D8 (GPIO15/HCS)       CSN

Setup and flash

In the project's directory create a copy of config.template.js as config.js and fill the necessary parameters.

Use npm install to get dependencies for this repository and then issue npm run flash to flash to the device. Probably you need to change the serial port used, this can be done in the package.json file, by the flash scripts's espruino command line arguments (default is /dev/ttyUSB0 but you can use Windows style COM1 as well).

Once flashed the device reboots and starts running the code. You can check the status over the USB serial connection (eg. using PuTTY or miniterm to connect to the serial port of the device, baud rate is 115200), but in case you don't have access to that, the NodeMCU's on board LED signals the different states:

  • Slow blink (1 sec on-off): the device is initializing. If this takes too long probably you have a bad connection to the CC1101.
  • Fast blink (0.5 sec on-off): there's some kind of error, like the CC1101 modem failed to initialize, or you have given bad WiFi credentials, check the serial output for errors.
  • Rapid blinking (0.1 sec on-off): the device disconnected from the MQTT broker, it will try to reconnect in 10 seconds, but if the problem persists, check your MQTT server or the config.

Device behaviour

Device will subscribe to the specified MQTT topic (q7rf/heating by default) and awaits commands from there. Messages are in plain text format. In your home automation system use these to trigger events.

  • ON - turn the heating on
  • OFF - turn the heating off

Since the protocol used is simplex, it's necessary to repeat the last command now and then so the receiver gets in sync in case a transmission error occurs. By default the last command is resent every 30 seconds. This interval can be altered in the config file.

Pairing with the receiver

Once the device settled you need to pair your device to the existing Computherm receiver. Press and hold the M/A button on the receiver until it starts flashing green. Now press the "Flash" button on your NodeMCU module. The receiver should stop blinking. The pairing is now completed.

If you wish to reset and use your original wireless thermostat, once again set the receiver into learning mode with the M/A button, then hold the SET + DAY button on your wireless thermostat until the blinking stops. The receiver only listens to the device currently paired.

In case you are operating multiple devices in the vicinity, you need to change the deviceId used inside the config.js file. This is a 16 bit value, so it's always 4 hexa characters long.

Research sources

espruino-cc1101-q7rf's People

Contributors

nistvan86 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.