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. Vera
  4. How to get PLEG condition value from LUUP code? With luup.variable_get()?

How to get PLEG condition value from LUUP code? With luup.variable_get()?

Scheduled Pinned Locked Moved Vera
8 Posts 2 Posters 3.8k 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.
  • S Offline
    S Offline
    samppa
    wrote on last edited by
    #1

    How to get PLEG condition value from LUUP code? With luup.variable_get()?

    I have several conditions in PLEG and I would like to track and plot the values in order to see, verify and optimize the behavior of the PLEG logic. For plotting I have done a scene with LUUP code that sends other sensor data to plot.ly for graphing. Now I need also the PLEG condition states, but how?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      samppa
      wrote on last edited by
      #2

      I mean is there urn for requesting PLEG Condition value in LUUP like:
      local val = luup.variable_get("urn:upnp-org:serviceId:PLEG-Condition", "Status", 106)

      1 Reply Last reply
      0
      • BulldogLowellB Offline
        BulldogLowellB Offline
        BulldogLowell
        Contest Winner
        wrote on last edited by BulldogLowell
        #3

        I would post a question right to the PLEG author, Richard Schaefer on the Vera Forum.

        S 1 Reply Last reply
        0
        • BulldogLowellB BulldogLowell

          I would post a question right to the PLEG author, Richard Schaefer on the Vera Forum.

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

          @BulldogLowell said:

          I would post a question right to the PLEG author, Richard Schaefer on the Vera Forum.

          I did that and got an answer:
          "
          A recent feature was to add the ability to Export a condition. (See the conditions tab).
          This creates a variable that can be imported into another PLEG as a device property OR access via luup.variable_get

          The servceid is: "urn:rts-services-com:serviceId:User"
          "

          Awesome!

          BulldogLowellB S 2 Replies Last reply
          0
          • S samppa

            @BulldogLowell said:

            I would post a question right to the PLEG author, Richard Schaefer on the Vera Forum.

            I did that and got an answer:
            "
            A recent feature was to add the ability to Export a condition. (See the conditions tab).
            This creates a variable that can be imported into another PLEG as a device property OR access via luup.variable_get

            The servceid is: "urn:rts-services-com:serviceId:User"
            "

            Awesome!

            BulldogLowellB Offline
            BulldogLowellB Offline
            BulldogLowell
            Contest Winner
            wrote on last edited by
            #5

            @samppa

            compound dependancies for variables...

            that's great

            I'd like to see IFTTT support on Vera!

            1 Reply Last reply
            0
            • S samppa

              @BulldogLowell said:

              I would post a question right to the PLEG author, Richard Schaefer on the Vera Forum.

              I did that and got an answer:
              "
              A recent feature was to add the ability to Export a condition. (See the conditions tab).
              This creates a variable that can be imported into another PLEG as a device property OR access via luup.variable_get

              The servceid is: "urn:rts-services-com:serviceId:User"
              "

              Awesome!

              S Offline
              S Offline
              samppa
              wrote on last edited by samppa
              #6

              A recent feature was to add the ability to Export a condition. (See the conditions tab).
              This creates a variable that can be imported into another PLEG as a device property OR access via luup.variable_get
              The servceid is: "urn:rts-services-com:serviceId:User"

              Unfortunately (of course) that did not work and the variable_get returns nil for that urn even if the Condition is marked to be exported. :-|

              BulldogLowellB 1 Reply Last reply
              0
              • S samppa

                A recent feature was to add the ability to Export a condition. (See the conditions tab).
                This creates a variable that can be imported into another PLEG as a device property OR access via luup.variable_get
                The servceid is: "urn:rts-services-com:serviceId:User"

                Unfortunately (of course) that did not work and the variable_get returns nil for that urn even if the Condition is marked to be exported. :-|

                BulldogLowellB Offline
                BulldogLowellB Offline
                BulldogLowell
                Contest Winner
                wrote on last edited by
                #7

                @samppa

                post your lua code, maybe we can help...

                Double check your service id's by hovering over them with your mouse:

                Screen Shot 2015-01-31 at 3.39.07 PM.png

                S 1 Reply Last reply
                0
                • BulldogLowellB BulldogLowell

                  @samppa

                  post your lua code, maybe we can help...

                  Double check your service id's by hovering over them with your mouse:

                  Screen Shot 2015-01-31 at 3.39.07 PM.png

                  S Offline
                  S Offline
                  samppa
                  wrote on last edited by samppa
                  #8

                  @BulldogLowell

                  Actually it started to work after update to 5.37 version of PLEG where Richard made some bugfix for numeric conditions.
                  Now the exported condition is shown correctly as a variable in the advanced tab.
                  So case resolved. :-D

                  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