Navigation

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

    robertmt

    @robertmt

    0
    Reputation
    10
    Posts
    557
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    robertmt Follow

    Best posts made by robertmt

    This user hasn't posted anything yet.

    Latest posts made by robertmt

    • RE: My Sesnor DHT - can't upload to Uno

      Ok... Looks like issue was with windows and some SH...T in AppData and Temp...
      Removed everything related with arduino and maneged to upload a sketch.
      (Maybe somebody else will have a same issue)

      Only one thing left, this:
      Invalid version found: 1.04
      Any idea what can it be? My Arduino IDE is 1.6.12 on Windows 7.

      Thanks in advance

      posted in My Project
      robertmt
      robertmt
    • RE: My Sesnor DHT - can't upload to Uno

      hello again:

      my latest trial gave me something like this:

      avr-g++: error: CreateProcess: No such file or directory
      exit status 1
      Error compiling for board Arduino/Genuino Uno.
      Invalid version found: 1.04

      anyone???

      posted in My Project
      robertmt
      robertmt
    • RE: My Sesnor DHT - can't upload to Uno

      I'm lost....

      I've installed Arduino ver 1.6.6 than I had an error 👍
      avr-g++: error: missing filename after '-o'

      removed everything and installed ver. 1.6.12 ... libraries from github:
      https://github.com/mysensors/MySensors
      https://github.com/mysensors/MySensorsArduinoExamples

      everything inside:
      C:\Users\Robert\Documents\Arduino\libraries\MySensors

      now error:
      C:\Users\Robert\Documents\Arduino\libraries\MySensors\examples\DhtTemperatureAndHumiditySensor\DhtTemperatureAndHumiditySensor.ino:44:17: fatal error: DHT.h: No such file or directory
      #include <DHT.h>
      ^
      compilation terminated.
      exit status 1
      Error compiling for board Arduino/Genuino Uno.

      posted in My Project
      robertmt
      robertmt
    • RE: My Sesnor DHT - can't upload to Uno

      Thanks... it helped a bit. No more DHT error... but now:

      avr-g++: error: CreateProcess: No such file or directory
      exit status 1
      Error compiling for board Arduino/Genuino Uno.
      Invalid version found: 1.04
      Invalid version found: 1.04

      posted in My Project
      robertmt
      robertmt
    • RE: My Sesnor DHT - can't upload to Uno

      Can't see getTemperature in dht.cpp. There is "readTemperature", "readHumidity" etc... but nothing like "get"

      posted in My Project
      robertmt
      robertmt
    • My Sesnor DHT - can't upload to Uno

      Hello.

      I'm trying to upload a example sketch from mysensors.org and I have this error... Reinstalled Arduino, downloaded DHT libraries and still nothing....
      This is error:

      `
      DHTSensor:41: error: no matching function for call to 'DHT::DHT()'
      DHT dht;
      ^
      D:\Arduino\DHTSensor\DHTSensor.ino:41:5: note: candidates are:
      In file included from D:\Arduino\DHTSensor\DHTSensor.ino:12:0:
      C:\Users\Robert\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:40:4: note: DHT::DHT(uint8_t, uint8_t, uint8_t)
      DHT(uint8_t pin, uint8_t type, uint8_t count=6);
      ^
      C:\Users\Robert\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:40:4: note: candidate expects 3 arguments, 0 provided
      C:\Users\Robert\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:38:7: note: constexpr DHT::DHT(const DHT&)
      class DHT {
      ^
      C:\Users\Robert\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:38:7: note: candidate expects 1 argument, 0 provided
      C:\Users\Robert\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:38:7: note: constexpr DHT::DHT(DHT&&)
      C:\Users\Robert\Documents\Arduino\libraries\DHT_sensor_library/DHT.h:38:7: note: candidate expects 1 argument, 0 provided
      D:\Arduino\DHTSensor\DHTSensor.ino: In function 'void setup()':
      DHTSensor:59: error: 'class DHT' has no member named 'setup'
      dht.setup(DHT_DATA_PIN); // set data pin of DHT sensor
      ^
      DHTSensor:60: error: 'class DHT' has no member named 'getMinimumSamplingPeriod'
      if (UPDATE_INTERVAL <= dht.getMinimumSamplingPeriod()) {
      ^
      DHTSensor:65: error: 'class DHT' has no member named 'getMinimumSamplingPeriod'
      sleep(dht.getMinimumSamplingPeriod());
      ^
      D:\Arduino\DHTSensor\DHTSensor.ino: In function 'void loop()':
      DHTSensor:72: error: 'class DHT' has no member named 'readSensor'
      dht.readSensor(true);
      ^
      DHTSensor:75: error: 'class DHT' has no member named 'getTemperature'
      float temperature = dht.getTemperature();
      ^
      DHTSensor:82: error: 'class DHT' has no member named 'toFahrenheit'
      temperature = dht.toFahrenheit(temperature);
      ^
      DHTSensor:99: error: 'class DHT' has no member named 'getHumidity'
      float humidity = dht.getHumidity();
      ^
      exit status 1
      no matching function for call to 'DHT::DHT()'

      Please help!!!

      posted in My Project
      robertmt
      robertmt
    • RE: Dev serial gateway - usb connection to raspberry pi (OpenHab and/or HomeAssistant)

      Hi.

      I have some progress. I can see data coming in terminal ...

      [INFO] [ runtime.busevents           ]   -   Arduino state updated to 0;0;1;0;4;1009.0
      0;1;1;0;0;22.0
      0;2;1;0;1;61.0
      

      and keep updating...
      (only 3 nodes so far)

      However on website still nothing... I assume there is something wrong with openhab config.

      What I did...

      • Added serial bindings from this link (
        http://forum.mysensors.org/topic/655/serial-gateway-connection-to-openhab/3
        and updated demo.rules accordingly
        and also
      • had to remove ... @115200 from demo.items - { serial="/dev/ttyACM0@115200" }
      posted in Development
      robertmt
      robertmt
    • RE: Dev serial gateway - usb connection to raspberry pi (OpenHab and/or HomeAssistant)

      Part of my OpenHab debug log:

      12:48:51.378 [DEBUG] [i.internal.GenericItemProvider:154  ] - Processing binding configs for items from model 'demo.items'
      12:48:51.388 [DEBUG] [i.internal.GenericItemProvider:419  ] - Couldn't find ItemFactory for item 'Arduino' of type 'String'
      12:48:51.393 [DEBUG] [i.internal.GenericItemProvider:419  ] - Couldn't find ItemFactory for item 'Temp2' of type 'Number'
      12:48:51.398 [DEBUG] [i.internal.GenericItemProvider:419  ] - Couldn't find ItemFactory for item 'Hum2' of type 'Number'
      12:48:51.464 [DEBUG] [i.internal.GenericItemProvider:133  ] - Read items from model 'demo.items'
      12:48:51.492 [DEBUG] [o.o.c.i.items.ItemRegistryImpl:137  ] - Item provider 'GenericItemProvider' has been added.
      12:48:51.500 [DEBUG] [i.internal.GenericItemProvider:133  ] - Read items from model 'demo.items'
      

      I have some progress on minicom... reading captured to file and it is showing same thing as serial Arduini IDE.

      0;255;3;0;9;Starting gateway (R-iŠÚŞŞr‚Rđ0;255;3;0;9;Starting gateway (R-NGA-, 2.0.0-beta)
      0;255;3;0;14;Gateway startup complete.
      0;255;3;0;11;Weather Station Sensor
      0;255;3;0;12;1.0
      0;0;0;0;8;
      0;2;0;0;7;
      0;1;0;0;6;
      0;4;0;0;7;
      0;3;0;0;6;
      0;5;0;0;6;
      0;255;3;0;9;Init complete, id=0, parent=0, distance=0
      0;0;1;0;4;0.0
      0;3;1;0;0;0.0
      0;4;1;0;1;0.0
      0;5;1;0;0;0.0
      0;0;1;0;4;0.0
      0;3;1;0;0;0.0
      0;4;1;0;1;0.0
      0;5;1;0;0;0.0
      0;0;1;0;4;0.0
      0;3;1;0;0;0.0
      0;4;1;0;1;0.0
      0;5;1;0;0;0.0
      .... (200 lines after)
      0;0;1;0;4;1007.0
      0;3;1;0;0;23.0
      0;4;1;0;1;55.0
      0;5;1;0;0;13.5
      0;0;1;0;4;1007.0
      0;3;1;0;0;23.0
      0;4;1;0;1;55.0
      0;5;1;0;0;13.5
      0;0;1;0;4;1007.0
      

      So... looks like there is something coming out from Arduino but OpenHab is still not happy.

      Why in this output first number is 0... shouldn't be 101 (as declared in
      // Set Node Id number
      #define MY_NODE_ID 101

      What is a proper config for a demo.items related to Arduino code... Can't find any informations on a net.

      posted in Development
      robertmt
      robertmt
    • RE: Dev serial gateway - usb connection to raspberry pi (OpenHab and/or HomeAssistant)

      Hello.

      Serial Monitor was active while connected on usb laptop with Arduino IDE. That is where the data posted comes from.
      Not really sure what is happening on Raspberry Pi side.
      Minicom gives me nothing...

      posted in Development
      robertmt
      robertmt
    • Dev serial gateway - usb connection to raspberry pi (OpenHab and/or HomeAssistant)

      Hello.

      I'm trying to connect my Arduino Uno with rf433 receiver and some data received from another Uno and push this data to raspberry pi (open hab - for example). I've used this tutorial http://forum.mysensors.org/topic/1194/tutorial-openhab-with-serial-gateway

      So far my readings in serial monitor looks like this:

      ±'Ú˘ţ0;255;3;0;9;Starting gateway (R-NGA-, 2.0.0-beta)
      0;255;3;0;14;Gateway startup complete.
      0;255;3;0;11;Weather Station Sensor
      0;255;3;0;12;1.0
      0;0;0;0;8;
      0;2;0;0;7;
      0;1;0;0;6;
      0;4;0;0;7;
      0;3;0;0;6;
      0;5;0;0;6;
      0;255;3;0;9;Init complete, id=0, parent=0, distance=0
      0;0;1;0;4;0.0
      0;3;1;0;0;0.0
      0;3;1;0;0;24.0
      0;4;1;0;1;59.0
      0;5;1;0;0;15.5
      0;0;1;0;4;1004.0
      0;3;1;0;0;24.0
      0;4;1;0;1;59.0
      0;5;1;0;0;15.5
      0;0;1;0;4;1004.0
      

      Unfortunatelly I can't see enything in raspberry pi and openhab.

      My Arduino Code:

      // Enable debug prints to serial monitor
      #define MY_DEBUG
      
      // Enable serial gateway
      #define MY_GATEWAY_SERIAL
      
      // FLash leds on rx/tx/err
      #define MY_LEDS_BLINKING_FEATURE
      // Set blinking priod
      #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 
      
      // Set Node Id number
      #define MY_NODE_ID 101
      
      #include <Wire.h> // use Wire library for protocol i2c (A4 = SDA & A5 = SCL)
      #include <VirtualWire.h> // use Virtual library for decode signal from Rx module
      #include <SPI.h>
      #include <MySensor.h>
      #include <DHT.h>
      
      // ---------------------------------------------------------------------------------------------------
      // Child sensor ids
      #define CHILD_ID_BARO 0
      #define CHILD_ID_TEMP1 1
      #define CHILD_ID_HUM1 2
      #define CHILD_ID_TEMP2 3
      #define CHILD_ID_HUM2 4
      #define CHILD_ID_TEMP3 5 //Dew Point
      
      // ----------------------------------------------------------------------------------------------------
      // DHT-11/22
      //#define HUMIDITY_SENSOR_DIGITAL_PIN 3
      
      //DHT dht;
      //float lastTemp;
      //float lastHum;
      //boolean metric = true;
      
      MyMessage msgPressure(CHILD_ID_BARO, V_PRESSURE);
      MyMessage msgHum1(CHILD_ID_HUM1, V_HUM);
      MyMessage msgTemp1(CHILD_ID_TEMP1, V_TEMP);
      MyMessage msgHum2(CHILD_ID_HUM2, V_HUM);
      MyMessage msgTemp2(CHILD_ID_TEMP2, V_TEMP);
      MyMessage msgTemp3(CHILD_ID_TEMP3, V_TEMP);
      
      
      // Sensors 
      int humidity;
      int temp;
      int tempf;
      int pres;
      int rain;
      char MsgReceived[21]; 
      //int led = 8; //pin for LED
      
      float tF;
      float dP;
      float dPF;
      float hT;
      
      void setup() 
      {
        
        //Serial.begin(115200); //Starting serial communication
        //Serial.println("Program started");
        //Serial.print(" WS :");
        //Serial.print("\t");
        //Serial.print("Rain Drop\t");
        //Serial.print("Pressure \t");
        //Serial.print("Air Hum\t");
        //Serial.print("\t");
        //Serial.print("Temp \t");
        //Serial.print("Dew Point\t");
        //Serial.println("Heat Index: ");
          
        // VirtualWire 
        // Bits per sec
        vw_setup(2000);
        // set pin for connect receiver module 
        vw_set_rx_pin(9);  
        // Start the receiver PLL running
        vw_rx_start();       
      
      //dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN);
      
      
      } // END void setup
      
      void presentation()
      {
         // Send the sketch Version Information to the Gateway
         sendSketchInfo("Weather Station Sensor", "1.0");
      
         // Register all sensors to gw (they will be created as child devices)
         present(CHILD_ID_BARO, S_BARO);
         present(CHILD_ID_HUM1, S_HUM);
         present(CHILD_ID_TEMP1, S_TEMP);
         present(CHILD_ID_HUM2, S_HUM);
         present(CHILD_ID_TEMP2, S_TEMP);
         present(CHILD_ID_TEMP3, S_TEMP);
      }
      
      
      void loop()
      {
        
        uint8_t buf[VW_MAX_MESSAGE_LEN];
        uint8_t buflen = VW_MAX_MESSAGE_LEN;
        //Taking the data from the control base
        if (vw_get_message(buf, &buflen)) //Non-blocking
        {
          //digitalWrite(led, HIGH);
          //delay(100);
          int i;
          // Message with a good checksum received, dump it. 
          for (i = 0; i < buflen; i++)
          {            
            // Fill Msg Char array with corresponding 
            // chars from buffer.   
            MsgReceived[i] = char(buf[i]);
            //Serial.print(MsgReceived[i]);
          }
          sscanf(MsgReceived, "%d,%d,%d",&pres, &humidity, &temp, &rain); // Converts a string to an array
          //digitalWrite(led, LOW); 
          //Serial.print(" WS : ");
          //Serial.print(rain);
          //Serial.print(" %\t");
          //Serial.print("\t");
          //Serial.print(pres);
          //Serial.print(" hPa \t");
          //Serial.print(humidity);
          //Serial.print(" %\t");
          //Serial.print("\t");
          //Serial.print(temp);
          //Serial.print("*C \t");
          dP = dewPointFast(temp, humidity);
          //Serial.print(dP);
          //Serial.print("*C \t");
          //Serial.print(" \t");
          hT = heatIndex(temp,humidity);
          //Serial.print(hT);
          //Serial.println(" *C");
          //Serial.println((char*)buf);
          memset( MsgReceived, 0, sizeof(MsgReceived));// This line is for reset the StringReceived
        }
      
        send(msgPressure.set(pres, 1));
        send(msgTemp2.set(temp, 1));
        send(msgHum2.set(humidity, 1));
        send(msgTemp3.set(dP, 1));
      
        
      }
      
      // delta max = 0.6544 wrt dewPoint()
      // 6.9 x faster than dewPoint()
      // reference: http://en.wikipedia.org/wiki/Dew_point
      double dewPointFast(double celsius, double humidity)
      {
       double a = 17.271;
       double b = 237.7;
       double temp = (a * celsius) / (b + celsius) + log(humidity*0.01);
       double Td = (b * temp) / (a - temp);
       return Td;
      }
      
      double heatIndex(double temp, double humidity)
      {
        double c1 = -42.38, c2 = 2.049, c3 = 10.14, c4 = -0.2248, c5= -6.838e-3, c6=-5.482e-2, c7=1.228e-3, c8=8.528e-4, c9=-1.99e-6  ;
        tempf = (temp*1.8 + 32);  //  Celsius to Fahrenheit
        double T = tempf;
        double R = humidity;
      
        double A = ((c5 * T) + c2) * T + c1;
        double B = ((c7 * T) + c4) * T + c3;
        double C = ((c9 * T) + c8) * T + c6;
      
        double rv = (C * R + B) * R + A;
        rv = ((((rv)-32)*5)/9);  //  converting to C
        return rv;
      }
      

      What I'm missing???
      FYI I'm quite new in arduino and programming.

      Thank you in advance for help.

      All the best
      Robert

      posted in Development
      robertmt
      robertmt