Skip to content

My Project

Show off and share your great projects here! We love pictures!
961 Topics 13.4k Posts
  • MQTT 3 Door switch sketch (Single relay to be added)

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Mysensors "Global" message

    7
    0 Votes
    7 Posts
    3k Views
    zzz-teoZ
    @napo7 said in Mysensors "Global" message: Is there a way to broadcast messages ? Hi, @napo7, still have the same question! The only thing that i have done till now is... to send a message to set.Destination(255) that is being handled from gateway as a normal message, but althought is visible to serial output all other nodes, wasn't able to handle it! (do not forget that i am new to this). is there any idea how to retrieve the payload from this kind of "INTERNAL" message?
  • Beehive monitoring using Ceech board

    7
    1 Votes
    7 Posts
    2k Views
    C
    Great work.
  • 6 Votes
    7 Posts
    5k Views
    L
    I liked domoticz (was very easy to set up and use). Together with dzVents scripting wasn't that difficult either. But I also had some problem with it lately, so I was actually thinking about switching to openhab (2).
  • Another case for Temp/humidity

    9
    3
    5 Votes
    9 Posts
    3k Views
    cadetC
    @rborer Thanks
  • Mailbox notifier with apds 9960 proximity

    1
    4
    4 Votes
    1 Posts
    1k Views
    No one has replied
  • Water flow and pressure Sensor

    1
    3
    2 Votes
    1 Posts
    2k Views
    No one has replied
  • Scene controller?

    9
    0 Votes
    9 Posts
    3k Views
    FotoFieberF
    @artipi Yes you can connect a pro mini or an uno. In sleep mode it draws 15ma.
  • Nexa smoke alarm hack

    7
    5 Votes
    7 Posts
    4k Views
    EfflonE
    @marceltrapman Haven't had the time to add an ack to the battery request, but the sensor is working just fine. I don't know if it's my home assistant setup or something else causing the battery levels to get lost but I'm sure it's not part of the smoke alarm hack. Since the sensor drain is almost nothing, the battery levels are not moving much. I cant guarantee the pcb layout is the same on newer versions of this smoke alarm..
  • AC Power controller with node to node remotes

    9
    0 Votes
    9 Posts
    6k Views
    FotoFieberF
    I use a similar design for a wireless door bell. To not be forced to push the button while the node is booting, I charge a large capacitor when a button is pressed.
  • Full-Duplex Network

    rf24 nrf24l01+ full duplex
    11
    0 Votes
    11 Posts
    14k Views
    S
    I solved it ...was quite easy ... thanks anyway... I'll post the code soon since it is not on web till now..
  • NRF24l01 1.27mm Arduino Pro Mini Adapter board

    7
    7 Votes
    7 Posts
    6k Views
    F
    PIN as Ground http://arduino.stackexchange.com/questions/620/a-digital-i-o-pin-as-ground
  • Multi-sensor soil moisture node

    3
    4 Votes
    3 Posts
    3k Views
    scalzS
    Hi, I've a similar project in progress :) but not same cpu, nor tensiometer-like sensors, and i'm doing my custom box.. but this is a nice setup, good work :+1:
  • 1 Votes
    1 Posts
    1k Views
    No one has replied
  • Arduino Pulse counting from energy meter vs current sensor method?

    16
    0 Votes
    16 Posts
    7k Views
    ragavenR
    @gohan yes its almost complete, since i ran out of memory in UNO. Am waiting to get mega and it will be all over soon. ...
  • Orientation sensor (and actuator)

    19
    5 Votes
    19 Posts
    8k Views
    hekH
    @koen01, really like this cool cube project. Couldn't you add it as a new project on openhardware.io? This enables me to show it on the mysensors.org build pages as well.
  • two energy meter

    4
    0 Votes
    4 Posts
    3k Views
    F
    I couldn't just lay down in the sofa so I started to test and now I got a code that seems to work. I have tested it for a few days and it seems to count correct. I made some changes so it will send data every minute and it will send Watt-value even if it is the same value since last time. I am using VAR2 for second energy meter since I don't know how to config Incomingmessage and seperate VAR1 from different Child_IDs. I change corrupted interrupts from 10000L to 40000L otherwise it reported interrupts twice. /** * 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 - Henrik Ekblad * * DESCRIPTION * Use this sensor to measure kWh and Watt of your house meter * You need to set the correct pulsefactor of your meter (blinks per kWh). * The sensor starts by fetching current kWh value from gateway. * Reports both kWh and Watt 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 watt-number. * http://www.mysensors.org/build/pulse_power */ #include <SPI.h> #include <MySensor.h> unsigned long SEND_FREQUENCY = 60000; // Minimum time between send (in milliseconds). We don't want to spam the gateway. #define SLEEP_MODE false // Watt-value can only be reported when sleep mode is false. //sensor 1 #define DIGITAL_INPUT_SENSOR_1 2 // The digital input you attached your light sensor. (Only 2 and 3 generates interrupt!) #define PULSE_FACTOR_1 1000 // Number of blinks per KWH of your meeter #define MAX_WATT_1 10000 // Max watt value to report. This filters outliers. #define INTERRUPT_1 DIGITAL_INPUT_SENSOR_1-2 // Usually the interrupt = pin -2 (on uno/nano anyway) #define CHILD_ID_1 1 // Id of the sensor child //sensor 2 #define DIGITAL_INPUT_SENSOR_2 3 // The digital input you attached your light sensor. (Only 2 and 3 generates interrupt!) #define PULSE_FACTOR_2 10000 // Number of blinks per KWH of your meeter #define MAX_WATT_2 10000 // Max watt value to report. This filters outliers. #define INTERRUPT_2 DIGITAL_INPUT_SENSOR_2-2 // Usually the interrupt = pin -2 (on uno/nano anyway) #define CHILD_ID_2 2 // Id of the sensor child MySensor gw; //sensor 1 double ppwh_1 = ((double)PULSE_FACTOR_1)/1000; // Pulses per watt hour boolean pcReceived_1 = false; volatile unsigned long pulseCount_1 = 0; volatile unsigned long lastBlink_1 = 0; volatile unsigned long watt_1 = 0; unsigned long oldPulseCount_1 = 0; unsigned long oldWatt_1 = 0; double oldKwh_1; unsigned long lastSend_1; //sensor 2 double ppwh_2 = ((double)PULSE_FACTOR_2)/1000; // Pulses per watt hour boolean pcReceived_2 = false; volatile unsigned long pulseCount_2 = 0; volatile unsigned long lastBlink_2 = 0; volatile unsigned long watt_2 = 0; unsigned long oldPulseCount_2 = 0; unsigned long oldWatt_2 = 0; double oldKwh_2; unsigned long lastSend_2; //sensor 1 MyMessage wattMsg_1(CHILD_ID_1,V_WATT); MyMessage kwhMsg_1(CHILD_ID_1,V_KWH); MyMessage pcMsg_1(CHILD_ID_1,V_VAR1); //sensor 2 MyMessage wattMsg_2(CHILD_ID_2,V_WATT); MyMessage kwhMsg_2(CHILD_ID_2,V_KWH); MyMessage pcMsg_2(CHILD_ID_2,V_VAR2); void setup() { gw.begin(incomingMessage); // Send the sketch version information to the gateway and Controller gw.sendSketchInfo("Energy Double", "1.0"); // Register this device as power sensor //sensor 1 gw.present(CHILD_ID_1, S_POWER); //sensor 2 gw.present(CHILD_ID_2, S_POWER); //Send new VAR to Gateway //gw.send(pcMsg_1.set(xxxxxxxxx)); // Send pulse count value to gw //gw.send(pcMsg_2.set(1895931000)); // Send pulse count value to gw // Fetch last known pulse count value from gw //sensor 1 gw.request(CHILD_ID_1, V_VAR1); //sensor 2 gw.request(CHILD_ID_2, V_VAR2); //sensor 1 attachInterrupt(INTERRUPT_1, onPulse_1, RISING); //sensor 2 attachInterrupt(INTERRUPT_2, onPulse_2, RISING); lastSend_1=millis(); lastSend_2=millis(); } void loop() { gw.process(); //sensor 1 unsigned long now_1 = millis(); // Only send values at a maximum frequency or woken up from sleep bool sendTime_1 = now_1 - lastSend_1 > SEND_FREQUENCY; if (pcReceived_1 && (SLEEP_MODE || sendTime_1)) { // New watt value has been calculated //if (!SLEEP_MODE && watt_1 != oldWatt_1) { // Check that we dont get unresonable large watt value. // could hapen when long wraps or false interrupt triggered if (watt_1<((unsigned long)MAX_WATT_1)) { gw.send(wattMsg_1.set(watt_1)); // Send watt value to gw } Serial.print("Watt_1:"); Serial.println(watt_1); oldWatt_1 = watt_1; //} // Pulse cout has changed if (pulseCount_1 != oldPulseCount_1) { gw.send(pcMsg_1.set(pulseCount_1)); // Send pulse count value to gw double kwh_1 = ((double)pulseCount_1/((double)PULSE_FACTOR_1)); oldPulseCount_1 = pulseCount_1; //if (kwh_1 != oldKwh_1) { gw.send(kwhMsg_1.set(kwh_1, 4)); // Send kwh value to gw oldKwh_1 = kwh_1; //} } lastSend_1 = now_1; } else if (sendTime_1 && !pcReceived_1) { // No count received. Try requesting it again gw.request(CHILD_ID_1, V_VAR1); lastSend_1=now_1; } //sensor 2 unsigned long now_2 = millis(); // Only send values at a maximum frequency or woken up from sleep bool sendTime_2 = now_2 - lastSend_2 > SEND_FREQUENCY; if (pcReceived_2 && (SLEEP_MODE || sendTime_2)) { // New watt value has been calculated //if (!SLEEP_MODE && watt_2 != oldWatt_2) { // Check that we dont get unresonable large watt value. // could hapen when long wraps or false interrupt triggered if (watt_2<((unsigned long)MAX_WATT_2)) { gw.send(wattMsg_2.set(watt_2)); // Send watt value to gw } Serial.print("Watt_2:"); Serial.println(watt_2); oldWatt_2 = watt_2; //} // Pulse cout has changed if (pulseCount_2 != oldPulseCount_2) { gw.send(pcMsg_2.set(pulseCount_2)); // Send pulse count value to gw double kwh_2 = ((double)pulseCount_2/((double)PULSE_FACTOR_2)); oldPulseCount_2 = pulseCount_2; //if (kwh_2 != oldKwh_2) { gw.send(kwhMsg_2.set(kwh_2, 4)); // Send kwh value to gw oldKwh_2 = kwh_2; //} } lastSend_2 = now_2; } else if (sendTime_2 && !pcReceived_2) { // No count received. Try requesting it again gw.request(CHILD_ID_2, V_VAR2); lastSend_2=now_2; } if (SLEEP_MODE) { gw.sleep(SEND_FREQUENCY); } } void incomingMessage(const MyMessage &message) { if (message.type==V_VAR1) { pulseCount_1 = oldPulseCount_1 = message.getLong(); Serial.print("Received_1 last pulse count from gw:"); Serial.println(pulseCount_1); pcReceived_1 = true; } if (message.type==V_VAR2) { pulseCount_2 = oldPulseCount_2 = message.getLong(); Serial.print("Received_2 last pulse count from gw:"); Serial.println(pulseCount_2); pcReceived_2 = true; } } void onPulse_1() { if (!SLEEP_MODE) { unsigned long newBlink_1 = micros(); unsigned long interval_1 = newBlink_1-lastBlink_1; if (interval_1<40000L) { // Sometimes we get interrupt on RISING return; } watt_1 = (3600000000.0 /interval_1) / ppwh_1; lastBlink_1 = newBlink_1; } //Serial.println(pulseCount_1); pulseCount_1++; //Serial.println(pulseCount_1); } void onPulse_2() { if (!SLEEP_MODE) { unsigned long newBlink_2 = micros(); unsigned long interval_2 = newBlink_2-lastBlink_2; if (interval_2<40000L) { // Sometimes we get interrupt on RISING return; } watt_2 = (3600000000.0 /interval_2) / ppwh_2; lastBlink_2 = newBlink_2; } //Serial.println(pulseCount_2); pulseCount_2++; //Serial.println(pulseCount_2); }
  • LED Lamp

    7
    6 Votes
    7 Posts
    2k Views
    YveauxY
    @checkup if you add this project to openhardware.io including sources, schematics (if applicable) and some description we can import it to the build pages.
  • Outdoor fence gate access

    2
    0 Votes
    2 Posts
    1k Views
    C
    @clippermiami can you hit it from your house with a garage door opener? I haven't integrated mine into a HA controller yet, but for now I just have an RPi driving a relay board that is soldered into the guts from a garage door opener. Bonus there are three buttons so I can run both garage doors and the front gate from a web interface. I'm sure you could do the same with an arduino in place of the RPi.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    12 Views
    No one has replied

20

Online

11.7k

Users

11.2k

Topics

113.1k

Posts