Navigation

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

    korttoma

    @korttoma

    Hero Member

    135
    Reputation
    686
    Posts
    2616
    Profile views
    3
    Followers
    0
    Following
    Joined Last Online
    Location Finland Age 40

    korttoma Follow
    Hero Member

    Best posts made by korttoma

    • RE: πŸ’¬ Dimmable LED Actuator

      Inspirational pictures from my Dimmable LED Actuator with rotary encoder device I made for my sons bedside lamp.
      Running this at 12VDC. His lamp had a G9 socket so I just broke apart the G9 LED bulb and soldered some G4 12VDC LED lights like these to it and replaces the "Dumb" switch with a 5mm DC plug. It turned out so nice that I think I will MySensor my own bedside lamp also.

      Edit: btw, I found the nice big knobs from here -> eBay

      0_1476680417320_WP_20161014_07_07_53.jpg

      0_1476680429390_WP_20161014_07_11_47.jpg

      2pcs Rotary Encoder with Switch + 30x17mm Black Circular Aluminum Knob

      $4.07
      Sold out
      posted in Announcements
      korttoma
      korttoma
    • MySensored 230v motion sensor with light level

      I have been searching for a nice enclosure to use with some motion sensors but nothing was to my satisfactory. So I started to look at different motion sensors to see if I could find something I could modify. I found this one at my local electronics shop. Both looks and prize was right so I picked one up.

      I cut the Live copper strip to the relay and removed the wire that would normally go to the lamp and removed 2 capacitors (marked with red and green), soldered 2 wires to were a capacitor had been to access the relay contacts (marked with green).
      WP_20141126_001.jpg

      Destroid one of them 90 cent iPhone charger clones to get a 5v power supply added a Pro Mini with radio and a LM393 photo resistor.
      Connected the relay contacts to GND and a binary in on the arduino and the photo transistor to a analog in.
      WP_20141126_003.jpg

      Here is the result:
      WP_20141126_006.jpg

      And here is the sketch:
      https://codebender.cc/sketch:62574

      Have not attached it to the ceiling yet just had it on the floor for testing, motion sensor works great but I'm not sure if the light sensor will be sensitive enough.

      Think I'm going to add a 2A glas fuse to it because of the cheep 5v power just in case.

      posted in My Project
      korttoma
      korttoma
    • RE: Temperature sensor accuracy comparison

      @wes Thanks for the list of sensor accuracy. But for for example battery nodes there are other parameters that are at least as important as temp accuracy and you left out the Si7021 that is really good for battery driven nodes.

      Si7021
      Precision Relative Humidity Sensor Β± 3% RH (max), 0–80% RH
      High Accuracy Temperature Sensor Β±0.4 Β°C (max), –10 to 85 Β°C
      Wide operating voltage (1.9 to 3.6 V)
      Low Power Consumption 150 Β΅A active current 60 nA standby current

      posted in Hardware
      korttoma
      korttoma
    • RE: First run of new nodeMCU based GatewaySerial. Not sure what it is saying.

      The correct way to use any ESP8266 based boards with the current MySensors implementation is to configure them as WiFi Gateways with local sensors. You cannot make one ESP8266 an serial GW and expect all other ESPs to communicate via this one using the WiFi.

      I other words all your ESPs will be Gateways but without any transport (NRF24L01 or RFM69 that is currently supported).

      posted in Troubleshooting
      korttoma
      korttoma
    • RE: nRF5 action!

      @nca78 I have now measured the current consumption of the small bluetooth beacon device (N51822 QFABC0) using your code and the results are encouraging.

      With your code I get around 4uA sleep current compared to 800-4000uA with my old code πŸ˜„

      Measurements done with an Micro (nano) ampere meter (double) that has not been calibrated against a reliable meter so do not take the measured values so seriously but more as a comparison.

      Device

      NRF51822 2V-3.3V Bluetooth 4.0 Wireless Module For iBeacon Base Station Intelligent Control System Beacon BLE Module 4MA W/ Case

      $4.49
      posted in My Project
      korttoma
      korttoma
    • RE: πŸ’¬ Building a WiFi Gateway using ESP8266

      @sghazagh maybe you can take a picture of the setup. Maybe someone else can see something that you don't.

      posted in Announcements
      korttoma
      korttoma
    • RE: Problem compiling sketch on library 1.5 DEVEL

      I think you need to include MySensor.h after any configuration defines

      I found a post by @hek pointing to the following document -> https://docs.google.com/document/d/1NKq5uuNdnxF5jWnum7VT32mbKLjuvqlx2A5D1qQ-H3Q/edit#

      There I read:

      Converting sketch from 1.5 to to 2.0
      
      Add the following to activate NRF-radio support
      #define MY_RADIO_NRF24
      
      Remove MySensor constructor 
      MySensors gw; 
      
      Remove MySensors setup() call 
      gw.setup(....);
      
      If node expects incoming messages, add the following function to handle data:
      void receive(const MyMessage &msg) {}
      
      Move present() and sendSketchInfo() from setup() to a new function called presentation().
      void presentation() {
           sendSketchInfo(...)	
           present(...);
      }
      
      If you’re using static ids , add:
      #define MY_NODE_ID xx
      
      If static parent node is used, add:
      #define MY_PARENT_NODE_ID xx
      
      If you want node to be a repeater, add
      #define MY_REPEATER_FEATURE
      
      Remove all β€œgw.” before MySensors library calls.
      
      If node requests time using requestTime(), remove callback argument define define the following function to handle time response:
      void receiveTime(unsigned long ts) {
      }
      
      Make sure to include MySensor.h after any configuration defines.
      posted in Troubleshooting
      korttoma
      korttoma
    • RE: nRF5 action!

      Just received these tiny NRF51822 devices and would like to turn them in to MySensors 1 button scencontroller.
      Where should I start?

      1. I guess I will need some kind of USB adapter ti program them. Think I read somewhere about JLink. Would this do?

      0_1515562170867_20180110_071948.jpg

      posted in My Project
      korttoma
      korttoma
    • RE: Request: New Sensor Type ? Thermostatically controlled switch

      I finally put together a thermostat device sketch. Unfortunately it got a bit out of hand and I implemented lots of features that most people probably not need.

      Not sure if I'm using the V_HVAC_FLOW_STATE and V_HVAC_SETPOINT_HEAT correctly but it seems to work with my Vera UI5 presented as a S_HEATER device.

      Here is the sketch in case someone needs it.

      https://codebender.cc/sketch:169733

      posted in Feature Requests
      korttoma
      korttoma
    • RE: πŸ’¬ Easy/Newbie PCB for MySensors

      @maghac it is not just as simple as the capacitor size is added, true it is added but different size capacitors also filter disturbances at different frequencies. So adding different size capacitors in parallel can act as a more effective disturbance filter.

      posted in OpenHardware.io
      korttoma
      korttoma

    Latest posts made by korttoma

    • RE: Pokit PRO on kickstarter

      Quite popular project after all..

      https://www.kickstarter.com/projects/pokitmeter/pokit-pro/posts/2691302

      posted in General Discussion
      korttoma
      korttoma
    • RE: Pokit PRO on kickstarter

      btw, did anyone here back their previous project the pokit meter?
      I would love to hear some comments about how the previous campaign project was handled and general information about the product quality this company produces.

      posted in General Discussion
      korttoma
      korttoma
    • Pokit PRO on kickstarter

      Hi all, just wanted to let you know about this kickstarter project and if you find it interesting and decided to back it please do so via my referral link πŸ˜‰

      https://kicks.to/HRE9Dtx

      posted in General Discussion
      korttoma
      korttoma
    • RE: VERA / Arduino Integration

      @sparky60 yes, 4 inputs and 4 outputs. It should be easy to modify if you need a different amount.

      posted in Vera
      korttoma
      korttoma
    • RE: VERA / Arduino Integration

      @sparky60
      Yes it is possible to run I/O on a Ethernet Gateway without radio unit
      Yes it is possible to have multiple Gateways connected to the same Vera, you just add another plugin device and use different IP for it. Remember to also use different MAC address for each GW in the sketch.

      Not sure how up to date this example is because I have not updated my devices for a year or 2 but I think you get the idea.
      Example sketch:

      /**
       * 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
       * Contribution by a-lurker and Anticimex,
       * Contribution by Norbert Truchsess <norbert.truchsess@t-online.de>
       * Contribution by Tomas Hozza <thozza@gmail.com>
       *
       *
       * DESCRIPTION
       * The EthernetGateway sends data received from sensors to the ethernet link.
       * The gateway also accepts input on ethernet interface, which is then sent out to the radio network.
       *
       * The GW code is designed for Arduino 328p / 16MHz.  ATmega168 does not have enough memory to run this program.
       *
       * LED purposes:
       * - To use the feature, uncomment WITH_LEDS_BLINKING in MyConfig.h
       * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
       * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
       * - ERR (red) - fast blink on error during transmission error or recieve crc error
       *
       * See http://www.mysensors.org/build/ethernet_gateway for wiring instructions.
       *
       */
      
      // Enable debug prints to serial monitor
      
      //#define MY_DEBUG 
      #define SN "EthGW/RFM69 Rele Button"
      #define SV "1.1"
      
      // Enable and select radio type attached
      //#define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      #define MY_RFM69_FREQUENCY RF69_433MHZ
      #define MY_IS_RFM69HW
      #define MY_RF69_SPI_CS 4  //try changeing this to 9
      // Enable gateway ethernet module type 
      #define MY_GATEWAY_W5100
      
      // W5100 Ethernet module SPI enable (optional if using a shield/module that manages SPI_EN signal)
      //#define MY_W5100_SPI_EN 10  
      
      // Enable Soft SPI for NRF radio (note different radio wiring is required)
      // The W5100 ethernet module seems to have a hard time co-operate with 
      // radio on the same spi bus.
      
      
      // Enable to UDP          
      //#define MY_USE_UDP
      
      #define MY_IP_ADDRESS 192,168,1,100   // If this is disabled, DHCP is used to retrieve address
      // Renewal period if using DHCP
      //#define MY_IP_RENEWAL_INTERVAL 60000
      // The port to keep open on node server mode / or port to contact in client mode
      #define MY_PORT 5003      
      
      // Controller ip address. Enables client mode (default is "server" mode). 
      // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere. 
      //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 254   
       
      // The MAC address can be anything you want but should be unique on your network.
      // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
      // Note that most of the Ardunio examples use  "DEAD BEEF FEED" for the MAC address.
      #define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xED, 0xED
      
      // Flash leds on rx/tx/err
      //#define MY_LEDS_BLINKING_FEATURE
      // Set blinking period
      #define MY_DEFAULT_LED_BLINK_PERIOD 300
      
      // Enable inclusion mode
      #define MY_INCLUSION_MODE_FEATURE
      // Enable Inclusion mode button on gateway
      //#define MY_INCLUSION_BUTTON_FEATURE
      // Set inclusion mode duration (in seconds)
      #define MY_INCLUSION_MODE_DURATION 60 
      // Digital pin used for inclusion mode button
      #define MY_INCLUSION_MODE_BUTTON_PIN  3 
      
      // Uncomment to override default HW configurations
      //#define MY_DEFAULT_ERR_LED_PIN 7  // Error led pin
      //#define MY_DEFAULT_RX_LED_PIN  8  // Receive led pin
      //#define MY_DEFAULT_TX_LED_PIN  9  // the PCB, on board LED
      
      #include <SPI.h>
      
      #if defined(MY_USE_UDP)
        #include <EthernetUdp.h>
      #endif
      #include <Ethernet.h>
      #include <MySensors.h>
      #include <Bounce2.h>
      #define RELAY_ON 0                      // switch around for ACTIVE LOW / ACTIVE HIGH relay
      #define RELAY_OFF 1
      //
      
      #define noRelays 4                     //2-4
      
      const int relayPin[] = {14, 15, 16, 17};       //  switch around pins to your desire
      const int buttonPin[] = {7, 8, 5, 6};   //  switch around pins to your desire
      
      class Relay             // relay class, store all relevant data (equivalent to struct)
      {
        public:
          int buttonPin;                   // physical pin number of button
          int relayPin;             // physical pin number of relay
          boolean relayState;               // relay status (also stored in EEPROM)
      };
      
      Relay Relays[noRelays];
      Bounce debouncer[noRelays];
      MyMessage msg[noRelays];
      
      void setup() {
        wait(100);
        // Initialize Relays with corresponding buttons
        for (int i = 0; i < noRelays; i++) {
          Relays[i].buttonPin = buttonPin[i];              // assign physical pins
          Relays[i].relayPin = relayPin[i];
          msg[i].sensor = i;                                   // initialize messages
          msg[i].type = V_LIGHT;
          pinMode(Relays[i].buttonPin, INPUT_PULLUP);
          wait(100);
          pinMode(Relays[i].relayPin, OUTPUT);
          Relays[i].relayState = loadState(i);                               // retrieve last values from EEPROM
          digitalWrite(Relays[i].relayPin, Relays[i].relayState ? RELAY_ON : RELAY_OFF); // and set relays accordingly
          send(msg[i].set(Relays[i].relayState ? true : false));                 // make controller aware of last status
          wait(50);
          debouncer[i] = Bounce();                        // initialize debouncer
          debouncer[i].attach(buttonPin[i]);
          debouncer[i].interval(30);
          wait(50);
        }
      }
      
      void presentation()
      {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo(SN, SV);
      
        wait(100);
      
        for (int i = 0; i < noRelays; i++)
          present(i, S_LIGHT);                               // present sensor to gateway
      
        wait(100);
      }
      
      
      void loop()
      {
        for (byte i = 0; i < noRelays; i++) {
          if (debouncer[i].update()) {
            
            int value = debouncer[i].read();
            
            if ( value == LOW) {
              Relays[i].relayState = !Relays[i].relayState;
              digitalWrite(Relays[i].relayPin, Relays[i].relayState ? RELAY_ON : RELAY_OFF);
              send(msg[i].set(Relays[i].relayState ? true : false));
              // save sensor state in EEPROM (location == sensor number)
              saveState( i, Relays[i].relayState );
      
            }
      
          }
        }
        //wait(20);
      }
      
      void receive(const MyMessage &message) {
        if (message.sender == 0) {
          if (message.type == V_LIGHT) {
            if (message.sensor < noRelays) {          // check if message is valid for relays..... previous line  [[[ if (message.sensor <=noRelays){ ]]]
              Relays[message.sensor].relayState = message.getBool();
              digitalWrite(Relays[message.sensor].relayPin, Relays[message.sensor].relayState ? RELAY_ON : RELAY_OFF); // and set relays accordingly
              saveState( message.sensor, Relays[message.sensor].relayState ); // save sensor state in EEPROM (location == sensor number)
            }
          }
        } 
        wait(20);
      }
      
      
      
      posted in Vera
      korttoma
      korttoma
    • RE: Code explanation

      @royzone Your code is a bit incomplete because you did not include the entire line but I think that you are comparing some boolean variable to the value "HIGH" and if it is HIGH then you send the value "1" with ack (acknowledgement).

      If an experienced coder see that my asumption is incorrect please correct me πŸ˜‰

      posted in General Discussion
      korttoma
      korttoma
    • RE: πŸ’¬ MySensors Library

      @flopp https://forum.mysensors.org/topic/9973/mysensors-2-3-1-released

      posted in Announcements
      korttoma
      korttoma
    • RE: Using PLEG to copy a sensor value to another

      Just add LUA as a Logic Action triggered by a cyclic condition in PLEG
      Using Lua just get the value from the temp sensor variable and set the variable on the thermostat:

      local PipeTemp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", 42)
      luup.variable_set("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature",PipeTemp,44)
      
      
      posted in Vera
      korttoma
      korttoma
    • RE: OLED Scene controller

      I have noticed that in the latest Vera firmware if a variable has no value it does not show up in the Advanced -> Variables tab.

      Try writing some value manually from Apps -> Develop apps -> test loop code (here is an example):

      luup.call_action("urn:upnp-arduino-cc:serviceId:arduino1", "SendCommand", {radioId="11;3", variableId="VAR_4", value=1}, 24)

      24 in the example is the Id of the MySensors plugin Main device.
      11;3 in the example is altid of the sensor node device.

      After writing and refreshing of browser (Ctrl + F5) you should see the variables under Advanced -> Variables tab

      The command should also send the value to your child node.

      posted in Hardware
      korttoma
      korttoma
    • RE: Which dust sensor do you use and why?

      @gohan said in Which dust sensor do you use and why?:

      @korttoma if you have a library that can read the values from the sensor, you can easily add the mysensors code

      yeah I know, I just thought that if @NeverDie already made a MySensors sketch I would not have to invent the wheel again.

      @NeverDie what lib are you using and how? I2C?

      posted in Hardware
      korttoma
      korttoma