esp32-rgb-homebridgeA rgb led project for homebridge

联合创作 · 2023-09-26 10:05

ESP32 RGB LED for homebridge

This is a project made for homebridge-better-http-rgb on HomeBridge.

HTTP server implemented from lwip-allnetworks.

Sample HomeBridge config:

{
    "bridge": {
        "name": "Homebridge",
        "username": "B8:27:EB:F9:51:49",
        "port": 51826,
        "pin": "031-45-154"
    },

    "description": "Homebridge",

    "accessories": [
    {
        "accessory": "HTTP-RGB",
        "name": "RGB Led on ESP32",

        "switch": {
            "status": "http://192.168.1.115/cmd/status/",
            "powerOn": "http://192.168.1.115/cmd/on/",
            "powerOff": "http://192.168.1.115/cmd/off/"
        },

        "brightness": {
            "status": "http://192.168.1.115/cmd/brightness/",
            "url": "http://192.168.1.115/cmd/brightness:%s/"
        },

        "color": {
            "status": "http://192.168.1.115/cmd/color/",
            "url": "http://192.168.1.115/cmd/color:%s/",
            "brightness": true
        }
    }],

    "platforms": []
}

NOTICE0: Be sure to include "COMPONENT_LDFLAGS += -lstdc++" in Makefile in order to compile.

NOTICE1: Although I'm using C++ class, it doesn't mean that you can control multiple RGB LED simultaneously by creating multiple objects.

NOTICE2: I included support for ledc_fade function in ESP-IDF, but I strongly recommend not using it because it will jam the server thread.

浏览 2
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报