Announcement

Collapse
No announcement yet.

BLGData -> Set A HS3 Device String Value To An Event Start Time

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

  • BLGData -> Set A HS3 Device String Value To An Event Start Time

    Blade,

    I've gotten the plug working and it's BRILLIANT. THANK YOU!!!

    Quick question:

    What I'm trying to do is have BLGData use the time that an event starts and set the value of a Homeseer virtual device's string to that.
    1. I create an event on the proper calendar that starts at 8:00am today.
    2. It is currently 6:00am.
    3. There is a virtual device in Homeseer called 'Next Event Start Time'.
    4. BLGData takes the 8:00am start time and sets the value of 'Next Event Start Time' to '8:00'.

    I've tried both HS[SetDeviceString~ and HS[SetDeviceValue~ in the following manner, and it's setting the value of 'Next Event Start Time' to literally $EVENTSTART, not referencing the value of the variable in the BLG plug.

    This is what I tried:

    Code:
    HS[SetDeviceString~Next Event Start Time~$EVENTSTART]
    How should I be doing it?
    Last edited by fksk; June 13th, 2019, 05:18 PM. Reason: Fixed the salutation

  • #2
    Is "Next Event Start Time" the full device name including the location?
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    Comment


    • #3
      Thanks for responding Blade!

      I am not currently specifying the location in the call.

      However, I am able to set the device's value to something so I know I'm hitting the correct device successfully.


      For the purposes of helping define the correct solution/code, use this:

      Device
      -------
      Floor: zSettings
      Room: zSettings - Hours
      Device: Next Event Start Time

      Can you suggest a code snippet that I would call inside the BLGData plugin event handler, *NOT* from within the Google Calendar event, using this sample device and pass it the start time of the upcoming calendar event? It is not my EXACT Floor/Room/Device naming convention but is VERY close.

      Comment


      • #4
        Can you try this:

        Code:
        HS[SetDeviceString~zSettings - Hours Next Event Start Time~$EVENTSTART]
        Cheers,
        Bob
        Web site | Help Desk | Feature Requests | Message Board

        Comment


        • #5
          Okay I just tried it. It did NOT work.

          Here's what I initially tried:

          Code:
          HS[SetDeviceString~zSettings - Hours - Next Event Start Time~$EVENTSTART]
          It did not update any aspect of the value of the target (virtual) device.

          Next I tried to see if I could update the value with a hard-coded value. This did NOT work (ie the value did not become '11'):

          Code:
          HS[SetDeviceString~zSettings - Hours Next Event Start Time~11]
          I also tried including floor as well, using both the dynamic $EVENTSTART variable as well as hardcoding '11' as the desired new value. None worked.

          Code:
          HS[SetDeviceString~zSettings - zSettings - Hours - Construction Biz Hours Custom Time Start~$EVENTSTART]
          HS[SetDeviceString~zSettings - zSettings - Hours - Construction Biz Hours Custom Time Start~11]

          Finally, I removed the floor and room references from the call in the BLGData Handler just to make sure I hadn't boned anything, and it updated the value of the HS virtual deice to the hard-coded value I put in ("foo").
          Code:
          HS[SetDeviceString~Construction Biz Hours Custom Time Start~foo]

          Comment


          • #6
            Can you try it like you originally tried

            HS[SetDeviceString~Next Event Start Time~$EVENTSTART]

            Before running it turn on debug logging and capture it, then turn off debug logging and attach the BLGData-Detailed.log zipped It is in the HS3 root folder
            Cheers,
            Bob
            Web site | Help Desk | Feature Requests | Message Board

            Comment

            Working...
            X