当前位置: 首页 > 软件库 > 其他开源 > 物联网 >

MQTT-AC-Controller

授权协议 Readme
开发语言 JavaScript
所属分类 其他开源、 物联网
软件类型 开源软件
地区 不详
投 递 者 逄学潞
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

ESP8266 Wifi AC Controller

header

Code for ESP8266 Microcontrollers that control my DIY Air-Conditioner remote. Code in this repo is intentionaly to use with Homebridge MQTT plugin on raspberry Pi.I made a circuit and enclosure by myself. I know that my circuit might need to add some resistors, feel free to edit it in your design.

Features

  • Display NTP Clock when standby.
  • Simple button control. Power, Temp up/down.
  • Can control temperature, swing, fan speed and mode with HomeKit.
  • Auto brightness according to ambient light.
  • OTA Firmware upgrade.
  • Control via HomeKit using HeaterCooler Service (iOS 11+)
  • Control via HomeKit(Below iOS 11), Amazon Alexa using Fan service because it does not support AC control.

Hardware

  • ESP8266 NodeMCU
  • OLED 256×64 SSD1332
  • LDR(Light Dependent Resistor)
  • Push Button
  • IR LED and LED (normal led for indicate when IR is emitting)
  • NPN Transistor BC338 - for increse voltage level for IR LED

schematic

Add this devices to Homebridge-MQTT

You can use program like MQTTLENS to send this command

Topic

homebridge/to/add

Payload

{
  "name": "Smart AC",
  "service_name": "smart_ac",
  "service": "HeaterCooler",
  "manufacturer": "ESP8266",
  "firmwarerevision": "1.0.0",
  "SwingMode": 1,
  "RotationSpeed": {"maxValue":3, "minValue": 0, "minStep": 3},
 "CoolingThresholdTemperature": {"maxValue":28, "minValue": 18, "minStep": 1}
}

Instruction

  1. I didn't made this project to supports all AC. It requires some modification to works with your AC. Please take a look at IRremoteESP8266 library which supports variety of AC brand.
  2. I developed this program with VSCode with PlatformIO plugin. Please install all missing libraries with PlaformIO
  3. Don't forget to change MQTT server ip address to match yours.
  4. For the first time, use Wifi setup to connect to your router.

Dependencies

  • PubSubClient
  • IRremoteESP8266
  • U8g2
  • WifiManager
  • ArduinoJson

Known issues

  • Schematics can be improved.
  • Interrupt can cause system crash.
  • 初始想法 需要在.net平台下进行MQTT客户端编程时,开源且简单的MQTTnet无疑是首选。但是MQTTnet的客户端中在编写应用消息处理的相关方法就有点繁琐了,一般来说一个订阅主题都应该对应一个处理方法,最简单粗暴的方法就是向下面这样用 if/else 或者 switch 硬写,这样不仅代码丑陋还不便扩展。 public async Task Run(string clientId) {

 相关资料
  • homebridge-lg-thinq-ac Homebridge plugin for LG ThinQ-enabled portable air conditioners. WARNING: This has only been tested with the LP1419IVSM model. This may not work with other models. Installation

  • MQ 遥测传输 (MQTT) 是轻量级基于代理的发布/订阅的消息传输协议,设计思想是开放、简单、轻量、易于实现。这些特点使它适用于受限环境。例如,但不仅限于此: 网络代价昂贵,带宽低、不可靠。 在嵌入设备中运行,处理器和内存资源有限。 该协议的特点有: 使用发布/订阅消息模式,提供一对多的消息发布,解除应用程序耦合。 对负载内容屏蔽的消息传输。 使用 TCP/IP 提供网络连接。 有三种消息发布服

  • 一、简介 mica-mqtt 基于 t-io 实现的简单、低延迟、高性能 的 mqtt 物联网开源组件。 二、功能 支持 MQTT v3.1、v3.1.1 以及 v5.0 协议。  支持 websocket mqtt 子协议(支持 mqtt.js)。  支持 http rest api,http api 文档详见。  支持 MQTT client 客户端。  支持 MQTT server 服务端。

  • JFinal-mqtt是一个基于paho-mqtt-client的JFinal插件,该插件简化了paho-mqtt-client的参数配置、订阅、发布等操作,提供断线重连功能。

  • IKEA motorize blinds Code for ESP8266 Microcontrollers that control DIY motorized blids made from IKEA TUPPLUR blinds. Code in this repo is intentionaly to use with Homebridge MQTT plugin on raspberry

  • MQTT X 是 EMQ 开源的一款跨平台 MQTT 5.0 客户端工具,它支持 macOS, Linux, Windows,并且支持 MQTT 消息格式转换。 MQTT X 的用户界面借助聊天软件的形式简化了页面的操作逻辑,用户可以快速创建连接保存并同时建立多个连接客户端,方便用户快速测试 MQTT/TCP、MQTT/TLS、MQTT/WebSocket 的 连接/发布/订阅 功能及其他特性。