Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Examples of controlling devices with an ESP8266 & an RF transmitter over MQTT and using Apple HomeKit via Homebridge

License

NotificationsYou must be signed in to change notification settings

hauni97/ESP8266-MQTT-RF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Controlling RF devices with anESP8266 & a RF transmitter overMQTT and usingApple HomeKit withHomebridge to use the Home app and Siri (Google's Android and Amazon's Alexa can also be used).

This project's primary goal is to use an ESP8266 with an RF transmitter for cost-effective upgrading to control existing standard RF controllable blinds.For this purpose, Somfy blinds were used to control over a command prompt and Apple's HomeKit via MQTT and the ESP8266 board.

Further Resources:

Step 1: Setting up the ESP8266

In this project, a microcontroller (Wemos mini ESP8266) was equipped with a 433 Mhz radio transmitter.The board was sketched using the Arduino software to upload the required files.

  1. A ticker will be required to call your functions.
  1. In addition, if you wish to communicate over the MQTT protocol, you will require a pub client such the one formNick O'Leary.

  2. Finally, a config file will also be required containing information about the MQTT server/ broker to connect (see more details in the next step) and your information to connect to your wifi.

Step 2: MQTT Setup

Setup of MQTT broker.

There are two main ways to approach this. You could either have your server, such as running it in your local network via a Raspberry Pi.A popular Python module calledPaho MQTT can be used

sudo pip install paho-mqtt

Alternatively, you can use an MQTT broker available such asCloudMQT .

Step 3: Scripts and Usage

In this project, scripts for command line usage were created using the Python paho-mqtt module.

Depending on the setup and use case, below is an example script (each action, such as stop, up, down has its own message/ script in MQTT):

importpaho.mqtt.clientasmqttclient=mqtt.Client()client.connect(“MQTTbrokeraddress",port,60)client.publish(“topic/for/blinds", "desiredmessagetotriggeraction");client.disconnect();

Setp 4: Utilizing Homebridge

Homebridge allows non-Apple-certified smart home devices to communicate with HomeKit for personal usage.Since the blinds will most likely be controlled throughout the day, it is advisable to run homebridge over raspberry pi; running homebridge over the computer will have the disadvantage of only working when your machine is running.

One plugin that was used in this project is:homebridge-blinds designed to control blinds over HTTP requests or the native command line.

The python scripts from the previous step should be used to use this plugin and must be sent (via SCP) to the raspberry pi if used.

Step 5: Control your blinds from your Apple device

Once your blinds are added to your homebridge config, they will appear in your HomeKit app when the bridge is added.

About

Examples of controlling devices with an ESP8266 & an RF transmitter over MQTT and using Apple HomeKit via Homebridge

Topics

Resources

License

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp