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. Feature Requests
  3. Request data from Domoticz

Request data from Domoticz

Scheduled Pinned Locked Moved Feature Requests
15 Posts 4 Posters 2.3k Views 4 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.
  • alowhumA Offline
    alowhumA Offline
    alowhum
    Plugin Developer
    wrote on last edited by alowhum
    #2

    In theory the latest versions of Domoticz automatically send info fields to your node if their value changes.

    otherwise you can do a request. The code below is a quick copy-paste from an SMS doorlock I use, so don't copy paste it, but take the parts you need.

    
    #define ROTATING_PASSWORD1_ID 3                     // SMS Password can be set from controller.
    char rotatingPassword1[26] = "door1";               // Holds the password we get from the controller. Starts as the backup password: if no connection to the controller can be established, this will we the password.
    
    
    // IN YOUR PRESENT:
      present(ROTATING_PASSWORD1_ID, S_INFO); delay(RF_DELAY);
    
    
    // IN YOUR LOOP OR SETUP:
    
           request(ROTATING_PASSWORD1_ID, V_TEXT);           // periodically check if there is a new password set.
     
    
    
    // IN YOUR RECEIVE FUNCTION:
    
    void receive(const MyMessage &message)
    {
      if (message.type == V_TEXT) {
        if(message.sensor == ROTATING_PASSWORD1_ID){
          if( rotatingPassword1 != message.getString() && sizeof(message.getString()) > 2 ){
            strcpy(rotatingPassword1, message.getString());
            Serial.print(F("Rotating password 1 is now: ")); Serial.println(rotatingPassword1);
            send(charmsg.setSensor(DEVICE_STATUS_ID).set( F("received latest password 1")));
          }
        }
      }
    }
     
    
    
    1 Reply Last reply
    1
    • P Offline
      P Offline
      pjr
      wrote on last edited by pjr
      #3

      Are your lights and temp sensors MySensored or would you like to get status from some random Domoticz devices?

      S 1 Reply Last reply
      0
      • P pjr

        Are your lights and temp sensors MySensored or would you like to get status from some random Domoticz devices?

        S Offline
        S Offline
        sindrome73
        wrote on last edited by
        #4

        @pjr
        yes, I intend to receive data from devices that do not belong to that node, but to other nodes.
        So random devices of the network

        1 Reply Last reply
        0
        • alowhumA Offline
          alowhumA Offline
          alowhum
          Plugin Developer
          wrote on last edited by
          #5

          Then you'll have to fill that info field with the values from those sensors, using some automation in Domoticz.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sindrome73
            wrote on last edited by
            #6

            do you mean that it is not possible to request those data from the node that will make the display ??

            1 Reply Last reply
            0
            • alowhumA Offline
              alowhumA Offline
              alowhum
              Plugin Developer
              wrote on last edited by alowhum
              #7

              No, you cannot request data from just any random device in your home. Just imagine how insecure that would be! And how complicated!

              The MySensors device has to create a field in Domoticz (using the present function). This can be a text field (as I explained above), but it can be any type you like.

              If the content of the info field then changes in Domoticz, its new value can be requested. In some cases the value will be automatically sent to the MySensors device (like info and thermostat).

              Finally, you will have to tell Domoticz to 'copy' the value you want into the field of your MySensors device.

              I hope this makes sense.

              1 Reply Last reply
              0
              • alowhumA Offline
                alowhumA Offline
                alowhum
                Plugin Developer
                wrote on last edited by
                #8

                For what you want, you could also just stick some old smartphones or tablets onto your wall, which have access to the Domoticz interface? If you create some special users for those devices you can curate which buttons and sensors each device can display.

                1 Reply Last reply
                0
                • alowhumA Offline
                  alowhumA Offline
                  alowhum
                  Plugin Developer
                  wrote on last edited by
                  #9

                  Another option: if you create a MySensors device with a little screen, and have that node also create some switches in Domoticz, then you can set those switches as 'slave devices' when you flip the master light switch. That way their value will also get updated. And then you can show that status on the screen of the MySensors device easily.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    sindrome73
                    wrote on last edited by
                    #10

                    Hello
                    So if I understand, a node from domoticz can only ask the status of a sensor connected already him, and not the status of other nodes of the network!
                    So it is impossible for me to create nodes / displays to display the status of other sensors in the network.
                    The only way is to use some old mobile phone as a display point

                    K P 2 Replies Last reply
                    0
                    • S sindrome73

                      Hello
                      So if I understand, a node from domoticz can only ask the status of a sensor connected already him, and not the status of other nodes of the network!
                      So it is impossible for me to create nodes / displays to display the status of other sensors in the network.
                      The only way is to use some old mobile phone as a display point

                      K Offline
                      K Offline
                      kimot
                      wrote on last edited by
                      #11

                      @sindrome73
                      But Domoticz can write value from other nodes into V_TEXT field of your node, which can be requested then.
                      Use LUA or DzVents script for this.
                      alowhum pointed this way in several his posts to you.

                      S 1 Reply Last reply
                      1
                      • K kimot

                        @sindrome73
                        But Domoticz can write value from other nodes into V_TEXT field of your node, which can be requested then.
                        Use LUA or DzVents script for this.
                        alowhum pointed this way in several his posts to you.

                        S Offline
                        S Offline
                        sindrome73
                        wrote on last edited by
                        #12

                        @kimot I did not understand what you tell me, can you explain better or with some examples ??

                        K 1 Reply Last reply
                        0
                        • S sindrome73

                          @kimot I did not understand what you tell me, can you explain better or with some examples ??

                          K Offline
                          K Offline
                          kimot
                          wrote on last edited by
                          #13

                          @sindrome73

                          Read post from gizmocuz commented on 10 May

                          https://github.com/domoticz/domoticz/issues/2380

                          There is a switch example, but domoticz can call events when temperature changes or periodically every minute etc.
                          And then you can store new value onto V_TEXT, which can be requested from mysensor node or in newer versions of domoticz is automatically sended to your mysensor node and can be displayed on LCD.

                          1 Reply Last reply
                          1
                          • S sindrome73

                            Hello
                            So if I understand, a node from domoticz can only ask the status of a sensor connected already him, and not the status of other nodes of the network!
                            So it is impossible for me to create nodes / displays to display the status of other sensors in the network.
                            The only way is to use some old mobile phone as a display point

                            P Offline
                            P Offline
                            pjr
                            wrote on last edited by
                            #14

                            @sindrome73 said in Request data from Domoticz:

                            Hello
                            So if I understand, a node from domoticz can only ask the status of a sensor connected already him, and not the status of other nodes of the network!
                            So it is impossible for me to create nodes / displays to display the status of other sensors in the network.
                            The only way is to use some old mobile phone as a display point

                            You can directly request data from other node(nothing to do with domoticz).

                            From documentation: https://www.mysensors.org/download/sensor_api_20#requesting-data

                            Requests a variable value from gateway or some other sensor in the radio network.
                            void request(uint8_t childSensorId, uint8_t variableType, uint8_t destination);
                            childSensorId - The unique child id for the different sensors connected to this Arduino. 0-254.
                            variableType - The variableType to fetch.
                            destination - The nodeId of other node to request data from in radio network. Default is gateway.

                            Other way is that you can present some text sensors in your "screen" node and update those from scripts at domoticz.

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              sindrome73
                              wrote on last edited by
                              #15

                              this is a good place to start and start to understand.
                              I'm not a lot of diggers, however I start reading something, and in case I'll ask for help
                              In a lot of thanks

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


                              24

                              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