Skip to content

My Project

967 Topics 13.5k Posts

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

  • AC diming

    16
    0 Votes
    16 Posts
    8k Views
    R
    @FotoFieber , I use some 230V dimmable leds that I bought from IKEA in Germany about 1 year ago and and they work good. Some are Philips and some are IKEA-branded. Most important is the 'dimmable' word on them. Most of current led drivers are not designed for AC dimming, as this increase the unit costs (usually the driver is more expensive than the leds itself)...
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • motion and relay

    12
    0 Votes
    12 Posts
    6k Views
    D
    AC works thank you for your help #include <SPI.h> #include <MySensor.h> #include <Wire.h> #include <DHT.h> #include <SimpleTimer.h> #define CHILD_ID_HUM 1 #define CHILD_ID_TEMP 2 #define CHILD_ID_MOTION 3 #define CHILD_ID_RELAY 4 #define HUMIDITY_SENSOR_DIGITAL_PIN 4 #define MOTION_SENSOR_DIGITAL_PIN 3 #define INTERRUPT MOTION_SENSOR_DIGITAL_PIN-2 // Usually the interrupt = pin -2 (on uno/nano anyway) #define RELAY 7 // Arduino Digital I/O pin number for first relay (second on pin+1 etc) #define RELAY_ON 0 // GPIO value to write to turn on attached relay #define RELAY_OFF 1 // GPIO value to write to turn off attached relay unsigned long SLEEP_TIME = 600000; // Sleep time between reads (in milliseconds) - 10mins MySensor gw; DHT dht; SimpleTimer timer; float lastTemp; float lastHum; boolean lastTripped; boolean metric = true; MyMessage msgHum(CHILD_ID_HUM, V_HUM); MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); MyMessage msg(CHILD_ID_MOTION, V_TRIPPED); void setup() { // Initialize library and add callback for incoming messages gw.begin(incomingMessage, AUTO, true); dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); // Send the Sketch Version Information to the Gateway gw.sendSketchInfo("HumTempRelayMotion", "1.0"); // REGISTER all sensors to gw (they will be created as child devices) gw.present(CHILD_ID_HUM, S_HUM); gw.present(CHILD_ID_TEMP, S_TEMP); gw.present(CHILD_ID_MOTION, S_MOTION); gw.present(CHILD_ID_RELAY, S_LIGHT); pinMode(RELAY, OUTPUT); digitalWrite(RELAY, gw.loadState(RELAY)?RELAY_OFF:RELAY_ON); //Serial.begin(9600); timer.setInterval(30000, getMeasure); metric = gw.getConfig().isMetric; } void loop() { // Alway process incoming messages whenever possible gw.process(); timer.run(); boolean tripped = digitalRead(MOTION_SENSOR_DIGITAL_PIN) == HIGH; if (tripped != lastTripped) { lastTripped = tripped; Serial.print("M: "); Serial.println(tripped); gw.send(msg.set(tripped?"1":"0")); // Send tripped value to gw } } void incomingMessage(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (message.type==V_LIGHT) { // Change relay state digitalWrite(message.sensor-CHILD_ID_RELAY+RELAY, message.getBool()?RELAY_ON:RELAY_OFF); // Store state in eeprom gw.saveState(message.sensor, message.getBool()); // Write some debug info Serial.print("Incoming change for sensor:"); Serial.print(message.sensor); Serial.print(", New status: "); Serial.println(message.getBool()); } } void getMeasure() { delay(dht.getMinimumSamplingPeriod()); float temperature = dht.getTemperature(); if (isnan(temperature)) { Serial.println("Failed reading temperature from DHT"); } else if (temperature != lastTemp) { lastTemp = temperature; if (!metric) { temperature = dht.toFahrenheit(temperature); } gw.send(msgTemp.set(temperature, 1)); Serial.print("T: "); Serial.println(temperature); } float humidity = dht.getHumidity(); if (isnan(humidity)) { Serial.println("Failed reading humidity from DHT"); } else if (humidity != lastHum) { lastHum = humidity; gw.send(msgHum.set(humidity, 1)); Serial.print("H: "); Serial.println(humidity); } } Insert Code Here
  • Dimmer LED with two state

    2
    0 Votes
    2 Posts
    2k Views
    J
    OK, i think it work's well now: } else if (persons == 0){ if (message.getString() != 0) {gw.send(dimmerMsg.set(0), true);} else {return;} ```
  • Pellet Burner Monitor using MySensors and OpenHAB

    1
    5 Votes
    1 Posts
    1k Views
    No one has replied
  • Breaking down the string that a MySensor node sends...

    4
    0 Votes
    4 Posts
    2k Views
    H
    http://forum.mysensors.org/topic/866/help-understanding-addressing-and-log-messages
  • help . power supply and add motion sensor to vera controller

    7
    0 Votes
    7 Posts
    2k Views
    R
    @Dwalt hi my dear friend , please came on chat with me
  • How to send boat data to my cellphone?

    3
    0 Votes
    3 Posts
    2k Views
    S
    Thanks! The boat is about 40 feet but I hope to feed all the data from the boat in one place close to the main board. I have solar panels. But they don't deliver enough power during the winter. That's why I also like to have an update of the voltage of the four 75Ah batteries so that I can charge the batteries from land (220V) when needed.
  • Button Actuated relay with Motion

    2
    0 Votes
    2 Posts
    2k Views
    T
    Maybe this will help you a bit http://forum.mysensors.org/topic/2106/reinventing-the-motion-controlled-outside-lamp
  • Multi Binary Switches

    13
    0 Votes
    13 Posts
    8k Views
    jeylitesJ
    @Cowboy1980 Can you post your script...
  • Need ideas how to control radiators

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    3 Posts
    2k Views
    R
    I think a vibration sensor may work better in this case, and there are examples.
  • Battery based sensors: at what voltage level do you set an alarm ?

    5
    0 Votes
    5 Posts
    4k Views
    D
    I have five battery powered MySensors nodes powered with CR123 lithium batteries. I set the limits at 100% at 3.0v and 0% at 1.9v. Now I just need a method for Vera to generate an alert when they drop near 0%.
  • Hackathon @Office showcasing Mysensors capability

    1
    5 Votes
    1 Posts
    1k Views
    No one has replied
  • Energy monitor shield

    4
    0 Votes
    4 Posts
    3k Views
    M
    Thank You for your suggestion. I will try with Energy Monitor Shield from Seeedstudio and connect it to MySensors gateway.
  • Noob question re MQTT gateway sketch

    3
    0 Votes
    3 Posts
    2k Views
    M
    @ahhk said: mqtt-client-gateway Thanks Have installed the mqtt-client-gateway and works well, thanks a lot!
  • cc1101 rf433mhz with mysensors

    3
    0 Votes
    3 Posts
    3k Views
    I
    Maybe you van use this http://blog.gummibaer-tech.de/cul-stick-868433-im-selbstbau/ I have buildthis one also and use it in fhem (www.fhem.de)
  • MySensorfying a cheap moodlight

    2
    5 Votes
    2 Posts
    2k Views
    T
    For anyone whois interested in how I mounted the electronics into the lamp. I posted an article about this on my blog http://www.houtbewerken-voor-dummies.com/grenzen-verleggen-een-moodlight/ it's in Dutch but you can translate this with google translator.
  • Water Flow sensor

    11
    1 Votes
    11 Posts
    12k Views
    R
    Hi These sensors are really quite neat. I got quite accurate measurements from 4,9 to 44 litres/min, I couldn't go any higher, the output fed into the audio input on the PC with a simple and free frequency meter software. Amazing for a few dollars. The downturn is the pressure loss across the meter, 0.08 bars at 15 L/min rising to 0,69 bars at 41.8 L/min : Here are what I measured dP L/min flowmeter 15 0,08 18,4 0,04 24,7 0,21 26,5 0,24 30,7 0,29 34,2 0,4 37,3 0,51 40,0 0,63 41,8 0,72 42,5 0,69
  • MyAirwik Sensor

    5
    2 Votes
    5 Posts
    7k Views
    D
    Hi, this one looks very nice and not shouting "i am a sensor". I am just curious, how long do the batteries last?

17

Online

12.0k

Users

11.2k

Topics

113.4k

Posts