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
  1. Home
  2. Troubleshooting
  3. 433mhz outlet

433mhz outlet

Scheduled Pinned Locked Moved Troubleshooting
433mhz
27 Posts 10 Posters 25.9k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • axillentA Offline
    axillentA Offline
    axillent
    Mod
    wrote on last edited by axillent
    #16

    @C.r.a.z.y. my sensors are none brand)) all using PT2262
    was purchased from here http://ru.aliexpress.com/item/-/1953282784.html?recommendVersion=1
    I have PIR sensors, door sensors, water leakage and gas leakage sensors.
    I also have a remote similar to your.

    Remote is easily recognized using radio 433MHz receiver connected to arduino and RCSwitch library

    It is also a plan to create a gateway from 433MHZ to NRF24 network - this can help me to build vera3 automation using a security sensors without purchasing z-wave or building mysensors sensors

    sense and drive

    C 1 Reply Last reply
    0
    • axillentA axillent

      @C.r.a.z.y. my sensors are none brand)) all using PT2262
      was purchased from here http://ru.aliexpress.com/item/-/1953282784.html?recommendVersion=1
      I have PIR sensors, door sensors, water leakage and gas leakage sensors.
      I also have a remote similar to your.

      Remote is easily recognized using radio 433MHz receiver connected to arduino and RCSwitch library

      It is also a plan to create a gateway from 433MHZ to NRF24 network - this can help me to build vera3 automation using a security sensors without purchasing z-wave or building mysensors sensors

      C Offline
      C Offline
      C.r.a.z.y.
      wrote on last edited by
      #17

      @axillent Thank you. Do you have dip switches in your sensors?

      I found a comparasion table maybe this could help people like me;

      http://www.hkvstar.com/technology-news/the-difference-between-fixed-code-pt2262-and-learning-code-ev1527.html

      If my remote is not a fixed code, how can i read and transmit it?

      1 Reply Last reply
      0
      • axillentA Offline
        axillentA Offline
        axillent
        Mod
        wrote on last edited by
        #18

        @C.r.a.z.y. some sensors do have dip switches, some have preprogrammed radio code

        if you have RF receiver you can try to get a code from your remote using example receiver sketch from RCSwitch library. I build a custom arduino with RF receiver and a button which I use to program the first received code into arduino EEPROM. Later this code is used to identify which sensor should light up my leds.
        IMG_1880.JPG

        sense and drive

        C 1 Reply Last reply
        1
        • axillentA axillent

          @C.r.a.z.y. some sensors do have dip switches, some have preprogrammed radio code

          if you have RF receiver you can try to get a code from your remote using example receiver sketch from RCSwitch library. I build a custom arduino with RF receiver and a button which I use to program the first received code into arduino EEPROM. Later this code is used to identify which sensor should light up my leds.
          IMG_1880.JPG

          C Offline
          C Offline
          C.r.a.z.y.
          wrote on last edited by
          #19

          @axillent OK i understand fixed codes are fine with RCSwitch.

          How can i transmit this data ?

          1100 0011 0010 0010 0011 0000 1100 1000 1000
          1100 0011 0001 0010 0011 0000 1100 0100 1000

          axillentA 1 Reply Last reply
          0
          • C C.r.a.z.y.

            @axillent OK i understand fixed codes are fine with RCSwitch.

            How can i transmit this data ?

            1100 0011 0010 0010 0011 0000 1100 1000 1000
            1100 0011 0001 0010 0011 0000 1100 0100 1000

            axillentA Offline
            axillentA Offline
            axillent
            Mod
            wrote on last edited by
            #20

            @C.r.a.z.y. Open any transmitting example from RCSwitch
            I never did it but I think send() function is designed for this
            https://code.google.com/p/rc-switch/wiki/HowTo_Send?tm=6

            sense and drive

            C 1 Reply Last reply
            0
            • axillentA axillent

              @C.r.a.z.y. Open any transmitting example from RCSwitch
              I never did it but I think send() function is designed for this
              https://code.google.com/p/rc-switch/wiki/HowTo_Send?tm=6

              C Offline
              C Offline
              C.r.a.z.y.
              wrote on last edited by
              #21

              @axillent Thank you i know you are very helpful. I tried to copy my remote to an universal remote learner(which has no name chipset) but it didnt copy. It is hard to understand and solve for a newbie.

              I simply tried to send 10101010codes with this sketch https://code.google.com/p/rc-switch/wiki/HowTo_Send?tm=6 and didnt work.

              Something interesting i found while tranmitting,
              If i remove the delay () than signal is always sent. I made a jammer! :) Any of my 433 remotes didnt work!

              I want to learn if any universal remote learner with EV1527 Chipset works with RCSwitch?
              My plan is to copy some remote codes to EV1527 universal remote and read the code from serial with RCSwitch-rfSniffer.

              Now i will try IR SENDER-RECEIVER http://www.mysensors.org/build/ir maybe i can get new ideas for 433mhz things..

              1 Reply Last reply
              0
              • J jribera

                Finally managed to get this working by modifying Dwalts sketch to use the rcswitch library.

                I found this much simpler to use as it allows you to learn your existing codes using a simple RF-Sniffer sketch (Sniffer.ino) ie no need to mess around with recording signals, binary codes etc. This sketch simply displays a decimal number which you can just send back to control your devices.

                ie

                define CODE_1On 0x5FF0DC //Sniffed code converted to Hex.

                Serial.println("Turn on Socket 1");
                mySwitch.send(CODE_1On, 24); // These codes are unique to each outlet
                delay(50);

                With this working i can now safely control a number of 240V devices around the home !

                D Offline
                D Offline
                diggs
                wrote on last edited by
                #22

                @jribera Been try to get this happening myself. Can you provide the sketch you ended up using to get this happening so I can try it. I know what all my codes are, just need to get a sketch happening to interface back to my controller (Domoticz Serial)

                Cheers

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  jribera
                  wrote on last edited by
                  #23

                  This is the sketch i'm using for controlling a number of sockets around the house.

                  /*  RF433Mhz Transmitter node:
                      This sketch allows On-Off-Keying (OOK) control of four 433Mhz relay outlets
                      which utilize the common PT2262 encoding chip for signal transmission. The sketch could
                      be easily expanded to include additional outlets.  The sensor node consists of a nano 
                      connected to a NRF24L01 and a 433Mhz transmitter connected to pin 3, 5V and Gnd.  The 
                      transmitter can run off of 3.3V as well. 
                      
                      The sketch is based on the MySensors project (http://www.mysensors.org). 
                      Submitted by Dwalt.
                  */ 
                  
                  //  Include related libraries
                  #include <MySensor.h>
                  #include <SPI.h>  
                  #include <RF24.h>
                  #include <RCSwitch.h>
                  
                  //  Define Constants
                  #define RF433_CHILD_ID 0
                  #define NUMBER_OF_OUTLETS 4 // Each outlet will have 2 OOK codes
                  //#define SEND_DATA 3
                  
                  #define CODE_1On 6287582
                  #define CODE_1Off 6287574
                  #define CODE_2On 6287580
                  #define CODE_2Off 6287572
                  #define CODE_3On 6287578
                  #define CODE_3Off 6287570
                  #define CODE_4On 6287577
                  #define CODE_4Off 6287569
                  
                  MySensor gw;
                  
                  RCSwitch mySwitch = RCSwitch();
                  
                  void setup() 
                  {
                    
                  
                  mySwitch.enableTransmit(3); 
                    
                   Serial.begin(115200); // Not sure why this was included
                  
                   //  The node is mains powered, so why not make it a repeater.
                   gw.begin(incomingMessage, AUTO, true);
                   
                   // Send the sketch version information to gateway
                   gw.sendSketchInfo("RF433", "1.1");
                   
                   // Register outlets to gw (they will be created as child devices)
                   for(int i=0; i<NUMBER_OF_OUTLETS;i++) {
                     gw.present(i+1, S_LIGHT);
                  
                   }
                      
                  }
                  
                  void loop() {
                    gw.process();
                  }
                    void incomingMessage(const MyMessage &message) {
                    
                    if (message.type==V_LIGHT) {
                    int incomingLightState =  message.getBool(); 
                    int incomingOutlet = message.sensor;
                    
                    Serial.print("Outlet #: ");
                    Serial.println(message.sensor);
                    Serial.print("Command: ");
                    Serial.println(message.getBool());
                   
                   if (incomingOutlet==1) {
                   if (incomingLightState==1) {
                      // Turn on  socket 1
                      Serial.println("Turn on Socket 1");
                   mySwitch.send(CODE_1On, 24); // These codes are unique to each outlet
                   delay(50); 
                   }
                   if (incomingLightState==0)  {
                      // Turn off socket 1
                   Serial.println("Turn off Socket 1");
                  mySwitch.send(CODE_1Off, 24);
                  delay(50); 
                   }
                   }
                   if (incomingOutlet==2) {
                   if (incomingLightState==1) {
                      // Turn on  socket 2
                      Serial.println("Turn on Socket 2");
                  mySwitch.send(CODE_2On, 24);
                   delay(50); 
                   }
                   if (incomingLightState==0)  {
                      // Turn off socket 2
                   Serial.println("Turn off Socket 2");
                  mySwitch.send(CODE_2Off, 24);
                  delay(50); 
                   }
                   }
                   if (incomingOutlet==3) {
                   if (incomingLightState==1) {
                      // Turn on  socket 3
                      Serial.println("Turn on Socket 3");
                  mySwitch.send(CODE_3On, 24);
                   delay(50); 
                   }
                   if (incomingLightState==0)  {
                      // Turn off socket 3
                   Serial.println("Turn off Socket 3");
                  mySwitch.send(CODE_3Off, 24);
                  delay(50); 
                   }
                   }
                   if (incomingOutlet==4) {
                   if (incomingLightState==1) {
                      // Turn on  socket 4
                      Serial.println("Turn on Socket 4");
                   mySwitch.send(CODE_4On, 24);
                   delay(50); 
                   }
                   if (incomingLightState==0)  {
                      // Turn off socket 4
                   Serial.println("Turn off Socket 4");
                  mySwitch.send(CODE_4Off, 24);
                  delay(50); 
                   }
                   }
                    }
                   delay(50);
                   }    
                      
                     
                      
                  
                  
                  
                  
                  
                  J 1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    treb0r
                    wrote on last edited by
                    #24

                    @jribera Your sketch works perfectly :)
                    I am trying to add also 433 receiver to allow domoticz update states of the switches is the Socket is switched on or off by remote control. Does anybody know how to do that? After receiving certain code change the state of the corresponding socket.
                    treb0r

                    P 1 Reply Last reply
                    0
                    • T treb0r

                      @jribera Your sketch works perfectly :)
                      I am trying to add also 433 receiver to allow domoticz update states of the switches is the Socket is switched on or off by remote control. Does anybody know how to do that? After receiving certain code change the state of the corresponding socket.
                      treb0r

                      P Offline
                      P Offline
                      Pendragon
                      wrote on last edited by
                      #25

                      @treb0r said:

                      I am trying to add also 433 receiver to allow domoticz update states of the switches is the Socket is switched on or off by remote control. Does anybody know how to do that? After receiving certain code change the state of the corresponding socket.
                      treb0r

                      Im an just trying to do this (also with domoticz) ;)

                      Here is my first try of the function using RCSwitch.h:

                      /****************************************
                      * Analyse the Radio traffic and set the states
                      ****************************************/
                      void readRadio()
                      {
                      	if (mySwitch.available())
                      	{
                      		int value = mySwitch.getReceivedValue();
                      
                      		if (value == 0)
                      		{
                      			#ifdef DEBUG
                      			Serial.print("Unknown encoding");
                      			#endif
                      		}
                      		else
                      		{
                      			led(false,4,150);
                      			#ifdef DEBUG
                      			Serial.print("Received ");
                      			Serial.print( mySwitch.getReceivedValue() );
                      			Serial.print(" / ");
                      			Serial.print( mySwitch.getReceivedBitlength() );
                      			Serial.print("bit ");
                      			Serial.print("Protocol: ");
                      			Serial.println( mySwitch.getReceivedProtocol() );
                      			#endif
                      			
                      			if (value == 4373) //Stehlampe ON
                      			{
                      				#ifdef DEBUG
                      				Serial.println("Stehlampe ON detected");
                      				#endif
                      			}
                      			else if (value == 4372 ) //Stehlampe OFF
                      			{
                      				#ifdef DEBUG
                      				Serial.println("Stehlampe OFF detected");
                      				#endif
                      				resend((msgLight1.set(0)),m_repeat);
                      			}
                      			else if (value == 1048597 ) //Vitrine ON
                      			{
                      				#ifdef DEBUG
                      				Serial.println("Vitrine ON detected");
                      				#endif
                      				resend((msgLight2.set(1)),m_repeat);
                      			}
                      			else if (value == 1048596 ) //Vitrine OFF
                      			{
                      				#ifdef DEBUG
                      				Serial.println("Vitrine OFF detected");
                      				#endif
                      				resend((msgLight2.set(0)),m_repeat);
                      			}
                      			mySwitch.resetAvailable();
                      		}
                      	}
                      }
                      1 Reply Last reply
                      0
                      • J jribera

                        This is the sketch i'm using for controlling a number of sockets around the house.

                        /*  RF433Mhz Transmitter node:
                            This sketch allows On-Off-Keying (OOK) control of four 433Mhz relay outlets
                            which utilize the common PT2262 encoding chip for signal transmission. The sketch could
                            be easily expanded to include additional outlets.  The sensor node consists of a nano 
                            connected to a NRF24L01 and a 433Mhz transmitter connected to pin 3, 5V and Gnd.  The 
                            transmitter can run off of 3.3V as well. 
                            
                            The sketch is based on the MySensors project (http://www.mysensors.org). 
                            Submitted by Dwalt.
                        */ 
                        
                        //  Include related libraries
                        #include <MySensor.h>
                        #include <SPI.h>  
                        #include <RF24.h>
                        #include <RCSwitch.h>
                        
                        //  Define Constants
                        #define RF433_CHILD_ID 0
                        #define NUMBER_OF_OUTLETS 4 // Each outlet will have 2 OOK codes
                        //#define SEND_DATA 3
                        
                        #define CODE_1On 6287582
                        #define CODE_1Off 6287574
                        #define CODE_2On 6287580
                        #define CODE_2Off 6287572
                        #define CODE_3On 6287578
                        #define CODE_3Off 6287570
                        #define CODE_4On 6287577
                        #define CODE_4Off 6287569
                        
                        MySensor gw;
                        
                        RCSwitch mySwitch = RCSwitch();
                        
                        void setup() 
                        {
                          
                        
                        mySwitch.enableTransmit(3); 
                          
                         Serial.begin(115200); // Not sure why this was included
                        
                         //  The node is mains powered, so why not make it a repeater.
                         gw.begin(incomingMessage, AUTO, true);
                         
                         // Send the sketch version information to gateway
                         gw.sendSketchInfo("RF433", "1.1");
                         
                         // Register outlets to gw (they will be created as child devices)
                         for(int i=0; i<NUMBER_OF_OUTLETS;i++) {
                           gw.present(i+1, S_LIGHT);
                        
                         }
                            
                        }
                        
                        void loop() {
                          gw.process();
                        }
                          void incomingMessage(const MyMessage &message) {
                          
                          if (message.type==V_LIGHT) {
                          int incomingLightState =  message.getBool(); 
                          int incomingOutlet = message.sensor;
                          
                          Serial.print("Outlet #: ");
                          Serial.println(message.sensor);
                          Serial.print("Command: ");
                          Serial.println(message.getBool());
                         
                         if (incomingOutlet==1) {
                         if (incomingLightState==1) {
                            // Turn on  socket 1
                            Serial.println("Turn on Socket 1");
                         mySwitch.send(CODE_1On, 24); // These codes are unique to each outlet
                         delay(50); 
                         }
                         if (incomingLightState==0)  {
                            // Turn off socket 1
                         Serial.println("Turn off Socket 1");
                        mySwitch.send(CODE_1Off, 24);
                        delay(50); 
                         }
                         }
                         if (incomingOutlet==2) {
                         if (incomingLightState==1) {
                            // Turn on  socket 2
                            Serial.println("Turn on Socket 2");
                        mySwitch.send(CODE_2On, 24);
                         delay(50); 
                         }
                         if (incomingLightState==0)  {
                            // Turn off socket 2
                         Serial.println("Turn off Socket 2");
                        mySwitch.send(CODE_2Off, 24);
                        delay(50); 
                         }
                         }
                         if (incomingOutlet==3) {
                         if (incomingLightState==1) {
                            // Turn on  socket 3
                            Serial.println("Turn on Socket 3");
                        mySwitch.send(CODE_3On, 24);
                         delay(50); 
                         }
                         if (incomingLightState==0)  {
                            // Turn off socket 3
                         Serial.println("Turn off Socket 3");
                        mySwitch.send(CODE_3Off, 24);
                        delay(50); 
                         }
                         }
                         if (incomingOutlet==4) {
                         if (incomingLightState==1) {
                            // Turn on  socket 4
                            Serial.println("Turn on Socket 4");
                         mySwitch.send(CODE_4On, 24);
                         delay(50); 
                         }
                         if (incomingLightState==0)  {
                            // Turn off socket 4
                         Serial.println("Turn off Socket 4");
                        mySwitch.send(CODE_4Off, 24);
                        delay(50); 
                         }
                         }
                          }
                         delay(50);
                         }    
                            
                           
                            
                        
                        
                        
                        
                        
                        J Offline
                        J Offline
                        justinthegeek
                        wrote on last edited by
                        #26

                        @jribera What version of mysensors was this coded for? I'm having issues building this on 1.4 for some reason.

                        J 1 Reply Last reply
                        0
                        • J justinthegeek

                          @jribera What version of mysensors was this coded for? I'm having issues building this on 1.4 for some reason.

                          J Offline
                          J Offline
                          jribera
                          wrote on last edited by
                          #27

                          @justinthegeek

                          Also 1.4

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          15

                          Online

                          11.7k

                          Users

                          11.2k

                          Topics

                          113.1k

                          Posts


                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                          • Login

                          • Don't have an account? Register

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