Navigation

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

    Posts made by MarkV

    • Home Gas measuring..

      Hello,

      I've made a circuit to readout my home gas usage.
      I took the water usage sketch from the mysensors site and changed S_WATER into S_GAS.

      The readout on my serial port of the arduino is good, i also see this in Domoticz, but some parts don't look fermiliar or in good order, and i like to add something but don't know how..

      This is the code:

      
      /**
       * The MySensors Arduino library handles the wireless radio link and protocol
       * between your home built sensors/actuators and HA controller of choice.
       * The sensors forms a self healing radio network with optional repeaters. Each
       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
       * network topology allowing messages to be routed to nodes.
       *
       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
       * Copyright (C) 2013-2015 Sensnology AB
       * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
       *
       * Documentation: http://www.mysensors.org
       * Support Forum: http://forum.mysensors.org
       *
       * This program is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License
       * version 2 as published by the Free Software Foundation.
       *
       *******************************
       *
       * REVISION HISTORY
       * Version 1.0 - Mark Verstappen
       * 
       * DESCRIPTION
       * Use this sensor to measure volume and flow of your house gasmeter.
       * You need to set the correct pulsefactor of your meter (pulses per m3).
       * The sensor starts by fetching current volume reading from gateway (VAR 1).
       * Reports both volume and flow back to gateway.
       *
       * Unfortunately millis() won't increment when the Arduino is in 
       * sleepmode. So we cannot make this sensor sleep if we also want  
       * to calculate/report flow.
       * http://www.mysensors.org/build/pulse_water
       */
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      #include <Time.h>
      #include <TimeLib.h>
      
      #include <SPI.h>
      #include <MySensor.h>  
      
      #define DIGITAL_INPUT_SENSOR 3                  // The digital input you attached your sensor.  (Only 2 and 3 generates interrupt!)
      #define SENSOR_INTERRUPT DIGITAL_INPUT_SENSOR-2        // Usually the interrupt = pin -2 (on uno/nano anyway)
      
      #define PULSE_FACTOR 100                       // 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 0,1                             // 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;  
      boolean pcReceived = false;
      unsigned long oldPulseCount = 0;                 
      unsigned long newBlink = 0;   
      double oldflow = 0;
      double volume =0;                     
      double oldvolume =3987.67;                              // Oude meterstand
      unsigned long lastSend =0;
      unsigned long lastPulse =0;
      
      void setup()  
      {  
        // initialize our digital pins internal pullup resistor so one pulse switches from high to low (less distortion) 
        pinMode(DIGITAL_INPUT_SENSOR, INPUT_PULLUP);
        
        pulseCount = oldPulseCount = 0;
      
        // Fetch last known pulse count value from gw
        request(CHILD_ID, V_VAR1);
      
        lastSend = lastPulse = millis();
      
        attachInterrupt(SENSOR_INTERRUPT, onPulse, FALLING);
      }
      
      void presentation()  {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("Gas Meter", "1.0");
      
        // Register this device as Gasflow sensor
        present(CHILD_ID, S_GAS);       
      }
      
      void loop()     
      { 
        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;
          
          Serial.println("--------- Debug void loop ------------");
          
          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("m3/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.println("flow:   ");
            Serial.print(flow);
            
      //      Serial.println(Time.now()); 
            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);
              Serial.println("---------------------------------------------------");
              
              send(volumeMsg.set(volume, 3));               // Send volume value to gw
            } 
          }
        }
        if (SLEEP_MODE) {
          sleep(SEND_FREQUENCY);
        }
      }
      
      void receive(const MyMessage &message) {
        if (message.type==V_VAR1) {
          unsigned long gwPulseCount=message.getULong();
          pulseCount += gwPulseCount;
          flow=oldflow=0;
          Serial.println("--------------- Debug void receive ---------------"); 
          Serial.print("Received last pulse count from gw:   ");
          Serial.println(pulseCount);
          Serial.println("---------------------------------------------------");
          pcReceived = true;
        }
      }
      
      void onPulse()     
      {
        if (!SLEEP_MODE)
        {
          unsigned long newBlink = micros();   
          unsigned long interval = newBlink-lastBlink;
          
          Serial.println("--------------- Debug void onPulse ---------------"); 
      //    Serial.println("newblink:   "); 
      //    Serial.print(newBlink);
      //    Serial.println("interval:   "); 
      //    Serial.print(interval);
      //    Serial.println();  
          
          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;
            Serial.println("flow = (60000000.0 /interval) / ppl");
            Serial.println(flow);
            Serial.println("---------------------------------------------------");
          }
          lastBlink = newBlink;
        }
        pulseCount++; 
      }
      

      Domoticz shows this:

      0_1467033253720_upload-2b3c3885-4357-4dce-8133-6d11a40cbc64

      The sensor registers each cycle.

      • Pulse counts are 134 wich corrosponds to the 1.340 volume.
        1m3 = 100 counts. (1 count is 0.01m3 )

      • What does the 0.230 value represent ??

      • The real count is more, is there a way to incorporate a option, to send a
        command through the serial console, wich updates the counter?
        For example when in a couple of months something goes wrong, you could update
        the counter with the correct value without, changing the compleet sketch, and there
        bij stopping the arduino etc.
        So some kind of counter update (Adjust) command through the serial console.

      • The flow isn't updated instantly, but each five minuts?
        I want it to be triggerd when the flow starts, measure, remind all data and when the
        flow stops report al the data at once.

      • Mysensors uses V_VOLUME and V_FLOW just as bij S_WATER therefore it says
        waterflow. So how could you change the type of the sensor (both aren't correct)?

      The update (adjust) option would be nice not only for gas measuring but als for water and electricity. (If you want to do it now, you have to dive into the db of domoticz)

      posted in Development
      MarkV
      MarkV
    • RE: Local sensor (no radio)

      @hek
      And what or how do you register this sensor in domoticz?

      posted in Development
      MarkV
      MarkV
    • RE: Power/ Usage sensor - multi channel - local display

      @AWI
      Goodevening
      Oh better, we definitie have to de that. When does it suit you?

      Grtz

      posted in My Project
      MarkV
      MarkV
    • RE: Power/ Usage sensor - multi channel - local display

      @AWI
      It the serial output from the gateway arduino, wich i've got connected through usb.
      I don't have a rotaryswitch connected and yesterday evening i connected a I2c Display just to see if something changes on that.

      I noticed one thin, when i check the serial output, the timer on the display is reset. Further more when i stop the serial readout, the counter also stops, like if the hole thing go's into a idle or stop.

      I've uncommented the debug informatie wich i could find:

      // Handle incoming messages from the MySensors Gateway
      void receive(const MyMessage &message) {  // Expect few types of messages from controller, V_VAR1 for messages
        if (message.type==V_TEXT) {
          // if message comes in, update the kWH reading for meter with value since last update
          // Write some debug info
          Serial.print("Last reading for sensor: ");
          Serial.print(message.sensor);                
          Serial.print(", Message: ");
          Serial.println(message.getString());
          if (message.sensor == LCD1_CHILD ) {
            strcpy(lastLCD1, message.getString());  // read payload in LCD string
          }
        }
      }
      

      Were could i read this debug information?
      At this moment i got my arduino hooked up through usb to my rasberry to see if it keeps sending information.

      I also changed all the cables to the meters.

      This is how one meter looks like:
      0_1462289685255_upload-a785d675-02ea-45c7-9888-2616d6a5c4f4

      And a other one:
      0_1462289751196_upload-ac4e8673-e392-43ac-aeea-1be31416479a

      All the meters are showing also strange values on the axis.

      Sorry for being such a noob at this.. :-S

      posted in My Project
      MarkV
      MarkV
    • RE: Power/ Usage sensor - multi channel - local display

      @AWI
      How is it that i get the readings like above? And after a while the sensor also stops with sending data, last connection stays on that time and date.

      I've uploaded your github sketch and done a serial readout of the measuring arduino and that one functions proberbly. No faulty low voltage errors etc.

      posted in My Project
      MarkV
      MarkV
    • RE: bootloader

      I've got it duss far.. Stupid me, i've forgot to change the reset pin from 10 to 53.
      After that it says ready with uploading the bootloader..
      Now i'm going to test it to see if it worked...

      posted in Development
      MarkV
      MarkV
    • RE: bootloader

      @dynamite
      tryed it and got a other error report:

      avrdude: Expected signature for ATmega328P is 1E 95 0F
               Double check chip, or use -F to override this check.
      Verkeerde microcontroller gevonden. Hebt u het correcte board geselecteerd in het menu Hulpmiddelen > Board?
      

      What now?

      posted in Development
      MarkV
      MarkV
    • RE: bootloader

      @dynamite
      Oh thanks, will do that. .
      But why does it giveel this message.. i wouldn't link this message to a failty powernapp supply..

      posted in Development
      MarkV
      MarkV
    • RE: bootloader

      @tekka
      Thanks for the replay.
      I ment i trying to load the boatloader into a arduino pro mini (clone) through a Arduino (as ISP) Mega 2560.
      When i try to upload the boatloader i'm getting this error:

      avrdude: Yikes!  Invalid device signature.
               Double check connections and try again, or use -F to override
               this check.
      
      Fout bij het branden van de bootloader.
      

      What's wrong and what should i change?

      posted in Development
      MarkV
      MarkV
    • RE: Power/ Usage sensor - multi channel - local display

      Super.
      I've updated everything and it's up and running.
      But my Master arduino (UNO clone) gives this readout on the USB port:

      0;255;3;0;14;Gateway startup complete.
      0;255;3;0;11;AWI-12ChannelPulse
      0;255;3;0;12;2.0
      0;0;0;0;13;Groep 1
      0;1;0;0;13;Groep 2
      0;2;0;0;13;Groep 3
      0;3;0;0;13;Groep 4
      0;4;0;0;13;Groep 5
      0;5;0;0;13;Groep 6
      0;20;0;0;36;Usage meter LCD
      0;20;1;0;47;-
      0;255;3;0;1;
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;20;2;0;47;
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;20;2;0;47;
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;20;2;0;47;
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;20;2;0;47;
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;20;2;0;47;
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;20;2;0;47;
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;20;2;0;47;
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;20;2;0;47;
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;20;2;0;47;
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;20;2;0;47;
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;20;2;0;47;
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      0;255;3;0;1;
      0;1;1;0;17;0
      0;1;1;0;18;-0.001
      0;255;3;0;1;
      0;2;1;0;17;0
      0;2;1;0;18;-0.001
      0;255;3;0;1;
      0;3;1;0;17;0
      0;3;1;0;18;-0.001
      0;255;3;0;1;
      0;4;1;0;17;0
      0;4;1;0;18;-0.001
      0;20;2;0;47;
      0;255;3;0;1;
      0;5;1;0;17;0
      0;5;1;0;18;-0.001
      0;255;3;0;1;
      0;0;1;0;17;0
      0;0;1;0;18;-0.001
      

      Is this correct?
      Because Domoticz doesn't change the values.
      Also this is not the format, wich is past through in the JSON code from the slave to master duino??

      posted in My Project
      MarkV
      MarkV
    • RE: bootloader

      @tekka
      Goodmorning i've got a question:
      Isn't it possible to write a Boards.txt for al boards? or does someone have this allready.
      I tried to load the bootloader in a Arduino Uno (CH340 interface) but this didn't function.
      It would be nice to load it in:
      Arduino Mega 2560
      Arduino Uno (official)
      Arduino Uno (CH340) chinees clone
      Arduino mini
      Arduino nano
      Arduino micro
      etc.

      posted in Development
      MarkV
      MarkV
    • RE: Power/ Usage sensor - multi channel - local display

      @AWI
      Goodmorning,
      I've got a question, are you planning to re-write the script for the main and slave Arduino to the new MySensors 2.0 structuur?

      I've also tryed to look on github if there's a page from you, but didn't find it...

      posted in My Project
      MarkV
      MarkV
    • RE: Windows GUI/Controller for MySensors

      @tekka

      I'Ve done the steps witch you describe but it doesn't show up in the ArduinoIDE.
      Step 1, added the lines to boards.txt
      Step 2, made a directory \MySensors under
      D:\Program Files\Arduino\hardware\arduino\avr\bootloaders
      Step 3, copied the .hex file into D:\Program Files\Arduino\hardware\arduino\avr\bootloaders\MySensors

      What did i do wrong???

      posted in Controllers
      MarkV
      MarkV
    • RE: only one arduino to domoticz without radio

      @Roland
      And does it work?

      posted in Development
      MarkV
      MarkV
    • RE: The use of local sensor on a arduino board directly connected through usb without RF, but light up as mysensors??

      Yep except the rf24 part.
      I''m looking for a way to connect the sensor's to the arduino and directly connect it through usb to my rasberrypi.

      posted in Feature Requests
      MarkV
      MarkV
    • RE: Power/ Usage sensor - multi channel - local display

      Last weeks i'm trying to get it to work but without luck. Could you give a manual on how to get it working with json? What should we do? And how? On my rasberry, on the arduino and in domoticz??

      posted in My Project
      MarkV
      MarkV
    • RE: RS485/RS232/Serial transport class for mysensors.org

      @LeoDesigner

      I'm searching for a usb transport class, could i use this??

      I'd like to connect my arduino (with sensors/actuators connected to it) to my rasberrypi through usb, without the wireless part, but still see them as mysensors sensors.

      Is this possible or could someone make a transport class for it???

      posted in Development
      MarkV
      MarkV
    • The use of local sensor on a arduino board directly connected through usb without RF, but light up as mysensors??

      Integration of a direct connected (through usb) arduino board without RF, only use the i/o ports.
      But they should light up in the mysensor network.

      posted in Feature Requests
      MarkV
      MarkV
    • RE: Power/ Usage sensor - multi channel - local display

      I meen the master sketch like written above.

      I'd want to build a gateway but without the wireless RF part, just connect the master arduino directly through usb to the RasberryPi and readout the measurements.

      So in general:

      Kwh Meters -- cable --> Slave arduino <-- serial --> Master arduino <-- USB --> RasberryPi

      posted in My Project
      MarkV
      MarkV
    • How can i connect a arduino with sensors, but without the rf receiver, but still see the sensors as MySensors????

      My sensor board is near my rasberryPi, so i want to connect it directly through usb on my Pi and readout the sensors.
      How can i do that and what should i change in the sketch???

      posted in Hardware
      MarkV
      MarkV
    • RE: Power/ Usage sensor - multi channel - local display

      So with 1.6 i can install the master software and connect my arduino master directly through usb without the rf24''s? ?

      posted in My Project
      MarkV
      MarkV
    • RE: Power/ Usage sensor - multi channel - local display

      Good evening,

      After a couple of weeks, again i'm busy with my arduino's, but now i have a rasberry with domoticz near my arduino, so i don't need to send it wireless.
      Is there a possibility to connect the master or slave arduino directly to my rasberry and read out the pulse meters???

      posted in My Project
      MarkV
      MarkV
    • Help!!! How do i install the bootloader in to sketch?

      I've downloaded the mysensors software, but what, where and how do i install the bootloaders from mysensors in order to get them to show up in arduino sketch?
      And after that how do i install them on my arduino??

      posted in Troubleshooting
      MarkV
      MarkV
    • RE: Power/ Usage sensor - multi channel - local display

      Tonight i checked the wires and changed them and i believe your wright, the output is:
      Schermafdruk 2015-09-22 21.30.56.png

      But it keeps giving a error, so i hangt them near each other with approx. 10cm space in between, why does it stil say fail after a good startup with ok and after 10a20sec it starts saying fail..

      Is the readout correct?
      And what more could cause the fail error?

      posted in My Project
      MarkV
      MarkV
    • RE: Power/ Usage sensor - multi channel - local display

      Then thats the problem with the slave arduino getting no data. I connected the pulse output like you mentioned second and didn't changed the sketch.
      Maybe i'm home tomorrow then i will give it a try.
      Or is it hard to chsnge the sketch? And what should i change?

      posted in My Project
      MarkV
      MarkV
    • RE: Power/ Usage sensor - multi channel - local display

      Dawm maybe thats the problem..
      I connected the 5v as commen to the pulse + and the - to the digital inputs.

      So to be sure i need to connect the pulse + to the digitale inputs and the pulse - to gnd????

      posted in My Project
      MarkV
      MarkV
    • RE: Power/ Usage sensor - multi channel - local display

      @AWI
      I´m using a LAN GW, i disconnected the serial and made the LAN one of it.
      Mmm, the comms error is strange, they're at max one meter apart, with a tiny plaster wall in between, both also got a cap between vcc and gnd.
      Next weekend i´m going to have a look at the slave input, rather strange that it doesn´t receives pulses.
      I connected the 5volt line to all the 6 pulse meters and connected their output to D2 - D8, through a cord of network cable.
      Thanks for all your help so far!!!!!

      posted in My Project
      MarkV
      MarkV
    • RE: Power/ Usage sensor - multi channel - local display

      AWI I got it up and running with your new sketches!! 😃
      Great work!!!!! Domoticz recognizes that there are sensors in the network.

      But something is still wrong, the usage isn't going up..
      Whats wrong?

      Didn't connect a display and rotaryswitch and also didn't commented things out..

      Why does it show every sensor twice? One with subtype unknown and one with electric??
      I also seen that with the humidity temp sensor..

      Schermafdruk 2015-09-20 17.45.11.png

      The serial on the master arduino says:
      Schermafdruk 2015-09-20 18.10.52.png

      There's not more than a tiny plaster wall between the two arduinos, a total distance of one meter...

      posted in My Project
      MarkV
      MarkV
    • RE: [contest] My 12 input high precision pulse counter (kWh/ W)

      Thanks for the commet and i defently need some help.
      Sorry i didn't see your "new" post about the pulse counter.

      I'm uploading the sketches now.
      I only got one question, what should i uncomment in the sketches when i'm not using the display and counter?

      And when i got this working, is it possible to add to other sensors, a CNY70 (reflector sensor) to readout a water and gas meter? (but this is the next step 😉 )

      I also installed the beta version from domoticz.

      posted in My Project
      MarkV
      MarkV
    • RE: [contest] My 12 input high precision pulse counter (kWh/ W)

      Good evening,

      It took a while but i wanted to check everything and see what i can do about it by myself.
      And.... still no luck, except that i have a running ethernet GW, plus a DHT11 Humidity/temperature sensor up and running.

      My pulse counter is also running and i'm getting output on the usb, normal output haha.
      Also the gateway is able to see the counter.
      Domoticz sees the gateway, the only problem is, that it doesn't add the sensor to it.
      The strange part is that is does add the humidity/temperatuur arduino.

      Schermafdruk 2015-09-19 21.34.19.png

      I've pressed the "add new sensors for 5 minuts" button and still no luck.

      I've also installed MYScontroller and when i connect through tcp i get the following:

      Schermafdruk 2015-09-19 21.39.24.png

      Arduino Sketch serial monitor:

      Schermafdruk 2015-09-19 21.42.06.png

      What's wrong, what did i do wrong and what should i do to fix it??

      posted in My Project
      MarkV
      MarkV
    • RE: MYSbootloader for Pro Mini 1Mhz

      How did you get it to work??

      Could you write a noob tutorial on how it works with bootloaders and how to upload them?

      I've downloaded the mysensors1.5 zip file, but what are the next steps, how do i get it to show up in arduino sketch and after that what must i change and how do i upload it in my arduino??

      posted in General Discussion
      MarkV
      MarkV
    • RE: [contest] My 12 input high precision pulse counter (kWh/ W)

      I've connected everything, but it says:

      11-11-0-0 s=255,c=0,t=17,pt=0,l=3,sg=0,st=fail:1.5

      What does this mean?? What does the fail mean?

      Also the sensors don't show up in Domoticz.

      And now i'm getting al sort off strange signes:
      -11-0-0 s=255,c=0,t=17,pt=0,l=3,sg=0,st=fail:1.5
      11-11-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=fail:0
      .W J‘õ11, parent=0, distance=1
      LLKLLKj‚šõ255,c=3,t=11,pt=0,l=18,sg=0,st=fail:AWI-12ChannelPulse
      LLKLLKj‚šõ255,c=3,t=12,pt=0,l=3,sg=0,st=fail:1.0
      LLKLLKj‚šõ0,c=0,t=13,pt=0,l=0,sg=0,st=fail:
      LLKLLKj‚šõ1,c=0,t=13,pt=0,l=0,sg=0,st=fail:
      find parent
      LLKLLK¦SSIªªšõ255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      11-0-0 s=2,c=0,t=13,pt=0,l=0,sg=0,st=fail:
      LLKLLKj‚šõ3,c=0,t=13,pt=0,l=0,sg=0,st=fail:
      LLKLLKj‚šõ4,c=0,t=13,pt=0,l=0,sg=0,st=fail:
      LLKLLKj‚šõ5,c=0,t=13,pt=0,l=0,sg=0,st=fail:
      LLKLLKj‚šõ255,c=3,t=1,pt=0,l=0,sg=0,st=fail:
      LLKLLKj‚šõ0,c=2,t=18,pt=0,l=0,sg=0,st=fail:
      find parent
      LLKLLK¦SSIªªšõ255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      11-0-0 s=1,c=2,t=18,pt=0,l=0,sg=0,st=fail:
      LLKLLKj‚šõ2,c=2,t=18,pt=0,l=0,sg=0,st=fail:
      LLKLLKj‚šõ3,c=2,t=18,pt=0,l=0,sg=0,st=fail:
      LLKLLKj‚šõ4,c=2,t=18,pt=0,l=0,sg=0,st=fail:
      LLKLLKj‚šõ5,c=2,t=18,pt=0,l=0,sg=0,st=fail:
      ¢¥µ•5
      LLKLLKj‚šõ255,c=3,t=1,pt=0,l=0,sg=0,st=fail:
      find parent
      LLKLLK¦SSIªªšõ255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      11-0-0 s=1,c=2,t=18,pt=0,l=0,sg=0,st=fail:
      Y‹é 11-11-0-0 s=255,c=0,Y‹é 11-11-0-0 s=25óYk½É�started, id=11,equesting time
      JsonParser.parse() failed
      ¢¥µ•5
      LLKLLKj‚šõ255,c=3,t=1,pt=0,l=0,sg=0,st=fail:
      LLKLLKj‚šõ2,c=2,t=18,pt=0,l=0,sg=0,st=fail:
      –‹é 11-11-0-0 s=25Í–‹é 11-11-255-255`¾ò–‹é 11-1Y‹é 11-ñequesting time
      JsonParser.parse() failed

      posted in My Project
      MarkV
      MarkV
    • RE: [contest] My 12 input high precision pulse counter (kWh/ W)

      I've uploaded both sketches without errors, but can't get any readings when i check the serial monitor? Also it doesn't say anything about the communication with the gateway.

      What's wrong? What should i check?

      posted in My Project
      MarkV
      MarkV
    • RE: [contest] My 12 input high precision pulse counter (kWh/ W)

      So i don't need the extra pulldown resistor and could connect everything like drawn down below?

      pocircuit2.png

      With the differance that i'm using a arduino mini wich runs on 3.3V and doesn't have a 5V point...

      posted in My Project
      MarkV
      MarkV
    • RE: [contest] My 12 input high precision pulse counter (kWh/ W)

      Could you explain how to connect the sensors 2 pins?
      On http://openenergymonitor.org/emon/buildingblocks/12-input-pulse-counting they connect it like in the picture?

      pocircuit.png

      Is it by this also like that?? Because i can't see the pull down resistors on yours..

      posted in My Project
      MarkV
      MarkV
    • RE: Domoticz crashes after more than one node being presented

      I've done the above sudo rmmod w1_gpio, a couple reboots and at this moment it detects a unknown energie meter and isn't crashing 🙂
      So maybe some smart brains should have a look at this.....

      posted in Domoticz
      MarkV
      MarkV
    • RE: Domoticz crashes after more than one node being presented

      I got the same config and the same problem.
      RaspberryPi 2B, usb gateway on a arduino uno v3
      And in sketch i see that the node has a sensor and at that moment domoticz crashes into the offline screen.
      So at the moment that the pi or domoticz receives the sensor domoticz crashes.

      What can i do about that???

      posted in Domoticz
      MarkV
      MarkV
    • RE: Help needed

      SUPER!!!!!!!!

      It works 😄
      Thats for my first Serial gateway, now i'm going to have a look if i can convert it to the ethernet version.

      An other question:
      Is it also possible to make a gateway wich can controle multiple receivers??
      For example, the RF24L01 with a 434Mhz receiver etc??

      posted in Hardware
      MarkV
      MarkV
    • RE: Help needed

      Now it says:

      0;0;3;0;9;radio init fail
      

      I've connected my nRF24L01 on my Mega2560 and change the pin settings in the Myconfig.h.
      MISO = Pin 53
      MOSI = Pin 51
      SCK = Pin 52
      CSN = Pin 41
      CE = Pin 40
      IRQ not connected

      MyConfig.h code part looks like:

      /**********************************
      *  NRF24L01 Driver Defaults
      ***********************************/
      #define RF24_CE_PIN		   40
      #define RF24_CS_PIN		   41
      

      All the wiring checked, no problems.
      Why do i keep getting the radio init fail 😞

      posted in Hardware
      MarkV
      MarkV
    • RE: Help needed

      I'm checking where i could change the pin settings.
      I believe because of the fact that i'm using a Mega the pin settings are different.
      Is there a way to make this in a file.
      Like when i'm using a mega i wil include for example a file called Mega2560.h and when i'm using a uno i have to include uno.h.
      so the settings are always wright???

      posted in Hardware
      MarkV
      MarkV
    • RE: Help needed

      I've copied the whole code from the development-branch and replaced this in the file.
      After that sketch didn't give any more error 😄

      U but what was wrong, just for me to learn a little bit about this?

      posted in Hardware
      MarkV
      MarkV
    • RE: Help needed

      I've downloaded the libary and the latest version of Arduino sketch.
      Sketchbook location is: C:\Users\MarkV\Documents\Arduino
      Arduino Sketch location is: D:\Program Files\Arduino
      I've unzipped the mysensors zip file under my sketchbook location and also copied the libary files to D:\Program Files\Arduino\libary.

      Hardware i'm using for the gateway is:
      Arduino Mega 2560
      Ethernet shield WL5100
      NRF24L01+ 2.4GHz

      I'm not using a rf69.

      posted in Hardware
      MarkV
      MarkV
    • Help needed

      I'd like to make a serial gw with a arduino mega2560 (maybe later a ethernet GW).

      I've downloaded the latest arduino sketch and loaded the serial gatweay.ino

      But when i try to load it to the arduino i'm getting errors.

      Arduino: 1.6.5 (Windows 7), Board:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"
      
      In file included from SerialGateway.ino:53:0:
      GatewayUtil.h:21: error: unterminated #ifndef
       #ifndef __GATEWAYUTIL_H__
       ^
      In file included from D:\Program Files\Arduino\libraries\MySensors/MyTransportRFM69.h:26:0,
                       from SerialGateway.ino:42:
      D:\Program Files\Arduino\libraries\MySensors/utility/RFM69.h:78:62: error: 'RF69_IRQ_PIN' was not declared in this scope
           RFM69(byte slaveSelectPin=RF69_SPI_CS, byte interruptPin=RF69_IRQ_PIN, bool isRFM69HW=false, byte interruptNum=RF69_IRQ_NUM) {
                                                                    ^
      D:\Program Files\Arduino\libraries\MySensors/utility/RFM69.h:78:116: error: 'RF69_IRQ_NUM' was not declared in this scope
           RFM69(byte slaveSelectPin=RF69_SPI_CS, byte interruptPin=RF69_IRQ_PIN, bool isRFM69HW=false, byte interruptNum=RF69_IRQ_NUM) {
                                                                                                                          ^
      In file included from SerialGateway.ino:42:0:
      D:\Program Files\Arduino\libraries\MySensors/MyTransportRFM69.h:33:145: error: 'RF69_IRQ_PIN' was not declared in this scope
        MyTransportRFM69(uint8_t freqBand=RFM69_FREQUENCY, uint8_t networkId=RFM69_NETWORKID, uint8_t slaveSelectPin=RF69_SPI_CS, uint8_t interruptPin=RF69_IRQ_PIN, bool isRFM69HW=false, uint8_t interruptNum=RF69_IRQ_NUM);
                                                                                                                                                       ^
      D:\Program Files\Arduino\libraries\MySensors/MyTransportRFM69.h:33:202: error: 'RF69_IRQ_NUM' was not declared in this scope
        MyTransportRFM69(uint8_t freqBand=RFM69_FREQUENCY, uint8_t networkId=RFM69_NETWORKID, uint8_t slaveSelectPin=RF69_SPI_CS, uint8_t interruptPin=RF69_IRQ_PIN, bool isRFM69HW=false, uint8_t interruptNum=RF69_IRQ_NUM);
                                                                                                                                                                                                                ^
      In file included from SerialGateway.ino:53:0:
      GatewayUtil.h:145: error: 'endif' does not name a type
       endif 
       ^
      unterminated #ifndef
      
        Dit rapport zou meer informatie hebben met
        "Tijdens de compilatie uitgebreide uitvoer weergeven"
        ingeschakeld in Bestand > Voorkeuren.
      

      What is wrong and what should be changed in order to make it work???

      (I'm a noob at arduino programming)

      posted in Hardware
      MarkV
      MarkV
    • RE: Arduino 220V AC wattmeter

      Okay
      But isn't possible to make a similar device without the z-wave but with a arduino.
      instead of pussing the signals to a z-wave chip, push them to a arduino??
      Just a simple voltage en current measuring device and let the arduino calculate and store the wattage or kWh...
      That would be a nice and cheap sollution..

      posted in My Project
      MarkV
      MarkV
    • Arduino with ethernet shield direct connect to openhab without NFR

      Is it possible to control / read sensors connected on a arduino directly through ethernet?

      For example arduino Mega with ethernet shield en different sensors connectod on digital and analog i/o pins.
      And can someone make a example or basic program for this???

      posted in Hardware
      MarkV
      MarkV
    • RE: Arduino 220V AC wattmeter

      @stofakiller said:

      poweroutlet ac wattmeter

      I'm also searching for something like this and it should be possible.
      Look at the fibaro wall plug [(http://www.fibaro.com/en/the-fibaro-system/wall-plug)]

      Thats exactly what i want aldo then for less money or a arduino based plug.

      posted in My Project
      MarkV
      MarkV
    • RE: Arduino (Fibaro Wall plug)

      Sorry didn't know this.

      posted in Feature Requests
      MarkV
      MarkV
    • Arduino (Fibaro Wall plug)

      Hello,

      I'm new into domotica and openhab.
      I've searched the internet and seen this great site.
      I'm searching for a way to control but more monitor my energie usage.
      There are a lot of examples but most of them read the main meter.

      I want to have readings of every individual device, so i can compare or notice what the great users are or when a device is faulty or breaking down.

      [(http://www.fibaro.com/en/the-fibaro-system/wall-plug)]

      So i came on the home plug of fibaro, it's small and does the job, but they are pretty expensive.

      The strange part is that no body has done a teared down or made a working clone of it...
      And i can't seem to find arduino projects small enough or projects wich don't use ac clamps.

      Is the someone who can make a arduino (fibaro wall plug) or arduino consumption meter to connect every indiviual device??

      posted in Feature Requests
      MarkV
      MarkV
    • Domoticz on a synology and Arduino Gateway

      Can someone give a step by step tutorial on how to connect the domoticz software installef on a synology nas with arduino sensors?

      posted in Domoticz
      MarkV
      MarkV