Navigation

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

    tigra

    @tigra

    3
    Reputation
    5
    Posts
    564
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    tigra Follow

    Best posts made by tigra

    • Scene controller based on old x10 remote

      I retrofitted old x10 remote (Model HR12A - can be had for under $10 on ebay) to work as scene controller for MySensors accompanied Vera setup.

      What I learned with Vera is that some cheap Z-wave remotes will not work with it (yes, I'm talking about you, GE45600) and others can only use "scene on" half of the keyboard. With this custom puppy we have full 36 scene activation combinations.

      I ran out of pins (only weirdos like A6 and A7 left) but there's also possibility to hook up the dial and report the battery status.

      Controller and radio "deep sleep" all the time waking up on interrupt when button is pressed then transmits the code and falls back asleep. I followed LED & voltage regulator disconnection procedures described here so with this in mind the battery should pretty much die of natural causes before discharging. 8M/3.3V chip, obviously only two batteries go in the 4x bay.

      Can't figure out how to post images here so here's the link: https://imgur.com/a/7EIqx
      In last picture note there's 4pin connector to be able to program the remote without taking it apart. Serial pins there are: GND, TX, RX, DTR

      #include <MySensor.h>
      #include <SPI.h>
      
      #define CHILD_ID 0
      #define PRESSDELAY 200
      
      // pin assignments (0 terminates the arrays)
      const char
        a_keysHor[] = {A0, A1, A2, A3, A4, A5, 0},
        a_keyVer[] = {8, 7, 6, 0},
        n_irqPin = 3,
        n_ledPin = 4,
        n_pagePin = 5;
      
      // maps value to code calculated from key's coordinate
      const char
        a_keyMap[] = {1, 2, 4, 5, 3, 6, 8, 7, 10, 9, 11, 12, 15, 17, 18, 13, 14, 16};
      
      char
        n_horLines,
        n_verLines,
        n_pageSize;
      
      MySensor o_gw;
      MyMessage o_sceneOn(CHILD_ID, V_SCENE_ON);
      
      void setup()  {
        for (n_horLines = 0; a_keysHor[n_horLines]; n_horLines++) {
          pinMode(a_keysHor[n_horLines], OUTPUT);
          digitalWrite(a_keysHor[n_horLines], HIGH);
        }
        for (n_verLines = 0; a_keyVer[n_verLines]; n_verLines++) {
          pinMode(a_keyVer[n_verLines], INPUT);
          digitalWrite(a_keyVer[n_verLines], HIGH);
        }
        n_pageSize = n_horLines * n_verLines;
      
        pinMode(n_ledPin, OUTPUT);
        digitalWrite(n_ledPin, LOW);
        
        pinMode(n_pagePin, INPUT);
        digitalWrite(n_pagePin, HIGH);
      
        pinMode(n_irqPin, INPUT);
        digitalWrite(n_irqPin, HIGH);
      
        o_gw.begin();
        o_gw.sendSketchInfo("MySensors Remote", "1.0");
        o_gw.present(CHILD_ID, S_SCENE_CONTROLLER);
      }
      
      void loop() {
        char n_hor, n_key;
      
        for (n_hor = 0; a_keysHor[n_hor]; n_hor++)
          digitalWrite(a_keysHor[n_hor], LOW);
        o_gw.sleep(1, LOW, 0);
        for (n_hor = 0; a_keysHor[n_hor]; n_hor++)
          digitalWrite(a_keysHor[n_hor], HIGH);
      
        while (n_key = f_readKey()) {
          o_gw.send(o_sceneOn.set(n_key));
          digitalWrite(n_ledPin, HIGH);
          delay(PRESSDELAY);
          digitalWrite(n_ledPin, LOW);
        }
      }
      
      int f_readKey() {
        char n_hor, n_ver, n_key = 0;
        for (n_hor = 0; a_keysHor[n_hor]; n_hor++) {
          digitalWrite(a_keysHor[n_hor], LOW);
          for (n_ver = 0; a_keyVer[n_ver]; n_ver++) {
            if (digitalRead(a_keyVer[n_ver]) == LOW) {
              n_key = a_keyMap[n_ver + n_hor * n_verLines];
              if (digitalRead(n_pagePin) == HIGH)
                n_key += n_pageSize;
              break;
            }
          }
          digitalWrite(a_keysHor[n_hor], HIGH);
          if (n_key)
            return n_key;
        }
        return 0;
      }
      

      I'll try to answer any questions here.

      posted in My Project
      tigra
      tigra
    • RE: Scene controller based on old x10 remote

      @Vladut-Grecu said:

      That remote had a wireless thingy.. W

      Indeed it was RF based remote control, but it was for X10 protocol and it wasn't compatible with my existing system. There's somewhat painful way to hook x10 to Vera via Raspberry running Mochad driver, but I'm getting rid of x10 altogether.

      posted in My Project
      tigra
      tigra

    Latest posts made by tigra

    • RE: Scene controller based on old x10 remote

      @Vladut-Grecu said:

      That remote had a wireless thingy.. W

      Indeed it was RF based remote control, but it was for X10 protocol and it wasn't compatible with my existing system. There's somewhat painful way to hook x10 to Vera via Raspberry running Mochad driver, but I'm getting rid of x10 altogether.

      posted in My Project
      tigra
      tigra
    • Scene controller based on old x10 remote

      I retrofitted old x10 remote (Model HR12A - can be had for under $10 on ebay) to work as scene controller for MySensors accompanied Vera setup.

      What I learned with Vera is that some cheap Z-wave remotes will not work with it (yes, I'm talking about you, GE45600) and others can only use "scene on" half of the keyboard. With this custom puppy we have full 36 scene activation combinations.

      I ran out of pins (only weirdos like A6 and A7 left) but there's also possibility to hook up the dial and report the battery status.

      Controller and radio "deep sleep" all the time waking up on interrupt when button is pressed then transmits the code and falls back asleep. I followed LED & voltage regulator disconnection procedures described here so with this in mind the battery should pretty much die of natural causes before discharging. 8M/3.3V chip, obviously only two batteries go in the 4x bay.

      Can't figure out how to post images here so here's the link: https://imgur.com/a/7EIqx
      In last picture note there's 4pin connector to be able to program the remote without taking it apart. Serial pins there are: GND, TX, RX, DTR

      #include <MySensor.h>
      #include <SPI.h>
      
      #define CHILD_ID 0
      #define PRESSDELAY 200
      
      // pin assignments (0 terminates the arrays)
      const char
        a_keysHor[] = {A0, A1, A2, A3, A4, A5, 0},
        a_keyVer[] = {8, 7, 6, 0},
        n_irqPin = 3,
        n_ledPin = 4,
        n_pagePin = 5;
      
      // maps value to code calculated from key's coordinate
      const char
        a_keyMap[] = {1, 2, 4, 5, 3, 6, 8, 7, 10, 9, 11, 12, 15, 17, 18, 13, 14, 16};
      
      char
        n_horLines,
        n_verLines,
        n_pageSize;
      
      MySensor o_gw;
      MyMessage o_sceneOn(CHILD_ID, V_SCENE_ON);
      
      void setup()  {
        for (n_horLines = 0; a_keysHor[n_horLines]; n_horLines++) {
          pinMode(a_keysHor[n_horLines], OUTPUT);
          digitalWrite(a_keysHor[n_horLines], HIGH);
        }
        for (n_verLines = 0; a_keyVer[n_verLines]; n_verLines++) {
          pinMode(a_keyVer[n_verLines], INPUT);
          digitalWrite(a_keyVer[n_verLines], HIGH);
        }
        n_pageSize = n_horLines * n_verLines;
      
        pinMode(n_ledPin, OUTPUT);
        digitalWrite(n_ledPin, LOW);
        
        pinMode(n_pagePin, INPUT);
        digitalWrite(n_pagePin, HIGH);
      
        pinMode(n_irqPin, INPUT);
        digitalWrite(n_irqPin, HIGH);
      
        o_gw.begin();
        o_gw.sendSketchInfo("MySensors Remote", "1.0");
        o_gw.present(CHILD_ID, S_SCENE_CONTROLLER);
      }
      
      void loop() {
        char n_hor, n_key;
      
        for (n_hor = 0; a_keysHor[n_hor]; n_hor++)
          digitalWrite(a_keysHor[n_hor], LOW);
        o_gw.sleep(1, LOW, 0);
        for (n_hor = 0; a_keysHor[n_hor]; n_hor++)
          digitalWrite(a_keysHor[n_hor], HIGH);
      
        while (n_key = f_readKey()) {
          o_gw.send(o_sceneOn.set(n_key));
          digitalWrite(n_ledPin, HIGH);
          delay(PRESSDELAY);
          digitalWrite(n_ledPin, LOW);
        }
      }
      
      int f_readKey() {
        char n_hor, n_ver, n_key = 0;
        for (n_hor = 0; a_keysHor[n_hor]; n_hor++) {
          digitalWrite(a_keysHor[n_hor], LOW);
          for (n_ver = 0; a_keyVer[n_ver]; n_ver++) {
            if (digitalRead(a_keyVer[n_ver]) == LOW) {
              n_key = a_keyMap[n_ver + n_hor * n_verLines];
              if (digitalRead(n_pagePin) == HIGH)
                n_key += n_pageSize;
              break;
            }
          }
          digitalWrite(a_keysHor[n_hor], HIGH);
          if (n_key)
            return n_key;
        }
        return 0;
      }
      

      I'll try to answer any questions here.

      posted in My Project
      tigra
      tigra
    • RE: Error Compiling Ethernet Gateway

      @clippermiami I had the same issue when the libraries weren't in place. See the steps at: http://www.mysensors.org/build/arduino

      posted in Vera
      tigra
      tigra
    • RE: Gateway-less sensors

      @hek: Is it technical "cannot" or legal "cannot"?
      From technical angle it's not walk in the park but it's been done (google z-force and open-zwave).

      posted in Hardware
      tigra
      tigra
    • Gateway-less sensors

      Congrats on a great project here!

      My understanding that nRF24L01 was chosen because of the low cost. Was CC1101 ever considered?
      It's just a dime more but from what I recon it can be configured to run in the native z-wave band of 908.42MHz
      If done this would allow the use of sensors without need for gateway which opens the project to more controllers and apps like SmartThings.
      Assuming that hardware is up to it, the radio chip abstraction layer can be created so the same code can be compiled for one of two methods with just a directive.

      Anyway, it would be interesting to hear the thoughts.

      posted in Hardware
      tigra
      tigra