This repo is a copy of the https://github.com/madmartin/Jarolift_MQTT code with changes made to allow control of Somfy shades via a Sonoff Basic ESP8266 based device and a programmable tranceiver based on the CC1101 chip. As of now, the code is all still the same as madmartin's with just some rearranging for use with platformio. In other words, it won't work at all for its intended purpose yet.
Controlling Jarolift(TM) TDEF 433MHz radio shutters via ESP8266 and CC1101 Transceiver Module in asynchronous mode. Experimental version. Use at your own risk. For private/educational use only. (Keeloq algorithm licensed only to TI Microcontrollers) This project is not affiliated in any way with the vendor of the Jarolift components. Jarolift is a Trademark of Schöneberger Rolladenfabrik GmbH & Co. KG
This is the MQTT version of Jarolift_RX_TX_FHEM, which was originally developed to operate with the FHEM home automation server. You find the original FHEM version on the project's homepage.
Written by Steffen Hille in Nov, 2017
The project home is here: Project Home If you need support please use the forum Project Forum
The main code of Jarolift_MQTT is licensed under the GPLv3. The provided libraries have different licenses, look into the respective files for more information.
- CC1101 library LGPL-License
- DoubleResetDetector MIT License
- Keeloq library unknown License
- PubSubClient-2.6.09 "AS-IS"-License
- simpleDSTadjust unknown License
- a NodeMCU board or similar, based on ESP8266 microcontroller
- a CC1101 Transmitter board
- some connection cables
Photos and hints on project home website
Download an install the Arduino IDE from Arduino website (as time of writing the current version is 1.8.5)
Locate your arduino sketch directory - this is $HOME/Arduino/
in linux
Download and / or unpack this project folder to a subfolder of this sketch directory
Locate the user library folder of your arduino sketch directory
Default under linux: $HOME/Arduino/libraries/
- copy the folder
DoubleResetDetector
to the arduino library folder - copy the folder
PubSubClient-2.6.09
to the arduino library folder - copy the folder
KeeloqLib
to the arduino library folder - copy the folder
simpleDSTadjust
to the arduino library folder
Open the Arduino IDE and open the project .ino file (Jarolift_MQTT.ino
)
TODO write a more detailed description
In menu "Tools" set the correct board type. If you have any kind of NodeMCU, the board
NodeMCU 1.0 (ESP-12E Module
will probably work.
The following settings have proofed to work with a NodeMCU v1.0/V2 comparison of boards
- Board: "NodeMCU 1.0 (ESP-12E Module)"
- Flash Size: "4M (1M SPIFFS)"
- lwIP variant: "v2 Lower Memory"
- CPU Frequency: "80 MHz"
- Upload speed: "115200"
Dont forget to set the correct serial port (Tools->Port) after plugging the USB connector of the NodeMCU into the computer.
Upload the compiled sketch into the NodeMCU. Second, you need to upload the files from the data directory into the SPIFFS area. This is only necessary on first use of the NodeMCU and then only after the content of the files has changed.
ESP8266FS is a tool which integrates into the Arduino IDE. It adds a menu item to Tools menu for uploading the contents of sketch data directory into ESP8266 flash file system.
- Download the SPIFFS tool
- In your Arduino sketchbook directory, create
tools
directory if it doesn't exist yet - Unpack the tool into
tools
directory (the path will look like$HOME/Arduino/tools/ESP8266FS/tool/esp8266fs.jar
) - Restart Arduino IDE
- Open the Jarolift_MQTT sketch
- Make sure you have selected a board, port, and closed Serial Monitor
- Select Tools > ESP8266 Sketch Data Upload. This should start
uploading the files into ESP8266 flash file system. When done, IDE
status bar will display
SPIFFS Image Uploaded
message.
ESP | CC1101 | Remark |
---|---|---|
D8 | CSN | |
D2 | GDO0 | (perhaps 1Kohm to GND) |
D1 | GDO2 | |
D6 | SO(GDO1) | |
D5 | SCLK | |
D7 | SI | |
GND | GND | |
VCC | VCC | 3.3 Volt !!! |
The configuration of the Jarolift Dongle is stored in the EEPROM memory of the ESP8266. On first initialisation, when no configuration is found, it is initialized with some default values and the Dongle turns on the Admin-Mode.
In Admin-Mode, the blue LED on the ESP submodule is turned on and the Dongle creates an WLAN-Access-Point with the SSID Jarolift-Dongle
, protectet with the WPA-Passwort 12345678
. Now you have 180 seconds (3 minutes) time to connect to the WLAN Accesspoint and visit the configuration webserver on
Admin-Mode quits after the 180 second timeout or when you restart the Dongle from the configuration webserver.
If you need the Admin-Mode later, just press the "Reset" button on the NodeMCU module two times within 10 seconds. This double-reset will be detected and the Dongle enters Admin-Mode again, showing this with the blue LED turned on.
The running Jarolift Dongle does some debug output on the serial console. Console Speed is 115200 Bit/s
- after flashing the NodeMCU board, on the first run of the fresh flashed sketch, any kind of restart (through WebUI or after a crash) of the ESP8266 may not properly work, causes the NodeMCU board board to hang. On the serial monitor, you see output like
handleFileRead: /favicon.png
[INFO] - Writing Config to EEPROM
ets Jan 8 2013,rst cause:2, boot mode:(1,6)
ets Jan 8 2013,rst cause:4, boot mode:(1,6)
wdt reset
-
this is a hardware issue, solution: power cycle your NodeMCU after flashing, pressing the reset button is not sufficient
-
sometimes opening the "system" page in the WebUI causes a crash (Exception 28) of the ESP8266. The cause is not found yet.
You can contribute to Jarolift_MQTT by
- providing Pull Requests (Features, Proof of Concepts, Language files or Fixes)
- testing new released features and report issues
- please try to follow the Style-Guide another Style-Guide