Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
jeylitesJ

jeylites

@jeylites
About
Posts
146
Topics
11
Shares
0
Groups
0
Followers
1
Following
6

Posts

Recent Best Controversial

  • In wall light switch node - Custom PCB
    jeylitesJ jeylites

    Just wondering, any of you guys looked into touch switches like below 0_1461627979698_HT1j2QTFGhXXXagOFbXh.jpg

    Hardware custompcb inwall node light switch switch

  • [SOLVED] Gateway as a sensor node in v1.6
    jeylitesJ jeylites

    Should a Repeater have it's on unique ID or the same ID as the NODE that it's repeating?

    Development

  • Repeater and the routing
    jeylitesJ jeylites

    Should a Repeater have it's on ID or the same ID as the NODE that it's repeating?

    General Discussion

  • Replacing Radio with ESP8266 on Nodes and Gateway
    jeylitesJ jeylites

    Anyone here knows if we could replace NRF24L01+ or RFM69 radio to an ESP8266, both on Gateway and Nodes?

    General Discussion

  • Array Relay Button Actuator
    jeylitesJ jeylites

    The following sketch has got what you're looking for. Hope that helps.

    Relay With Actuator Switch Toggle

    #include <MySensor.h>
    #include <SPI.h>
    #include <Bounce2.h>
    #define RELAY_ON 0                      // switch around for realy HIGH/LOW state
    #define RELAY_OFF 1
    
    MySensor gw;
    
    #define RADIO_ID 11                    // Radio ID, whatever channel you assigned to
    #define noRelays 6
    const int relayPin[] = {A0, A1, A2, A3, A4, A5};
    const int buttonPin[] = {3, 4, 5, 6, 7, 8};
    
    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
      byte oldValue;               		// last Values for key (debounce)
      boolean relayState;             	// relay status (also stored in EEPROM)
    };
    
    Relay Relays[noRelays];	
    Bounce debouncer[noRelays];
    MyMessage msg[noRelays];
    
    void setup(){
    	gw.begin(incomingMessage, RADIO_ID, true);
    	delay(250);
    	gw.sendSketchInfo("MultiRelayButton", "0.9b");
    	delay(250);
    
    	// 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;
    	debouncer[i] = Bounce();						     // initialize debouncer
    	debouncer[i].attach(buttonPin[i]);
    	debouncer[i].interval(5);
    	pinMode(Relays[i].buttonPin, INPUT_PULLUP);
    	pinMode(Relays[i].relayPin, OUTPUT);
    	Relays[i].relayState = gw.loadState(i);			                      // retrieve last values from EEPROM
    	digitalWrite(Relays[i].relayPin, Relays[i].relayState? RELAY_ON:RELAY_OFF);   // and set relays accordingly
    	gw.send(msg[i].set(Relays[i].relayState? true : false));	              // make controller aware of last status
    	gw.present(i, S_LIGHT);							      // present sensor to gateway
    	delay(250);
    
    	}
    }
    
    void loop()
    	{
    	gw.process();
    	for (byte i = 0; i < noRelays; i++){
    	debouncer[i].update();
    	byte value = debouncer[i].read();
    //	if (value != Relays[i].oldValue && value == 0){
            if (value != Relays[i].oldValue){
    	Relays[i].relayState = !Relays[i].relayState;
    	digitalWrite(Relays[i].relayPin, Relays[i].relayState?RELAY_ON:RELAY_OFF);
    	gw.send(msg[i].set(Relays[i].relayState? true : false));
    	gw.saveState( i, Relays[i].relayState );}                 // save sensor state in EEPROM (location == sensor number)
    	
            Relays[i].oldValue = value;
            
    	}
    }
    
    // process incoming message 
    void incomingMessage(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
            gw.saveState( message.sensor, Relays[message.sensor].relayState ); // save sensor state in EEPROM (location == sensor number)
    		}
    	}
    }
    
    General Discussion

  • In wall light switch node - Custom PCB
    jeylitesJ jeylites

    @samuel235

    Nice work so far. I had a similar idea to use Binary Switch to turn ON/OFF my relays and lights but I had to discard the idea after going through several issues. Occasionally my serial gateway would fail to connect to the Vera and it would paralyze all my lightings. Essentially the Binary switches talk's to the Relays by going through the gateway. So decided to redesign the electronics to accommodate Relay with Button Actuator Sketch. If you lose the gateway, you could still bet that it would work though I wouldn't say it's 100% reliable but it gets the job done. Lately, I'm also exploring other avenues to somehow use www.Souliss.net concepts on MySensor and I was informed that My sensor Ver 2.0 Beta has got something similar by using ESP8266. I don't know how much of this is true but I'm pretty sure @hek will be able to explain.

    Hardware custompcb inwall node light switch switch

  • New to this and frustrated with the arduino IDE
    jeylitesJ jeylites

    @mfalkvidd

    Out of curiosity, what version Arduino are you running? I ran version 1.0.6 without any problems. I only have an issue on 1.6.7. It looks like 1.6.7 manages library differently.

    Development

  • New to this and frustrated with the arduino IDE
    jeylitesJ jeylites

    @ewaldsreef
    @mfalkvidd

    After checking, I notice there are two library folder. There is one in My Documents and another in Program Files - Arduino - library. Which MY Sensor files need to go into which folder?

    Development

  • New to this and frustrated with the arduino IDE
    jeylitesJ jeylites

    @ewaldsreef
    @mfalkvidd

    Thanks guys, I'm going to give a third try.

    Development

  • New to this and frustrated with the arduino IDE
    jeylitesJ jeylites

    Where do you have to install MY Sensor library? I have downloaded Arduino-Master and copied all the files into Arduino Library but its not working.

    Development

  • Mysensors stopped working on Vera
    jeylitesJ jeylites

    @msebbe Mine's been abruptly going offline 3 versions ago. Are all your sensors and gateway running Ver 1.5?

    You mind giving me a little more info on your setup eg:
    Version,
    Hardware,
    Radio Distance,
    Kind of PSU.

    This is my setup. I have about 20 relay sensors placed in an area with activated repeater mode. I don't know if it's advisable to set up repeater mode in this manner when these sensors are between 10 and 50 ft apart. From gateway to sensors they range between 30 and 100 ft.

    Out of 20 relay sensors, 5 of them take turns to abruptly go offline.

    Troubleshooting

  • Mysensors stopped working on Vera
    jeylitesJ jeylites

    I'm having the same issue too and I don't know what is going on. I tried a few things like rebooting Vera, Gateway & Nodes, it temporarily fixes it, but some nodes go offline a few days later. This has been going on a for months.

    Vera Model: Vera Edge Ui7
    Vera version: 1.7.1598

    Gateway: Ver 1.4
    Nodes: Ver 1.5

    Troubleshooting

  • Multi Binary Switches
    jeylitesJ jeylites

    @Cowboy1980 Can you post your script...

    My Project

  • Array Relay Button Actuator
    jeylitesJ jeylites

    @gonzalonal

    I don't think it matters. You could try flip "gw.send & gw.present" and see how it respond to the change.

    General Discussion

  • Array Relay Button Actuator
    jeylitesJ jeylites

    @rainair, I tested it and it works! Thanks!!!

    General Discussion

  • Multimeter Sensor
    jeylitesJ jeylites

    @NeverDie

    I have a few chores to accomplish but will keep your thoughts in mind.

    General Discussion

  • Multimeter Sensor
    jeylitesJ jeylites

    Nice all in one! something to look at.

    General Discussion

  • Multimeter Sensor
    jeylitesJ jeylites

    @NeverDie , Will check that out. Thank you!

    General Discussion

  • Multimeter Sensor
    jeylitesJ jeylites

    @NeverDie , do you have a link? :smiley:

    General Discussion

  • Help!!! Binary & Relay Compilation Not Working
    jeylitesJ jeylites

    @Moshe-Livne

    I'm going to try fix it as suggested. But the thing is it complies....

    General Discussion
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular