maccoylton / esp-homekit-multi-sensor Goto Github PK
View Code? Open in Web Editor NEWHomekit muti sensor, motion, temperate, humidity and light with OTA
License: Apache License 2.0
Homekit muti sensor, motion, temperate, humidity and light with OTA
License: Apache License 2.0
Hi @maccoylton,
I was wondering if you'd consider creating homekit firmware for sonoff ifan02?
what esp board you using for esp-homekit-multi-sensor?
Hi,
Could you add led blink when it be pooling light?
For Esp12E on board led connected to gpio 2. So,
First: #define LED_GPIO 13 should change as #define LED_GPIO 2
Second: You can call a led_code function at the end of that task
void light_sensor_task(void *_args) {
// thaks to https://github.com/peros550/esp-homekit-multiple-sensors/blob/master/examples/multiple_sensors/multiple_sensors.c
int loop_count = 60;
uint16_t analog_light_value;
while (1) {
analog_light_value = sdk_system_adc_read();
//The below code does not produce accurate LUX readings which is what homekit expects. It only provides an indication of brightness on a scale between 0 to 1024
//More work needs to be done so that accurate conversation to LUX scale can take place. However this is strongly dependent on the type of sensor used.
//In my case I used a Photodiode Light Sensor
currentAmbientLightLevel.value.float_value = (1024 - analog_light_value);
homekit_characteristic_notify(¤tAmbientLightLevel, HOMEKIT_FLOAT((1024 - analog_light_value)));
printf ("%s: Light level: %i\n", __func__, (1024 - analog_light_value));
if (loop_count == 10){
snprintf (post_string, 150, "sql=insert into homekit.lightsensorlog (LightSensorName, LightLevel) values ('%s', %f)", accessory_name, currentAmbientLightLevel.value.float_value);
printf ("%s: Post String: %s\n", __func__, post_string);
vTaskResume( http_post_tasks_handle );
loop_count = 0;
}
vTaskDelay(5000 / portTICK_PERIOD_MS);
// FOR EXAMPLE HERE //
loop_count ++;
}
}
I have designed a custom device with esp12e which is the most popular esp8266 module. I have put it in the box which I have designed as well. The box has transparent face and when the led of esp flickering, box look so nice. Indeed, sometimes, Esp crashes, I don't know why. So, It can help me to see If there is no led blink, I should do something for device.
P.s: Unfortunately, there is no any chance to connect a led to default pin, gpio 13. I can only use on board led of esp. That's why I want that you change it.
Can`t find qr code?
Your projects are very nice but, Please give more information about for your whole projects.
Such as, for this project, Read me doesn't give these answers of questions at below.
Thanks. โ๐ป
Hello there. First of all, I apologize for my bad english. I am very new to Arduino and ESP8266 yet. When I try to add a library through the Arduino program, I get an error. I am attaching the link of the library I want to add. Maybe the file I'm trying to add isn't even a library. If this is not a library, how can I use files of this type?
I am living same issue with that: maccoylton/esp-homekit-air-quality-sensor#9
I cloned it with that code: git clone --recursive https://github.com/maccoylton/esp-homekit-multi-sensor.git .
Then, entered src folder and tried to execute that code: make -C . test
Result:
vagrant@vagrant-ubuntu-trusty-64:~/esp-homekit-demo/examples/esp-homekit-multi-sensor/src$ make -C . test
make: Entering directory `/home/vagrant/esp-homekit-demo/examples/esp-homekit-multi-sensor/src'
/home/vagrant/esp-open-rtos/common.mk:223: /home/vagrant/esp-homekit-demo/examples/esp-homekit-multi-sensor/components/esp-homekit/component.mk: No such file or directory
make: *** No rule to make target `/home/vagrant/esp-homekit-demo/examples/esp-homekit-multi-sensor/components/esp-homekit/component.mk'. Stop.
make: Leaving directory `/home/vagrant/esp-homekit-demo/examples/esp-homekit-multi-sensor/src'
vagrant@vagrant-ubuntu-trusty-64:~/esp-homekit-demo/examples/esp-homekit-multi-sensor/src$
Hi,
I did your project via OTA programming way at my home and It worked very well but I think, light sensor pooling time is too high. It reads around every 30 seconds.
Why is it too high? Is there any way to decrease it around 5 sec. or more less? And if you update it on your GitHub page, my device automatically update itself?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.