Skip to content

My Project

967 Topics 13.5k Posts

Show off and share your great projects here! We love pictures!

  • flic.io -> homeautomation -> Garage Door node

    11
    4 Votes
    11 Posts
    3k Views
    LiamL
    Looking for any information about these problems. I had a network failure and the garage door opener Chamberlain B970 stopped working. I already found and fixed the problem, but I really lost contact with the remote control. Your solutions are perfect for me. Thank you! P.S. I know it's an old topic, but I wanted to thank everyone involved. I've been looking for the right information for 2 hours and didn't expect to find it here.
  • 2AAA battery NRF24 Sensor PCB with ATmega 328p

    9
    1
    0 Votes
    9 Posts
    2k Views
    N
    @garystofer said in 2AAA battery NRF24 Sensor PCB with ATmega 328p: One could measure the VCC an other way not needing a voltage divider by configuring the ADC so that it uses the VCC as the reference and then measure the internal 1.1V reference. Yes this is how I do it, except even more extreme: I measure the battery voltage during the entire tx interval, and pick the lowest voltage (which, it turns out, is always the last measurement). So, I suspect the extreme method can be made more efficient by measuring just after Tx completes.
  • Help! feedback S_COVER status

    9
    0 Votes
    9 Posts
    910 Views
    G
    //#define MY_DEBUG #define MY_GATEWAY_ESP8266 #define MY_NODE_ID 9 #define MY_BAUD_RATE 9600 #define MY_WIFI_SSID "xxxxx" #define MY_WIFI_PASSWORD "xxxxxxxxxxx" #define MY_HOSTNAME "PortInt48" #define SKETCH_NAME "PortInt48" #define SKETCH_VERSION "2.4" #define SKETCH_NAME_PORT "Portão Interno" #define SKETCH_NAME_SENS_PORT_O "Sensor Portão Aberto" #define SKETCH_NAME_SENS_PORT_C "Sensor Portão Fechado" #define SKETCH_NAME_INFO "Estado do Portão" //#define SKETCH_NAME_BOTAO "Botão Portão Ext" #define MY_IP_ADDRESS 10,0,1,48 #define MY_IP_GATEWAY_ADDRESS 10,0,1,1 #define MY_IP_SUBNET_ADDRESS 255,255,255,0 #define MY_PORT 5003 #define MY_GATEWAY_MAX_CLIENTS 3 //#define MY_INCLUSION_MODE_FEATURE //#define MY_INCLUSION_MODE_DURATION 60 //#define MY_INCLUSION_MODE_BUTTON_PIN 5 // D1 #ifndef UNIT_TEST #include <Arduino.h> #endif #include <ESP8266WiFi.h> #include <SPI.h> #include <ArduinoOTA.h> #include <MySensors.h> #include <NewPing.h> #define CHILD_PORTAO_INT 1 #define CHILD_ID_SENSOR_A 2 #define CHILD_ID_SENSOR_TA 3 #define CHILD_ID_TEXT 4 #define RELE_PIN 13 //d7 #define ECHO_PIN 14 //d5 #define TRIGGER_PIN 12 //d6 #define CLOSED 0 #define OPEN 1 #define CLOSING 2 #define OPENING 3 #define MAX_DISTANCE 160 #define RELE_OFF 1 #define RELE_ON 0 int reverso = 3000; int lastDist = 0; int AverageDist = 0; int cState = 0; int lState = 0; int lLimit = 0; int Distx = 0; int lDistx = 0; int incomingBlindData = 0; int distmin = 13; int distmax = 80; int Level_FECHADO = 2; int Level_ABERTO = 2; int Level_CONTROLE = 23 ; int lastState = 0; int lastposition = 0; int aberto = 0; int abertototal = 0; boolean metric = true; boolean obstruction = false; const char *currentState[] = { "Fechado", "Aberto", "Fechando", "Abrindo" }; static int status = 0; // 0=cover is down, 1=cover is up static bool initial_state_sent = false; unsigned long lastsend = 0; unsigned long lastsendx = 0; enum State {STOP, UP, DOWN,}; static int State = STOP; NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); MyMessage msg_Porcent(CHILD_PORTAO_INT, V_PERCENTAGE); MyMessage msg_S_COVER_U(CHILD_PORTAO_INT, V_UP); MyMessage msg_S_COVER_D(CHILD_PORTAO_INT, V_DOWN); MyMessage msg_S_COVER_S(CHILD_PORTAO_INT, V_STOP); MyMessage msg_Aberto(CHILD_ID_SENSOR_A, V_TRIPPED); MyMessage msg_Aberto_Total(CHILD_ID_SENSOR_TA, V_TRIPPED); MyMessage msg_Text(CHILD_ID_TEXT, V_TEXT); void presentation() { sendSketchInfo(SKETCH_NAME, SKETCH_VERSION); // Send the sketch version information to the gateway and Controller present(CHILD_PORTAO_INT, S_COVER, SKETCH_NAME_PORT); // Register all sensors to gw (they will be created as child devices) present(CHILD_ID_SENSOR_A, S_DOOR, SKETCH_NAME_SENS_PORT_O); present(CHILD_ID_SENSOR_TA, S_DOOR, SKETCH_NAME_SENS_PORT_C); present(CHILD_ID_TEXT, S_INFO, SKETCH_NAME_INFO ); metric = getControllerConfig().isMetric; } void setup() { pinMode(RELE_PIN, OUTPUT); digitalWrite(RELE_PIN, RELE_OFF); //-------------------OTA---------------- ArduinoOTA.setHostname(MY_HOSTNAME); ArduinoOTA.onStart([]() { Serial.println("ArduinoOTA start"); }); ArduinoOTA.onEnd([]() { Serial.println("\nArduinoOTA end"); }); ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) { Serial.printf("OTA Progress: %u%%\r", (progress / (total / 100))); }); ArduinoOTA.onError([](ota_error_t error) { Serial.printf("Error[%u]: ", error); if (error == OTA_AUTH_ERROR) { Serial.println("Auth Failed"); } else if (error == OTA_BEGIN_ERROR) { Serial.println("Begin Failed"); } else if (error == OTA_CONNECT_ERROR) { Serial.println("Connect Failed"); } else if (error == OTA_RECEIVE_ERROR) { Serial.println("Receive Failed"); } else if (error == OTA_END_ERROR) { Serial.println("End Failed"); } }); ArduinoOTA.begin(); } void loop() { ArduinoOTA.handle(); calcDistx(); getState(); if (initial_state_sent == false) { sendState(); initial_state_sent = true; } if (millis() - lastsendx >= 20000) { sendState(); lastsendx = millis(); } if (lState != cState) { if ( (cState == OPEN) || (cState == CLOSED) ) { if (cState == OPEN) { status = 1; State = UP; aberto = 1; abertototal = 1; } else if (cState == CLOSED) { status = 0; State = DOWN; aberto = 0; abertototal = 0; } } if (cState == CLOSING) { status = 0; State = STOP; aberto = 1; abertototal = 0; } else if (cState == OPENING) { status = 0; State = STOP; aberto = 1; abertototal = 0; } else { //send(msg_Porcent.set(Distx)); } lState = cState; sendState(); } if ( digitalRead( RELE_PIN ) == 1) { relayOff(); } } void relayOff() { digitalWrite(RELE_PIN, RELE_OFF ); } void getState() { if (Distx >= distmax) { cState = OPEN; } else if (Distx <= distmin) { cState = CLOSED; } else if ((Distx < distmax) && (Distx > distmin)) { if (lState == OPEN) { cState = CLOSING; } else { cState = OPENING; } } } void receive(const MyMessage &message) { if (message.isAck()) { return; } incomingBlindData = atoi(message.data); if (message.sensor == CHILD_PORTAO_INT) { calcDistx(); if ((message.type == V_UP ) && (cState == OPENING)) { m_up(); wait(reverso); m_up(); wait(reverso); m_up(); } else if ((message.type == V_UP ) && (cState == CLOSING)) { m_up(); } else if ((message.type == V_UP ) && (cState == CLOSED)) { m_up(); } else if ((message.type == V_UP ) && (cState == OPEN)) { } else if ((message.type == V_DOWN) && (cState == OPEN)) { m_up(); } else if ((message.type == V_DOWN) && (cState == CLOSED)) { } else if ((message.type == V_DOWN) && (cState == CLOSING)) { m_up(); wait(reverso); m_up(); wait(reverso); m_up(); } else if ((message.type == V_DOWN) && (cState == OPENING)) { m_up(); wait(reverso); m_up(); } else if (message.type == V_STOP ) { m_up(); } else if ((incomingBlindData == 100) && (cState != OPEN)) { lastposition = 100; m_up(); } else if ((incomingBlindData == 0) && (cState != CLOSED)) { lastposition = 0; m_up(); } else if ((incomingBlindData > 0) && (incomingBlindData < 100)) { if ((cState == CLOSING) && (incomingBlindData > Distx)) { m_up(); while (Distx >= incomingBlindData) { calcDistx(); send(msg_Porcent.set(Distx)); } m_up(); } else if ((cState == OPENING) && (incomingBlindData < Distx)) { m_up(); while (Distx <= incomingBlindData) { calcDistx(); send(msg_Porcent.set(Distx)); } m_up(); } else if ((cState == OPENING) && (incomingBlindData > Distx)) { m_up(); wait(reverso); m_up(); wait(reverso); // m_up(); while (Distx >= incomingBlindData) { calcDistx(); send(msg_Porcent.set(Distx)); } m_up(); } else if ((cState == CLOSING) && (incomingBlindData < Distx)) { m_up(); wait(reverso); m_up(); wait(reverso); //m_up(); while (Distx <= incomingBlindData) { calcDistx(); send(msg_Porcent.set(Distx)); } m_up(); } else if ((cState == OPEN) && (incomingBlindData < Distx)) { m_up(); while (Distx >= incomingBlindData) { calcDistx(); send(msg_Porcent.set(Distx)); } m_up(); } else if ((cState == CLOSED) && (incomingBlindData > Distx)) { m_up(); while (Distx <= incomingBlindData) { calcDistx(); send(msg_Porcent.set(Distx)); } m_up(); } }*/ lastposition = incomingBlindData; sendState(); // Update Vera with status of blinds (up/down) } } void m_up() { digitalWrite(RELE_PIN, RELE_ON); // Change relay state wait(500); digitalWrite(RELE_PIN, RELE_OFF); exit; } void calcDistx() { for (int i = 0; i < 10; ++i) { AverageDist += metric ? sonar.ping_cm() : sonar.ping_in();; wait(10); } AverageDist /= 10; int dist = AverageDist; // Serial.println("Ping: "); Serial.print(dist); // Convert ping time to distance in cm and print result (0 = outside set distance range) // Serial.println(metric ? " cm" : " in"); if (dist != lastDist) { lastDist = dist; int Disty = map(lastDist, distmin, distmax, 0, 100); Distx = constrain(Disty, 0, 100); // Serial.print("Ping CONERTIDO: "); // Serial.print(Distx); // Convert ping time to distance in cm and print result (0 = outside set distance range) // Serial.println(metric ? " cm" : " in"); } } void sendState() { send( msg_Text.set( currentState[cState] ) ); send(msg_S_COVER_U.set(State == UP)); send(msg_S_COVER_D.set(State == DOWN)); send(msg_S_COVER_S.set(State == STOP)); send(msg_Aberto.set(aberto)); send(msg_Aberto_Total.set(abertototal)); send(msg_Porcent.set(Distx)); }
  • Introducing MySensors on nRF24LE1

    myscontroller nrf24le1 soc
    37
    11 Votes
    37 Posts
    33k Views
    Y
    @neverdie Thank you!
  • 1 Votes
    1 Posts
    387 Views
    No one has replied
  • 0 Votes
    1 Posts
    321 Views
    No one has replied
  • HM-TRP Gateway

    10
    1
    0 Votes
    10 Posts
    1k Views
    mfalkviddM
    Great work @chanky Would yo mind sharing the code changes, either through a pull request or here in the forum? Maybe others can benefit from and build on your work.
  • My experiences with MySensors

    32
    1 Votes
    32 Posts
    5k Views
    B
    @kimot said in My experiences with MySensors: And for "MESH" topology. Arduino "painlessMesh" library for ESPs exists WIll have a look at that too in the near future. Thanks for hinting me towards this. Boozz
  • Another Automatic Kettle Project

    1
    0 Votes
    1 Posts
    470 Views
    No one has replied
  • d-diot board v.2.0 ready!

    1
    0 Votes
    1 Posts
    350 Views
    No one has replied
  • Mini lightshow project ideas

    8
    0 Votes
    8 Posts
    1k Views
    N
    When you get trained you can pimp up the guitars like the one in this video, it's based on a nano :D https://www.youtube.com/watch?v=4vkzY3U7qts
  • Extension ir signal

    3
    0 Votes
    3 Posts
    701 Views
    M
    @mfalkvidd Thank you for your answer. I will give it a try for this price.
  • My Multisensor Project

    1
    1
    2 Votes
    1 Posts
    753 Views
    No one has replied
  • Best sensor for falling alert

    29
    0 Votes
    29 Posts
    5k Views
    D
    Not sure if it helps. I find this drop/tilt/vibration sensor https://bit.ly/2kZrZnV. And my personal advice is that you buy your dad a emergency watch with built-in heart rate detector. It would help a lot i think
  • Air particulate / dust sensor node

    2
    6
    1 Votes
    2 Posts
    669 Views
    N
    @simbo said in Air particulate / dust sensor node: The PMS7003 module is physically a bit of a pain as the intake / exhaust ports are on the same side as the connector If you are making a PCB you should take that opportunity to put a female header (1.27mm spacing) on it and plug the PMS7003 directly on the PCB: no adapter, no cable needed.
  • arduino ide says unable to compile on arduino what should i do

    6
    0 Votes
    6 Posts
    906 Views
    zboblamontZ
    @jasxvii Have a vague memory of coming across this error and found it linked to the library MyConfig being called, but as I went with a different sketch for that particular project did not investigate further. @mfalkvidd has considerably greater insight on the sequence of library calls, perhaps posting the sketch might help.
  • 0 Votes
    1 Posts
    347 Views
    No one has replied
  • Automatic Water Meter Reading with a Webcam

    15
    7 Votes
    15 Posts
    27k Views
    M
    There are several solutions for this kind of water reading but all are lacking something for my needs. I've been seeking for a solution which would combine best parts of different projects: https://github.com/ecsfang/WaterMeter accuracy of 0,125 litres by reading only 1 liter dial with 8 trigger points. Easy and this data would be sufficient combined with time stamps. https://github.com/jomjol/water-meter-measurement-system ESP32-CAM as camera and server running the OCR would be a lot cheaper than raspberry system. Usually someone building these have the server and really I wouldn't have any other needs for the Raspberry. Also this could be integrated ESPHome etc.? So it would be out of the box type design for ie. Home Assistant... https://olammi.iki.fi/sw/dialEye/ Possibility to define any IP web camera as source But I'm not any good at programming or coding... I'm not even sure if I describe my wishes correctly, please pardon me. Would I find someone interested enough to combine these three solutions? TL;DR water meter solution development request: 1 liter dial OCR with 8 trigger points ESP to server and server OCR software (prefer Ubuntu systems) MQTT publish and/or Home assistant compatibility via ESPhome or similar systems? Willing to throw in a coffee/beer or two for this matter... Regards, Matti
  • 0 Votes
    12 Posts
    2k Views
    M
    Package: YesUse: SwitchUse: Automated curtainsUse: UniversalUse: Electric DoorUse: TVUse: LightingChannel: 4Wireless Communication: RFBrand Name: QIACHIPFrequency: 433 MHzSupport APP: NoModel Number: KT16+480E*4Working Voltage: DC 3.3~5VEncoding Type: Learning EV1527Application example 1: Mandos a Distancia De Puertas De GarageApplication example 3: Garage Doors Access Control SsystemWorking Temperature: -25~75Use: Automated curtains,Universal,Switch,Electric DoReceiving Sensitivity: -108dBQuiescent Current: <5mAApplication example 2: Electronic Gates Access Control SystemApplication example 4: Electrical Appliances Control```
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    16 Views
    No one has replied

20

Online

12.0k

Users

11.2k

Topics

113.4k

Posts