Navigation

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

    finch666

    @finch666

    2
    Reputation
    13
    Posts
    480
    Profile views
    1
    Followers
    0
    Following
    Joined Last Online

    finch666 Follow

    Best posts made by finch666

    • RE: [SOLVED]Two nodes with relays interfering

      @sundberg84 said:

      The output on node 2 looks strange - ID 0 is (and should only be) the gateway!

      I guess you mean node 1. And indeed, I really messed up the code somehow. Reloaded the original sketch and adapted it again, now everything works like a charm.
      Thanks everyone for thinking along!

      posted in Troubleshooting
      finch666
      finch666

    Latest posts made by finch666

    • RE: Wiegand sending codes to domoticz

      Hi mscory,

      It's been a while, but as far as I remember I was able to see the values as text in domoticz, but was not able to use those in events.

      posted in Troubleshooting
      finch666
      finch666
    • RE: Windmill

      You can charge a battery, of course.....
      A small dynamo will do the job.

      posted in General Discussion
      finch666
      finch666
    • RE: Parking Sensor problem

      @BulldogLowell said:

      @mikeg291

      It could be that transient sound waves are reflecting/scattering around and affecting the readings. The NewPing library states that 29milliseconds should be the shortest delay between reads.

      Sound travels a little more than one foot in 1millisecond so you have an inherent delay in an empty garage; 15 feet each way, for example is about 30milliseconds from ping to read.

      So, if you insert a delay(50) after you obtain the distance you may leave enough time for all of the sound to be absorbed or reflected away.

      I second this. Built the sensor with a neopixel ring and the leds go berserk when I am about 3 cm away from the sensor with my hand.

      posted in Troubleshooting
      finch666
      finch666
    • Wiegand sending codes to domoticz

      Trying to get a Wiegand 26 reader to send the tagcode to domoticz.
      Being not a wizard in coding, I think I got something wrong. I need to send the cardCode to domoticz to use in events, but the code appears in domoticz as "lux".
      Does anyone out there knows how to correct the program (much obliged)

      //
      //
      #include <MySensor.h>
      #include <SPI.h>
      #define ID 0
      
       
      MySensor gw;
      MyMessage msg(ID, S_CUSTOM);
      
      #define MAX_BITS 100                 // max number of bits 
      #define WEIGAND_WAIT_TIME  3000      // time to wait for another weigand pulse.  
      
      unsigned char databits[MAX_BITS];    // stores all of the data bits
      unsigned char bitCount;              // number of bits currently captured
      unsigned char flagDone;              // goes low when data is currently being captured
      unsigned int weigand_counter;        // countdown until we assume there are no more bits
      
      unsigned long facilityCode=0;        // decoded facility code
      unsigned long cardCode=0;            // decoded card code
      
      // interrupt that happens when INTO goes low (0 bit)
      void ISR_INT0()
      {
        //Serial.print("0");
        bitCount++;
        flagDone = 0;
        weigand_counter = WEIGAND_WAIT_TIME;  
        
      }
      
      // interrupt that happens when INT1 goes low (1 bit)
      void ISR_INT1()
      {
        //Serial.print("1");
        databits[bitCount] = 1;
        bitCount++;
        flagDone = 0;
        weigand_counter = WEIGAND_WAIT_TIME;  
      }
      
      void setup()
      {
        gw.begin();
        gw.sendSketchInfo("Wiegand", "1.0");
        gw.present(ID, S_CUSTOM); 
        pinMode(13, OUTPUT);  // LED
        pinMode(2, INPUT);     // DATA0 (INT0)
        pinMode(3, INPUT);     // DATA1 (INT1)
        
        Serial.begin(9600);
        Serial.println("RFID Readers");
        
        // binds the ISR functions to the falling edge of INTO and INT1
        attachInterrupt(0, ISR_INT0, FALLING);  
        attachInterrupt(1, ISR_INT1, FALLING);
        
      
        weigand_counter = WEIGAND_WAIT_TIME;
      }
      
      void loop()
      {
        // This waits to make sure that there have been no more data pulses before processing data
        if (!flagDone) {
          if (--weigand_counter == 0)
            flagDone = 1;	
        }
        
        // if we have bits and we the weigand counter went out
        if (bitCount > 0 && flagDone) {
          unsigned char i;
          
          Serial.print("Read ");
          Serial.print(bitCount);
          Serial.print(" bits. ");
          
         
          if (bitCount == 26)
          {
                  // facility code = bits 2 to 9
            for (i=1; i<9; i++)
            {
               facilityCode <<=1;
               facilityCode |= databits[i];
            }
            
            // card code = bits 10 to 23
            for (i=9; i<25; i++)
            {
               cardCode <<=1;
               cardCode |= databits[i];
            }
            
            printBits();  
            
          }
          else {
                Serial.println("Unable to decode."); 
          }
           // cleanup and get ready for the next card
           bitCount = 0;
           facilityCode = 0;
           cardCode = 0;
           for (i=0; i<MAX_BITS; i++) 
           {
             databits[i] = 0;
           } 
      
       }
      
      }
      
      void printBits()
      {
            // I really hope you can figure out what this function does
            Serial.print("FC = ");
            Serial.print(facilityCode);
            Serial.print(", CC = ");
            Serial.println(cardCode); 
            gw.send(msg.set(cardCode)); 
      }
      
      posted in Troubleshooting
      finch666
      finch666
    • RE: Wiegand support?

      Thanks.
      Knew this, but esp easy has native support for a wiegand reader, where mysensors has not. Had the software (included access control) up and running, but unreliable; as said before.
      So I'm searching for a substitute for the esp.

      posted in Feature Requests
      finch666
      finch666
    • Wiegand support?

      Finally done away with esp sensors, wich to me appeared unreliable, and switched to the NRF solution. Stable as a rock so far, but I really miss the possibility to intergrate my wiegand door access in the network.
      Anyone developing something like this at the moment?

      posted in Feature Requests
      finch666
      finch666
    • IDX table cleanup possible?

      Been running Domoticz now for a month and experimenting with programming sensors, I notice IDX numbers keep rising. Not used IDX's are not re-assigned by domoticz.
      Is it possible to re-assign IDX numbers, so I won't run out off IDX's, or is it a none existing problem I see ahead?

      posted in Domoticz
      finch666
      finch666
    • RE: [SOLVED]Arduino nano clone, serial gateway not working

      It appeared my radio module wasn't functioning......😠
      The nano gateway works perfect now.......😌
      Thank you, TheoL, for your reactions!

      posted in Troubleshooting
      finch666
      finch666
    • RE: [SOLVED]Arduino nano clone, serial gateway not working

      Yep, even larger than 4.7 uF.
      Could it be the 5V pin on the nano, not giving enough current?(a 3.3V regulator is connected to this pin). I thought this pin was directly connected to the 5V coming from the usb connection (powered hub attached). But if it isn't........ will be investigating that later this day...
      This topic could be a lead; will try to get 3.3v directly from the nano.........

      posted in Troubleshooting
      finch666
      finch666
    • [SOLVED]Arduino nano clone, serial gateway not working

      Trying to use a nano clone instead of mij current uno to establish a serial gateway to a raspberry. The nano however, keeps giving me a radio fail.
      Checked the wiring 4 or 5 times, so that should be okay.
      Searched the interweb for problems with these clones, but nothing useful came up, besides known problems with a USB driver, wich don't seem to be relevant, given the fact that uploading a sketch gives no problems.
      Anyone else experienced such problems? Is there a solution? Or would it be much smarter to use a mini with a ftdi232?

      posted in Troubleshooting
      finch666
      finch666