Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

SomfyRemote allows you to control Somfy blinds using a simple web interface

License

Notifications You must be signed in to change notification settings

marcovolpato00/SomfyControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WARNING: this project is no more in active development.

SomfyControl for ESP8266

Introduction

SomfyRemote allows you to control Somfy blinds using a simple web interface. The entire system is built around an ESP8266 microcontroller and a cheap compatible 433.42 MHz remote like this. The remote has been hacked to be powered and controlled by the microcontroller.

Features

  • Web UI
  • Login protection (see here)
  • Alexa support
  • More coming...

Requirements

  • ESP8266 based development board
  • 433.42MHz remote like this
  • Wires, breadboard and stuff like that (depending on your needs)

Setup

Hardware

As mentioned above, I have hacked a 433.42MHz replacement remote compatible with the Somfy protocol in order to be easily controlled by the ESP8266 board. To program the remote just follow the instructions that comes with it.

The wiring is the following:

  • +3V: 3V3
  • GND: GND
  • button 1: GPIO 5
  • button 2: GPIO 4
  • button 3: GPIO 12
  • button 4: GPIO 12

Software

In config.json you will need to set your own preferences. The Sinric API key is mandatory only if you make use of the Alexa support. For more informations about the Alexa support take a look at here.

{
    "ssid": "YOUR_WIFI_SSID",
    "password": "YOUR_WIFI_PASSWORD",
    "web_username": "admin",
    "web_password": "password",
    "sinric_enabled": false,
    "sinric_api_key": "YOUR_SINRIC_API_KEY",
    "language": "en",
    "languages": {
        "en": "English",
        "it": "Italiano",
        "fr": "Française"
    }
}

The devices.json file defines all the devices you want to control. The button parameter defines the button on the remote you want to be pressed in order to control a specific device.

{
    "devices": [
        {
            "button": 1,
            "name": "Device 1",
            "description": "Bedroom's blind"
        },
        {
            "button": 2,
            "name": "Device 2",
            "description": "Kitchen's blind"
        }
    ]
}

Now you have to upload these two JSON file to the SPIFFS memory of the ESP8266. In order to do so, you have to install this plugin for the Arduino IDE, which allows you to upload the files inside the data folder. Follow the plugin's repo instruction and then upload the data.

Now it's time to upload the firmware itself and for doing so you have just to open SomfyControl sketch with the Arduino IDE and then do the usual stuff. Open the serial monitor and you will see the boot process. If all goes well, the board will connect to the WiFi network and then you can use the web UI with your browser. IMPORTANT: You should manually reset the board by pressing the RST button the first time you flash it in order to avoid this bug.

Security issues

The login protection isn't very secure because the ESP8266 isn't powerfull enough to handle HTTPS connections and the session cookie is unique for every user. This is a huge vulnerability because anyone can sniff the connection between you and the board, grabbing the cookie and logging in without needing to know the username and password. I will do my best to improve the security, but until then be very carefull exposing the board on the open internet and even on your home network.

Disclaimer

This project is still in heavy development stage, so I cannot guarantee it's fully working.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

SomfyRemote allows you to control Somfy blinds using a simple web interface

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published