Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. xydix
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by xydix

    • Smart button / scene controller

      The idea started when i bought a flic smart button.
      Today i use it to raise, lower and play/pause my chromecast audio.
      I want more buttons, actually a want more buttons doing the same thing.
      I have my flic in my kitchen. But when i am at my table? or in my couch?
      Of course, i could buy more flics. But..... Mysensors....
      To start with i will put these button under my tables for easy volume control.

      This is a sleeping node presenting it self as a scene controller.

      If someone want to try a sleeping mysensors smart button. Version 2.X compatible.
      Three functions from one button. Single click, double click and hold.
      You will need to install an external library called Onebutton. This is available in the library manager.

      This have been done before by @dakipro but that thread isn't that easy to find it you search and isn't 2.X compatible.
      By finding that very thread i solved the sleep.

      /*
        Mysensors Smart Button
      */
      
      #define MY_DEBUG
      #define MY_RADIO_NRF24
      
      #include "OneButton.h"
      #include <SPI.h>
      #include <MySensors.h>
      
      #define SN "MySmartButton"
      #define SV "1.0"
      #define CHILD_ID 1
      #define SLEEP_PIN 2
      // Setup a new OneButton on pin D2. true will set pin high (internal pull up), false will set pin low.
      OneButton button(2, true);
      unsigned long previousMillis = 0;
      unsigned long currentMillis = 0;
      const long interval = 5000;
      
      MyMessage on(CHILD_ID, V_SCENE_ON);
      
      // setup code here, to run once:
      void setup() {
      
        // link the doubleclick function to be called on a doubleclick event.
        button.attachClick(click);
        button.attachDoubleClick(doubleclick);
        button.attachPress(press);
      
      } // setup
      
      void presentation()  {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo(SN, SV);
        present(CHILD_ID, S_SCENE_CONTROLLER);
      }
      
      int messageA = 1;
      int messageB = 2;
      int messageC = 3;
      
      
      void loop() {
        currentMillis = millis();
        // keep watching the push button:
        button.tick();
      
        if (currentMillis - previousMillis >= interval) {
          Serial.println("Sleep");
          previousMillis = currentMillis;
          sleep(SLEEP_PIN - 2, CHANGE, 0);
        }
      } // loop
      // this function will be called when the button was pressed one time
      
      void click() {
        send(on.set(messageA));
      }
      // this function will be called when the button was pressed 2 times in a short timeframe.
      void doubleclick() {
        send(on.set(messageB));
      } // doubleclick
      // this function will be called when the button was pressed for about one second
      void press() {
        send(on.set(messageC));
      }
      

      It isn't reporting battery state yet.
      I will add that to the sketch later when i build my button node.
      Maybe i update this thread later when that is done if someone is interested.

      EDIT 2017-06-26
      Some pics.
      0_1498514681220_IMG_20170619_234627.jpg
      0_1498514728022_IMG_20170622_225859.jpg
      0_1498514691129_IMG_20170622_225651.jpg
      0_1498514754436_IMG_20170622_225715.jpg

      posted in My Project
      xydix
      xydix
    • RE: 💬 Dimmable Led Strip board (MysX)

      FYI...
      12v = Mosfet = irlz44n, Voltage Reg (12 to 5v) = LM2940CT-5
      24v = Mosfet = ???, Voltage reg (24 to 5v) = ???

      I think IRZL44N will handle 24V.

      posted in OpenHardware.io
      xydix
      xydix
    • RE: New nodes, new problems :/ Motion sensor [Solved]

      Thank you @martinhjelmare for that answer. It explains it. i Can confirm this is the issue.
      The pir i am using is this one, the mini pir.
      http://www.ebay.com/itm/121880058682?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

      I tried another pir, the HC-SR501 (http://www.ebay.com/itm/201414880948?rmvSB=true)
      This pir is working ok with the node as it is.
      First i tried an 100uF capacitor as @gohan suggested, but it didn't help.
      Now i tried an 470uF capacitor and it seems to be fine with the mini pir.

      @Vladimir-Dobrikov my radio already got an 100uF for the 3,3V circuit.
      Im am still testing but the node it seems fine for now.
      Thank you all for the help.

      posted in Home Assistant
      xydix
      xydix
    • RE: Pro mini

      @Oitzu
      Thanks for the quick reply.
      Nice to got that sorted out.
      Thank you.

      posted in Hardware
      xydix
      xydix
    • RE: 💬 MyPulse Sensor

      Hi. Thank you for sharing your board. It seems awesome. I got a question. When I read the BOM, I think I should use 100 ohm, 330 ohm and 1500 ohm resistor. When I look at the schematic picture it says 100k 330k. What resistor should I use?

      posted in OpenHardware.io
      xydix
      xydix
    • RE: New nodes, new problems :/ Motion sensor [Solved]

      I guess this thread should be in the hardware forum.
      But if someone find this thread i can share some pictures and the idea with this node.
      I built it as a USB-stick with a USB-connector on a prototype PCB.
      Not good looking but when i get my TV up on the wall you can't see it.
      I use it to turn on light in the bathroom at night if my kids visit the toilet.
      0_1491467736631_IMG_20170406_102320.jpg
      0_1491467746038_IMG_20170406_102342.jpg

      posted in Home Assistant
      xydix
      xydix
    • RE: Arduino UNO R3 maximum current?

      0_1485424008444_IMG_20170125_205415.jpg
      Not so fancy but this is how I did. It will do for now.
      This is the 5V pin under the USB connector.
      Now I get 5V directly from my USB power supply.

      posted in Hardware
      xydix
      xydix