[Newbie] Vera barometric sensor detection



  • Hi,
    I'm trying to make my vera lite detect my barometric sensor BMP085 (Bosch model).
    the following skecth work fine using arduino ide but my vera refuse to detect it:

    /*

    • Copyright (C) 2013 Henrik Ekblad henrik.ekblad@gmail.com
    • 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
    • The ArduinoGateway prints data received from sensors on the serial link.
    • The gateway accepts input on seral which will be sent out on radio network.
    • The GW code is designed for Arduino Nano 328p / 16MHz
    • Wire connections (OPTIONAL):
      • Inclusion button should be connected between digital pin 3 and GND
      • RX/TX/ERR leds need to be connected between +5V (anode) and digital ping 6/5/4 with resistor 270-330R in a series
    • LED purposes:
      • 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
        */

    #include <SPI.h>
    #include <EEPROM.h>
    #include <RF24.h>
    #include <MsTimer2.h>
    #include <PinChangeInt.h>
    #include <Gateway.h>
    #include <stdarg.h>
    #include <avr/progmem.h>
    #include <Wire.h>
    #include <Adafruit_BMP085.h>

    #define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled
    #define INCLUSION_MODE_PIN 3 // Digital pin used for inclusion mode button

    // No blink or button functionality. Use the vanilla constructor.
    //Gateway gw;

    // To start gateway with include button and led blinking functionality enabled use this instead!
    Gateway gw(9, 10, INCLUSION_MODE_TIME, INCLUSION_MODE_PIN, 6, 5, 4);
    float lastPressure = -1;
    char inputString[MAX_RECEIVE_LENGTH] = ""; // A string to hold incoming commands from serial/ethernet interface
    int inputPos = 0;
    boolean commandComplete = false; // whether the string is complete
    Adafruit_BMP085 bmp = Adafruit_BMP085(); // Digital Pressure Sensor

    void setup()
    {
    gw.begin();
    Serial.begin(115200);
    if (!bmp.begin()) {
    Serial.println("Could not find a valid BMP085 sensor, check wiring!");
    while (1) {}
    }
    // C++ classes and interrupts really sucks. Need to attach interrupt
    // outside thw Gateway class due to language shortcomings! Gah!
    gw.sendSensorPresentation(0, S_BARO);

    if (gw.isLedMode()) {
    // Add led timer interrupt
    MsTimer2::set(300, ledTimersInterrupt);
    MsTimer2::start();
    // Add interrupt for inclustion button to pin
    PCintPort::attachInterrupt(INCLUSION_MODE_PIN, startInclusionInterrupt, RISING);
    }
    }

    void loop()
    {

    Serial.print("Temperature = ");
    Serial.print(bmp.readTemperature());
    Serial.println(" *C");
    
    Serial.print("Pressure = ");
    Serial.print(bmp.readPressure());
    Serial.println(" Pa");
    

    float pressure = bmp.readPressure();
    if (pressure != lastPressure) {
    gw.sendVariable(0, V_PRESSURE, pressure, 0);
    lastPressure = pressure;
    }

    // Calculate altitude assuming 'standard' barometric
    // pressure of 1013.25 millibar = 101325 Pascal
    Serial.print("Altitude = ");
    Serial.print(bmp.readAltitude());
    Serial.println(" meters");
    

    // you can get a more precise measurement of altitude
    // if you know the current sea level pressure which will
    // vary with weather and such. If it is 1015 millibars
    // that is equal to 101500 Pascals.
    Serial.print("Real altitude = ");
    Serial.print(bmp.readAltitude(101500));
    Serial.println(" meters");

    Serial.println();
    delay(500);
    checkSerialInput();
    

    }

    void startInclusionInterrupt() {
    gw.startInclusionInterrupt();
    }

    void ledTimersInterrupt() {
    gw.ledTimersInterrupt();
    }

    void checkSerialInput() {
    if (commandComplete) {
    // A command wass issued from serial interface
    // We will now try to send it to the actuator
    gw.parseAndSend(inputString);
    commandComplete = false;
    inputPos = 0;
    }
    }

    /*
    SerialEvent occurs whenever a new data comes in the
    hardware serial RX. This routine is run between each
    time loop() runs, so using delay inside loop can delay
    response. Multiple bytes of data may be available.
    */
    void serialEvent() {
    while (Serial.available()) {
    // get the new byte:
    char inChar = (char)Serial.read();
    // if the incoming character is a newline, set a flag
    // so the main loop can do something about it:
    if (inputPos<MAX_RECEIVE_LENGTH-1 && !commandComplete) {
    if (inChar == '\n') {
    inputString[inputPos] = 0;
    commandComplete = true;
    } else {
    // add it to the inputString:
    inputString[inputPos] = inChar;
    inputPos++;
    }
    } else {
    // Incoming message too long. Throw away
    inputPos = 0;
    }
    }
    }

    Here is my vera plugin

    vera.png

    Thanks for your help !



  • @javier And here are the logs at the inclusion:
    50 07/16/14 19:45:54.271 luup_log:36: Arduino: Sending: 0;0;4;6;0 <0x2e2d7680>
    50 07/16/14 19:45:54.600 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:45:54.602 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=191: 98828 <0x2dcd7680>
    50 07/16/14 19:45:54.650 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:45:55.220 luup_log:36: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,InclusionMode, 0, 36 <0x2dcd7680>
    06 07/16/14 19:45:55.221 Device_Variable::m_szValue_set device: 36 service: urn:upnp-arduino-cc:serviceId:arduino1 variable: InclusionMode was: 1 now: 0 #hooks: 0 upnp: 0 v:0xee3f40/NONE duplicate:0 <0x2dcd7680>
    50 07/16/14 19:45:55.222 luup_log:36: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,InclusionFoundCountHR, , 36 <0x2dcd7680>
    06 07/16/14 19:45:55.222 Device_Variable::m_szValue_set device: 36 service: urn:upnp-arduino-cc:serviceId:arduino1 variable: InclusionFoundCountHR was: 0 devices found now: #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2dcd7680>
    50 07/16/14 19:45:55.223 luup_log:36: Arduino: Inclusion mode ended. <0x2dcd7680>
    50 07/16/14 19:45:55.301 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:45:55.311 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=198: 98832 <0x2dcd7680>
    50 07/16/14 19:45:55.351 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:45:56.001 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:45:56.011 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=81: 98833 <0x2dcd7680>
    50 07/16/14 19:45:56.060 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    08 07/16/14 19:45:56.672 JobHandler_LuaUPnP::HandleActionRequest device: 36 service: urn:upnp-arduino-cc:serviceId:arduino1 action: StartInclusion <0x2e52b680>
    08 07/16/14 19:45:56.673 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=36 <0x2e52b680>
    08 07/16/14 19:45:56.673 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:upnp-arduino-cc:serviceId:arduino1 <0x2e52b680>
    08 07/16/14 19:45:56.673 JobHandler_LuaUPnP::HandleActionRequest argument action=StartInclusion <0x2e52b680>
    08 07/16/14 19:45:56.673 JobHandler_LuaUPnP::HandleActionRequest argument rand=0.3395828555676518 <0x2e52b680>
    50 07/16/14 19:45:56.674 luup_log:36: Arduino: Sending: 0;0;4;6;1 <0x2e52b680>
    50 07/16/14 19:45:56.711 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:45:56.713 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=102: 98831 <0x2dcd7680>
    50 07/16/14 19:45:56.760 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:45:57.411 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:45:57.421 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=173: 98827 <0x2dcd7680>
    50 07/16/14 19:45:57.470 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:45:58.040 luup_log:36: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,InclusionMode, 1, 36 <0x2dcd7680>
    06 07/16/14 19:45:58.041 Device_Variable::m_szValue_set device: 36 service: urn:upnp-arduino-cc:serviceId:arduino1 variable: InclusionMode was: 0 now: 1 #hooks: 0 upnp: 0 v:0xee3f40/NONE duplicate:0 <0x2dcd7680>
    50 07/16/14 19:45:58.041 luup_log:36: Arduino: urn:upnp-arduino-cc:serviceId:arduino1,InclusionFoundCountHR, 0 devices found, 36 <0x2dcd7680>
    06 07/16/14 19:45:58.042 Device_Variable::m_szValue_set device: 36 service: urn:upnp-arduino-cc:serviceId:arduino1 variable: InclusionFoundCountHR was: now: 0 devices found #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2dcd7680>
    50 07/16/14 19:45:58.111 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:45:58.121 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=102: 98831 <0x2dcd7680>
    50 07/16/14 19:45:58.170 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:45:59.461 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:45:59.471 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=159: 98834 <0x2dcd7680>
    50 07/16/14 19:45:59.521 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:45:59.553 luup_log:5: RFXtrx: Received message: 0A 52 01 C2 9C 01 00 F2 3D 01 69 <0x2e0d7680>
    06 07/16/14 19:45:59.554 Device_Variable::m_szValue_set device: 5 service: urn:rfxcom-com:serviceId:rfxtrx1 variable: LastReceivedMsg was: 0A 52 01 C1 E6 04 01 84 18 02 79 now: 0A 52 01 C2 9C 01 00 F2 3D 01 69 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2e0d7680>
    50 07/16/14 19:45:59.556 luup_log:5: RFXtrx: cmds: TH1/39937 Temperature 24.2 TH1/39937 Humidity 61 TH1/39937 BatteryLevel 100 <0x2e0d7680>
    06 07/16/14 19:45:59.558 Device_Variable::m_szValue_set device: 11 service: urn:upnp-org:serviceId:TemperatureSensor1 variable: CurrentTemperature was: 24.2 now: 24.2 #hooks: 1 upnp: 0 v:0xe04e60/NONE duplicate:1 <0x2e0d7680>
    06 07/16/14 19:45:59.558 Device_Variable::m_szValue_set device: 11 service: urn:micasaverde-com:serviceId:HaDevice1 variable: BatteryLevel was: 100 now: 100 #hooks: 0 upnp: 0 v:0xe131d0/NONE duplicate:1 <0x2e0d7680>
    06 07/16/14 19:45:59.605 Device_Variable::m_szValue_set device: 11 service: urn:micasaverde-com:serviceId:HaDevice1 variable: BatteryDate was: 1405532720 now: 1405532759 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2e0d7680>
    06 07/16/14 19:45:59.607 Device_Variable::m_szValue_set device: 12 service: urn:micasaverde-com:serviceId:HumiditySensor1 variable: CurrentLevel was: 61 now: 61 #hooks: 1 upnp: 0 v:0xe452d0/NONE duplicate:1 <0x2e0d7680>
    06 07/16/14 19:45:59.607 Device_Variable::m_szValue_set device: 12 service: urn:micasaverde-com:serviceId:HaDevice1 variable: BatteryLevel was: 100 now: 100 #hooks: 0 upnp: 0 v:0xe131d0/NONE duplicate:1 <0x2e0d7680>
    06 07/16/14 19:45:59.610 Device_Variable::m_szValue_set device: 12 service: urn:micasaverde-com:serviceId:HaDevice1 variable: BatteryDate was: 1405532720 now: 1405532759 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2e0d7680>
    50 07/16/14 19:46:00.171 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:00.173 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=173: 98827 <0x2dcd7680>
    50 07/16/14 19:46:00.220 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:00.871 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:00.881 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=241: 98830 <0x2dcd7680>
    50 07/16/14 19:46:00.930 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:01.581 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:01.582 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=63: 98837 <0x2dcd7680>
    50 07/16/14 19:46:01.630 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:02.281 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:02.291 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=241: 98830 <0x2dcd7680>
    50 07/16/14 19:46:02.340 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:02.990 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:02.993 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=102: 98831 <0x2dcd7680>
    50 07/16/14 19:46:03.040 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:03.691 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:03.701 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=40: 98829 <0x2dcd7680>
    50 07/16/14 19:46:03.741 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:04.400 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:04.403 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=173: 98827 <0x2dcd7680>
    50 07/16/14 19:46:04.451 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:05.101 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:05.103 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=13: 98824 <0x2dcd7680>
    50 07/16/14 19:46:05.151 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:05.801 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:05.811 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=102: 98831 <0x2dcd7680>
    50 07/16/14 19:46:05.861 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:06.503 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:06.511 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=154: 98825 <0x2dcd7680>
    50 07/16/14 19:46:06.560 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:07.211 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:07.221 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=58: 98826 <0x2dcd7680>
    50 07/16/14 19:46:07.270 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:07.921 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:07.923 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=159: 98834 <0x2dcd7680>
    50 07/16/14 19:46:07.970 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:09.003 luup_log:5: RFXtrx: Received message: 0A 52 01 C3 E6 04 01 84 18 02 79 <0x2e0d7680>
    06 07/16/14 19:46:09.004 Device_Variable::m_szValue_set device: 5 service: urn:rfxcom-com:serviceId:rfxtrx1 variable: LastReceivedMsg was: 0A 52 01 C2 9C 01 00 F2 3D 01 69 now: 0A 52 01 C3 E6 04 01 84 18 02 79 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2e0d7680>
    50 07/16/14 19:46:09.005 luup_log:5: RFXtrx: cmds: TH1/58884 Temperature 38.8 TH1/58884 Humidity 24 TH1/58884 BatteryLevel 100 <0x2e0d7680>
    06 07/16/14 19:46:09.008 Device_Variable::m_szValue_set device: 18 service: urn:upnp-org:serviceId:TemperatureSensor1 variable: CurrentTemperature was: 38.8 now: 38.8 #hooks: 1 upnp: 0 v:0xe04e60/NONE duplicate:1 <0x2e0d7680>
    06 07/16/14 19:46:09.009 Device_Variable::m_szValue_set device: 18 service: urn:micasaverde-com:serviceId:HaDevice1 variable: BatteryLevel was: 100 now: 100 #hooks: 0 upnp: 0 v:0xe131d0/NONE duplicate:1 <0x2e0d7680>
    02 07/16/14 19:46:09.056 IOPort::Run RecvFailed 0 close 15 <0x2dcd7680>
    06 07/16/14 19:46:09.069 Device_Variable::m_szValue_set device: 18 service: urn:micasaverde-com:serviceId:HaDevice1 variable: BatteryDate was: 1405532726 now: 1405532769 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2e0d7680>
    06 07/16/14 19:46:09.070 Device_Variable::m_szValue_set device: 19 service: urn:micasaverde-com:serviceId:HumiditySensor1 variable: CurrentLevel was: 24 now: 24 #hooks: 1 upnp: 0 v:0xe452d0/NONE duplicate:1 <0x2e0d7680>
    06 07/16/14 19:46:09.071 Device_Variable::m_szValue_set device: 19 service: urn:micasaverde-com:serviceId:HaDevice1 variable: BatteryLevel was: 100 now: 100 #hooks: 0 upnp: 0 v:0xe131d0/NONE duplicate:1 <0x2e0d7680>
    06 07/16/14 19:46:09.072 Device_Variable::m_szValue_set device: 19 service: urn:micasaverde-com:serviceId:HaDevice1 variable: BatteryDate was: 1405532726 now: 1405532769 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2e0d7680>
    02 07/16/14 19:46:10.103 ZW_Send_Data node 3 NO ROUTE (nil) <0x2bed7680>
    02 07/16/14 19:46:12.231 ZW_Send_Data node 3 NO ROUTE (nil) <0x2bed7680>
    06 07/16/14 19:46:12.379 Device_Variable::m_szValue_set device: 25 service: urn:upnp-org:serviceId:TemperatureSensor1 variable: CurrentTemperature was: -1000 now: -1000 #hooks: 0 upnp: 0 v:0xe04e60/NONE duplicate:1 <0x2bad7680>
    02 07/16/14 19:46:14.382 ZW_Send_Data node 3 NO ROUTE (nil) <0x2bed7680>
    06 07/16/14 19:46:14.520 Device_Variable::m_szValue_set device: 25 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 0.0000 now: 0.0000 #hooks: 0 upnp: 0 v:0xee5e38/NONE duplicate:1 <0x2bad7680>
    06 07/16/14 19:46:14.520 Device_Variable::m_szValue_set device: 25 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWHReading was: 1405532684 now: 1405532774 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2bad7680>
    50 07/16/14 19:46:15.551 luup_log:36: Arduino: Log: Arduino startup complete. <0x2dcd7680>
    50 07/16/14 19:46:15.552 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:15.561 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=0,ty=8,cr=175: 1.3b3 (67f4c <0x2dcd7680>
    50 07/16/14 19:46:15.571 luup_log:36: Arduino: Log: Ack: received none ack msg. <0x2dcd7680>
    50 07/16/14 19:46:15.651 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:15.653 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=241: 98830 <0x2dcd7680>
    50 07/16/14 19:46:15.701 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:16.351 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:16.354 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=58: 98826 <0x2dcd7680>
    50 07/16/14 19:46:16.361 luup_log:36: Arduino: Log: Ack: received none ack msg. <0x2dcd7680>
    02 07/16/14 19:46:16.530 ZW_Send_Data node 3 NO ROUTE (nil) <0x2bed7680>
    06 07/16/14 19:46:16.660 Device_Variable::m_szValue_set device: 25 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 0 now: 0 #hooks: 0 upnp: 0 v:0xee6488/NONE duplicate:1 <0x2bad7680>
    06 07/16/14 19:46:16.660 Device_Variable::m_szValue_set device: 25 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: ActualUsage was: 1 now: 1 #hooks: 0 upnp: 0 v:0xee64c8/NONE duplicate:1 <0x2bad7680>
    04 07/16/14 19:46:16.662 <0x2bad7680>
    50 07/16/14 19:46:17.010 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:17.013 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=40: 98829 <0x2dcd7680>
    50 07/16/14 19:46:17.060 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:17.711 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:17.720 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=84: 98822 <0x2dcd7680>
    50 07/16/14 19:46:17.770 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:18.411 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:18.421 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=241: 98830 <0x2dcd7680>
    50 07/16/14 19:46:18.470 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:19.121 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:19.123 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=191: 98828 <0x2dcd7680>
    50 07/16/14 19:46:19.170 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:19.821 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:19.831 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=154: 98825 <0x2dcd7680>
    50 07/16/14 19:46:19.880 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:20.530 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:20.533 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=159: 98834 <0x2dcd7680>
    50 07/16/14 19:46:20.580 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:21.231 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:21.241 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=58: 98826 <0x2dcd7680>
    50 07/16/14 19:46:21.290 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:21.931 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:21.941 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=173: 98827 <0x2dcd7680>
    50 07/16/14 19:46:21.991 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:22.641 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:22.651 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=40: 98829 <0x2dcd7680>
    50 07/16/14 19:46:22.700 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:22.775 luup_log:5: RFXtrx: Received message: 0A 52 07 C4 27 0E 00 F9 3A 01 79 <0x2e0d7680>
    06 07/16/14 19:46:22.776 Device_Variable::m_szValue_set device: 5 service: urn:rfxcom-com:serviceId:rfxtrx1 variable: LastReceivedMsg was: 0A 52 01 C3 E6 04 01 84 18 02 79 now: 0A 52 07 C4 27 0E 00 F9 3A 01 79 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2e0d7680>
    50 07/16/14 19:46:22.777 luup_log:5: RFXtrx: cmds: TH7/9998 Temperature 24.9 TH7/9998 Humidity 58 TH7/9998 BatteryLevel 100 <0x2e0d7680>
    06 07/16/14 19:46:22.790 Device_Variable::m_szValue_set device: 27 service: urn:upnp-org:serviceId:TemperatureSensor1 variable: CurrentTemperature was: 24.9 now: 24.9 #hooks: 1 upnp: 0 v:0xe04e60/NONE duplicate:1 <0x2e0d7680>
    06 07/16/14 19:46:22.791 Device_Variable::m_szValue_set device: 27 service: urn:micasaverde-com:serviceId:HaDevice1 variable: BatteryLevel was: 100 now: 100 #hooks: 0 upnp: 0 v:0xe131d0/NONE duplicate:1 <0x2e0d7680>
    06 07/16/14 19:46:22.792 Device_Variable::m_szValue_set device: 27 service: urn:micasaverde-com:serviceId:HaDevice1 variable: BatteryDate was: 1405532696 now: 1405532782 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2e0d7680>
    06 07/16/14 19:46:22.793 Device_Variable::m_szValue_set device: 28 service: urn:micasaverde-com:serviceId:HumiditySensor1 variable: CurrentLevel was: 58 now: 58 #hooks: 1 upnp: 0 v:0xe452d0/NONE duplicate:1 <0x2e0d7680>
    06 07/16/14 19:46:22.794 Device_Variable::m_szValue_set device: 28 service: urn:micasaverde-com:serviceId:HaDevice1 variable: BatteryLevel was: 100 now: 100 #hooks: 0 upnp: 0 v:0xe131d0/NONE duplicate:1 <0x2e0d7680>
    06 07/16/14 19:46:22.794 Device_Variable::m_szValue_set device: 28 service: urn:micasaverde-com:serviceId:HaDevice1 variable: BatteryDate was: 1405532696 now: 1405532782 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2e0d7680>
    50 07/16/14 19:46:23.341 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:23.351 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=154: 98825 <0x2dcd7680>
    50 07/16/14 19:46:23.400 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:24.700 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:24.703 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=13: 98824 <0x2dcd7680>
    50 07/16/14 19:46:24.750 luup_log:36: Arduino: Log: Ack: receive timeout <0x2dcd7680>
    50 07/16/14 19:46:25.401 luup_log:36: Arduino: Log: Relaying message back to gateway. <0x2dcd7680>
    50 07/16/14 19:46:25.403 luup_log:36: Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=191: 98828 <0x2dcd7680>


  • Hero Member

    if you put the sketch in debug mode plus read USB port with "screen /dev/ttyWharever 115200" what do you get sensor side and gateway side ?


  • Admin

    This looks strange:

    @javier said:

    Arduino: Log: Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=1,ty=4,cr=191: 98828

    What is this big number (98828) you're trying to send out to node 0=gateway?

    Is communication really working. Have you followed the debug-help guidelines on www.mysensor.org?



  • Hi,
    I think the Value is the pressure in Pa...
    Maybe you can divide it by 100 to turn it in Hpa to let it working with Vera...
    You can see the comment on the bottom of the page..
    http://www.mysensors.org/build/pressure
    BR.



  • Hi,
    thanks for the replies.
    In fact, my problem is the detection of the sensor by my Veralite.
    The 98828 number is the pressure, and on my pc connected by USB the sensors retrieve good values (temp + pressure) by the vera plugin doest not detect the sensor.

    Thanks.


  • Admin

    @javier said:

    I actually looked at the code you posted above now.
    You seem to have mixed up things a bit. For sensors you must use Sensor or Relay-classes. Not Gateway. Gateway should only be used for the the gateway.

    Please look at the provided examples on http://www.mysensors.org.



  • @hek you are right, because I thought it was necessary.
    As I mentionned I'm newbie on arduino, so I don't really know what is necessary or not so I tried to make a mix of the sketchs.



  • @hek sorry for my long absence but I did'nt have much time to spend on it.

    I tried from scrash the inclusion of my baromtere sensor, following your tuto
    1 = upload to my USB arduino the original ArduinoGateway sketch
    2 = plug my arduino to my vera using USB hub
    3 = upload files plugin to my vera
    4 = create the device
    5 = configure the serial port for the new module
    6 = reload vera twice and then the module appear with the lib version (1.3b3)
    At this time I'm able to click on the "Start" button but of course no sensor is detected
    8 = unplug my arduino, plg my barometer sensor to my arduino,
    9 = load the BMP085 Barometric Pressure & Temp Sensor sketch changing only the baud rate (9600 to 115200)
    10 = test on my PC work fine (I get temp and barometer values)
    11 = plug my arduino to the VERA
    At this time the "Start" button doesn't work any more, even after many reload of my vera

    I guess I'm missing something but I don't see what.
    Thanks for your help.


  • Hero Member

    @javier Do you have a USB Gateway AND an Arduino Sensor with the BMP ... two separate devices linked by radio. It SOUNDS like you are trying to run the Baro sensor on the Gateway?



  • @clippermiami in fact I have my arduino nano and pluged in y pressure sensor.
    The arduino nano is pluged into my Vera
    WP_20140808_001.jpg


  • Hero Member

    @javierhttps://github.com/empierre/arduino

    you can take mine which is pressure sensor



  • @epierre thanks but I guess I misunderstood some basics : I guessed I only needed ONE arduino nano USB + sensor pluged on it and the vera plugin to get sensor data retrieve by vera lite.
    This is right ? or do I need more than one arduino ?

    sorry for my dummies questions 🙂


  • Hero Member

    @javier clearly here your gateway has no radio... and all mysensors is about having wireless sensors speaking to a controller (e.g. the vera) through a wirelessgateway (the gateway).

    I guess that if you don't want radio, you should write to the serial port the data in the form of the gateay, but don't need the gateway. That could be a bit complicated but not impossible.



  • @epierre thanks for your explanation. I' m going to try to write to the serial, it will be a funny task 🙂


  • Hero Member

    @javier the design principal is an

    • Arduino Gateway connected to the Vera, either directly over USB or indirectly via Ethernet; no sensors are attached to the Gateway;

    • Each Arduino Sensor Node has the various sensor devices and talks to the Gateway over a wireless connection

    I vaguely recall there has been some discussion of attaching Sensor devices to the Gateway but don't recall that ever went anywhere.


  • Hero Member

    @clippermiami the conclusion was that the sensors may make the gateway miss some messages...


  • Hero Member

    @epierre Thanks 🙂


Log in to reply
 

Suggested Topics

  • 2
  • 1
  • 2
  • 1
  • 10

22
Online

11.2k
Users

11.1k
Topics

112.5k
Posts