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. My Project
  3. Get Temperature from other nodes(through VERA).

Get Temperature from other nodes(through VERA).

Scheduled Pinned Locked Moved My Project
7 Posts 2 Posters 2.7k Views 2 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.
  • clio75C Offline
    clio75C Offline
    clio75
    wrote on last edited by clio75
    #1

    Hi,

    I'm have started to plan a irrigation controller(Thanx @petewill).
    But I need to get the temperature from my sensors to my controller. I have not been able to do this :(

    My plan was to read this out from my vera controller, but cant find any way to do this.
    Does anyone have a advice or idea to do this ?

    I'm using the V2.0.0, of library.
    I have tried to use the
    request(tempNode_ID, V_TEMP) But no replay from VERA.
    To store/update the "setTemp" I'm using the V_VAR1 on the and this is returned from VEAR.

    So Is this possible or not ?

    Thanx

    korttomaK 1 Reply Last reply
    0
    • clio75C clio75

      Hi,

      I'm have started to plan a irrigation controller(Thanx @petewill).
      But I need to get the temperature from my sensors to my controller. I have not been able to do this :(

      My plan was to read this out from my vera controller, but cant find any way to do this.
      Does anyone have a advice or idea to do this ?

      I'm using the V2.0.0, of library.
      I have tried to use the
      request(tempNode_ID, V_TEMP) But no replay from VERA.
      To store/update the "setTemp" I'm using the V_VAR1 on the and this is returned from VEAR.

      So Is this possible or not ?

      Thanx

      korttomaK Offline
      korttomaK Offline
      korttoma
      Hero Member
      wrote on last edited by
      #2

      Hi @clio75

      Here is an example of the lua I use when sending V_VAR1 to a MySensors Node:
      16 is the id of the device from where I get the temperature value.
      24 is the id of the MySensors plugin main device
      11;3 is the altid of the MySensors node device to witch I'm sending the value.

      local temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", 16)
      luup.call_action("urn:upnp-arduino-cc:serviceId:arduino1", "SendCommand", {radioId="11;3", variableId="VAR_1", value=temp}, 24)
      

      Here is an example of the receive code in the node itself:

      void receive(const MyMessage &message)
      {
        if (message.type == V_VAR1)
        {
          OutdoorTemp = String(message.data);
          //Serial.print("OutdoorTemp recieved:");
          //Serial.println(OutdoorTemp);
        }  
      }
      
      • Tomas
      1 Reply Last reply
      1
      • clio75C Offline
        clio75C Offline
        clio75
        wrote on last edited by
        #3

        hi @korttoma

        Thanx for your suggestion, But I was not able to figure out where to insert this LUA code.

        Thanx

        korttomaK 1 Reply Last reply
        0
        • clio75C clio75

          hi @korttoma

          Thanx for your suggestion, But I was not able to figure out where to insert this LUA code.

          Thanx

          korttomaK Offline
          korttomaK Offline
          korttoma
          Hero Member
          wrote on last edited by
          #4

          @clio75 you could add it as an action in a scene under "Also, execute the following Luup code:".

          The way I use it is to send weather information to a small display node so I have a PLEG condition running every 10min to update the information. So I have the lua code as an action for the PLEG condition.

          • Tomas
          clio75C 1 Reply Last reply
          0
          • korttomaK korttoma

            @clio75 you could add it as an action in a scene under "Also, execute the following Luup code:".

            The way I use it is to send weather information to a small display node so I have a PLEG condition running every 10min to update the information. So I have the lua code as an action for the PLEG condition.

            clio75C Offline
            clio75C Offline
            clio75
            wrote on last edited by
            #5

            @korttoma

            Thanx, I will Try again this afternoon :)

            clio75C 1 Reply Last reply
            0
            • clio75C clio75

              @korttoma

              Thanx, I will Try again this afternoon :)

              clio75C Offline
              clio75C Offline
              clio75
              wrote on last edited by
              #6

              @korttoma
              Thanx this is working perfect.

              1 Reply Last reply
              1
              • clio75C Offline
                clio75C Offline
                clio75
                wrote on last edited by
                #7

                Hi @korttoma,

                Just an other question,
                II'm also using PLEG.
                Is there a way to compeer the last value against the new value and only IF these values are different we sending a this new value.

                some thing like :
                local temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", 35)
                local oldTemp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","VAR_1", 14)
                if temp != oldTemp then
                luup.call_action("urn:upnp-arduino-cc:serviceId:arduino1", "SendCommand", {radioId="14;2", variableId="VAR_1", value=temp}, 3)
                end
                Thanx

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


                8

                Online

                11.7k

                Users

                11.2k

                Topics

                113.0k

                Posts


                Copyright 2019 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