Announcement

Collapse
No announcement yet.

set device to another device doesn't work for counter devices?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    set device to another device doesn't work for counter devices?

    I just set a counter to 1 and tried to use the set another device to action and I get this error:

    ERROR SetDeviceValue: Cannot find control value 1 for device 1212

    Any hope?
    Originally posted by rprade
    There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

    #2
    Anybody?
    Originally posted by rprade
    There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

    Comment


      #3
      Is device 1212 the counter or the other device? What does the Status Graphics tab show for device 1212? Is it a status only device?
      HS 4.2.8.0: 2134 Devices 1252 Events
      Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

      Comment


        #4
        Originally posted by sparkman View Post
        Is device 1212 the counter or the other device? What does the Status Graphics tab show for device 1212? Is it a status only device?
        1212 is a counter. It's got the regular counter graphic. It's the device who's value I'm trying to set. I tried it with a virtual device and I get the same error just with the new device's number.

        Is there a different way I should be going about this? I want to have a device that I can count with, hence a counter. I want this device set back to 0 during the night but first I want its value transferred to a different device so I can reference the prior day's number.
        Originally posted by rprade
        There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

        Comment


          #5
          I'm not sure overwriting a counter's value this way would work at all because the device is just the representation of the counter, not the actual counter itself, so when the counter changed it would overwrite that value anyways. Copying to a virtual device should work though. I just tried copying a counter value to a virtual device using an immediate script command and that worked fine, so you may have to go that route if EasyTrigger does not work for that:

          Code:
          &hs.SetDeviceValueByRef(xxxx, hs.DeviceValue(yyyy), True)
          where yyyy is the source device and xxxx is the target device.
          HS 4.2.8.0: 2134 Devices 1252 Events
          Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

          Comment


            #6
            There is no way in script to set a counter to a specific value (which in my opinion is a huge deficiency).

            That is probably why Easy Trigger cannot do it.

            Comment


              #7
              Thanks guys. It does seem to be a very real lacking in counters. I was successfully able to accomplish my goal with the script sparkman posted.
              Originally posted by rprade
              There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

              Comment


                #8
                Originally posted by S-F View Post
                I just set a counter to 1 and tried to use the set another device to action and I get this error:

                ERROR SetDeviceValue: Cannot find control value 1 for device 1212

                Any hope?
                I'm having pretty much the same problem, but with timers instead of counters.

                I tried to use EasyTrigger to copy the current value of a running timer to another (non-running) timer. I got an error similar to yours:

                Click image for larger version

