Navigation

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

    danivalencia

    @danivalencia

    4
    Reputation
    13
    Posts
    524
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    danivalencia Follow

    Best posts made by danivalencia

    • RE: Is it possible to delete specific nodes?

      You'll have to edit your mysensors.json file (or the name you have at configuration.yaml), and remove the node from that file, with homeassistant stopped before. Normally the format is <node number>: { <lot of data> }.
      This is one of my nodes from HA file.

      "1": {"sensor_id": 1, "type": 17, "sketch_version": "1.0", "battery_level": 52, "protocol_version": "2.0.0-beta", "sketch_name": "Contact1", "children": {"0": {"id": 0, "type": 0, "values": {"16": "0"}}}}
      

      Just delete that part, and start HA again.

      posted in Home Assistant
      danivalencia
      danivalencia
    • RE: Sending Battery level with sensor data.

      On your sketch... (from https://www.mysensors.org/download/sensor_api_15)

       gw.sendBatteryLevel(batteryLevel);
      

      But you'll have to measure batteryLevel before someway 😉

      posted in Home Assistant
      danivalencia
      danivalencia

    Latest posts made by danivalencia

    • RE: Easy/Newbie PCB for MySensors

      @sundberg84 No worry, I talked with hek and he finded that was a pcbway mistake. BTW...very good job with the PCB, I'm using it with a lot of my sensors 😉

      posted in Hardware
      danivalencia
      danivalencia
    • RE: Easy/Newbie PCB for MySensors

      @sundberg84 Any idea why I've received a "2nd version" of your Rev.8 from PCBWay for free? By free I mean that I bought 10x your Rev.8 about 2 months ago (Black in the photo), but today I've got a package from China and when I opened I got that other PCB that I haven't ordered 😕
      I don't see any changes regarding the radio capacitor. Any clue? 0_1465478705931_IMG_6741.jpg

      posted in Hardware
      danivalencia
      danivalencia
    • RE: Is it possible to delete specific nodes?

      You'll have to edit your mysensors.json file (or the name you have at configuration.yaml), and remove the node from that file, with homeassistant stopped before. Normally the format is <node number>: { <lot of data> }.
      This is one of my nodes from HA file.

      "1": {"sensor_id": 1, "type": 17, "sketch_version": "1.0", "battery_level": 52, "protocol_version": "2.0.0-beta", "sketch_name": "Contact1", "children": {"0": {"id": 0, "type": 0, "values": {"16": "0"}}}}
      

      Just delete that part, and start HA again.

      posted in Home Assistant
      danivalencia
      danivalencia
    • RE: Newbie needs help

      @masterkenobi said:

      There is also another thing concern me. What if my neighbor also into Mysensors? Will he be able to view all the data from my sensors? How do I secure the nodes?

      Take a look at https://forum.mysensors.org/topic/1021/security-introducing-signing-support-to-mysensors

      posted in Hardware
      danivalencia
      danivalencia
    • RE: Newbie needs help

      Here you have a sample of one of my battery nodes. Now I'm using V2.0 of Library, but this used to work before updating

      #include <MySensor.h>  
      #include <SPI.h>
      #include <BH1750.h>
      
      #define SN "SensorLuz"
      #define SV "1.0"
      unsigned long SLEEP_TIME = 300000; // 5 minutos
      #define CHILD_ID_LIGHT 0
      #define NODE_ID 7
      
      #define VBAT_PER_BITS 0.003363075  
      #define VMIN 1.9                                  //  Vmin (radio Min Volt)=1.9V (564v)
      #define VMAX 3.0                                  //  Vmax = (2xAA bat)=3.0V (892v)
      int batteryPcnt = 0;                              // Calc value for battery %
      int batLoop = 0;                                  // Loop to help calc average
      int BATTERY_SENSE_PIN = A0; 
      
      MySensor gw;
      BH1750 lightSensor;
      
      uint16_t lastlux;
      
      MyMessage msgLux(CHILD_ID_LIGHT, V_LEVEL);
      MyMessage msgLuxUnit(CHILD_ID_LIGHT, V_UNIT_PREFIX);
      
      void setup()  
      {  
         analogReference(INTERNAL);
      
        gw.begin(NULL, NODE_ID);
        lightSensor.begin();
        gw.sendSketchInfo(SN, SV);
        gw.present(CHILD_ID_LIGHT, S_LIGHT_LEVEL);
        gw.send(msgLuxUnit.set("lux"));
      
      }
      
      void loop()     
      {     
      
        uint16_t lux = lightSensor.readLightLevel();
        Serial.print("Lux: ");
        Serial.println(lux);
        if (lux != lastlux) {
            gw.send(msgLux.set(lux));
            lastlux = lux;
        }
        batM();
        
        gw.sleep(SLEEP_TIME);
      }
      
      void batM() //The battery calculations
      {
         delay(500);
         int sensorValue = analogRead(BATTERY_SENSE_PIN);    
         delay(500);
         
         float Vbat  = sensorValue * VBAT_PER_BITS;
         int batteryPcnt = static_cast<int>(((Vbat-VMIN)/(VMAX-VMIN))*100.);
         //Serial.print("Battery percent: "); Serial.print(batteryPcnt); Serial.println(" %");  
         
        
         if (batLoop > 24) {  //24 ciclos de 5 min = 2h.
           gw.sendBatteryLevel(batteryPcnt);
           batLoop = 0;
         }
         else 
         {
         batLoop++;
         }
      }
      
      posted in Hardware
      danivalencia
      danivalencia
    • RE: Buy designs on OpenHardware.io

      Just received DIY kit (My Slim 2AA node), and they sent me SMD NRLF24+, not the standard 😟 Do I have to contact them?

      posted in OpenHardware.io
      danivalencia
      danivalencia
    • RE: Sending Battery level with sensor data.

      On your sketch... (from https://www.mysensors.org/download/sensor_api_15)

       gw.sendBatteryLevel(batteryLevel);
      

      But you'll have to measure batteryLevel before someway 😉

      posted in Home Assistant
      danivalencia
      danivalencia
    • RE: Buy designs on OpenHardware.io

      How do we know order's state for buyed DIY kits from OH? I ordered a kit Saturday and haven't received any news from PCBWay or OH since then.
      I tried searching PCBWay site but no luck.

      posted in OpenHardware.io
      danivalencia
      danivalencia
    • RE: Problem with S_RGB_LIGHT

      @martinhjelmare

      And there was the fail !! :s

      Installed 1.5.4 and now it runs in the right manner.

      Thank you!!

      posted in Home Assistant
      danivalencia
      danivalencia
    • RE: Problem with S_RGB_LIGHT

      @martinhjelmare

      I tried your sketch as is, just to try one leg for the RGB Led, but I'm not getting the expected result. When I change the brightness from the HA UI slider, the node gets the correct value, but...

      send: 12-12-0-0 s=255,c=3,t=15,pt=2,l=2,sg=0,st=ok:0
      send: 12-12-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,st=ok:1.5.3
      send: 12-12-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
      sensor started, id=12, parent=0, distance=1
      send: 12-12-0-0 s=1,c=0,t=26,pt=0,l=0,sg=0,st=ok:
      send: 12-12-0-0 s=255,c=3,t=11,pt=0,l=11,sg=0,st=ok:DimmableLED
      send: 12-12-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.1
      send: 12-12-0-0 s=1,c=2,t=3,pt=0,l=0,sg=0,st=ok:
      send: 12-12-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0,st=ok:0
      send: 12-12-0-0 s=1,c=1,t=3,pt=2,l=2,sg=0,st=ok:0
      send: 12-12-0-0 s=1,c=1,t=40,pt=0,l=6,sg=0,st=ok:ffffff
      read: 0-0-12 s=1,c=1,t=2,pt=0,l=1,sg=0:1
      Changing level to 100, from 0
      send: 12-12-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0,st=ok:1
      send: 12-12-0-0 s=1,c=1,t=3,pt=2,l=2,sg=0,st=ok:100
      read: 0-0-12 s=1,c=1,t=3,pt=0,l=2,sg=0:17   // <- Here I modified brightness
      Changing level to 100, from 100
      send: 12-12-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0,st=ok:1
      send: 12-12-0-0 s=1,c=1,t=3,pt=2,l=2,sg=0,st=ok:100
      read: 0-0-12 s=1,c=1,t=3,pt=0,l=1,sg=0:9  // <- Here too
      Changing level to 100, from 100
      send: 12-12-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0,st=ok:1
      send: 12-12-0-0 s=1,c=1,t=3,pt=2,l=2,sg=0,st=ok:100
      

      As you see, no matter what level receives, It goes to 100 forever.
      And if you try to move the brightness slider more over to the right (or the left to reduce), the values sometimes get higher than 100 (or -100), despite of the "clipping" method of the sketch.

      EDIT:

      Made a few changes to the code, to find what's failing, and I think is the way HA sends commands to the node;

      ...
      
        if (message.type == V_DIMMER) {
      
          //  Retrieve the power or dim level from the incoming request message
          int requestedLevel = atoi(message.data);
          Serial.print("Received: ");
          Serial.println(message.data);
          Serial.print("Bright: ");
          Serial.println(requestedLevel);
      ...
      

      And the log from the sensor:

      send: 12-12-0-0 s=255,c=3,t=15,pt=2,l=2,sg=0,st=ok:0
      send: 12-12-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,st=ok:1.5.3
      send: 12-12-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
      sensor started, id=12, parent=0, distance=1
      send: 12-12-0-0 s=1,c=0,t=26,pt=0,l=0,sg=0,st=ok:
      send: 12-12-0-0 s=255,c=3,t=11,pt=0,l=11,sg=0,st=ok:DimmableLED
      send: 12-12-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.1
      send: 12-12-0-0 s=1,c=2,t=3,pt=0,l=0,sg=0,st=ok:
      read: 0-0-12 s=1,c=1,t=3,pt=0,l=3,sg=0:100
      Received: 100mableLED
      Bright: 100
      Changing level to 100, from 0
      send: 12-12-0-0 s=1,c=1,t=3,pt=2,l=2,sg=0,st=ok:100
      send: 12-12-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0,st=ok:1
      send: 12-12-0-0 s=1,c=1,t=3,pt=2,l=2,sg=0,st=ok:100
      send: 12-12-0-0 s=1,c=1,t=40,pt=0,l=6,sg=0,st=ok:ffffff
      read: 0-0-12 s=1,c=1,t=3,pt=0,l=2,sg=0:45
      Received: 450mableLED
      Bright: 450
      Changing level to 100, from 100
      send: 12-12-0-0 s=1,c=1,t=3,pt=2,l=2,sg=0,st=ok:100
      

      Seems there is a string of the message (sketch name maybe) messing with the brightness data.

      posted in Home Assistant
      danivalencia
      danivalencia