Skip to content

My Project

Show off and share your great projects here! We love pictures!
961 Topics 13.4k Posts
  • Need some help with a Multi-Sensor Node

    2
    1 Votes
    2 Posts
    1k Views
    mfalkviddM
    @drock1985 the comparison for the tripped check is commented out, so it will send values every time. Uncomment it :) If that doesn't help, please post the debug output of the node.
  • Automated folding blinds

    1
    1 Votes
    1 Posts
    902 Views
    No one has replied
  • 0 Votes
    2 Posts
    2k Views
    solaS
    Hi paqor, I would like to build something similar to your multifunction node. The URL pointing to the project seems to be broken. Could you correct it or copy the info about your project here?
  • My basement flooding alarm

    14
    6 Votes
    14 Posts
    6k Views
    micahM
    Nice build, and great idea using the ultra sonic sensor. This sort of thing was the exact reason I got into arduino and eventually mysensors. I had a concern about a damp basement and went looking for a water leak detection alarm but the prices were so high at the time... eventually I stumbled upon arduino and the obsession went from there. The first node I ever made was a water leak detection system that used the 4cm thing mentioned above... then I realized I had all these left over pins ;) so I filled them up with a gas, flame, temperature, humidity and light sensor. Forget nest protect and commercial water leak detection systems... I now have an all in one DIY solution that probably only cost $30
  • Chicken house door controller (beta)

    1
    1 Votes
    1 Posts
    902 Views
    No one has replied
  • Fire pit RGB striplight controller

    12
    5 Votes
    12 Posts
    6k Views
    micahM
    @Boots33 I've fried a couple pro mini's and a nano running 12v to the vin/raw... actually in one case it might have been up to 15v .... oops. But I've since learned my lesson.... I now use a Linear Voltage Regulator between the source and the arduino for all my builds that have a higher voltage power source (i.e.: builds that run lights). Typically a L7805CV or L7809CV or L7810CV (or other) depending on the voltage of my source and what I want to send to the arduino. Here is an example L7809CV from AliExpress
  • 5 Votes
    29 Posts
    21k Views
    BulldogLowellB
    Wow this is an old topic! But... I was working on a project and thought that anyone who was looking for a NeoPixel candle example that isn't blocking, well this would be the place. It flickers and flutters like a real candle. The only thing is that the flame isn't illuminated like these nice Luminaras, but I'm too cheap to buy them! Keep in mind that my example here uses GRB LEDs, but you merely need to reorder the variables in order to get this working for RGB. Plus the Time Library is not Arduino, so you will have to play with that too for a good randomSeed(). It looks pretty realistic with even a single neoPixel in a sheet of A4 paper rolled into a cylinder. I'll post a video when I can. Have fun with it: #include "neopixel.h" enum CandleStates{ BURN_CANDLE, FLICKER_CANDLE, FLUTTER_CANDLE, MODES_MAX_CANDLE }; enum PixelSelect{ EVERY_PIXEL, SINGLE_PIXEL, }; class Candle : public Adafruit_NeoPixel { public: Candle(uint16_t count, uint8_t pin, uint8_t type); Candle(uint16_t count, uint8_t pin, uint8_t type, PixelSelect pixel, uint32_t pixNum = 0); ~Candle(){}; void update(); private: bool fire(uint8_t greenDropValue, uint32_t cycleTime); PixelSelect _pixelMode = EVERY_PIXEL; uint32_t _pixNum = 0; CandleStates _mode; uint32_t _lastModeChange; uint32_t _modeDuration; uint8_t _redPx = 255; uint8_t _bluePx = 10; //10 for 5v, 15 for 3.3v uint8_t _grnHigh = 100; //110-120 for 5v, 135 for 3.3v uint8_t _grnPx = 100; uint32_t _lastBurnUpdate = 0; int _direction = 1; }; Candle::Candle(uint16_t count, uint8_t pin, uint8_t type) : Adafruit_NeoPixel(count, pin, type) { randomSeed(Time.now() + micros()); _mode = BURN_CANDLE; } Candle::Candle(uint16_t count, uint8_t pin, uint8_t type, PixelSelect pixel, uint32_t pixNum) : Adafruit_NeoPixel(count, pin, type) { _pixelMode = pixel; _pixNum = pixNum; } void Candle::update() { if(millis() - _lastModeChange > _modeDuration) { _mode = static_cast<CandleStates>(random(MODES_MAX_CANDLE)); _modeDuration = random(1000, 8000); _lastModeChange = millis(); //Serial.printlnf("New state: %d\tTime: %d", static_cast<int>(_mode), _modeDuration); } switch(_mode) { case BURN_CANDLE: this->fire(10, 120); break; case FLICKER_CANDLE: this->fire(15, 120); break; case FLUTTER_CANDLE: this->fire(30, 120); break; }; } bool Candle::fire(uint8_t greenDropValue, uint32_t cycleTime) { int currentMillis = millis(); if(currentMillis - _lastBurnUpdate > (cycleTime / greenDropValue / 2)) { _grnPx = constrain(_grnPx += _direction, _grnHigh - greenDropValue, _grnHigh); if(_grnPx == _grnHigh - greenDropValue or _grnPx == _grnHigh) { _direction *= -1; } switch (_pixelMode) { case EVERY_PIXEL: for(int i = 0; i < this->numPixels(); i++) { this->setPixelColor(i, _grnPx, _redPx, _bluePx); } break; case SINGLE_PIXEL: this->setPixelColor(_pixNum, _grnPx, _redPx, _bluePx); break; } this->show(); _lastBurnUpdate = currentMillis; } } #define PIXEL_COUNT 2 #define PIXEL_PIN D2 #define PIXEL_TYPE WS2812B // I'M USING GRB WS2821B's here Candle candle = Candle(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE, SINGLE_PIXEL); void setup(void) { Serial.begin(115200); pinMode(13, OUTPUT); candle.begin(); candle.show(); Serial.println("Started program"); } void loop(void) { candle.update(); static uint32_t lastFlashMillis = 0; if(millis() - lastFlashMillis > 250) { digitalWrite(13, !digitalRead(13)); lastFlashMillis = millis(); } }
  • Upgraded Vera Edge, MySensorsv plugin can't find new devices

    2
    0 Votes
    2 Posts
    815 Views
    dbemowskD
    @jlieffort If you want to follow this thread, I have a brand new vera plus having the same kind of issue. I cannot get device discovery to work. https://forum.mysensors.org/topic/5553/brand-new-vera-controller/2
  • OpenHAB, 230V Relays and external Switches

    6
    0 Votes
    6 Posts
    5k Views
    dgdsD
    So, it's been quite some time. The apartment is done so no more construction work. But I ended up changing the whole setup. My initial setup with pi zeros dind't go so well. It worked 90% of the time but sometimes the relays would bounce although I had them debounced (well I guess not that good) and with the whole cabeling I built an antenna, that started switching whenever some one walked through the room, so back to the basics, added opto couplers an rc's so the antenna behavior was gone, but everytime I pluged something in or out of the 230V Sockets some light would turn on or off. As my wife started to question the whole project I didn't bother to check if the power regulator of the pi was a mess or whatever the problem was. This is yet to be investigated. I bought the eq3 RX/TX boards. connected them to the relay board and the light switches and it works. It's great that I have a working solution but it's sad that it isn't my solution. I add some pics so you see what my Idea looked like. [image: 1482319432813-img_20160810_213317.jpg] [image: 1482319448519-img_20160804_004108.jpg]
  • CDS - Cat Defense System (Arduino + Servo + Motion Sensor)

    8
    0 Votes
    8 Posts
    4k Views
    TetnobicT
    @MaKin I have not done this build, but if I had to do it I will try with this The most complicated is to find the Raid Power Sprayer :-)
  • 6 Way wall touch switch

    25
    7 Votes
    25 Posts
    20k Views
    J
    Hello sir, have any update? we are waiting for your new updates. Thank you
  • plastics identifying sensor

    2
    0 Votes
    2 Posts
    798 Views
    hekH
    Never heard of such a thing. Photo detectors could be used to sense the presence of opaque or reflective plastics. There's also colour detectors that could be used if the plastic material have a specific colour. But I guess you would see a few false positives.
  • 4 doors sensors and 4 move sensors on the same node

    5
    0 Votes
    5 Posts
    2k Views
    carlekiC
    @gloob ok ! I will check the wires and signal output from the movement sensors ;)
  • Arduino-controlled-battery-charger AND Amazon DOT control VA Domoticz

    1
    1 Votes
    1 Posts
    886 Views
    No one has replied
  • Gas meter monitoring with optical sensor

    5
    4 Votes
    5 Posts
    5k Views
    I
    @rubyan Thanks, i have some trouble with adjusting it. I set the trct5000 when the 6 comes by the led goes on. When i use this sketch from the forum /** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * REVISION HISTORY * Version 1.0 - Mark Verstappen * * DESCRIPTION * Use this sensor to measure volume and flow of your house gasmeter. * You need to set the correct pulsefactor of your meter (pulses per m3). * The sensor starts by fetching current volume reading from gateway (VAR 1). * Reports both volume and flow back to gateway. * * Unfortunately millis() won't increment when the Arduino is in * sleepmode. So we cannot make this sensor sleep if we also want * to calculate/report flow. * http://www.mysensors.org/build/pulse_water */ // Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 #include <Time.h> #include <TimeLib.h> #include <SPI.h> #include <MySensor.h> #define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your sensor. (Only 2 and 3 generates interrupt!) #define SENSOR_INTERRUPT DIGITAL_INPUT_SENSOR-2 // Usually the interrupt = pin -2 (on uno/nano anyway) #define PULSE_FACTOR 100 // Nummber of blinks per m3 of your meter (One rotation/liter) #define SLEEP_MODE false // flowvalue can only be reported when sleep mode is false. #define MAX_FLOW 0,1 // Max flow (l/min) value to report. This filters outliers. #define CHILD_ID 1 // Id of the sensor child unsigned long SEND_FREQUENCY = 30000; // Minimum time between send (in milliseconds). We don't want to spam the gateway. MyMessage flowMsg(CHILD_ID,V_FLOW); MyMessage volumeMsg(CHILD_ID,V_VOLUME); MyMessage lastCounterMsg(CHILD_ID,V_VAR1); double ppl = ((double)PULSE_FACTOR)/1000; // Pulses per liter volatile unsigned long pulseCount = 0; volatile unsigned long lastBlink = 0; volatile double flow = 0; boolean pcReceived = false; unsigned long oldPulseCount = 0; unsigned long newBlink = 0; double oldflow = 0; double volume =0; double oldvolume =550.67; // Oude meterstand unsigned long lastSend =0; unsigned long lastPulse =0; void setup() { // initialize our digital pins internal pullup resistor so one pulse switches from high to low (less distortion) pinMode(DIGITAL_INPUT_SENSOR, INPUT_PULLUP); pulseCount = oldPulseCount = 0; // Fetch last known pulse count value from gw request(CHILD_ID, V_VAR1); lastSend = lastPulse = millis(); attachInterrupt(SENSOR_INTERRUPT, onPulse, FALLING); } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Gas Meter", "1.0"); // Register this device as Gasflow sensor present(CHILD_ID, S_GAS); } void loop() { unsigned long currentTime = millis(); // Only send values at a maximum frequency or woken up from sleep if (SLEEP_MODE || (currentTime - lastSend > SEND_FREQUENCY)) { lastSend=currentTime; Serial.println("--------- Debug void loop ------------"); if (!pcReceived) { //Last Pulsecount not yet received from controller, request it again request(CHILD_ID, V_VAR1); return; } if (!SLEEP_MODE && flow != oldflow) { oldflow = flow; Serial.print("m3/min:"); Serial.println(flow); // Check that we dont get unresonable large flow value. // could hapen when long wraps or false interrupt triggered if (flow<((unsigned long)MAX_FLOW)) { send(flowMsg.set(flow, 2)); // Send flow value to gw } } // No Pulse count received in 2min if(currentTime - lastPulse > 120000){ flow = 0; } // Pulse count has changed if ((pulseCount != oldPulseCount)||(!SLEEP_MODE)) { oldPulseCount = pulseCount; Serial.println("flow: "); Serial.print(flow); // Serial.println(Time.now()); Serial.print("pulsecount: "); Serial.println(pulseCount); send(lastCounterMsg.set(pulseCount)); // Send pulsecount value to gw in VAR1 double volume = ((double)pulseCount/((double)PULSE_FACTOR)); if ((volume != oldvolume)||(!SLEEP_MODE)) { oldvolume = volume; Serial.print("volume: "); Serial.println(volume, 3); Serial.println("---------------------------------------------------"); send(volumeMsg.set(volume, 3)); // Send volume value to gw } } } if (SLEEP_MODE) { sleep(SEND_FREQUENCY); } } void receive(const MyMessage &message) { if (message.type==V_VAR1) { unsigned long gwPulseCount=message.getULong(); pulseCount += gwPulseCount; flow=oldflow=0; Serial.println("--------------- Debug void receive ---------------"); Serial.print("Received last pulse count from gw: "); Serial.println(pulseCount); Serial.println("---------------------------------------------------"); pcReceived = true; } } void onPulse() { if (!SLEEP_MODE) { unsigned long newBlink = micros(); unsigned long interval = newBlink-lastBlink; Serial.println("--------------- Debug void onPulse ---------------"); // Serial.println("newblink: "); // Serial.print(newBlink); // Serial.println("interval: "); // Serial.print(interval); // Serial.println(); if (interval!=0) { lastPulse = millis(); if (interval<500000L) { // Sometimes we get interrupt on RISING, 500000 = 0.5sek debounce ( max 120 l/min) return; } flow = (60000000.0 /interval) / ppl; Serial.println("flow = (60000000.0 /interval) / ppl"); Serial.println(flow); Serial.println("---------------------------------------------------"); } lastBlink = newBlink; } pulseCount++; } The counter goes up but it is still off with the gasmeter. Then i upload you're sketch and the counter doesn't go up and the serial monitor says Stable pin value different! Can you help?
  • Automate Curtain with Mysensor

    4
    0 Votes
    4 Posts
    1k Views
    Dominic BonneauD
    Yeah ! could do the trick ... i don't have time to check right now but is he explained every detail and hardware of his process ? Thanks
  • Identify a Sensor

    5
    0 Votes
    5 Posts
    1k Views
    t1m0T
    @mfalkvidd ah okay. I Think that script would be okay and i can usw it for Pimatic... Thank you :)
  • How do i sent "virtual switches" from node to Controller?

    25
    0 Votes
    25 Posts
    6k Views
    T
    @SuperKris you already solved the problem with Pin0 and 1 (did you?). Here is possibly another solution (from 2.0 API): MY_DISABLED_SERIAL Disabled Enable this in sketch if you want to use TX(1), RX(0) as normal I/O pin so #define MY_DISABLED_SERIAL should free Pin 0 and Pin 1.
  • Get Temperature from other nodes(through VERA).

    7
    0 Votes
    7 Posts
    3k Views
    clio75C
    Hi @korttoma, Just an other question, II'm also using PLEG. Is there a way to compeer the last value against the new value and only IF these values are different we sending a this new value. some thing like : local temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", 35) local oldTemp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","VAR_1", 14) if temp != oldTemp then luup.call_action("urn:upnp-arduino-cc:serviceId:arduino1", "SendCommand", {radioId="14;2", variableId="VAR_1", value=temp}, 3) end Thanx
  • Multi sensing node for plant monitoring

    7
    1 Votes
    7 Posts
    2k Views
    dbemowskD
    @Nca78 This would be nice as a complete battery operated MySensors node all in one board. I would be interested if you get this working.

19

Online

11.7k

Users

11.2k

Topics

113.1k

Posts