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. Controllers
  3. Domoticz
  4. Learning 433 mhz with Domoticz

Learning 433 mhz with Domoticz

Scheduled Pinned Locked Moved Domoticz
5 Posts 4 Posters 9.1k Views 1 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.
  • D Offline
    D Offline
    diggs
    wrote on last edited by
    #1

    Bit of a newbie question.

    I have my mysensors gateway talking to Domoticzc. I also have a lot of old 433 mhz switches and sockets around the place I want to use. Now I have been doing a lot of reading in the forums working out how to get my 433 mhz gear talking to domoticz via the gateway and a lot of the posts discuss learning the codes sent bu the 433 gear.

    My question is, in domoticz, with the switches, they have a learning mode for the switch that listens to incomming signals. If everything is setup OK, can this function be used once basic connectivity is made with the 433 gear and the gateway? If you could point me to the best posts on the subject I will dig further.

    1 Reply Last reply
    0
    • DwaltD Offline
      DwaltD Offline
      Dwalt
      wrote on last edited by
      #2

      I have several 433 switches which also have the 'learn code' button. I used the remote to set the codes, sniffed the codes and then put those codes into the sketch on arduino 433 gateway. I do not use the remote after programming the switches. My brand of switches can store three different commands for both off and on. I have used this feature to improve (?) speed and synchronization of multiple switch actuation.

      I do not see how the controller (my case is Vera) could utilize this 'learning' feature. Is there something you had in mind?

      Veralite UI5 :: IBoard Ethernet GW :: MyS 1.5

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andriej
        wrote on last edited by
        #3

        Learning in Domoticz is for RFXCom transceiver, which is expensive.
        Do your own coding with arduino libraries (i.e. new remote switch) and code it with i.e. script.

        :-)

        1 Reply Last reply
        0
        • DwaltD Offline
          DwaltD Offline
          Dwalt
          wrote on last edited by
          #4

          I may have misinterpreted @diggs question. I am not familiar with Domoticz. I use Vera which also has a plugin for using the RFXCom equipment but the expense drove me to use MySensors for my 433 switches.

          I used the 433Mhz transmitter on a mains powered nano and use the relay sketch to control my 433Mhz outlets.

          Veralite UI5 :: IBoard Ethernet GW :: MyS 1.5

          1 Reply Last reply
          0
          • Michel - ItM Offline
            Michel - ItM Offline
            Michel - It
            wrote on last edited by Michel - It
            #5

            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() );
                }
              }
            }```
            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            20

            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