Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Patrik Söderström
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Patrik Söderström

    @Patrik Söderström

    8
    Reputation
    30
    Posts
    712
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Patrik Söderström Follow

    Best posts made by Patrik Söderström

    • Hack air refresher

      I have an air refresher in the main bathroom, the problem with that one is that is spraying in constant intervals, so even if no one has been in the bathroom for a long time (during night for example).

      Now when I have started with Arduino and MySensors I think it would be possible to hack this one, so I can trigger it via sensors or schedules.

      2_1475517290733_20161002_114323.jpg 1_1475517290730_20161002_114302.jpg 0_1475517290728_20161002_114251.jpg

      Have anyone tried this before? 🙂

      posted in My Project
      Patrik Söderström
      Patrik Söderström
    • RE: 💬 Water Meter Pulse Sensor

      Great! Thanks for the help 🙂
      Now I just need to figure out a good placement for it and get values to Domoticz.
      But this helped me a lot to get started.

      posted in Announcements
      Patrik Söderström
      Patrik Söderström
    • RE: ESP8266 GW with sensors

      Thanks! 🙂
      Yes I ordered a couple of days ago, waiting for them 🙂 Need them for the temp. sensor as well.

      posted in Domoticz
      Patrik Söderström
      Patrik Söderström
    • RE: What hardware to choose for this scenarios

      Again, thanks for quick reply.
      I´m starting to get a better understanding now of how its meant to be used 👍

      I have ordered some hardware now and will start to test.

      Thanks once again.

      posted in Hardware
      Patrik Söderström
      Patrik Söderström
    • RE: 💬 Soil Moisture Sensor

      Is there any updated sketch to use with the Soil Moisture Sensor shown in the pictures?

      posted in Announcements
      Patrik Söderström
      Patrik Söderström

    Latest posts made by Patrik Söderström

    • RE: 💬 Building a Raspberry Pi Gateway

      Any ETA on support for RFM69 ? Need to extend my coverage 🙂

      posted in Announcements
      Patrik Söderström
      Patrik Söderström
    • RE: 💬 Soil Moisture Sensor

      Is there any updated sketch to use with the Soil Moisture Sensor shown in the pictures?

      posted in Announcements
      Patrik Söderström
      Patrik Söderström
    • RE: 💬 Motion Sensor

      Do you have an example sketch of connecting two PIRs to one Arduino? Would really need that in my setup.

      posted in Announcements
      Patrik Söderström
      Patrik Söderström
    • RE: 💬 Building a Raspberry Pi Gateway

      @mfalkvidd Alright 🙂 The thing is that I have my Raspberry Pi as a Gateway today near my server rack and would like to measure the temperatur. Maybe I just get a Nano to do the work for me. Just would have been great to use the Raspberry.

      posted in Announcements
      Patrik Söderström
      Patrik Söderström
    • RE: 💬 Building a Raspberry Pi Gateway

      Can I attach one or more DallasTemp sensors on the Raspberry Pi gateway?

      posted in Announcements
      Patrik Söderström
      Patrik Söderström
    • RE: water meter - reading method with Line Track Sensor

      oh, I should have read this before I ordered the TCRT5000. I two seems to have hard time to get readings from my water meter.

      I also have this small wheels.

      I have a RPi and USB camera, so I could try that solution. But should have been nice with the TCRT5000.
      Have anyone made any updates?

      posted in Hardware
      Patrik Söderström
      Patrik Söderström
    • RE: 💬 Water Meter Pulse Sensor

      Great! Thanks for the help 🙂
      Now I just need to figure out a good placement for it and get values to Domoticz.
      But this helped me a lot to get started.

      posted in Announcements
      Patrik Söderström
      Patrik Söderström
    • RE: 💬 Water Meter Pulse Sensor

      Should have said that I was trying to run it on a Node MCU 0.9. I can compile fine for Arduino Nano but not for Node MCU. Also I got another error now when I upgraded to 1.6.12.

      In file included from C:\Users\xxxxx\Documents\Arduino\libraries\MySensors-development/MySensors.h:337:0,
      
                       from C:\Users\xxxxxxx\AppData\Local\Temp\untitled921979828.tmp\sketch_oct14a\sketch_oct14a.ino:44:
      
      C:\Users\xxxxxxx\Documents\Arduino\libraries\MySensors-development/core/MyMainESP8266.cpp:4:22: fatal error: Schedule.h: No such file or directory
      
       #include "Schedule.h"
      
                            ^
      
      compilation terminated.
      
      exit status 1
      Error compiling for board NodeMCU 0.9 (ESP-12 Module).```
      posted in Announcements
      Patrik Söderström
      Patrik Söderström
    • RE: 💬 Water Meter Pulse Sensor

      Running 1.6.11, will try and update.

      posted in Announcements
      Patrik Söderström
      Patrik Söderström
    • RE: 💬 Temperature Sensor

      I use the following code, I have added the GW support for ESP board.

      /**
       * 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.
       *
       *******************************
       *
       * DESCRIPTION
       *
       * Example sketch showing how to send in DS1820B OneWire temperature readings back to the controller
       * http://www.mysensors.org/build/temp
       */
      
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      
      // Enable and select radio type attached
      //#define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      // Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h
      #define MY_BAUD_RATE 9600
      #define MY_GATEWAY_ESP8266
      
      #define MY_ESP8266_SSID "TP54C10"
      #define MY_ESP8266_PASSWORD "blarretp54c10"
      
      // The port to keep open on node server mode
      #define MY_PORT 5003
      
      // How many clients should be able to connect to this gateway (default 1)
      #define MY_GATEWAY_MAX_CLIENTS 2
      
      #include <ESP8266WiFi.h>
      #include <SPI.h>
      #include <MySensors.h>  
      #include <DallasTemperature.h>
      #include <OneWire.h>
      
      #define COMPARE_TEMP 1 // Send temperature only if changed? 1 = Yes 0 = No
      
      #define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected 
      #define MAX_ATTACHED_DS18B20 16
      unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
      OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
      DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature. 
      float lastTemperature[MAX_ATTACHED_DS18B20];
      int numSensors=0;
      bool receivedConfig = false;
      bool metric = true;
      // Initialize temperature message
      MyMessage msg(0,V_TEMP);
      
      void before()
      {
        // Startup up the OneWire library
        sensors.begin();
      }
      
      void setup()  
      { 
        // requestTemperatures() will not block current thread
        sensors.setWaitForConversion(false);
      }
      
      void presentation() {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("Temperature Sensor", "1.1");
      
        // Fetch the number of attached temperature sensors  
        numSensors = sensors.getDeviceCount();
      
        // Present all sensors to controller
        for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {   
           present(i, S_TEMP);
        }
      }
      
      void loop()     
      {     
        // Fetch temperatures from Dallas sensors
        sensors.requestTemperatures();
      
        // query conversion time and sleep until conversion completed
        int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());
        // sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater)
        sleep(conversionTime);
      
        // Read temperatures and send them to controller 
        for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
      
          // Fetch and round temperature to one decimal
          float temperature = static_cast<float>(static_cast<int>((getConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
      
          // Only send data if temperature has changed and no error
          #if COMPARE_TEMP == 1
          if (lastTemperature[i] != temperature && temperature != -127.00 && temperature != 85.00) {
          #else
          if (temperature != -127.00 && temperature != 85.00) {
          #endif
      
            // Send in the new temperature
            send(msg.setSensor(i).set(temperature,1));
            // Save new temperatures for next compare
            lastTemperature[i]=temperature;
          }
        }
        sleep(SLEEP_TIME);
      }
      

      the exakt error I get in Arduino IDE is

      In file included from C:\Users\xxxxx\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.h:22:0,
      
                       from Z:\MySensors\NodeMCU-Water meter\NodeMCU-Water_meter\NodeMCU-Water_meter.ino:51:
      
      C:\Users\xxxxxx\Documents\Arduino\libraries\OneWire/OneWire.h:108:2: error: #error "Please define I/O register types here"
      
       #error "Please define I/O register types here"
      
        ^
      
      exit status 1
      Error compiling for board NodeMCU 0.9 (ESP-12 Module).```
      posted in Announcements
      Patrik Söderström
      Patrik Söderström