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
Michel - ItM

Michel - It

@Michel - It
About
Posts
42
Topics
6
Shares
0
Groups
1
Followers
1
Following
3

Posts

Recent Best Controversial

  • 2 SWITCH 2 RELAY
    Michel - ItM Michel - It

    0_1461447103800_Cattura.PNG
    File 3d print
    0_1461521471055_PROGETTO_base.stl

    0_1461447612068_Cattura2.PNG
    I need help on the code

    Pin 3/4 Relay
    alt text

    Pin 6/7 Switches
    alt text

    https://codebender.cc/sketch:291491
    BinarySwitch Sensor Example, we agree to aid in the development of the code.
    work in progress.

    Enclosures / 3D Printing

  • Motion/Relay sensor sketch help
    Michel - ItM Michel - It

    recapping sensor h2o 2 relays 2 buttons I used this code to optimize the water heater in the bathroom and detect water on the floor

    the dish is ready
    https://codebender.cc/sketch:210051

    Development

  • RELAY 433MHZ + KEYPAD 4x4 COMANDER (vera-domoticz)
    Michel - ItM Michel - It

    I have one better, but how to implement it in code mysensor?Schematic-Keypad.png

    .

    New Code > sketch + Library > https://codebender.cc/sketch:183503

    Original Code

    #include <MyTransportNRF24.h>
    #include <MyHwATMega328.h>
    #include <MySensor.h>
    #include <SPI.h>
    #include <Wire.h>
    #include <RCSwitch.h>
    RCSwitch mySwitch = RCSwitch();
    
    #define NODE_ID          165
    #define NODE_VERSION     "1.1"
    #define NODE_DESCRIPTION "MikRelay"
    
    
    #define NUMFLAKES 10
    #define XPOS 0
    #define YPOS 1
    #define DELTAY 2
    
    #define RADIO_TX_PIN 2
    #define NUMBER_OF_RELAYS 11 // Total number of attached relays
    typedef struct 
    {
      unsigned long address;
      unsigned char unit;
      bool dimmer;
    } MikParams;
    MikParams Mik_PARAMS[NUMBER_OF_RELAYS] =
    {
      {87311, 24, false},
      {87500, 24, false},
      {87491, 24, false},
      {87359, 24, false},
      {87539, 24, false},
      {87548, 24, false},
      {87536, 24, false},
      {87356, 24, false},
      {87503, 24, false},
      {4011779, 24, false},
      {4011968, 24, false}
      
    };
    
    
    // NRFRF24L01 radio driver (set low transmit power by default)
    MyTransportNRF24 radio(RF24_CE_PIN, RF24_CS_PIN, RF24_PA_LEVEL_GW);
    //MyTransportRFM69 radio;
    // Message signing driver (none default)
    //MySigningNone signer;
    // Select AtMega328 hardware profile
    MyHwATMega328 hw;
    // Construct MySensors library
    MySensor gw(radio, hw);
    
    void setup()
    {
      mySwitch.enableTransmit(RADIO_TX_PIN);
      // init done
      // Show image buffer on the display hardware.
      // Since the buffer is intialized with an Adafruit splashscreen
      // internally, this will display the splashscreen.
      // Initialize library and add callback for incoming messages
      gw.begin(incomingMessage, NODE_ID, false);
    
      delay(2000);
    
      // Send the sketch version information to the gateway and Controller
      gw.sendSketchInfo(NODE_DESCRIPTION, NODE_VERSION);
    
      // Fetch relay status
      for (int sensor = 1; sensor <= NUMBER_OF_RELAYS; sensor++) {
        // Register all sensors to gw (they will be created as child devices)
        gw.present(sensor, S_LIGHT);
      }
    }
    
    void loop()
    {
      // Alway process incoming messages whenever possible
      gw.process();
    }
    
    void incomingMessage(const MyMessage &message)
    {
      if ((message.sensor < 1) && (message.sensor >= NUMBER_OF_RELAYS))
      {
        return;
      }
      if (message.type == V_LIGHT)
      {
        mySwitch.send(Mik_PARAMS[message.sensor - 1].address, Mik_PARAMS[message.sensor - 1].unit);
        // Store state in eeprom
        gw.saveState(message.sensor, message.getBool());
        // Write some debug info
        Serial.print("Incoming change for sensor:");
        Serial.print(message.sensor);
        Serial.print(", Miks: ");
        Serial.print(Mik_PARAMS[message.sensor - 1].address);
        Serial.print(", Miks: ");
        Serial.print(Mik_PARAMS[message.sensor - 1].unit);
        Serial.print(", New status: ");
        Serial.println(message.getBool());
    
      }
      else if (message.type == V_DIMMER)
      {
        mySwitch.send(Mik_PARAMS[message.sensor - 1].address, Mik_PARAMS[message.sensor - 1].unit);
      }
    }```
    
    

    I know that not everyone. but there is some kind soul can help me?

    I see you do not laugh!

    My Project

  • 💬 Building a Serial Gateway
    Michel - ItM Michel - It

    @mfalkvidd I wanted to see if you were ready :satisfied: It can help someone

    Announcements

  • problem to code?
    Michel - ItM Michel - It

    the problem was the radio module nrf24, replacing it I solved

    ps
    when you see lots of nrf24 not buy them on the cheap. thank you all for the support

    Bug Reports

  • 💬 RFID Lock Sensor
    Michel - ItM Michel - It

    Hi, I have a MFRC522 module, and I would like to implement it with 2.0 library. could I use this code?

    Announcements
  • Login

  • Don't have an account? Register

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