Name:	2019-04-07_14-00-08.jpg
Views:	133
Size:	17.0 KB
ID:	1297677
                (Device 226 is the target timer.) I also tried assigning the timer's current value to a virtual device, but got similar results.

                Is this an inherent limitation of the device to device value copy feature?
                Attached Files

                Comment


                  #9
                  What version of Easy Trigger are you running? Easy trigger was not able to set values of devices with undefined control values. This should be fixed in the latest beta 3.0.0.63.

                  Actual Counters and Timers are not devices, they are more like global variables. When you see a Counter or Timer in your Device Manager screen, these are not actual counters and timers, they are HS devices that are updated as the actual Counter and Timer changes, but setting these devices will not change the actual Counter and Timer they are connected to.

                  Is device 226 a virtual device you created? If it is a Virtual Timer created by HS to represent an actual Timer, setting it's value will likely have unexpected results as setting the Virtual Device will not set the corresponding Timer it is connected to.

                  HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                  Comment


                    #10
                    Originally posted by rprade View Post
                    What version of Easy Trigger are you running? Easy trigger was not able to set values of devices with undefined control values. This should be fixed in the latest beta 3.0.0.63.

                    Actual Counters and Timers are not devices, they are more like global variables. When you see a Counter or Timer in your Device Manager screen, these are not actual counters and timers, they are HS devices that are updated as the actual Counter and Timer changes, but setting these devices will not change the actual Counter and Timer they are connected to.

                    Is device 226 a virtual device you created? If it is a Virtual Timer created by HS to represent an actual Timer, setting it's value will likely have unexpected results as setting the Virtual Device will not set the corresponding Timer it is connected to.
                    Randy, I am a relative newbie, so you can understand that I'm usually fairly careful to make system choices that are least likely to get me into trouble. So I generally pass on betas, unless I have specific reasons to try them. I am using EasyTrigger v. 3.0.0.56, which I believe is the latest released version. If I check the betas in the Pending Updates section, I find that the same version is offered there. I therefore assume that 3.0.0.63 must be a back door version that hasn't even made it to the Pending Updates section.

                    The device 226 I posted is a timer that I created to receive snapshots of a running timer. And, of course, it didn't work. And, as I said in my post, I also tried copying a snapshot of the running timer to a virtual device, and that didn't work, either.

                    I know a little more about counters and timers now than I did a day or two ago. I understand that what I see in the device list is sort of an image of the code object that does the actual counting or timing. What I don't see is any reason why it should be difficult or impossible to copy a value displayed for a device in the device list to either a device list representation of a counter/timer or an actual virtual device. In the case of a timer, I can see a possible format representation problem (xx:xx:xx) when a time value is transferred to a virtual device, but even that potential problem is eliminated when one is simply saving the value of a counter.

                    Perhaps the HS3 core just doesn't offer plug-in authors enough hooks to manipulate counters/timers, and to access their data. But if it doesn't, it should.

                    BTW, a few words on my application: I have a timer which runs all the time, but it is occasionally reset. I want to save the largest value the timer ever reaches before it is reset. It sounds simple, but I still haven't found a way to do it. If you have a solution, I'm all ears. Thanks.

                    Comment


                      #11
                      Originally posted by ericg View Post
                      BTW, a few words on my application: I have a timer which runs all the time, but it is occasionally reset. I want to save the largest value the timer ever reaches before it is reset. It sounds simple, but I still haven't found a way to do it. If you have a solution, I'm all ears. Thanks.
                      Not the easiest solution, but if all else fails:

                      You could run a script every time and just before resetting that timer.

                      Inside the script you could include the statement:

                      dim ts as TimeSpan = hs.TimerValue("mytimer")

                      Then fetch the previous value from a virtual switch or "ini" file. If the new value is larger, save the new value back.


                      Comment


                        #12
                        Originally posted by ericg View Post

                        Randy, I am a relative newbie, so you can understand that I'm usually fairly careful to make system choices that are least likely to get me into trouble. So I generally pass on betas, unless I have specific reasons to try them. I am using EasyTrigger v. 3.0.0.56, which I believe is the latest released version. If I check the betas in the Pending Updates section, I find that the same version is offered there. I therefore assume that 3.0.0.63 must be a back door version that hasn't even made it to the Pending Updates section.

                        The device 226 I posted is a timer that I created to receive snapshots of a running timer. And, of course, it didn't work. And, as I said in my post, I also tried copying a snapshot of the running timer to a virtual device, and that didn't work, either.

                        I know a little more about counters and timers now than I did a day or two ago. I understand that what I see in the device list is sort of an image of the code object that does the actual counting or timing. What I don't see is any reason why it should be difficult or impossible to copy a value displayed for a device in the device list to either a device list representation of a counter/timer or an actual virtual device. In the case of a timer, I can see a possible format representation problem (xx:xx:xx) when a time value is transferred to a virtual device, but even that potential problem is eliminated when one is simply saving the value of a counter.

                        Perhaps the HS3 core just doesn't offer plug-in authors enough hooks to manipulate counters/timers, and to access their data. But if it doesn't, it should.

                        BTW, a few words on my application: I have a timer which runs all the time, but it is occasionally reset. I want to save the largest value the timer ever reaches before it is reset. It sounds simple, but I still haven't found a way to do it. If you have a solution, I'm all ears. Thanks.
                        In the beta section, you should see the Beta version 3.0.0.63 like in the screenshot below:Click image for larger version

Name:	beta.PNG
Views:	161
Size:	43.3 KB
ID:	1297845

                        as Randy said with this beta version you should be able to set a device to any value even if this device has no controls.

                        If you want to stay on 3.0.0.56, you can edit your virtual device and add a control range which cover all the possible values that this device can take, the EasyTrigger plugin will then be able to set this device to the dsired value.

                        Comment


                          #13
                          Aha! I just now discovered that the "Beta section" is not identical to "Pending Updates/Installs". Rather, the Beta section is an element of Pending Updates/Installs. I'll install 3.0.0.63 and see what I can do with it.
                          Thank you.

                          Comment


                            #14
                            Originally posted by ericg View Post
                            Aha! I just now discovered that the "Beta section" is not identical to "Pending Updates/Installs". Rather, the Beta section is an element of Pending Updates/Installs. I'll install 3.0.0.63 and see what I can do with it.
                            Thank you.
                            The “Pending Updates/Installs” section is simply the updates you have chosen to install, whether beta or release versions. It will not be populated unless/until you select packages to be installed. The entire section is “Additional Interfaces” which consists of release versions by category and a separate beta release section. I think Spud and many other plug-in authors use the beta section for speed as it takes much longer for HST to get an update in the release version categories.

                            Click image for larger version

Name:	81F0C9DD-B0BE-4B15-9DB5-4D5079A5040C.jpeg
Views:	140
Size:	44.5 KB
ID:	1297899
                            HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                            Comment


                              #15
                              EasyTrigger v. 3.0.0.63 does in fact allow me to set a device to the current value of a timer. Thanks for the assistance.

                              Comment

                              Working...
                              X