Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. niccodemi
    • Continue chat with niccodemi
    • Start new chat with niccodemi
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    niccodemi

    @niccodemi

    11
    Reputation
    113
    Posts
    1330
    Profile views
    1
    Followers
    0
    Following
    Joined Last Online

    niccodemi Follow

    Posts made by niccodemi

    • RE: Openhab multiple gateways

      @TimO thanks, that's great. Do I have to change the bridge name (gateway) for the second bridge to something else? Can I use same node IDs on both gateways?

      Bridge mysensors:bridge-ser:gateway [ serialPort="/dev/pts/2", sendDelay=200 ] {
      	humidity 		hum01 	[ nodeId=172, childId=0 ]
      	temperature		temp01 	[ nodeId=172, childId=1 ]
              light			light01 [ nodeId=105, childId=0  ]
              light			light02 [ nodeId=105, childId=1 ]
        }
      Bridge mysensors:bridge-eth:gateway [ ipAddress="127.0.0.1", tcpPort=5003, sendDelay=200 ] {
      	humidity 		hum01 	[ nodeId=172, childId=0 ]
      	temperature		temp01 	[ nodeId=172, childId=1 ]
              light			light01 [ nodeId=105, childId=0 ]
              light			light02 [ nodeId=105, childId=1 ]
        }
      
      posted in OpenHAB
      niccodemi
    • Openhab multiple gateways

      Hi,

      is it possible to configure multiple MySensors gateways (ie one serial and one ethernet) on single Openhab server?

      posted in OpenHAB
      niccodemi
    • RE: water flow sensor YF-B5

      @yveaux is there any way to convert flow in l/min to pulses per liter?

      Another user posted below info; is that accurate?

        • Flow meter using Honeywell C7195A2001B which has a hall sensor that pulses at 7 Hz per liter/min
      • we count only upgoing pulses, so in our case we get:
      • 7 pulses per second at 1 l/min
      • 420 pulses per liter
      • 420000 pulses per m3
      • Flow meter Caleffi 316 which has a hall sensor that pulses at 8.8 Hz per liter/min (according to specs)
      • In reality the frequency is about 30% lower in my case, so we have to correct this with a factor of 1.3.
      • 8.8 pulses per second at 1 l/min
      • 528 pulses per liter
      • 528000 pulses per m3
      • 528000/1.3 = 406154
      posted in Troubleshooting
      niccodemi
    • water flow sensor YF-B5

      Hi,

      I would like to use YF-B5 water flow sensor with default mysensors water-meter sketch. I need help getting correct PULSE_FACTOR value based on below specs:

      1 Appearance Product identification clear, accurate and meet the requirements
      2 water pressure> 1.75MPa
      3 Operating voltage range DC5 ~ 15V
      4 Insulation resistance> 100MΩ
      5 Accuracy (in 1 ~ 25L \ MIN) ± 3%
      6 Flow Pulse Characteristics (6.6 * Q) Q = L / Min ± 3%
      7 Output pulse high> DC 4.7V (input voltage DC 5V)
      8 Output pulse low level <DC 0.5V (input voltage DC 5V)
      9 Output pulse duty cycle 50% ± 10%

      #define MY_DEBUG
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_NRF5_ESB
      //#define MY_RADIO_RFM69
      //#define MY_RADIO_RFM95
      
      #include <MySensors.h>
      
      #define DIGITAL_INPUT_SENSOR 3                  // The digital input you attached your sensor.  (Only 2 and 3 generates interrupt!)
      
      #define PULSE_FACTOR 1000                       // Number 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 40                             // Max flow (l/min) value to report. This filters outliers.
      
      posted in Troubleshooting
      niccodemi
    • RE: Relay control - bistable switch instead of monostable.

      I am using below sketch; make sure that number of relays matches number of relayPins and buttonPins.

      //MultiRelayButton Sketch, MySensors 1.6, toggle switch
      
      #define MY_RADIO_NRF24
      
      #define MY_REPEATER_FEATURE
      
      //Set Static node id
      //#define MY_NODE_ID 250
      
      #include <MySensors.h>
      #include <SPI.h>
      #include <Bounce2.h>
      #define RELAY_ON 0                      // switch around for ACTIVE LOW / ACTIVE HIGH relay
      #define RELAY_OFF 1
      //
      
      #define noRelays 2                     //2-4
      const int relayPin[] = {14,15};          //  switch around pins to your desire
      const int buttonPin[] = {3,4};      //  switch around pins to your desire
      
      class Relay             // relay class, store all relevant data (equivalent to struct)
      {
      public:                                      
        int buttonPin;                   // physical pin number of button
        int relayPin;             // physical pin number of relay
        boolean relayState;               // relay status (also stored in EEPROM)
      };
      
      Relay Relays[noRelays]; 
      Bounce debouncer[noRelays];
      MyMessage msg[noRelays];
      
      void setup(){
          sendHeartbeat();
          wait(100);
          // Initialize Relays with corresponding buttons
          for (int i = 0; i < noRelays; i++){
          Relays[i].buttonPin = buttonPin[i];              // assign physical pins
          Relays[i].relayPin = relayPin[i];
          msg[i].sensor = i;                                   // initialize messages
          msg[i].type = V_LIGHT;   
          pinMode(Relays[i].buttonPin, INPUT_PULLUP);
          wait(100);
          pinMode(Relays[i].relayPin, OUTPUT);
          Relays[i].relayState = loadState(i);                               // retrieve last values from EEPROM
          digitalWrite(Relays[i].relayPin, Relays[i].relayState? RELAY_ON:RELAY_OFF);   // and set relays accordingly
          send(msg[i].set(Relays[i].relayState? true : false));                  // make controller aware of last status  
          wait(50);
          debouncer[i] = Bounce();                        // initialize debouncer
          debouncer[i].attach(buttonPin[i]);
          debouncer[i].interval(20);
          wait(50);
          }
      }
      void presentation()  {
            sendSketchInfo("MultiRelayButton", "1.0");
            wait(100);
            for (int i = 0; i < noRelays; i++)
            present(i, S_LIGHT);                               // present sensor to gateway
            wait(100);
      }
      void loop()
      {
          for (byte i = 0; i < noRelays; i++) {
              if (debouncer[i].update()) {
                  Relays[i].relayState = !Relays[i].relayState;
                  digitalWrite(Relays[i].relayPin, Relays[i].relayState?RELAY_ON:RELAY_OFF);
                  send(msg[i].set(Relays[i].relayState? true : false));
                  // save sensor state in EEPROM (location == sensor number)
                  saveState( i, Relays[i].relayState );
              }                 
          }
          wait(20);
      }
      // process incoming message 
      void receive(const MyMessage &message){        
         if (message.type == V_LIGHT){ 
         if (message.sensor <noRelays){            // check if message is valid for relays..... previous line  [[[ if (message.sensor <=noRelays){ ]]]
         Relays[message.sensor].relayState = message.getBool(); 
         digitalWrite(Relays[message.sensor].relayPin, Relays[message.sensor].relayState? RELAY_ON:RELAY_OFF); // and set relays accordingly
         saveState( message.sensor, Relays[message.sensor].relayState ); // save sensor state in EEPROM (location == sensor number)
         }
        }
        wait(20);
      }
      posted in Troubleshooting
      niccodemi
    • RE: Remote Access

      @Mitja-Blazinsek I had similar issue. I found the cause was port 8443 itself. When I changed Mycontroller config to use another port (8442 or 8444) and opened it, I was able to access Mycontroller from external networks.

      posted in MyController.org
      niccodemi
    • RE: How to scan rf remote

      as emc2 said; alternatively if rc-switch doesn't work for you (unlikely) you can also try with Remoteswitch library.

      posted in Development
      niccodemi
    • RE: Anyone tried the $199 Monoprice 3D printer?

      @NeverDie they do, but many people don't notice it or find it unbearable. It also depends on type of filament; ABS smells like hot plastic, PLA like something sweet (it is derived from sugar). I keep mine in the house but I put it inside DIY enclosure - mainly to improve ABS printing quality but as side effect it also contains smell.

      posted in Enclosures / 3D Printing
      niccodemi
    • RE: Remote Access

      @Velo17 I am still on IPv4. I use DDClient as an update agent. I think it works with majority of providers such as NO-IP and DYNU.

      posted in MyController.org
      niccodemi