Comments (9)
It depends how your lights work. DC or AC, PWM or current control, etc. There is no common way.
from arduino-homekit-esp8266.
I understand. However, from the configuration homekit_accessory_t *accessories[]
of the device, for a simple switch, in HomeKit app it only shows two states, how can I configure a dimmer.
If you have an example for a DC dimmer, I would very much appreciate, I think from There I can understand the logic and extend it
from arduino-homekit-esp8266.
Refer to the HAP doc. See legcy/simple_led to know how to define a light_bulb with brightness control.
from arduino-homekit-esp8266.
Thank you I will take a look
from arduino-homekit-esp8266.
anything new to make a brightness control with a switch
from arduino-homekit-esp8266.
Refer to the HAP doc. See legcy/simple_led to know how to define a light_bulb with brightness control.
I'm new to this project, why are all the LED examples legacy?
from arduino-homekit-esp8266.
You need to define your switch as a lightbulb instead if you want a dimmer control in HomeKit.
from arduino-homekit-esp8266.
this is my code so far, but i only get a switch, no dimming option on ios. any hints?
/*
* my_accessory.c
* Define the accessory in C language using the Macro in characteristics.h
*
* Created on: 2020-05-15
* Author: Mixiaoxiao (Wang Bin)
*/
#include <homekit/homekit.h>
#include <homekit/characteristics.h>
void my_accessory_identify(homekit_value_t _value) {
printf("accessory identify\n");
}
homekit_characteristic_t cha_on = HOMEKIT_CHARACTERISTIC_(ON, false);
homekit_characteristic_t cha_name = HOMEKIT_CHARACTERISTIC_(NAME, "Dimmer");
homekit_characteristic_t cha_bright = HOMEKIT_CHARACTERISTIC_(BRIGHTNESS, 50);
homekit_accessory_t *accessories[] = {
HOMEKIT_ACCESSORY(.id=1, .category=homekit_accessory_category_lightbulb, .services=(homekit_service_t*[]) {
HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {
HOMEKIT_CHARACTERISTIC(NAME, "Dimmer"),
HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Arduino HomeKit"),
HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "0123456"),
HOMEKIT_CHARACTERISTIC(MODEL, "ESP8266/ESP32"),
HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "1.0"),
HOMEKIT_CHARACTERISTIC(IDENTIFY, my_accessory_identify),
NULL
}),
HOMEKIT_SERVICE(SWITCH, .primary=true, .characteristics=(homekit_characteristic_t*[]){
&cha_on,
&cha_name,
&cha_bright,
NULL
}),
NULL
}),
NULL
};
homekit_server_config_t config = {
.accessories = accessories,
.password = "111-11-111"
};
from arduino-homekit-esp8266.
Your HOMEKIT_SERVICE needs to be “LIGHTBULB” not SWITCH
from arduino-homekit-esp8266.
Related Issues (20)
- LDR Light Sensor HOT 4
- Sensors looses Connection HOT 9
- HAPStatus call anyone
- New architecture HOT 3
- Compatibility issue with ios 16.6 HOT 5
- Use Homekit-ESP8266 to control a stepper driver. HOT 3
- Loosing accessories with iOS 16.7 and powerloss HOT 12
- Accesorry not showing up in the home app HOT 2
- Lock Management Auto Security Timeout
- hiding accessories HOT 6
- Disconnect on pair setup step 3/3 HOT 6
- Can't find device in HomeApp
- Gives code -2 HOT 1
- esp8266 [ Error compiling for board NodeMCU 1.0 (ESP-12E Module).] issue
- Implement temperature, humidity and 2 switches and oled 0.96 to monitor the sensors. HOT 5
- Accessories not respond
- Sensor Pin
- Please help me code DS18B20
- Doesnt work relay in D2 port
- How can I remove from the example several sensors that I don’t need?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-homekit-esp8266.