Navigation

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

    Posts made by Michel - It

    • RE: Orange Pi Zero H2

      I joke a little, I agree with the basic rules

      posted in Hardware
      Michel - It
      Michel - It
    • RE: Orange Pi Zero H2

      @ramoncarranza I kill You! ! by @hek alt text

      posted in Hardware
      Michel - It
      Michel - It
    • RE: Orange Pi Zero H2

      I bought an orange pi 2 but by many problems and support is null.
      This orange pi zero for what you use it for mysensor?

      posted in Hardware
      Michel - It
      Michel - It
    • RE: Gateway ethernet to modules arduino mcu wifi? O_o

      @mfalkvidd for me is new and on the forum I do not find many skeck Library 2.0
      for this device ๐Ÿ˜ข alt text

      posted in General Discussion
      Michel - It
      Michel - It
    • Gateway ethernet to modules arduino mcu wifi? O_o

      I wondered, but you can create an Ethernet gateway with the new Arduino MCU wifi module? and where can I find sketches Library 2.0? thank you all

      posted in General Discussion
      Michel - It
      Michel - It
    • RE: RFID Garage door opener

      @Mercury69 you can post the sketch ?

      posted in My Project
      Michel - It
      Michel - It
    • RE: ๐Ÿ’ฌ RFID Lock Sensor

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

      posted in Announcements
      Michel - It
      Michel - It
    • RE: ๐Ÿ’ฌ Building a Serial Gateway

      @mfalkvidd I wanted to see if you were ready ๐Ÿ˜† It can help someone

      posted in Announcements
      Michel - It
      Michel - It
    • RE: ๐Ÿ’ฌ Building a Serial Gateway

      you have been very kind, you also tell me, where can I find the old serial sketches compatible for mysensors version 1.5?

      posted in Announcements
      Michel - It
      Michel - It
    • RE: ๐Ÿ’ฌ Building a Serial Gateway

      I have two questions ...
      one) this sketch only works with version mysensors_v2.0 it?
      two) all the old skeck are no longer usable?
      thank you

      posted in Announcements
      Michel - It
      Michel - It
    • RFID-RC522 problem connecting via RJ45 cable

      hello everyone, I have created a two modules with 3d printer, I followed another project created by Barte, to open the garage, but I've used it, to turn to disable alarm inside the house, of course I made some changes the original design. Now I finished and running the project, I mounted the RFID-rc522 form and i connected to another module where inside there is Arduino and radio. I connected via RJ45 cable and the distance of 3 meters. The radio module is no longer recognized. my question is spontaneous at this point. How can I fix the problem?

      0_1464953572731_rfidCompreto.jpg 0_1464953579700_rfidmoduloporta-180x180.jpg 0_1464953586849_rfidcentralina-180x180.jpg

      Attention to the fourth pin from the bottom not connected to rc522 form because that cable I used for the LED and therefore not connected to rc522
      0_1464953864460_mysensor nano+radio+rfid_pcb.jpg

      0_1464954180603_allarm.jpg

      posted in Hardware
      Michel - It
      Michel - It
    • RE: RFID Garage door opener

      hello to all guys, I noticed some problems, if the power goes away there is a flaw in the system. I modified the source as needed to me, now you turn the sensor on domoticz when you turn on and off when you turn off. I modified the project to create an alarm homemade I configured via lua script the motion sensors. I mounted on the bell so as to turn on and off when I go out or within the home. thank you all

      0_1464953572731_rfidCompreto.jpg 0_1464953579700_rfidmoduloporta-180x180.jpg 0_1464953586849_rfidcentralina-180x180.jpg
      0_1464953864460_mysensor nano+radio+rfid_pcb.jpg
      0_1464954180603_allarm.jpg

      posted in My Project
      Michel - It
      Michel - It
    • RE: New nRF24 driver in MySensors 2.0.0

      @tekka wow

      posted in Announcements
      Michel - It
      Michel - It
    • RE: problem to code?

      the project
      http://forum.mysensors.org/topic/3721/2-switch-2-relay/2

      posted in Bug Reports
      Michel - It
      Michel - It
    • RE: problem to code?

      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

      posted in Bug Reports
      Michel - It
      Michel - It
    • RE: 2 SWITCH 2 RELAY

      http://forum.mysensors.org/topic/3753/problem-to-code

      posted in Enclosures / 3D Printing
      Michel - It
      Michel - It
    • RE: problem to code?

      alt text
      alt text

      posted in Bug Reports
      Michel - It
      Michel - It
    • problem to code?
      
      #include <MySigningNone.h>
      #include <MyTransportNRF24.h>
      //#include <MyTransportRFM69.h>
      #include <MyHwATMega328.h>
      #include <MySensor.h>
      #include <SPI.h>
      #include "Bounce2.h"
      
      //char sketch_name[] = "Multy-Relay";
      //char sketch_ver[]  = "0.1";
      
      #define RELAY_ON 0                      // switch around for realy HIGH/LOW state
      #define RELAY_OFF 1
      #define DEBUG On
      //
      MySensor gw;
      
      #define RADIO_ID 45                    // radio Id, whatever channel you assigned to
      #define noRelays 2
      const int relayPin[] = {3,4}; //  switch around pins to your desire
      const int buttonPin[] = {6,7}; //  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
        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(500);
        gw.sendSketchInfo("Bar-Multy-Relay&Interruttori", "0.4");
        delay(500);
      
        // 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, V_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;
            gw.send(msg[i].set(Relays[i].relayState ? true : false));
            digitalWrite(Relays[i].relayPin, Relays[i].relayState ? RELAY_ON : RELAY_OFF);
            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)
          }
        }
      }
      
      

      REport

      send: 44-44-0-0 s=255,c=3,t=15,pt=2,l=2,sg=0,st=fail:0
      send: 44-44-0-0 s=255,c=0,t=18,pt=0,l=5,sg=0,st=fail:1.5.4
      send: 44-44-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=fail:0
      repeater started, id=44, parent=0, distance=0
      send: 44-44-0-0 s=255,c=3,t=11,pt=0,l=25,sg=0,st=fail:Bar-Multy-Relay&Interrutt
      send: 44-44-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=fail:0.4
      send: 44-44-0-0 s=0,c=1,t=2,pt=2,l=2,sg=0,st=fail:0
      find parent
      send: 44-44-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      send: 44-44-0-0 s=0,c=0,t=2,pt=0,l=0,sg=0,st=fail:
      send: 44-44-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0,st=fail:0
      send: 44-44-0-0 s=1,c=0,t=2,pt=0,l=0,sg=0,st=fail:
      send: 44-44-0-0 s=0,c=1,t=2,pt=2,l=2,sg=0,st=fail:1
      send: 44-44-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0,st=fail:1
      
      <<< reset button
      
      send: 44-44-0-0 s=255,c=3,t=15,pt=2,l=2,sg=0,st=fail:0
      send: 44-44-0-0 s=255,c=0,t=18,pt=0,l=5,sg=0,st=fail:1.5.4
      send: 44-44-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=fail:0
      repeater started, id=44, parent=0, distance=0
      send: 44-44-0-0 s=255,c=3,t=11,pt=0,l=25,sg=0,st=fail:Bar-Multy-Relay&Interrutt
      send: 44-44-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=fail:0.4
      send: 44-44-0-0 s=0,c=1,t=2,pt=2,l=2,sg=0,st=fail:1
      find parent
      send: 44-44-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      send: 44-44-0-0 s=0,c=0,t=2,pt=0,l=0,sg=0,st=fail:
      send: 44-44-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0,st=fail:1
      send: 44-44-0-0 s=1,c=0,t=2,pt=0,l=0,sg=0,st=fail:
      send: 44-44-0-0 s=0,c=1,t=2,pt=2,l=2,sg=0,st=fail:0
      send: 44-44-0-0 s=1,c=1,t=2,pt=2,l=2,sg=0,st=fail:0
      

      ๐Ÿ˜ค

      posted in Bug Reports
      Michel - It
      Michel - It
    • 2 SWITCH 2 RELAY

      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.

      posted in Enclosures / 3D Printing
      Michel - It
      Michel - It
    • RE: Relay_Actuator add second relay?

      solution vera

      http://forum.mysensors.org/topic/799/my-relay-module

      posted in Troubleshooting
      Michel - It
      Michel - It
    • RE: How To: Make a Simple/Cheap Scene Controller (with video)

      @Michal-Mormon awesome!

      posted in My Project
      Michel - It
      Michel - It
    • RE: How To: Make a Simple/Cheap Scene Controller (with video)

      lua script?

      posted in My Project
      Michel - It
      Michel - It
    • Reset Nodes

      I have a home automation system and I set it to collapse will restart automatically in the automaton now after resetting the noode you bloccan, And 'possible to do a reset of all the node device with a command from NRF24L01? if you like?

      posted in Hardware
      Michel - It
      Michel - It
    • RE: My Relay Module

      soon as I finish the project it will create a new post in the category myproject
      @pjr unfortunately I read your seat now but I confirm that pins are those that use exact thank - @salvato that helped me as an angel.

      the irq pin does not need to be connected

      posted in My Project
      Michel - It
      Michel - It
    • RE: My Relay Module

      I have "check wires" error on the serial arduino....
      where do I fit in debug mode there is a guide?
      I saw a video that uses MQTT program on mac.
      I have downloaded windows MYSController I can be of help? How do I connect my PC? It is all new and are a little confused. ๐Ÿ˜ต ๐Ÿˆณ

      I "atmega adk" is a problem?
      https://www.arduino.cc/en/uploads/Main/ArduinoADK_R3_Front_450px.jpg

      posted in My Project
      Michel - It
      Michel - It
    • RE: Motion/Relay sensor sketch help

      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

      posted in Development
      Michel - It
      Michel - It
    • RE: Motion/Relay sensor sketch help

      Hello everyone, I am using this code for my bathroom but I added a sensor, This latter allows me to know if there is a flood in my absence and through ver4-domoticz allows me to set an alarm, this code goes in my opinion correct

      https://codebender.cc/sketch:209969
      G106.jpg

      posted in Development
      Michel - It
      Michel - It
    • RE: 110v-230v AC to Mysensors PCB board

      WOW, REALLY GREAT JOB!

      posted in Hardware
      Michel - It
      Michel - It
    • RE: Relay_Actuator add second relay?

      Optimus Prime Solution

      #include <MySensor.h>
      #include <SPI.h>
      #include <Bounce2.h>
      //#include "Bounce2.h"
      
      
      #define RELAY_ON 0                      // switch around for realy HIGH/LOW state
      #define RELAY_OFF 1
      
      //
      MySensor gw;
      
      #define RADIO_ID 13           // radio Id, whatever channel you assigned to 
      #define noRelays 2
      const int relayPin[] = {4,5};          //  switch around pins to your desire
      const int buttonPin[] = {6,7};      //  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
        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("Multy-Relay&Pulsanti", "0.");
          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){
          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)
              }
          }
      }
      
      posted in Troubleshooting
      Michel - It
      Michel - It
    • RE: RELAY 433MHZ + KEYPAD 4x4 COMANDER (vera-domoticz)

      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!

      posted in My Project
      Michel - It
      Michel - It
    • RE: My Relay Module

      I connected the radio module as follows

      AtMega 2650 Arduino Step Down Module/Radio
      GND > GND
      5V > Step Down module VCC
      14 > SCK
      15 > MOSI
      16 > MISO
      17 > CE
      18 > CSN
      I tried but it did not work I tried to connect also IrQ
      2 > IRQ
      it did not work. I tried to connect to 3v3 with the capacitor. it did not work. I tried adding the line in the code
      #include <MyTransportNRF24.h>
      #include <MyHwATMega328.h>
      but to no avail. I am groping in the dark

      posted in My Project
      Michel - It
      Michel - It
    • RE: Gateway as Node?

      http://forum.mysensors.org/search/Ethernet Gateway?in=titlesposts

      posted in General Discussion
      Michel - It
      Michel - It
    • RE: My Relay Module

      Update: Forget it, the code works with Arduino Mini and 2 relay. I tried one after the code of Arduino Mega and not working. Something wrong but I do not know what I require help
      picture.jpg

      I found mistakes on Arduino Mega solvable at the following link
      http://forum.mysensors.org/topic/2161/the-mysensor-1-5-code-is-not-compiling-for-my-arduino-mega-2560-board/1
      but I do not have this kind of problem you can get support? I connected NRF24L01 to Arduino Mega, as if it were an Arduino Nano, right?

      posted in My Project
      Michel - It
      Michel - It
    • RE: My Relay Module

      Here is the improved code that I used on my Arduino Mega to create a home automation controller

      New optimized code to arduino mega

      https://codebender.cc/sketch:206446

      posted in My Project
      Michel - It
      Michel - It
    • RE: Combined MySensor Gateway with 433Mhz transmitter (HomeEasy/Klik-Aan-Klik-uit)

      forget it, I managed to make it work now I would like to add a 4x4 keypad for a total of 16 buttons currently on the code there are 11 virtual reley but will arrive at 16 someone can give me a hand to add the keypad of 16 buttons that control the relay 16 ?
      http://forum.mysensors.org/topic/2650/relay-433mhz-keypad-4x4-comander-vera-domoticzlink text

      posted in My Project
      Michel - It
      Michel - It
    • RE: Merry Christmas and a Happy New 2016

      Merry Christmas from Italy

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

      Hello everyone , I'm trying to create a gateway with the following modules ;
      433 sender
      4x4 keypad
      Arduino mini / nano
      NRF24L01
      10uf Capacitor

      he project is in development I'm stuck in the insertion of the keypad would use 4 -pin analog and 4 digital pins . I welcome suggestions on code.

      link where it started my idea: http://forum.mysensors.org/topic/1557/combined-mysensor-gateway-with-433mhz-transmitter-homeeasy-klik-aan-klik-uit
      link original code which I then edited: https://github.com/meijeren/MySensors-RF433-Node

      IMG_2996.JPG
      https://codebender.cc/sketch:209936

      Cattura.PNG

      posted in My Project
      Michel - It
      Michel - It
    • RE: Learning 433 mhz with Domoticz

      BOYS COMBINE FORCES, participate on
      http://forum.mysensors.org/topic/1557/combined-mysensor-gateway-with-433mhz-transmitter-homeeasy-klik-aan-klik-uit/11 because it seems to have been settled in part

      /**
       * Import the libraries needed by the Sketch
       */
      #include <MySensor.h>  
      #include <SPI.h>
      #include <RemoteTransmitter.h>
       
      /**
       * Declare constants like pin settings etc.
       */
      #define TRANSMITTERPIN 6 // documentation doesn't see anything if the needs to be a PWM, but why take the risk?
      #define CHILD_ID_ACTION_SWITCH_A 1 // Declare the DEVICE A as a separate switch
      #define CHILD_ID_ACTION_SWITCH_B 2 // Declare the DEVICE B as a separate switch -- In my situation I configured all outlet's as DEVICE A, so reserved for future useage 
      #define CHILD_ID_ACTION_SWITCH_C 3 // Declare the DEVICE B as a separate switch -- In my situation I configured all outlet's as DEVICE A, so reserved for future useage 
      #define CHILD_ID_ACTION_SWITCH_D 4 // Declare the DEVICE B as a separate switch -- In my situation I configured all outlet's as DEVICE A, so reserved for future useage 
      #define CHILD_ID_ACTION_SWITCH_E 5 // Declare the DEVICE B as a separate switch -- In my situation I configured all outlet's as DEVICE A, so reserved for future useage 
      const char SYSTEMCODE = char(31); // cast the integer byte value to a char should do the trick. Adjust this to your own SYSTEMCODE see RemoteTransmitter.h
       
      /*
       * Declare variables
       */
      ActionTransmitter switchTransmitter = ActionTransmitter( TRANSMITTERPIN ); 
      unsigned long SLEEP_TIME = 5000; // the main loop will probably won't do a thing if we only attach a transmitter.
      MySensor gw;
       
      /*
       * Declare MySensors Messages
       */
      MyMessage msgDeviceA( CHILD_ID_ACTION_SWITCH_A, V_LIGHT );
      MyMessage msgDeviceB( CHILD_ID_ACTION_SWITCH_B, V_LIGHT );
      MyMessage msgDeviceC( CHILD_ID_ACTION_SWITCH_C, V_LIGHT );
      MyMessage msgDeviceD( CHILD_ID_ACTION_SWITCH_D, V_LIGHT );
      MyMessage msgDeviceE( CHILD_ID_ACTION_SWITCH_E, V_LIGHT );
      
      /**
       * Preparation code during initialization of the Arduino
       */
      void setup() {
        // put your setup code here, to run once:
        // Serial.begin( 115200 );
        gw.begin( incomingMessage ); // attach a message handler for handling commands transmitted by the controller.
      
        gw.sendSketchInfo("433Mhz bridge", "1.0");       // Send the sketch version information to the gateway and Controller
        gw.present( CHILD_ID_ACTION_SWITCH_A, S_LIGHT ); // Present Device A to the gateway
        gw.present( CHILD_ID_ACTION_SWITCH_B, S_LIGHT ); // Present Device B to the gateway
        gw.present( CHILD_ID_ACTION_SWITCH_C, S_LIGHT ); // Present Device C to the gateway
        gw.present( CHILD_ID_ACTION_SWITCH_D, S_LIGHT ); // Present Device D to the gateway
        gw.present( CHILD_ID_ACTION_SWITCH_E, S_LIGHT ); // Present Device E to the gateway
        
        gw.sendBatteryLevel(100); // It just looks better in Domoticz if we let Domoticz no we're running on 100% power.
      
      }
      
      /**
       * The Sketch's main loop.
       */
      void loop() {
        // I have nothing to do if only attach a transmitter. 
        gw.wait( SLEEP_TIME ); // call the wait routine, which will allow for incomming messages during the waiting
      }
      
      void incomingMessage(const MyMessage &message) {
        Serial.println("message");
        // We only expect one type of message from controller. But we better check anyway.
        if (message.type==V_LIGHT) {
          char device = 64 + message.sensor; // translate child id to device ID. A = 65 so if we take off one and add the received sensor ID we get the correct device
        //  Serial.println( "Command received for Device " + (String)device + " on id " + (String)message.sensor + " request to turn " + (message.getBool()?"on":"off") );
          if ( device >= 'A' && device <= 'E' ) { // Impuls/Action system only allows device 'A' to 'E'
            switchTransmitter.sendSignal(SYSTEMCODE, device, message.getBool() );
          }
        }
      }```
      posted in Domoticz
      Michel - It
      Michel - It
    • RE: Combined MySensor Gateway with 433Mhz transmitter (HomeEasy/Klik-Aan-Klik-uit)

      @TheoL hello, I would like to do your own thing, then how did you manage to make the code? I would be grateful if you share it.

      posted in My Project
      Michel - It
      Michel - It
    • RE: My Relay Module

      thank you! I apologize for my level , I hope to fix with your help.

      posted in My Project
      Michel - It
      Michel - It
    • RE: My Relay Module

      I downloaded this , https://github.com/mysensors/Arduino . I Submitted libraries entirely within the zip file in my briefcase Arduino library.
      however it from the library is the 1.5 readme. Where am I wrong ?
      il codice รจ il seguente

      #include <MySensor.h>
      
      #include <SPI.h>
      #include <Bounce2.h>
      
      #define RELAY_PIN 4 // Arduino Digital I/O pin number for relay
      #define BUTTON_PIN 3 // Arduino Digital I/O pin number for button
      #define CHILD_ID 1 // Id of the sensor child
      #define RELAY_ON 1
      #define RELAY_OFF 0
      
      Bounce debouncer = Bounce();
      int oldValue=0;
      bool state;
      MySensor gw;
      MyMessage msg(CHILD_ID,V_LIGHT);
      
      void setup()
      {
      gw.begin(incomingMessage, AUTO, true);
      
      // Send the sketch version information to the gateway and Controller
      gw.sendSketchInfo("Relay & Button", "1.0");
      
      // Setup the button
      pinMode(BUTTON_PIN,INPUT);
      // Activate internal pull-up
      digitalWrite(BUTTON_PIN,HIGH);
      
      // After setting up the button, setup debouncer
      debouncer.attach(BUTTON_PIN);
      debouncer.interval(5);
      
      // Register all sensors to gw (they will be created as child devices)
      gw.present(CHILD_ID, S_LIGHT);
      
      // Make sure relays are off when starting up
      digitalWrite(RELAY_PIN, RELAY_OFF);
      // Then set relay pins in output mode
      pinMode(RELAY_PIN, OUTPUT);
      
      // Set relay to last known state (using eeprom storage)
      state = gw.loadState(CHILD_ID);
      digitalWrite(RELAY_PIN, state?RELAY_ON:RELAY_OFF);
      }
      /*
      * Example on how to asynchronously check for new messages from gw
      */
      void loop()
      {
      gw.process();
      debouncer.update();
      // Get the update value
      int value = debouncer.read();
      if (value != oldValue && value==0) {
      gw.send(msg.set(state?false:true), true); // Send new state and request ack back
      }
      oldValue = value;
      }
      
      void incomingMessage(const MyMessage &message) {
      // We only expect one type of message from controller. But we better check anyway.
      if (message.isAck()) {
      Serial.println("This is an ack from gateway");
      }
      
      if (message.type == V_LIGHT) {
      // Change relay state
      state = message.getBool();
      digitalWrite(RELAY_PIN, state?RELAY_ON:RELAY_OFF);
      // Store state in eeprom
      gw.saveState(CHILD_ID, state);
      
      // Write some debug info
      Serial.print("Incoming change for sensor:");
      Serial.print(message.sensor);
      Serial.print(", New status: ");
      Serial.println(message.getBool());
      }
      }```
      posted in My Project
      Michel - It
      Michel - It
    • RE: My Relay Module

      Hello everyone , I have a problem . maybe it's stupid , I have a server with raspberry domoticz , I downloaded code, but by the following errorCattura.PNG

      posted in My Project
      Michel - It
      Michel - It