Navigation

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

    Posts made by ericvdb

    • RE: ESP8266 as MySensors nodes instead of Arduino + nRF24L01

      @AffordableTech

      MySensors = node --> gateway --> HA Controller

      If you want to use ESP8266 it is as easy as: ESP8266 node --> MQTT broker --> HA Controller

      The MQTT broker can run on a RPi (mosquitto for example)

      Regarding the ID assignment that will be DHCP if you want

      Just my 2c

      posted in Feature Requests
      ericvdb
      ericvdb
    • RE: MQTT on Serial Gateway?

      @Grubstake if you build a MQTT MySensors gateway, there's no OpenHab binding needed. Disadvantage is that you need to configure your nodes in OpenHab manually.

      posted in General Discussion
      ericvdb
      ericvdb
    • RE: N00b + MQTT gw + openHAB2

      @gohan said in N00b + MQTT gw + openHAB2:

      but anyway ethernet is the best solution for beginners because you can use myscontroller to debug messages while connected to controller.

      With MQTT you can also debug using MQTT-Spy or MQTTLens or various other MQTT apps.

      MQTT is easy in interconnecting various systems without they have to know about each-other.

      As long as you have a MQTT broker (RabbitMQ, Mosquitto, ActiveMQ, ...) you're all set.

      In OpenHab in conf/services create a file called mqtt.cfg, and past the following:

      mqtt:broker.url=tcp://ip-address-of-mqttbroker:1883
      mqtt:broker.clientId=openhab
      mqtt:broker.retain=true
      mqtt:broker.async=false
      

      Then in your items file you can do:

      Switch Light_GV_Hall    			"Ceiling"       	(GV_Hall, Lights) {mqtt=">[broker:myhome/room/switch1:command:ON:1],>[broker:myhome/room/switch1:command:OFF:0],<[broker:myhome/room/switch1:state:ON:1],<[broker:myhome/room/switch1:state:OFF:0"}
      

      And now you can turn on/off the light from OpenHab as wel as from any other device that publishes to the same toppic (yes, even from MQTT-Spy and MQTTLens)

      posted in Troubleshooting
      ericvdb
      ericvdb
    • RE: 💬 Building a Raspberry Pi Gateway

      use sudo 😉

      posted in Announcements
      ericvdb
      ericvdb
    • RE: Double click | Hold for buttons

      Maybe this will help: http://jmsarduino.blogspot.be/2009/10/4-way-button-click-double-click-hold.html

      posted in General Discussion
      ericvdb
      ericvdb
    • RE: RF433 transistor/fet wanted

      @Boots33 no, it's not the FS1000 type, but a regular cheap RF433 transmitter.
      The problem is that when powered with 12V, the transmitter does not see the 5V on the data pin as high.

      posted in Hardware
      ericvdb
      ericvdb
    • RF433 transistor/fet wanted

      Hi guys,

      who can help choosing a component.
      I'm building a RF433Mhz node to control wireless powerplugs. The transmitter works fine at 5V but the range is not that great.
      The transmitter can handle up to 12V, but I have no clue what transitor/fet i can use for both the power line and the data line.
      Yesterday I tried to use a opto-coupler but that is not fast enough, I clearly see on the scope the signal fading out when going from high to low.

      I also have some BC547 laying around, but that is inverting the signal, not what i want.

      Anyone can make some suggestions?

      Thanks in advance.

      Eric

      posted in Hardware
      ericvdb
      ericvdb
    • RE: 💬 Building a Raspberry Pi Gateway

      @ben999 Yes, version 2

      posted in Announcements
      ericvdb
      ericvdb
    • RE: Is this worth it?

      Dunno about that one but I bought a Rigol 1054z 50Mhz which you can freely upgrade to 100Mhz

      https://nl.aliexpress.com/item/FREE-SHIPPING-RIGOL-DS1054Z-50MHz-Digital-Oscilloscope-4-analog-channels-50MHz-bandwidth/32498608008.html

      posted in General Discussion
      ericvdb
      ericvdb
    • RE: 💬 Building a Raspberry Pi Gateway

      @marceloaqno

      When running as a service, is there a way to watch the debug log?

      posted in Announcements
      ericvdb
      ericvdb
    • RE: [SOLVED] GatewayESP8266MQTTClient node reboots permanently as soon as MyController activates it as gateway

      @DerTomm said:

      #define MY_MQTT_CLIENT_ID "mysensors-1"
      

      try changing to something like

      #define MY_MQTT_CLIENT_ID "mywifinode-1"
      

      You are using the same client ID on both controller and node

      posted in Troubleshooting
      ericvdb
      ericvdb
    • RE: 💬 Building a Raspberry Pi Gateway

      @marceloaqno I have it completely working now. 😆 A Raspberry Pi PulseCounter for water/gas/electricity consumption measurements with ethernet/mqtt. I can post my code here if you want.

      Minor detail:

      millis() / 1000;
      

      should be

      millis() * 1000;
      

      to get micros() 😉

      posted in Announcements
      ericvdb
      ericvdb
    • RE: 💬 Building a Raspberry Pi Gateway

      @marceloaqno

      I have it working 😃 only need to play with the debounce value

      posted in Announcements
      ericvdb
      ericvdb
    • RE: 💬 Building a Raspberry Pi Gateway

      @marceloaqno
      I have it almost working. Regarding the interrupt, I have to pull-up to 3.3V the io pin through a resistor of 10k?
      Right now the interrupt isn't firing

      posted in Announcements
      ericvdb
      ericvdb
    • RE: 💬 Building a Raspberry Pi Gateway

      @marceloaqno

      i was able to get a bit further by replacing all "unsigned long" declarations with "uint"

      Remains unsolved:

      root@raspberrypi:/downloads/MySensors# make
      cc  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/log.o drivers/Linux/log.c
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/noniso.o drivers/Linux/noniso.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Print.o drivers/Linux/Print.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetClient.o drivers/Linux/EthernetClient.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/SerialPort.o drivers/Linux/SerialPort.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Stream.o drivers/Linux/Stream.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/IPAddress.o drivers/Linux/IPAddress.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/compatibility.o drivers/Linux/compatibility.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/SoftEeprom.o drivers/Linux/SoftEeprom.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetServer.o drivers/Linux/EthernetServer.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o examples_linux/mysGateway.o examples_linux/mysGateway.cpp
      examples_linux/mysGateway.cpp: In function âvoid onPulse()â:
      examples_linux/mysGateway.cpp:96:28: error: âmicrosâ was not declared in this scope
           uint newBlink = micros();
                                  ^
      examples_linux/mysGateway.cpp: In function âvoid loop()â:
      examples_linux/mysGateway.cpp:180:25: error: call of overloaded âsleep(uint&)â is ambiguous
           sleep(SEND_FREQUENCY);
                               ^
      examples_linux/mysGateway.cpp:180:25: note: candidates are:
      In file included from examples_linux/mysGateway.cpp:22:0:
      /usr/include/unistd.h:444:21: note: unsigned int sleep(unsigned int)
       extern unsigned int sleep (unsigned int __seconds);
                           ^
      In file included from ./MySensors.h:320:0,
                       from examples_linux/mysGateway.cpp:60:
      ./core/MySensorsCore.cpp:543:8: note: int8_t sleep(uint32_t, bool)
       int8_t sleep(const uint32_t sleepingMS, const bool smartSleep) {
              ^
      Makefile:46: recipe for target 'examples_linux/mysGateway.o' failed
      make: *** [examples_linux/mysGateway.o] Error 1
      
      posted in Announcements
      ericvdb
      ericvdb
    • RE: 💬 Building a Raspberry Pi Gateway

      @marceloaqno

      Today i tried to use the sketch Water Meter Pulse Sensor in mysGateway.cpp but i run into alot of errors, you have any idea?

      mysGateway.cpp:

      /**
       * 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 Marcelo Aquino <marceloaqno@gmail.org>
       * Copyleft (c) 2016, Marcelo Aquino
       * 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.
       */
       
      #include <iostream>
      #include <cstdio>
      #include <unistd.h>
      
      // For more options run ./configure --help
      
      // Config file
      //#define MY_LINUX_CONFIG_FILE "/etc/mysensors.dat"
      
      // How many clients should be able to connect to this gateway (default 1)
      #define MY_GATEWAY_MAX_CLIENTS 10
      
      // Serial config
      // Enable this if you are using an Arduino connected to the USB
      //#define MY_LINUX_SERIAL_PORT "/dev/ttyACM0"
      // Enable this if you need to connect to a controller running on the same device
      //#define MY_IS_SERIAL_PTY
      // Choose a symlink name for the PTY device
      //#define MY_LINUX_SERIAL_PTY "/dev/ttyMySensorsGateway"
      // Grant access to the specified system group for the serial device
      //#define MY_LINUX_SERIAL_GROUPNAME "tty"
      
      // MQTT options
      //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 68
      //#define MY_PORT 1883
      //#define MY_MQTT_CLIENT_ID "mysensors-1"
      //#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
      //#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
      
      // Enable these if your MQTT broker requires usenrame/password
      //#define MY_MQTT_USER "username"
      //#define MY_MQTT_PASSWORD "password"
      
      // Flash leds on rx/tx/err
      //#define MY_DEFAULT_ERR_LED_PIN 12  // Error LED pin
      //#define MY_DEFAULT_RX_LED_PIN  16  // Receive LED pin
      //#define MY_DEFAULT_TX_LED_PIN  18  // Transmit LED pin
      // Inverse the blinking feature
      //#define MY_WITH_LEDS_BLINKING_INVERSE
      
      #include <MySensors.h>
      
      #define DIGITAL_INPUT_SENSOR 26                  // The digital input you attached your sensor.  (Only 2 and 3 generates interrupt!)
      
      #define PULSE_FACTOR 1000                       // Nummber of blinks per m3 of your meter (One rotation/liter)
      
      #define SLEEP_MODE false                        // flowvalue can only be reported when sleep mode is false.
      
      #define MAX_FLOW 40                             // Max flow (l/min) value to report. This filters outliers.
      
      #define CHILD_ID 1                              // Id of the sensor child
      
      unsigned long SEND_FREQUENCY = 30000;           // Minimum time between send (in milliseconds). We don't want to spam the gateway.
      
      MyMessage flowMsg(CHILD_ID,V_FLOW);
      MyMessage volumeMsg(CHILD_ID,V_VOLUME);
      MyMessage lastCounterMsg(CHILD_ID,V_VAR1);
      
      double ppl = ((double)PULSE_FACTOR)/1000;        // Pulses per liter
      
      volatile unsigned long pulseCount = 0;   
      volatile unsigned long lastBlink = 0;
      volatile double flow = 0;  
      bool pcReceived = false;
      unsigned long oldPulseCount = 0;
      unsigned long newBlink = 0;   
      double oldflow = 0;
      double volume =0;                     
      double oldvolume =0;
      unsigned long lastSend =0;
      unsigned long lastPulse =0;
      
      void onPulse()     
      {
        if (!SLEEP_MODE)
        {
          unsigned long newBlink = micros();   
          unsigned long interval = newBlink-lastBlink;
      
          if (interval!=0)
          {
            lastPulse = millis();
            if (interval<500000L) {
              // Sometimes we get interrupt on RISING,  500000 = 0.5sek debounce ( max 120 l/min)
              return;   
            }
            flow = (60000000.0 /interval) / ppl;
          }
          lastBlink = newBlink;
        }
        pulseCount++; 
      }
      
      void setup() {
        attachInterrupt(DIGITAL_INPUT_SENSOR, onPulse, FALLING); 
      }
      
      void presentation() {
        // Present locally attached sensors here  
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("Water Meter", "1.1");
      
        // Register this device as Waterflow sensor
        present(CHILD_ID, S_WATER);  
      }
      
      void loop() {
        // Send locally attached sensors data here
        unsigned long currentTime = millis();
      
          // Only send values at a maximum frequency or woken up from sleep
        if (SLEEP_MODE || (currentTime - lastSend > SEND_FREQUENCY))
        {
          lastSend=currentTime;
      
          if (!pcReceived) {
            //Last Pulsecount not yet received from controller, request it again
            request(CHILD_ID, V_VAR1);
            return;
          }
      
          if (!SLEEP_MODE && flow != oldflow) {
            oldflow = flow;
      
            Serial.print("l/min:");
            Serial.println(flow);
      
            // Check that we dont get unresonable large flow value. 
            // could hapen when long wraps or false interrupt triggered
            if (flow<((unsigned long)MAX_FLOW)) {
              send(flowMsg.set(flow, 2));                   // Send flow value to gw
            }  
          }
      
          // No Pulse count received in 2min 
          if(currentTime - lastPulse > 120000){
            flow = 0;
          } 
      
          // Pulse count has changed
          if ((pulseCount != oldPulseCount)||(!SLEEP_MODE)) {
            oldPulseCount = pulseCount;
      
            Serial.print("pulsecount:");
            Serial.println(pulseCount);
      
            send(lastCounterMsg.set(pulseCount));                  // Send  pulsecount value to gw in VAR1
      
            double volume = ((double)pulseCount/((double)PULSE_FACTOR));     
            if ((volume != oldvolume)||(!SLEEP_MODE)) {
              oldvolume = volume;
      
              Serial.print("volume:");
              Serial.println(volume, 3);
      
              send(volumeMsg.set(volume, 3));               // Send volume value to gw
            } 
          }
        }
        if (SLEEP_MODE) {
          sleep(SEND_FREQUENCY);
        }
      }
      

      ./configure --my-debug=enable --my-gateway=ethernet --my-radio=none --my-port=5003

      [SECTION] Detecting target machine.
      [OK] machine detected: SoC=BCM2835, Type=RPi, CPU=armv6l, REV=000e.
      [OK] init system detected: systemd
      [SECTION] Saving configuration.
      [SECTION] Cleaning previous builds.
      [OK] Finished.
      

      make:

      root@raspberrypi:/downloads/MySensors# make
      cc  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/log.o drivers/Linux/log.c
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/noniso.o drivers/Linux/noniso.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Print.o drivers/Linux/Print.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetClient.o drivers/Linux/EthernetClient.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/SerialPort.o drivers/Linux/SerialPort.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Stream.o drivers/Linux/Stream.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/IPAddress.o drivers/Linux/IPAddress.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/compatibility.o drivers/Linux/compatibility.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/SoftEeprom.o drivers/Linux/SoftEeprom.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetServer.o drivers/Linux/EthernetServer.cpp
      g++ -DMY_GATEWAY_LINUX -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=5003  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o examples_linux/mysGateway.o examples_linux/mysGateway.cpp
      examples_linux/mysGateway.cpp: In function âvoid onPulse()â:
      examples_linux/mysGateway.cpp:96:37: error: âmicrosâ was not declared in this scope
           unsigned long newBlink = micros();
                                           ^
      examples_linux/mysGateway.cpp: In function âvoid loop()â:
      examples_linux/mysGateway.cpp:166:41: error: call of overloaded âset(volatile long unsigned int&)â is ambiguous
             send(lastCounterMsg.set(pulseCount));                  // Send  pulsecount value to gw in VAR1
                                               ^
      examples_linux/mysGateway.cpp:166:41: note: candidates are:
      In file included from ./MySensors.h:319:0,
                       from examples_linux/mysGateway.cpp:60:
      ./core/MyMessage.cpp:222:12: note: MyMessage& MyMessage::set(const char*) <near match>
       MyMessage& MyMessage::set(const char* value) {
                  ^
      ./core/MyMessage.cpp:222:12: note:   no known conversion for argument 1 from âvolatile long unsigned intâ to âconst char*â
      ./core/MyMessage.cpp:234:12: note: MyMessage& MyMessage::set(bool)
       MyMessage& MyMessage::set(bool value) {
                  ^
      ./core/MyMessage.cpp:241:12: note: MyMessage& MyMessage::set(uint8_t)
       MyMessage& MyMessage::set(uint8_t value) {
                  ^
      ./core/MyMessage.cpp:256:12: note: MyMessage& MyMessage::set(uint32_t)
       MyMessage& MyMessage::set(uint32_t value) {
                  ^
      ./core/MyMessage.cpp:263:12: note: MyMessage& MyMessage::set(int32_t)
       MyMessage& MyMessage::set(int32_t value) {
                  ^
      ./core/MyMessage.cpp:270:12: note: MyMessage& MyMessage::set(uint16_t)
       MyMessage& MyMessage::set(uint16_t value) {
                  ^
      ./core/MyMessage.cpp:277:12: note: MyMessage& MyMessage::set(int16_t)
       MyMessage& MyMessage::set(int16_t value) {
                  ^
      examples_linux/mysGateway.cpp:180:25: error: call of overloaded âsleep(long unsigned int&)â is ambiguous
           sleep(SEND_FREQUENCY);
                               ^
      examples_linux/mysGateway.cpp:180:25: note: candidates are:
      In file included from examples_linux/mysGateway.cpp:22:0:
      /usr/include/unistd.h:444:21: note: unsigned int sleep(unsigned int)
       extern unsigned int sleep (unsigned int __seconds);
                           ^
      In file included from ./MySensors.h:320:0,
                       from examples_linux/mysGateway.cpp:60:
      ./core/MySensorsCore.cpp:543:8: note: int8_t sleep(uint32_t, bool)
       int8_t sleep(const uint32_t sleepingMS, const bool smartSleep) {
              ^
      Makefile:46: recipe for target 'examples_linux/mysGateway.o' failed
      make: *** [examples_linux/mysGateway.o] Error 1
      
      posted in Announcements
      ericvdb
      ericvdb
    • RE: 💬 Building a Raspberry Pi Gateway

      @marceloaqno what about gpio interrupts, is that supported?

      I'm thinking to use a RPi as a pulse counter for water, electricity and gas with no radio, just ethernet or mqtt.
      In combination with a I2C display, this could be a nice project 😉

      Greetz,
      Eric

      posted in Announcements
      ericvdb
      ericvdb
    • RE: combining pulse counters

      Here is the difference in code.

      Digital IO polling:

      int inPin = 7;   // pushbutton connected to digital pin 7
      int val = 0;     // variable to store the read value
      
      void setup()
      {
        pinMode(inPin, INPUT);      // sets the digital pin 7 as input
      }
      
      void loop()
      {
        val = digitalRead(inPin);   // read the input pin
      }
      

      Interrupt based:

      const byte interruptPin = 2;
      volatile byte state = LOW;
      
      void setup() {
        pinMode(interruptPin, INPUT_PULLUP);
        attachInterrupt(digitalPinToInterrupt(interruptPin), blink, CHANGE);
      }
      
      void loop() {
        // do whatever you want here
      }
      
      void blink() {
        // this gets called whenever the input changes
        state = !state;
      }
      posted in Development
      ericvdb
      ericvdb
    • RE: combining pulse counters

      Interrupt: whenever you input changes from low-to-high or high-to-low, the atmega will fire the method you told it to do.
      Digital IO: if you want to know the state of the digital io, you have to constantly poll the io.

      Regarding 3 counters on 1 nano, have a look at 12 input pulse counter

      posted in Development
      ericvdb
      ericvdb
    • RE: combining pulse counters

      No, use 1 nano, use interrupts for electricity and gas, and use digital input for water.
      Unless you want everything interrupt based, then you will need 2 x nano (or a mega)

      posted in Development
      ericvdb
      ericvdb
    • RE: combining pulse counters

      yes but not interrupt based.

      Have a look at button sketch

      posted in Development
      ericvdb
      ericvdb
    • RE: combining pulse counters

      There are only 2 interrupts available, thats why you are not seeing the pulses from the 3th

      posted in Development
      ericvdb
      ericvdb
    • RE: 💬 Building a Raspberry Pi Gateway

      Would it be possible to connect a I2C display to display some information, and drive that display from within mysGatway.cpp ?

      posted in Announcements
      ericvdb
      ericvdb
    • RE: MySensors Raspberry port suggestions

      @marceloaqno said:

      Update: Added support for status leds (RX/TX/ERR), you can enable it in examples_linux/mysGateway.cpp file.

      // Flash leds on rx/tx/err
      //#define MY_DEFAULT_ERR_LED_PIN 12 // Error LED pin
      //#define MY_DEFAULT_RX_LED_PIN 16 // Receive LED pin
      //#define MY_DEFAULT_TX_LED_PIN 18 // Transmit LED pin

      What do I put there? RPi pin numbers or GPIO numbers?

      posted in Development
      ericvdb
      ericvdb
    • RE: MySensors Raspberry port suggestions

      @marceloaqno

      what am I doing wrong here?

      root@raspberrypi:/downloads/MySensors# ./configure --my-gateway=mqtt --my-mqtt-client-id=msgw --my-mqtt-publish-topic-prefix=mspub --my-mqtt-subscribe-topic-prefix=mssub --my-controller-ip-address=10.0.10.4 --my-port=1883
      [SECTION] Detecting target machine.
      [OK] machine detected: SoC=BCM2835, Type=RPi, CPU=armv6l, REV=000d.
      [OK] init system detected: systemd
      [SECTION] Saving configuration.
      [SECTION] Cleaning previous builds.
      [OK] Finished.
      root@raspberrypi:/downloads/MySensors# make
      cc  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/log.o drivers/Linux/log.c
      g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/noniso.o drivers/Linux/noniso.cpp
      g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Print.o drivers/Linux/Print.cpp
      g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetClient.o drivers/Linux/EthernetClient.cpp
      g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/SerialPort.o drivers/Linux/SerialPort.cpp
      g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Stream.o drivers/Linux/Stream.cpp
      g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/IPAddress.o drivers/Linux/IPAddress.cpp
      g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/compatibility.o drivers/Linux/compatibility.cpp
      g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetServer.o drivers/Linux/EthernetServer.cpp
      g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o examples_linux/mysGateway.o examples_linux/mysGateway.cpp
      In file included from ./MySensors.h:287:0,
                       from examples_linux/mysGateway.cpp:60:
      ./core/MyTransport.cpp: In function âvoid transportProcessMessage()â:
      ./core/MyTransport.cpp:535:61: error: no matching function for call to âmin(uint8_t, unsigned int)â
        const uint8_t msgLength = min(mGetLength(_msg), MAX_PAYLOAD);
                                                                   ^
      ./core/MyTransport.cpp:535:61: note: candidates are:
      In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                       from /usr/include/c++/4.9/ios:40,
                       from /usr/include/c++/4.9/ostream:38,
                       from /usr/include/c++/4.9/iostream:39,
                       from examples_linux/mysGateway.cpp:20:
      /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
           min(const _Tp& __a, const _Tp& __b, _Compare __comp)
           ^
      /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note:   template argument deduction/substitution failed:
      In file included from ./MySensors.h:287:0,
                       from examples_linux/mysGateway.cpp:60:
      ./core/MyTransport.cpp:535:61: note:   deduced conflicting types for parameter âconst _Tpâ (âunsigned charâ and âunsigned intâ)
        const uint8_t msgLength = min(mGetLength(_msg), MAX_PAYLOAD);
                                                                   ^
      In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                       from /usr/include/c++/4.9/ios:40,
                       from /usr/include/c++/4.9/ostream:38,
                       from /usr/include/c++/4.9/iostream:39,
                       from examples_linux/mysGateway.cpp:20:
      /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
           min(const _Tp& __a, const _Tp& __b)
           ^
      /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note:   template argument deduction/substitution failed:
      In file included from ./MySensors.h:287:0,
                       from examples_linux/mysGateway.cpp:60:
      ./core/MyTransport.cpp:535:61: note:   deduced conflicting types for parameter âconst _Tpâ (âunsigned charâ and âunsigned intâ)
        const uint8_t msgLength = min(mGetLength(_msg), MAX_PAYLOAD);
                                                                   ^
      ./core/MyTransport.cpp: In function âbool transportSendWrite(uint8_t, MyMessage&)â:
      ./core/MyTransport.cpp:826:82: error: no matching function for call to âmin(unsigned int, const uint8_t&)â
        bool result = transportSend(to, &message, min(MAX_MESSAGE_LENGTH, totalMsgLength));
                                                                                        ^
      ./core/MyTransport.cpp:826:82: note: candidates are:
      In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                       from /usr/include/c++/4.9/ios:40,
                       from /usr/include/c++/4.9/ostream:38,
                       from /usr/include/c++/4.9/iostream:39,
                       from examples_linux/mysGateway.cpp:20:
      /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
           min(const _Tp& __a, const _Tp& __b, _Compare __comp)
           ^
      /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note:   template argument deduction/substitution failed:
      In file included from ./MySensors.h:287:0,
                       from examples_linux/mysGateway.cpp:60:
      ./core/MyTransport.cpp:826:82: note:   deduced conflicting types for parameter âconst _Tpâ (âunsigned intâ and âuint8_t {aka unsigned char}â)
        bool result = transportSend(to, &message, min(MAX_MESSAGE_LENGTH, totalMsgLength));
                                                                                        ^
      In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                       from /usr/include/c++/4.9/ios:40,
                       from /usr/include/c++/4.9/ostream:38,
                       from /usr/include/c++/4.9/iostream:39,
                       from examples_linux/mysGateway.cpp:20:
      /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
           min(const _Tp& __a, const _Tp& __b)
           ^
      /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note:   template argument deduction/substitution failed:
      In file included from ./MySensors.h:287:0,
                       from examples_linux/mysGateway.cpp:60:
      ./core/MyTransport.cpp:826:82: note:   deduced conflicting types for parameter âconst _Tpâ (âunsigned intâ and âuint8_t {aka unsigned char}â)
        bool result = transportSend(to, &message, min(MAX_MESSAGE_LENGTH, totalMsgLength));
                                                                                        ^
      Makefile:46: recipe for target 'examples_linux/mysGateway.o' failed
      make: *** [examples_linux/mysGateway.o] Error 1
      root@raspberrypi:/downloads/MySensors#
      
      posted in Development
      ericvdb
      ericvdb
    • RE: Gas meter monitoring with optical sensor

      @rubyan , I used this method too many years ago, but it was not reliable in my case because the meter was located in the garage, and every time we turned on the light, it would add pulses.

      Can you post a picture of you complete gas meter? Depending on your meter I might have a better solution 😉

      posted in My Project
      ericvdb
      ericvdb
    • RE: My basement flooding alarm

      @GertSanders said:

      The node resets itself to a start position on startup. This means that during startup a first distance measurement is done. This is the "zero" level. Any deviation from that first measured distance is "the change".

      Small caveat @GertSanders , if your basement is flooded with 9cm of water and still rising, when at that moment the power interrupts for a few seconds, your node will reset and take the 9cm as the zero level, meaning, your pump will start then when there's 19cm of water. Will not be a big issue, but your pump will need to run longer, and hoping there won't be any other power interruptions.

      Great project btw.

      posted in My Project
      ericvdb
      ericvdb
    • RE: [solved] MySensorWrapper - Wrapping sensor libraries for MySensors 2.0.x - need help

      @Daniel-Oliveira That seems to me an issue with the build process.
      I think you better point this out on the VisualMicro Forum

      posted in Development
      ericvdb
      ericvdb
    • RE: How to connect USBASP to a bare atmega328p

      Just take out the Atmega328p from your Arduino Uno, put in a new Atmega328p, connect your USBASP and burn the bootloader.

      posted in Troubleshooting
      ericvdb
      ericvdb
    • RE: MySensors Raspberry port suggestions

      @marceloaqno thanks, will try this asap. What about the status leds, is that supported?

      posted in Development
      ericvdb
      ericvdb
    • RE: MySensors Raspberry port suggestions

      Do I get it right that this is a RPi gateway with directly connected RF24L01+ tranceiver with support for both ethernet and MQTT?

      If so, is there a guide somewhere on how to set this all up?

      posted in Development
      ericvdb
      ericvdb
    • RE: Stand alone lighting control system

      @Stuart-Middleton you can do node-to-node as well as node-to-gateway communication one after the other.
      Your switch node can send a command to the relay node, and send a command to the gateway. But to be honestly, I would have the relay nodes communicate their changed status to the gateway, that way if you press a button on a switch node, and it does not arrive at the relay node, but it arrives at the gateway, you controller will think the light is on while it is not.

      Regarding the mapping, i would build my switching nodes so that when they boot up, they ask the controller for the mapping and store that in the eeprom. (or make a function that when button 1 on a switch node is pressed for 5 secs, it asks the controller for the mapping) This makes it all independent from any gateway and/or controller while you retain the flexibility of changing mappings afterwards.

      Just my 2c's

      Greetings

      posted in General Discussion
      ericvdb
      ericvdb
    • RE: Alternative to ArduinoIDE

      There is also Visual Micro for Visual Studio

      posted in General Discussion
      ericvdb
      ericvdb
    • RE: Over the air

      @Jason-Brunk i believe MyController supports OTA over MQTT

      posted in Hardware
      ericvdb
      ericvdb
    • RE: Female-female header connectors?

      Make your own 😉 Just grab a piece of breadboard, cut to the size of the 2 female headers and solder the 2 female headers to it and your done.
      breadboard

      posted in Hardware
      ericvdb
      ericvdb
    • RE: Meetup in the Netherlands - Saturday July 30th, in Breda!

      Did anyone took some pics?

      posted in General Discussion
      ericvdb
      ericvdb
    • RE: ESP-12E as pulse sensor with Eastron SDM120

      If you have TL light in the room where the meter is located will cause false pulses when you turn on/off the light. Try adding caps on both ends (near the kwh meter and your arduino)

      posted in Hardware
      ericvdb
      ericvdb
    • RE: Water high volume flow meter

      The pump of my swimming pool can do 240L/min, the pipe diameter is 35mm.

      posted in Hardware
      ericvdb
      ericvdb
    • Water high volume flow meter

      Guys,

      did anyone came across a water flow meter for +/- 240L/min? Most i find is 30L/min.

      Thanks in advance

      posted in Hardware
      ericvdb
      ericvdb
    • RE: MySensors nodes with Ethernet interface only

      Will this include nodes with ESP8266 modules too?

      posted in My Project
      ericvdb
      ericvdb
    • RE: MyNodes.NET moving to node.js.

      Hi,

      I knew about MyNodes.Net already a couple of months ago, but only tried it yesterday, and man, why the hell didn't i tried this sooner, it is absolutely a breeze to work with, you can do complex things in very little time. Amazingly job you did there.

      The editor is really great, but it would be nice to see the actual values on the nodes, especially the constant node. Now you always have to go to configure to see/check what the constant node contains.

      I think there is a bug in the Google speech part. I played around a bit with it, but no matter what i try, it always plays the message twice.

      And one more issue, if you add 4 panels, with the 1st one being a bit long, the 4th one appears in the middle on the 2nd row with many whitespace between the 2nd panel and the 4th panel, is this intended?

      BTW, moving to node.js, does that mean you will abandon .Net ?

      Keep up the great work.

      Greetings,
      Eric

      posted in MyNodes.NET
      ericvdb
      ericvdb
    • RE: NRF24L01+ range of only few meters

      the 3.3V on the arduino boards suck. Do not use that, instead use the 5V with your own 3.3V regulator.

      posted in Hardware
      ericvdb
      ericvdb
    • RE: Tiny 0.8-3.3V sleep current

      I talked about it here with measurements and pictures.

      And no, they don't have a powerled 😉

      posted in Hardware
      ericvdb
      ericvdb
    • RE: Pressure Sensor Node send fails.

      Is your controller setup to hand out ID's to the sensor nodes?
      What if you set a fixed ID?

      posted in Troubleshooting
      ericvdb
      ericvdb
    • RE: ST=FAIL?!

      You know that your node is also acting as a repeater? If that's not what you want, you need to do

      gw.begin(NULL,11,false);
      posted in General Discussion
      ericvdb
      ericvdb
    • RE: Number of decimals in sketches

      If you use Set to send your temp/hum you can define how many decimals you want:

      MyMessage& set(float value, uint8_t decimals);
      

      For example:

      gw.send(msgTemp.set(temperature, 1));
      

      will send you the value with 1 decimal.

      Reference: here

      posted in General Discussion
      ericvdb
      ericvdb
    • RE: Request for input: Driving 2 rgb stripes with 1 Arduino

      @Oitzu, that looks familiar, Ikea right 😉

      posted in Hardware
      ericvdb
      ericvdb
    • RE: The new Atmega328PB

      With the 2 SPI ports, the softSpi library is not needed. Wouldn't that free up some space for a gateway?

      posted in Hardware
      ericvdb
      ericvdb
    • RE: The new Atmega328PB

      @samuel235 with pleasure 😉

      posted in Hardware
      ericvdb
      ericvdb
    • The new Atmega328PB

      The high-performance Atmel® ATmega328PB is an 8-bit AVR RISC-based microcontroller (MCU) with picoPower® technology. It combines 32kB ISP Flash memory with read-while-write capabilities, 1kB EEPROM, 2kB SRAM, 27 general purpose I/O lines, 32 general purpose working registers, five flexible timer/counters with compare modes, internal and external interrupts, two USARTs with wake-up on start of transmission, two byte-oriented 2-wire serial interfaces, two SPI serial ports, 8-channel 10-bit A/D converter, programmable watchdog timer with internal oscillator, a unique serial number and six software selectable power saving modes. The device operates between 1.8-5.5 volts.

      The ATmega328PB is the first 8-bit AVR MCU to feature the QTouch® Peripheral Touch Controller (PTC), which acquires signals in order to detect touch on capacitive sensors, and supports both self- and mutual-capacitance sensors. The PTC is supported by the QTouch Composer development tool (QTouch Library project builder and QTouch Analyzer). It provides a faster and less complex capacitive touch implementation in any application.

      The ATmega328PB supports 24 buttons in self-capacitance mode, or up to 144 buttons in mutual-capacitance mode. Mixing and matching mutual-and self-capacitance sensors is possible, and only one pin is required per electrode – no external components are required, delivering savings on the BOM cost compared to competing solutions.
      By executing powerful instructions in a single clock cycle, the device achieves throughputs approaching 1 MIPS per MHz, balancing power consumption and processing speed.

      Nice feature for MySensors is that it has 2 SPI interfaces, so nice for the ethernet gateway 😉 and also has a Unique ID

      Application note here

      Thanks to @samuel235 for finding this.

       Flash (Kbytes):				32 Kbytes
       Pin Count:						32
       Max. Operating Freq. (MHz):		20 MHz
       CPU:							8-bit AVR
       # of Touch Channels:			12
       Hardware QTouch Acquisition:	Yes
       Max I/O Pins:					27
       Ext Interrupts:				27
       USB Speed:						No
       USB Interface:					No
       SPI:							2
       TWI (I2C):						2
       UART:							2
       Graphic LCD:					No
       Video Decoder:					No
       Camera Interface:				No
       ADC Channels:					8
       ADC Resolution (bits):			10
       ADC Speed (ksps):				15
       Analog Comparators:			1
       Resistive Touch Screen:		No
       DAC Channels:					0
       DAC Resolution (bits):			0
       Temp. Sensor:					Yes
       Crypto Engine:					No
       SRAM (Kbytes):					2
       EEPROM (Bytes):				1024
       Self Program Memory:			YES
       External Bus Interface:		0
       DRAM Memory:					No
       NAND Interface:				No
       picoPower:						Yes
       Temp. Range (deg C):			-40 to 85
       I/O Supply Class:				1.8 to 5.5
       Operating Voltage (Vcc):		1.8 to 5.5
       FPU:							No
       MPU / MMU:						no / no
       Timers:						5
       Output Compare Channels:		10
       Input Capture Channels:		3
       PWM Channels:					10
       32kHz RTC:						Yes
       Calibrated RC Oscillator:		Yes
       Watchdog:						Yes
       CAN:							0
       LIN:							0
       Ethernet:						0
       Debug Interface:				debugWIRE
       I2S:							No
       RTC:							Counter
      posted in Hardware
      ericvdb
      ericvdb
    • RE: My motion / dallas / light sensor

      Are you using a wifi gateway? Others reported strange values too: http://forum.mysensors.org/topic/2934/wifi-gateway-motion-sensor-value-1107296256-instead-of-tripped/2

      posted in Development
      ericvdb
      ericvdb
    • RE: Infrared Temp Sensor

      or contact-less body temperature 😉

      posted in Hardware
      ericvdb
      ericvdb
    • RE: Where do I find Serial Gateway for Raspberry?

      https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/examples/SerialGateway/SerialGateway.ino

      posted in Development
      ericvdb
      ericvdb
    • RE: My Slim 2AA Battery Node

      @ahmedadelhosni that really sucks 😞

      posted in My Project
      ericvdb
      ericvdb
    • RE: Battery percentage - Help needed

      Your 100 k ohm should be 1 M Ohm

      And you swapped the resistors, R1 should be 1Mohm, R2 should be 470kohm.
      And to stabilize the readings a bit, add a 0.1uF capacitor over R2

      posted in Hardware
      ericvdb
      ericvdb
    • RE: My motion / dallas / light sensor

      The 0 before 65.30 is the index number of the temperature sensor.

      And to get Celsius, you should make the controller return true for gw.getConfig().isMetric or change

      float temperature = static_cast<float>(static_cast<int>((gw.getConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
      

      to

      float temperature = static_cast<float>(static_cast<int>((metric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
      posted in Development
      ericvdb
      ericvdb
    • RE: Mysensors ESP8266 GW with relay - Presentation relay not working why?

      please indent your code with 4 spaces to keep it readable.
      And in the arduino gui press CTRL-T to tabify your code correctly 😉

      posted in Development
      ericvdb
      ericvdb
    • RE: Optimize ardiuno pro mini 3.3V to battery power

      I stopped using those mini's, instead i buy the atmega328 dip version, easier to handle then the smd version. My nodes consume 50uA dusing sleep (atmega, ds18B20, LDO and Booster)

      posted in Hardware
      ericvdb
      ericvdb
    • RE: gateway wont recieve new sensors

      Did you add Decoupling-Capacitor to the nrf power lines? See here

      posted in Troubleshooting
      ericvdb
      ericvdb
    • RE: Where next with making prototype more permanent?

      This is one I like, and could be of use to you: Link

      posted in My Project
      ericvdb
      ericvdb
    • RE: 18V => 5V Step-Down

      Keep in mind that often doorbells are AC, and not DC.

      posted in General Discussion
      ericvdb
      ericvdb
    • RE: Why can't I assign a static NODE_ID in one sketch; but not the other?

      In the first sketch change

      gw.begin (msg, NODE_ID) ;
      

      to

      gw.begin (NULL, NODE_ID) ;
      posted in Troubleshooting
      ericvdb
      ericvdb
    • RE: Test of Step-Up-Modules (sparkfun, Pololu & china-module) / any other?

      No time to look for the datasheet atm, but here are some pics:

      IMG_0695.JPG

      IMG_0696.JPG

      IMG_0697.JPG

      posted in Hardware
      ericvdb
      ericvdb
    • RE: livolo Glass Panel Touch Light Wall Switch + arduino 433Mhz

      @mickaelh51 ,

      I found this post on the arduino forum, and his seller said it is 433.92Mhz

      posted in My Project
      ericvdb
      ericvdb
    • RE: Test of Step-Up-Modules (sparkfun, Pololu & china-module) / any other?

      @icebob said:

      @ericvdb great observation. But this board is not an MCP1702, because MCP1702 is a voltage regulator IC

      Where did you read that it's an MCP1702??

      This test setup has a Step-Up module to 5V AND a voltage regulator to 3.3V. I never mentioned the MCP is included in the Step-Up module.

      posted in Hardware
      ericvdb
      ericvdb
    • RE: Auto Node ID Assignment Question

      Just name your sensor nodes accordingly to the room they're in

      posted in Troubleshooting
      ericvdb
      ericvdb
    • RE: Test of Step-Up-Modules (sparkfun, Pololu & china-module) / any other?

      Just took the time to shoot a pic of my Step-Up consumption, including a Voltage regulator MCP1702-3.3

      As you can see, it's consuming 54uA with nothing connected.

      Step-Up module: link

      The capacitors are really important, one on the input of the step-up module, the other on the output of the MCP1702-3.3, both are 22uF. Without them, consumption is 2.20mA

      IMG_0688 (2).JPG

      posted in Hardware
      ericvdb
      ericvdb
    • RE: Need some help to start....

      As you can see in my screenshots, i'm also running 1.6.7 and i have no issues at all.

      posted in General Discussion
      ericvdb
      ericvdb
    • RE: Need some help to start....

      Your libraries folder should look like this:

      upload-ebc1aaee-0c0f-4184-ad7d-3a54681bf9a7

      Then you should see in the arduino gui:

      upload-c7796245-4038-4239-ad0f-54f367de54ab

      posted in General Discussion
      ericvdb
      ericvdb
    • RE: repeater node with sensor

      mfalkvidd means:

      gw.wait(dht.getMinimumSamplingPeriod());
      posted in General Discussion
      ericvdb
      ericvdb
    • RE: Irrigation Controller - Relays not working??

      Post your exact code, that could help us looking at the problem.

      posted in Troubleshooting
      ericvdb
      ericvdb
    • RE: repeater node with sensor

      Keep this in your loop otherwise it will not process messages:

      gw.process();
      

      PS @cranky beat me with an example 😉

      posted in General Discussion
      ericvdb
      ericvdb
    • RE: 3 in 1 incl battery monitor

      @icebob,
      whats that app you are using to do the battery calculations?

      posted in My Project
      ericvdb
      ericvdb
    • RE: Improve DS18B20 resolution

      @Yveaux ,

      not entirely true, read a bit further in the datasheet:

      The resolution of the temperature sensor is user-configurable to 9, 10, 11, or 12 bits, corresponding to increments of 0.5°C, 0.25°C, 0.125°C, and 0.0625°C, respectively.
      The default resolution at power-up is 12-bit

      posted in Hardware
      ericvdb
      ericvdb
    • RE: Improve DS18B20 resolution

      You can do as follows:

      //Declare a DeviceAddress
      DeviceAddress deviceAddress;
      
      //In your setup routine do
      sensors.getAddress(deviceAddress, index);
      //Set the resolution to 9/10/11/12 bits
      sensors.setResolution(deviceAddress, 9);
      
      //In your loop change
      gw.send(msg.setSensor(i).set(temperature,1));
      // to
      gw.send(msg.setSensor(i).set(temperature,2));
      

      Just for information, remember that the stepsize in 12bit = 0.0625 °C, so don't expect to see temperature readings like 12.50, 12.51, 12.52, ...

      posted in Hardware
      ericvdb
      ericvdb
    • RE: Issues reading from serial gateway

      Sure, thats what all the controllers do.

      Have a read on the API page

      posted in Development
      ericvdb
      ericvdb
    • RE: Issues reading from serial gateway

      Exactly, It's the controllers job to give out ID's to the Node's. There's no way around other then setting the Node ID in the sketch as i mentioned above.

      posted in Development
      ericvdb
      ericvdb
    • RE: Wifi gateway is it working?

      Change

      gw.begin();
      

      to

      gw.begin(null, 10, false);
      

      where 10 is the Node ID in this example.

      posted in General Discussion
      ericvdb
      ericvdb
    • RE: Issues reading from serial gateway

      Change http://www.mysensors.org/build/binary#binaryswitchsensor-example line 46

      gw.begin();
      

      to

      gw.begin(null, 10, false);
      

      Where 10 is in this example the Node ID

      posted in Development
      ericvdb
      ericvdb
    • RE: Merry Christmas and a Happy New 2016

      Merry Christmas to all from Belgium 😉

      posted in Announcements
      ericvdb
      ericvdb
    • RE: RFID Garage door opener

      @Lawrence-Helm said:

      very cool, might have a go at some stage to try and use the nfc variant... So that you can open it with your phone http://www.aliexpress.com/item/Free-shipping-PN532-NFC-RFID-module-User-Kits-for-Arduino-compatible/2009097698.html?spm=2114.01020208.3.1.piLmyG&ws_ab_test=searchweb201556_9_79_78_77_80,searchweb201644_5,searchweb201560_6

      Well, I have that NFC reader, and I also have 2 Huawei G8 phones that have NFC build in. They both have the same NFC UID (1234), so distinguishing who opened the door is a problem. Even worse, a google search revealed that most phones have the same 1234 UID configured, which means that anyone with a NFC enabled phone can open your door!!!

      I still have to find a way to change that UID on the phone, or add extra NFC tags into the phone.

      posted in My Project
      ericvdb
      ericvdb
    • RE: Ethernet Gateway and Window Sensor dont communicate.

      No, you are getting it wrong.

      The gateway never assigns ID to sensors, thats the task of a controller:

      sensor ---> gateway ---> controller (where controller is one of the controllers listed here

      Alternatively, you can set a static ID on your sensornode by doing

      // Assign ID 6 to sensor node
      gw.begin(NULL,6,false);
      

      instead of

      gw.begin(NULL,AUTO,false);
      posted in Troubleshooting
      ericvdb
      ericvdb
    • RE: Ethernet Gateway and Window Sensor dont communicate.

      Your sensor is requesting an ID. What controller are you using?

      posted in Troubleshooting
      ericvdb
      ericvdb
    • RE: Error compiling librf24-bcm for Serial gateway directly to Rpi2

      I also had this error when I did an update and upgrade on Pi. Try again with the downloaded image without update and upgrade.

      posted in Troubleshooting
      ericvdb
      ericvdb
    • RE: MyController.org

      The 100% cpu usage happens only if nothing connects to /dev/ttyMySensorsGateway, at least thats what i experienced.

      posted in MyController.org
      ericvdb
      ericvdb
    • RE: Test of Step-Up-Modules (sparkfun, Pololu & china-module) / any other?

      Crap?? The ones I got consume +/- 60uA while the arduino is sleeping, wouldn't say thats crap...

      posted in Hardware
      ericvdb
      ericvdb
    • RE: Test of Step-Up-Modules (sparkfun, Pololu & china-module) / any other?

      I bought these, both the 5V and 3.3V versions

      http://www.aliexpress.com/item/8pcs-Very-small-DC-DC-0-9-5V-to-DC-5V-Step-UP-Boost-Voltage-Converter/32268508188.html

      http://www.aliexpress.com/store/product/8-pcs-Ultra-small-DC-DC-0-8-3-3V-to-DC-3-3V-Step-UP/1525466_32268496143.html

      posted in Hardware
      ericvdb
      ericvdb
    • RE: MyController.org

      @jkandasa Would it be possible to add a graph for the battery percentage?

      posted in MyController.org
      ericvdb
      ericvdb
    • RE: cc1101 rf433mhz with mysensors

      I don't think the RCSwitch library is compatible with the CC1101. It uses the dirt cheap RF TX/RX modules that require just 1 pin each, while the CC1101 uses SPI. That also implies you will need to use SoftSPI on your sensor node.

      posted in My Project
      ericvdb
      ericvdb
    • RE: How to bootload OTA on arduino pro mini?

      In the file arduino-1.6.5-r2\hardware\arduino\avr\boards.txt add a new section with the correct settings

      ## Arduino Pro or Pro Mini (3V3 & 5V, 16 MHz) w/ ATmega328 MYSBootloader
      ## -------------------------------------------------
      
      
      proMYSBL.menu.cpu.8MHzatmega328=ATmega328 16Mhz MYSBootloader
      proMYSBL.menu.cpu.8MHzatmega328.upload.tool=avrdude
      proMYSBL.menu.cpu.8MHzatmega328.upload.protocol=arduino
      proMYSBL.menu.cpu.8MHzatmega328.upload.maximum_size=30720
      proMYSBL.menu.cpu.8MHzatmega328.upload.maximum_data_size=2048
      proMYSBL.menu.cpu.8MHzatmega328.upload.speed=115200
      proMYSBL.menu.cpu.8MHzatmega328.bootloader.tool=avrdude
      proMYSBL.menu.cpu.8MHzatmega328.bootloader.low_fuses=0xF7
      proMYSBL.menu.cpu.8MHzatmega328.bootloader.high_fuses=0xDA
      proMYSBL.menu.cpu.8MHzatmega328.bootloader.extended_fuses=0x06
      proMYSBL.menu.cpu.8MHzatmega328.bootloader.unlock_bits=0x3F
      proMYSBL.menu.cpu.8MHzatmega328.bootloader.lock_bits=0x0F
      proMYSBL.menu.cpu.8MHzatmega328.bootloader.file=MySensors/MYSBootloader.hex
      proMYSBL.menu.cpu.8MHzatmega328.build.mcu=atmega328p
      proMYSBL.menu.cpu.8MHzatmega328.build.f_cpu=16000000L
      proMYSBL.menu.cpu.8MHzatmega328.build.board=AVR_UNO
      proMYSBL.menu.cpu.8MHzatmega328.build.core=arduino
      proMYSBL.menu.cpu.8MHzatmega328.build.variant=standard
      

      save the file and restart the arduino IDE

      posted in Development
      ericvdb
      ericvdb
    • RE: Low Power Temperature Sensor

      My 2xAA Nimh or 1 x 18650 Li-Ion battery sensors use a DC-DC boost converter to crank up the voltage to 5V, then with a LDO MCP1702 i step down to 3.3V to power the arduino pro mini, the nRF24L01+ and the DS18B20. First test results show me that over 2 weeks my battery voltage went down with 4%, that should give me theoretically +/- 8 months without charging the batteries.

      http://www.aliexpress.com/item/8pcs-Very-small-DC-DC-0-9-5V-to-DC-5V-Step-UP-Boost-Voltage-Converter/32268508188.html
      http://www.aliexpress.com/item/MCP1702-3302E-TO-IC-REG-LDO-3-3V-25A-TO-92-3-MCP1702-3302E-1702-MCP1702/32225711061.html

      posted in Hardware
      ericvdb
      ericvdb
    • RE: Presence detection

      @pbcstudios good luck with the dating 😉

      posted in Hardware
      ericvdb
      ericvdb
    • RE: Presence detection

      Another way is to track the amount of people that enters the room. This can be done with a double IR beam horizontally placed next to each-other (IR-A and IR-B). Now when a person walks into the room, you know that IR-A triggers before IR-B, and you increment the room-occupants-counter with 1. If the person leaves the room, IR-B will trigger before IR-A and you decrease the counter.

      The IR barrier can be installed inside the door casing.

      Using this technique you don't need a PIR sensor, unless the room has a window and you want to detect movement without someone passed the IR beams (a burglar maybe?)

      Combine the IR beams with a lightsensor and you can also define that the light should go on only below a certain light level.

      My 2 cents...

      posted in Hardware
      ericvdb
      ericvdb
    • RE: Windows GUI/Controller for MySensors

      @tekka would you mind describing in detail the process (on the controller side) how the OTA works?

      posted in Controllers
      ericvdb
      ericvdb
    • RE: Windows GUI/Controller for MySensors

      @tekka i guess OTA is not available when using a MQTT gateway?

      I would like to switch my whole setup to MQTT, but don't wanna loose the super fantastic OTA feature.

      posted in Controllers
      ericvdb
      ericvdb
    • RE: New Project with MySensor network and autonomous nodes

      I like the idea to change the sleeping times from the controller. 😄 You could use the VAR1-5 value types for that.

      @hek, this calls for a I_SLEEPTIME internal variable 😉

      posted in My Project
      ericvdb
      ericvdb
    • RE: LCD display for MQTT gateway

      12, 11 and 10 are used by the ethernetshield for the SPI bus. You should use other pins for the lcd display.

      posted in Troubleshooting
      ericvdb
      ericvdb
    • Repeater questions

      Can I send a heartbeat from the repeater node like this,

      unsigned long lastHeartbeat = 0;
      #define HEARTBEAT_INTERVAL 3600000
      
      void loop() {
      if (millis() - lastHeartbeat > HEARTBEAT_INTERVAL) {
        ... PING ....
        lastHeartbeat = millis();
        }
      }
      

      and will the status leds work on a repeater node?

      I thought I ask first before spending time making the modifications.

      Greetz

      posted in Development
      ericvdb
      ericvdb