Navigation

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

    fernando alvarez buylla

    @fernando alvarez buylla

    18
    Reputation
    23
    Posts
    689
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    fernando alvarez buylla Follow

    Best posts made by fernando alvarez buylla

    • RE: Thanks to all

      Guys you are right is too early to quit , i have to try the RFM69 433Mhz as well before quitting , i was planning to wire my house with a 5v power supply to power all the sensors but i guess using a lower freq can help me to avoid that , will give it a try , lest just hope the rfm69 arrive, cuz i always have problems with evay ,

      thanks guys you open mi mind one more time

      posted in General Discussion
      fernando alvarez buylla
      fernando alvarez buylla
    • RE: What did you build today (Pictures) ?

      well this is my project , right now im using 2 arduino nano with ethernet shield to read 3 lines Voltage on a delta instalation , 3 current sensors of 300amps for a motor , and 1 water pressure ,
      all conected to a raspberry pi with domoticz
      0_1555866423061_IMG_20190416_160915041_BURST000_COVER_TOP.jpg

      but yesterday i decide to change all , instead of 2 uno i will use a pro mini with a nrf24
      so i desing two pcb
      0_1555866610375_downImg.png

      0_1555866627272_downImg2.png

      some code

      #define MY_NODE_ID 100
      #define MY_DEBUG
      #define MY_RADIO_NRF24
      
      #include <SPI.h>
      #include <MySensors.h>  
      
      
      #define CHILD_ID_VOLT_1 1
      #define CHILD_ID_VOLT_2 2
      #define CHILD_ID_VOLT_3 3
      
      #define CHILD_ID_CURRENT_1 4
      #define CHILD_ID_CURRENT_2 5
      #define CHILD_ID_CURRENT_3 6
      
      #define CHILD_ID_PRESION 7
      
      #define VOLT_SENSOR_ANALOG_PIN_1 0
      #define VOLT_SENSOR_ANALOG_PIN_2 1
      #define VOLT_SENSOR_ANALOG_PIN_3 2
      
      #define CURRENT_SENSOR_ANALOG_PIN_1 3
      #define CURRENT_SENSOR_ANALOG_PIN_2 4
      #define CURRENT_SENSOR_ANALOG_PIN_3 5
      
      
      #define PressPin      A6 
      
      
      
      unsigned long SLEEP_TIME = 20000; // Sleep time between reads (in milliseconds)
      
      MyMessage msg(CHILD_ID_VOLT_1, V_VOLTAGE);
      MyMessage msg2(CHILD_ID_VOLT_2, V_VOLTAGE);
      MyMessage msg3(CHILD_ID_VOLT_3, V_VOLTAGE);
      
      MyMessage msg4(CHILD_ID_CURRENT_1, V_CURRENT);
      MyMessage msg5(CHILD_ID_CURRENT_2, V_CURRENT);
      MyMessage msg6(CHILD_ID_CURRENT_3, V_CURRENT);
      
      MyMessage pressureMsg(CHILD_ID_PRESION, V_PRESSURE);
      
      float lastVolt1;
      float lastVolt2;
      float lastVolt3;
      
      float lastCurrent1;
      float lastCurrent2;
      float lastCurrent3;
      
      float lastPresion;
      
      
      int pressure = 0;
      float PSI = 0;
      float PSI_CAL = 2.0;            // Calibration of sensor
      int PSImsb = 0;
      int PSIr = 0;
      
      
      
      void before() {
      
      }
      
      
      void presentation()
      {
       sendSketchInfo("Multisensor", "1.7");  // Send the sketch version information to the gateway and Controller
       present(CHILD_ID_VOLT_1, S_MULTIMETER);   // Register this device as power sensor
       present(CHILD_ID_VOLT_2, S_MULTIMETER);   // Register this device as power sensor
       present(CHILD_ID_VOLT_3, S_MULTIMETER);   // Register this device as power sensor
      
       present(CHILD_ID_CURRENT_1, S_MULTIMETER);   // Register this device as power sensor
       present(CHILD_ID_CURRENT_2, S_MULTIMETER);   // Register this device as power sensor
       present(CHILD_ID_CURRENT_3, S_MULTIMETER);   // Register this device as power sensor
      
       present(CHILD_ID_PRESION, S_WATER);   // Register this device as power sensor
       
      }
      
      
      void setup()  
      { 
      
      }
      
      void loop()      
      {     
       int Voltaje1 = analogRead(A0);
       int Voltaje2 = analogRead(A1);
       int Voltaje3 = analogRead(A2);
      
       int Corriente1 = analogRead(A3);
       int Corriente2 = analogRead(A4);
       int Corriente3 = analogRead(A5);
      
       
       
       float VoltLevel1 = map(Voltaje1,0,1023,0,500);
       float VoltLevel2 = map(Voltaje2,0,1023,0,500);
       float VoltLevel3 = map(Voltaje3,0,1023,0,500);
      
       float CorrienteLevel1 = map(Corriente1,0,1023,0,200);
       float CorrienteLevel2 = map(Corriente2,0,1023,0,200);
       float CorrienteLevel3 = map(Corriente3,0,1023,0,200);
      
       
       Serial.print("Voltaje L1: ");
       Serial.println(VoltLevel1);
       Serial.print("Voltaje L2: ");
       Serial.println(VoltLevel2);
       Serial.print("Voltaje L3: ");
       Serial.println(VoltLevel3);
      
      
       Serial.print("Corriente L1: ");
       Serial.println(CorrienteLevel1);
       Serial.print("Corriente L2: ");
       Serial.println(CorrienteLevel2);
       Serial.print("Corriente L3: ");
       Serial.println(CorrienteLevel3);
      
       //sensor de voltaje
       if (VoltLevel1 != lastVolt1) {
           send(msg.set(VoltLevel1, 1));
           lastVolt1 = VoltLevel1;
       }
      
         if (VoltLevel2 != lastVolt2) {
           send(msg2.set(VoltLevel2, 1));
           lastVolt2 = VoltLevel2;
       }
         if (VoltLevel3 != lastVolt3) {
           send(msg3.set(VoltLevel3, 1));
           lastVolt3 = VoltLevel3;
       }
      
      
      //sensor de corriente
         if (CorrienteLevel1 != lastCurrent1) {
           send(msg4.set(CorrienteLevel1, 1));
           lastCurrent1 = CorrienteLevel1;
       }
           if (CorrienteLevel2 != lastCurrent2) {
           send(msg5.set(CorrienteLevel2, 1));
           lastCurrent2 = CorrienteLevel2;
       }
           if (CorrienteLevel3 != lastCurrent3) {
           send(msg6.set(CorrienteLevel3, 1));
           lastCurrent3 = CorrienteLevel3;
       }
      
      /* ************************************************ */
         pressure  = analogRead    (PressPin) ;        // junk read
         wait(25);
         
      /* • Output: 0.5V – 4.5V linear voltage output. 0 psi outputs 0.5V, 50 psi outputs 2.5V, 100 psi outputs 4.5V 
         0   psi = .33v after scalling 5.0v to 3.3v
         50  psi = 1.65v
         100 psi = 2.97v
      
         3.3v/1024 = .0032266 volt per bit
      */
         pressure  = analogRead    (PressPin) ;
      
         if (pressure < 106) pressure = 106;         // this is minimum of .5v
         PSI = (pressure - 106 ) * .1246;            // where did we get this?? was .119904
         PSI = PSI + PSI_CAL;                        // adjustment
         
         PSImsb = PSI * 100;
         PSIr = PSImsb % 100;
         
      
         send(pressureMsg.set(PSI, 2));            // Send water pressure to gateway
      
         Serial.print("Presion: ");
         Serial.println(PSI);
         
         wait(200);
         
          // end of if (SLEEP_MODE || (cu
      
       
       sleep(SLEEP_TIME);
      }
      

      havent tested with sensors yet

      but looks good so far
      0_1555866800921_Anotación 2019-04-21 121255.jpg

      posted in General Discussion
      fernando alvarez buylla
      fernando alvarez buylla
    • RE: C.H.I.P.

      Sorry to replying in this old thread
      Domoticz work pretty well on c.h.i.p. but not out the box we need to install a few stuff like java 8 git etc but I'm so happy is working just order two more c.h.i.p.'s as this small device is amazing and cheaper

      posted in Hardware
      fernando alvarez buylla
      fernando alvarez buylla
    • RE: What did you build today (Pictures) ?

      well today finally i decide to change to c.h.i.p. as a controller with domoticz an amazing device but too bad for the product that got really bad customer support, ( if you planning to buy a c.h.i.p. read the forum first to get all the problems)

      this is my controller using a chip, arduino nano

      0_1512877583590_IMG_20171209_213652.jpg
      0_1512877592331_IMG_20171209_213710.jpg

      planing to chage the nano to a nodemcu

      posted in General Discussion
      fernando alvarez buylla
      fernando alvarez buylla
    • C.H.I.P. my controller choise

      almost a year ago i was browsing on kickstarter when i saw the new micro pc C.H.I.P. from Next Thing Co. (www.getchip.com) , i order one just for fun 9usd + 6usd shipping , this machine took too long to arrive almost a year ,
      but when arrive i get amazed of all the fetures that this $9 machine can do

      1GHz Allwinner R8 processor
      512MB of RAM
      8GBytes of flash
      Wifi
      Bluetooth 4.0
      video output (composite video)
      linux debian distribution

      CHIP is powered at 5V and draws about 500mA during boot,On the header terminals, we find a variety of power sources include 5V, 3.3V and 1.8V. The maximum current draws on these are 2A, 700mA and 50mA respectively

      already included with a connector for a battery ( 1s) with " sudo battery.sh "we can have battery stats
      BAT_STATUS=0
      CHARG_IND=1
      BAT_EXIST=1
      CHARGE_CTL=0xc9
      CHARGE_CTL2=0x45
      Battery voltage = 3951.2mV
      Battery discharge current = 0mA
      Battery charge current = 510.0mA
      Internal temperature = 56.8c

      so i decide to make a controller for my sensors as i dont had a pi (to expensive for me 😞 )
      so i decide to install mycontroller (mycontroller.org) it works pretty well but i decide to use Domoticz the installation for domoticz is pretty simple

      sudo apt-get update
      sudo apt-get upgrade
      sudo apt-get install build-essential nano cmake git libboost-dev libboost-thread-dev libboost-system-dev libsqlite3-dev curl libcurl4-openssl-dev libssl-dev libusb-dev zlib1g-dev python3-dev
      mkdir ~/domoticz
      cd ~/domoticz
      wget https://releases.domoticz.com/releases/release/domoticz_linux_armv7l.tgz
      tar xvfz domoticz_linux_armv7l.tgz
      rm domoticz_linux_armv7l.tgz
      ./domoticz 
      

      and thats it
      http://chip-ip:8080

      domoticz is really nice controller i gonna test it for a couple of months.

      also we can install node-red and johnny-five gpio for chip

      sudo apt-get update
      sudo apt-get upgrade
      sudo apt-get install build-essential
      sudo apt-get install python
      cd /tmp
      mkdir node
      cd node
      wget https://nodejs.org/dist/v4.4.7/node-v4.4.7-linux-armv7l.tar.xz
      tar -xvf node*
      cd node*
      sudo cp -R * /usr/local
      cd /usr/local/bin
      cd ~
      mkdir node-red
      cd node-red
      npm install node-red
      cd node_modules
      cd node-red
      npm install node-red-contrib-gpio johnny-five chip-io
      node red.js
      

      Go to http://chip-ip:1880 and play
      i test node-red and works great
      if you know how to use a pi you will know how to use chip

      on the chip forum danjperron manage to add a nrf24l01 to the chip se meaby we can use a controller and gateway in the same device or make wifi sensors
      https://bbs.nextthing.co/t/success-nrf24l01-on-spi-works/7919

      posted in Hardware
      fernando alvarez buylla
      fernando alvarez buylla
    • RE: Mycontroller on c.h.I.p.

      @jkandasa so far so good need to buy extra sensors to see if this device can hold , but I'm pretty sure it will just like raspberry pi 1

      posted in MyController.org
      fernando alvarez buylla
      fernando alvarez buylla
    • RE: What did you build today (Pictures) ?

      And a few days later my pcb's arrived
      0_1556345757207_IMG_20190427_011106.jpg

      Now to test the next version

      posted in General Discussion
      fernando alvarez buylla
      fernando alvarez buylla
    • RE: C.H.I.P.

      @vikasjee glady but I follow some one else steps lol
      https://bbs.nextthing.co/t/domoticz-small-how-to/2585

      But instead of
      wget http://domoticz.sourceforge.net/beta/domoticz_linux_armv7l.tgz

      Just use
      Wget https://releases.domoticz.com/releases/beta/domoticz_linux_armv7l.tgz

      posted in Hardware
      fernando alvarez buylla
      fernando alvarez buylla
    • RE: V_LEVEL in Domoticz [resolved]

      yes
      0_1512876941506_Sin título-1.jpg

      posted in Domoticz
      fernando alvarez buylla
      fernando alvarez buylla
    • RE: Understanding combined sketch

      @mfalkvidd thanks mate that's exactly what I need

      posted in My Project
      fernando alvarez buylla
      fernando alvarez buylla

    Latest posts made by fernando alvarez buylla

    • My isp dont allow to open ports

      Hi guys I got a problem I just change ISP today and I decide to open the port 8080 to access my domoticz via internet but I just find out my ISP don't allow to open any ports is a double Nat. Already call support and there's nothing they can do , my question is you guys know any other way to portforwarding on a rpi. Any software. vpn or something else, i can use paid or free,

      Thanks in advanced

      posted in Domoticz
      fernando alvarez buylla
      fernando alvarez buylla
    • questioun using multiple sensors on domoticz

      Hi guys i building a multi sensor node , but i have one problem with a water pressure it keeps giving me a weather pressure , any one know what im doing wrong

      0_1556661291979_multisensor.jpg

      #define MY_NODE_ID 1
      #define MY_DEBUG
      #define MY_RADIO_NRF24
      
      #include <SPI.h>
      #include <MySensors.h>  
      
      
      #define CHILD_ID_VOLT_1 1
      #define CHILD_ID_VOLT_2 2
      #define CHILD_ID_VOLT_3 3
      
      #define CHILD_ID_CURRENT_1 4
      #define CHILD_ID_CURRENT_2 5
      #define CHILD_ID_CURRENT_3 6
      
      #define CHILD_ID_PRESION 7
      
      #define VOLT_SENSOR_ANALOG_PIN_1 0
      #define VOLT_SENSOR_ANALOG_PIN_2 1
      #define VOLT_SENSOR_ANALOG_PIN_3 2
      
      #define CURRENT_SENSOR_ANALOG_PIN_1 3
      #define CURRENT_SENSOR_ANALOG_PIN_2 4
      #define CURRENT_SENSOR_ANALOG_PIN_3 5
      
      
      #define PressPin      A6 
      
      
      
      unsigned long SLEEP_TIME = 20000; // Sleep time between reads (in milliseconds)
      
      MyMessage msg(CHILD_ID_VOLT_1, V_VOLTAGE);
      MyMessage msg2(CHILD_ID_VOLT_2, V_VOLTAGE);
      MyMessage msg3(CHILD_ID_VOLT_3, V_VOLTAGE);
      
      MyMessage msg4(CHILD_ID_CURRENT_1, V_CURRENT);
      MyMessage msg5(CHILD_ID_CURRENT_2, V_CURRENT);
      MyMessage msg6(CHILD_ID_CURRENT_3, V_CURRENT);
      
      MyMessage pressureMsg(CHILD_ID_PRESION, V_PRESSURE);
      
      float lastVolt1;
      float lastVolt2;
      float lastVolt3;
      
      float lastCurrent1;
      float lastCurrent2;
      float lastCurrent3;
      
      float lastPresion;
      
      
      int pressure = 0;
      float PSI = 0;
      float PSI_CAL = 2.0;            // Calibration of sensor
      int PSImsb = 0;
      int PSIr = 0;
      
      
      
      void before() {
      
      }
      
      
      void presentation()
      {
        sendSketchInfo("Pozo multi sensor", "1.0");  // Send the sketch version information to the gateway and Controller
        present(CHILD_ID_VOLT_1, S_MULTIMETER);   // Register this device as power sensor
        present(CHILD_ID_VOLT_2, S_MULTIMETER);   // Register this device as power sensor
        present(CHILD_ID_VOLT_3, S_MULTIMETER);   // Register this device as power sensor
      
        present(CHILD_ID_CURRENT_1, S_MULTIMETER);   // Register this device as power sensor
        present(CHILD_ID_CURRENT_2, S_MULTIMETER);   // Register this device as power sensor
        present(CHILD_ID_CURRENT_3, S_MULTIMETER);   // Register this device as power sensor
      
        present(CHILD_ID_PRESION, S_WATER);   // Register this device as power sensor
        
      }
      
      
      void setup()  
      { 
      
      }
      
      void loop()      
      {     
        int Voltaje1 = analogRead(A0);
        int Voltaje2 = analogRead(A1);
        int Voltaje3 = analogRead(A2);
      
        int Corriente1 = analogRead(A3);
        int Corriente2 = analogRead(A4);
        int Corriente3 = analogRead(A5);
      
        
        
        float VoltLevel1 = map(Voltaje1,0,1023,0,500);
        float VoltLevel2 = map(Voltaje2,0,1023,0,500);
        float VoltLevel3 = map(Voltaje3,0,1023,0,500);
      
        float CorrienteLevel1 = map(Corriente1,0,1023,0,200);
        float CorrienteLevel2 = map(Corriente2,0,1023,0,200);
        float CorrienteLevel3 = map(Corriente3,0,1023,0,200);
      
        
        Serial.print("Voltaje L1: ");
        Serial.println(VoltLevel1);
        Serial.print("Voltaje L2: ");
        Serial.println(VoltLevel2);
        Serial.print("Voltaje L3: ");
        Serial.println(VoltLevel3);
      
      
        Serial.print("Corriente L1: ");
        Serial.println(CorrienteLevel1);
        Serial.print("Corriente L2: ");
        Serial.println(CorrienteLevel2);
        Serial.print("Corriente L3: ");
        Serial.println(CorrienteLevel3);
      
        //sensor de voltaje
        if (VoltLevel1 != lastVolt1) {
            send(msg.set(VoltLevel1, 1));
            lastVolt1 = VoltLevel1;
        }
      
          if (VoltLevel2 != lastVolt2) {
            send(msg2.set(VoltLevel2, 1));
            lastVolt2 = VoltLevel2;
        }
          if (VoltLevel3 != lastVolt3) {
            send(msg3.set(VoltLevel3, 1));
            lastVolt3 = VoltLevel3;
        }
      
      
      //sensor de corriente
          if (CorrienteLevel1 != lastCurrent1) {
            send(msg4.set(CorrienteLevel1, 1));
            lastCurrent1 = CorrienteLevel1;
        }
            if (CorrienteLevel2 != lastCurrent2) {
            send(msg5.set(CorrienteLevel2, 1));
            lastCurrent2 = CorrienteLevel2;
        }
            if (CorrienteLevel3 != lastCurrent3) {
            send(msg6.set(CorrienteLevel3, 1));
            lastCurrent3 = CorrienteLevel3;
        }
      
      /* ************************************************ */
          pressure  = analogRead    (PressPin) ;        // junk read
          wait(25);
          
      /* • Output: 0.5V – 4.5V linear voltage output. 0 psi outputs 0.5V, 50 psi outputs 2.5V, 100 psi outputs 4.5V 
          0   psi = .33v after scalling 5.0v to 3.3v
          50  psi = 1.65v
          100 psi = 2.97v
      
          3.3v/1024 = .0032266 volt per bit
       */
          pressure  = analogRead    (PressPin) ;
      
          if (pressure < 106) pressure = 106;         // this is minimum of .5v
          PSI = (pressure - 106 ) * .1246;            // where did we get this?? was .119904
          PSI = PSI + PSI_CAL;                        // adjustment
          
          PSImsb = PSI * 100;
          PSIr = PSImsb % 100;
          
      
          send(pressureMsg.set(PSI, 2));            // Send water pressure to gateway
      
          Serial.print("Presion: ");
          Serial.println(PSI);
          
          wait(200);
          
           // end of if (SLEEP_MODE || (cu
      
        
        sleep(SLEEP_TIME);
      }
      

      0_1556661484919_baro.jpg
      0_1556661493474_baro2.jpg

      any help will be very appreciated

      posted in Domoticz
      fernando alvarez buylla
      fernando alvarez buylla
    • RE: What did you build today (Pictures) ?

      And a few days later my pcb's arrived
      0_1556345757207_IMG_20190427_011106.jpg

      Now to test the next version

      posted in General Discussion
      fernando alvarez buylla
      fernando alvarez buylla
    • RE: What did you build today (Pictures) ?

      well this is my project , right now im using 2 arduino nano with ethernet shield to read 3 lines Voltage on a delta instalation , 3 current sensors of 300amps for a motor , and 1 water pressure ,
      all conected to a raspberry pi with domoticz
      0_1555866423061_IMG_20190416_160915041_BURST000_COVER_TOP.jpg

      but yesterday i decide to change all , instead of 2 uno i will use a pro mini with a nrf24
      so i desing two pcb
      0_1555866610375_downImg.png

      0_1555866627272_downImg2.png

      some code

      #define MY_NODE_ID 100
      #define MY_DEBUG
      #define MY_RADIO_NRF24
      
      #include <SPI.h>
      #include <MySensors.h>  
      
      
      #define CHILD_ID_VOLT_1 1
      #define CHILD_ID_VOLT_2 2
      #define CHILD_ID_VOLT_3 3
      
      #define CHILD_ID_CURRENT_1 4
      #define CHILD_ID_CURRENT_2 5
      #define CHILD_ID_CURRENT_3 6
      
      #define CHILD_ID_PRESION 7
      
      #define VOLT_SENSOR_ANALOG_PIN_1 0
      #define VOLT_SENSOR_ANALOG_PIN_2 1
      #define VOLT_SENSOR_ANALOG_PIN_3 2
      
      #define CURRENT_SENSOR_ANALOG_PIN_1 3
      #define CURRENT_SENSOR_ANALOG_PIN_2 4
      #define CURRENT_SENSOR_ANALOG_PIN_3 5
      
      
      #define PressPin      A6 
      
      
      
      unsigned long SLEEP_TIME = 20000; // Sleep time between reads (in milliseconds)
      
      MyMessage msg(CHILD_ID_VOLT_1, V_VOLTAGE);
      MyMessage msg2(CHILD_ID_VOLT_2, V_VOLTAGE);
      MyMessage msg3(CHILD_ID_VOLT_3, V_VOLTAGE);
      
      MyMessage msg4(CHILD_ID_CURRENT_1, V_CURRENT);
      MyMessage msg5(CHILD_ID_CURRENT_2, V_CURRENT);
      MyMessage msg6(CHILD_ID_CURRENT_3, V_CURRENT);
      
      MyMessage pressureMsg(CHILD_ID_PRESION, V_PRESSURE);
      
      float lastVolt1;
      float lastVolt2;
      float lastVolt3;
      
      float lastCurrent1;
      float lastCurrent2;
      float lastCurrent3;
      
      float lastPresion;
      
      
      int pressure = 0;
      float PSI = 0;
      float PSI_CAL = 2.0;            // Calibration of sensor
      int PSImsb = 0;
      int PSIr = 0;
      
      
      
      void before() {
      
      }
      
      
      void presentation()
      {
       sendSketchInfo("Multisensor", "1.7");  // Send the sketch version information to the gateway and Controller
       present(CHILD_ID_VOLT_1, S_MULTIMETER);   // Register this device as power sensor
       present(CHILD_ID_VOLT_2, S_MULTIMETER);   // Register this device as power sensor
       present(CHILD_ID_VOLT_3, S_MULTIMETER);   // Register this device as power sensor
      
       present(CHILD_ID_CURRENT_1, S_MULTIMETER);   // Register this device as power sensor
       present(CHILD_ID_CURRENT_2, S_MULTIMETER);   // Register this device as power sensor
       present(CHILD_ID_CURRENT_3, S_MULTIMETER);   // Register this device as power sensor
      
       present(CHILD_ID_PRESION, S_WATER);   // Register this device as power sensor
       
      }
      
      
      void setup()  
      { 
      
      }
      
      void loop()      
      {     
       int Voltaje1 = analogRead(A0);
       int Voltaje2 = analogRead(A1);
       int Voltaje3 = analogRead(A2);
      
       int Corriente1 = analogRead(A3);
       int Corriente2 = analogRead(A4);
       int Corriente3 = analogRead(A5);
      
       
       
       float VoltLevel1 = map(Voltaje1,0,1023,0,500);
       float VoltLevel2 = map(Voltaje2,0,1023,0,500);
       float VoltLevel3 = map(Voltaje3,0,1023,0,500);
      
       float CorrienteLevel1 = map(Corriente1,0,1023,0,200);
       float CorrienteLevel2 = map(Corriente2,0,1023,0,200);
       float CorrienteLevel3 = map(Corriente3,0,1023,0,200);
      
       
       Serial.print("Voltaje L1: ");
       Serial.println(VoltLevel1);
       Serial.print("Voltaje L2: ");
       Serial.println(VoltLevel2);
       Serial.print("Voltaje L3: ");
       Serial.println(VoltLevel3);
      
      
       Serial.print("Corriente L1: ");
       Serial.println(CorrienteLevel1);
       Serial.print("Corriente L2: ");
       Serial.println(CorrienteLevel2);
       Serial.print("Corriente L3: ");
       Serial.println(CorrienteLevel3);
      
       //sensor de voltaje
       if (VoltLevel1 != lastVolt1) {
           send(msg.set(VoltLevel1, 1));
           lastVolt1 = VoltLevel1;
       }
      
         if (VoltLevel2 != lastVolt2) {
           send(msg2.set(VoltLevel2, 1));
           lastVolt2 = VoltLevel2;
       }
         if (VoltLevel3 != lastVolt3) {
           send(msg3.set(VoltLevel3, 1));
           lastVolt3 = VoltLevel3;
       }
      
      
      //sensor de corriente
         if (CorrienteLevel1 != lastCurrent1) {
           send(msg4.set(CorrienteLevel1, 1));
           lastCurrent1 = CorrienteLevel1;
       }
           if (CorrienteLevel2 != lastCurrent2) {
           send(msg5.set(CorrienteLevel2, 1));
           lastCurrent2 = CorrienteLevel2;
       }
           if (CorrienteLevel3 != lastCurrent3) {
           send(msg6.set(CorrienteLevel3, 1));
           lastCurrent3 = CorrienteLevel3;
       }
      
      /* ************************************************ */
         pressure  = analogRead    (PressPin) ;        // junk read
         wait(25);
         
      /* • Output: 0.5V – 4.5V linear voltage output. 0 psi outputs 0.5V, 50 psi outputs 2.5V, 100 psi outputs 4.5V 
         0   psi = .33v after scalling 5.0v to 3.3v
         50  psi = 1.65v
         100 psi = 2.97v
      
         3.3v/1024 = .0032266 volt per bit
      */
         pressure  = analogRead    (PressPin) ;
      
         if (pressure < 106) pressure = 106;         // this is minimum of .5v
         PSI = (pressure - 106 ) * .1246;            // where did we get this?? was .119904
         PSI = PSI + PSI_CAL;                        // adjustment
         
         PSImsb = PSI * 100;
         PSIr = PSImsb % 100;
         
      
         send(pressureMsg.set(PSI, 2));            // Send water pressure to gateway
      
         Serial.print("Presion: ");
         Serial.println(PSI);
         
         wait(200);
         
          // end of if (SLEEP_MODE || (cu
      
       
       sleep(SLEEP_TIME);
      }
      

      havent tested with sensors yet

      but looks good so far
      0_1555866800921_Anotación 2019-04-21 121255.jpg

      posted in General Discussion
      fernando alvarez buylla
      fernando alvarez buylla
    • RE: help with serial gateway on raspberry pi

      thanks guys , the solution for me was to add

      ln -s /dev/ttyMySensorsGateway /dev/ttyUSB020
      

      to rc.local

      but i will try your idea @mfalkvidd thanks for the help

      posted in Domoticz
      fernando alvarez buylla
      fernando alvarez buylla
    • help with serial gateway on raspberry pi

      hi guys i just make a new controller with a raspberry pi and domoticz , now im trying to add the serial gateway to my domoticz , but in order to domoticz to open the port i need to open ssh connection and use

      sudo ./bin/mysgw
      
      

      for domoticz to read the port /dev/ttyUSB020 , if i dont use ./bin/mysgw the log just said
      2019-04-21 04:31:58.747 Status: MySensors: Using serial port: /dev/ttyUSB020
      2019-04-21 04:31:58.747 Error: MySensors: Error opening serial port!
      , what im missing here

      just do the standar installaton

      ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway
      make 
      sudo make install 
      sudo systemctl enable mysgw.service
      sudo ln -s /dev/ttyMySensorsGateway /dev/ttyUSB020
      

      i dont know what im missing here, thanks for the help

      posted in Domoticz
      fernando alvarez buylla
      fernando alvarez buylla
    • RE: Thanks to all

      Guys you are right is too early to quit , i have to try the RFM69 433Mhz as well before quitting , i was planning to wire my house with a 5v power supply to power all the sensors but i guess using a lower freq can help me to avoid that , will give it a try , lest just hope the rfm69 arrive, cuz i always have problems with evay ,

      thanks guys you open mi mind one more time

      posted in General Discussion
      fernando alvarez buylla
      fernando alvarez buylla
    • Thanks to all

      Hello guys i just decide to quit using mysensors , in nothing personal is just is not working for me i live in mexico and almost all houses are a Faraday cages, yesterday i was tenting a new gateway with a few sensors and i just lose my mind , losing connection , every minute , try adding a repeater didnt help change the NRF24L01+ radio for a long range antenna , changing arduinos mini /nano/ uno etc , same result all day yesterday i was fighting to use mysensors , today i just went ahead and buy a nodemcu install mqtt to my controller , flash tasmota and in less than 2 hours i was able to add my sensor , i love this community, thanks to you guys i was introduced to home automation and learn a lot , but is time for me to change for another solutions for my home ,

      thanks guys i really appreciate all your help , and all you time spending on working on an open source solution for all of us ,

      posted in General Discussion
      fernando alvarez buylla
      fernando alvarez buylla
    • RE: What did you build today (Pictures) ?

      @neverdie go for the pi zero chip is really nice a little better than the pi zero wifi and bt integraded 4gb and a few cool stuff , but theres people that pay a year ago and still waiting for the chip to arrive , no reply and no support on forum , to me chip is dying , you cant never go wrong with a pi , but i will try in a few months the omega2 to remplace my chips

      posted in General Discussion
      fernando alvarez buylla
      fernando alvarez buylla
    • RE: What did you build today (Pictures) ?

      well today finally i decide to change to c.h.i.p. as a controller with domoticz an amazing device but too bad for the product that got really bad customer support, ( if you planning to buy a c.h.i.p. read the forum first to get all the problems)

      this is my controller using a chip, arduino nano

      0_1512877583590_IMG_20171209_213652.jpg
      0_1512877592331_IMG_20171209_213710.jpg

      planing to chage the nano to a nodemcu

      posted in General Discussion
      fernando alvarez buylla
      fernando alvarez buylla