Author Topic: Desktop Widgets  (Read 2278 times)

0 Members and 1 Guest are viewing this topic.

IKROWNI

  • $upporter
  • Sr. Member
  • *****
  • Posts: 146
  • Karma: 2
    • View Profile
Desktop Widgets
« on: September 10, 2016, 06:13:13 PM »
I just created a 3d model of my home using a program called "sweet home 3d" I set the image of my house as the desktop background and now i would like to make some widgets using rainmeter and voxcommando to get like a live status of each device in my house.



In the image above i have the house set as desktop and on the right i have some status widgets i have made for the devices in the house using rainmeters webparsing plugin.

The problem is that these widgets will not autoupdate. So i need some way for my vera to send updates to voxcommando so that the widget will update.

here is an xml of one of the widgets

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.2.3-->
<command id="563" name="Living Room" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Vera.Get.Status</cmdType>
    <params>
      <param>9</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{LastResult}&amp;&amp;1</ifParams>
    <then>
      <action>
        <cmdType>Results.Replace</cmdType>
        <params>
          <param>1</param>
          <param>On</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>Results.Replace</cmdType>
        <params>
          <param>0</param>
          <param>Off</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <action>
    <cmdType>File.Write</cmdType>
    <params>
      <param>C:\Users\theki\Documents\Rainmeter\Skins\Home Automation\Lights\Living Room\VoxLivingRoomLights.txt</param>
      <param>&lt;BEGIN&gt; {LastResult} &lt;END&gt;</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

Is what im trying to achieve possible?

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Desktop Widgets
« Reply #1 on: September 10, 2016, 06:47:08 PM »
If I'm understanding the problem correctly, it sounds like you'd want to use events that Vera generates when devices change their status to trigger widget commands in VC.

Those events should already be appearing in the VC history window if you have the "Generate Events" box checked in the Vera plugin settings.

Note as well that the Vera events generally include payloads that include "on" or "off" etc. so you may not need to do the kind of 1 == "on" evaluation that you're currently doing manually in your macro.

If you roll over an event when it appears in the history window, you'll see what the payloads are.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

IKROWNI

  • $upporter
  • Sr. Member
  • *****
  • Posts: 146
  • Karma: 2
    • View Profile
Re: Desktop Widgets
« Reply #2 on: September 10, 2016, 09:26:55 PM »
Those events should already be appearing in the VC history window if you have the "Generate Events" box checked in the Vera plugin settings.

Is this supposed to also generate an event if the device was shut off through a different program? Like if i use my phone to turn off a device with the vera app will this generate an event in voxcommando?


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Desktop Widgets
« Reply #3 on: September 10, 2016, 10:52:24 PM »
Yes of course.

IKROWNI

  • $upporter
  • Sr. Member
  • *****
  • Posts: 146
  • Karma: 2
    • View Profile
Re: Desktop Widgets
« Reply #4 on: September 10, 2016, 11:17:19 PM »
huh i must have broke something along the way then. I just used the vera android app to turn off my dining room lights after clearing the history and nothing popped up at all.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Desktop Widgets
« Reply #5 on: September 11, 2016, 08:47:28 AM »
I guess you must have.  Are you getting any Vera events?

Make sure "Show All Events" is checked in the VC dropdown "Options" menu.

In the Vera plugin you must click "Save Options" after enabling "Generate Events".

Did you ever use the "Edit Event Variables" in the Vera plugin?

IKROWNI

  • $upporter
  • Sr. Member
  • *****
  • Posts: 146
  • Karma: 2
    • View Profile
Re: Desktop Widgets
« Reply #6 on: September 11, 2016, 11:43:12 AM »
I guess you must have.  Are you getting any Vera events?

Make sure "Show All Events" is checked in the VC dropdown "Options" menu.

In the Vera plugin you must click "Save Options" after enabling "Generate Events".

Did you ever use the "Edit Event Variables" in the Vera plugin?

Only time i ever remember getting vera events showing in the history panel is when im firing them from within vox

Show all events is checked in the options drop down

generate events is also checked and saved

ive never looked at the "edit event variables" at all.

I honestly never even knew that vox could do this. I just figured it was a limitation on the veras side preventing it so never even really asked about it. Now i feel pretty dumb considering all the work arounds ive tried to go through because of this lol.

Should i just try a fresh install and move all my stuff over to the new install? Or is there a way i can fix this without doing that?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Desktop Widgets
« Reply #7 on: September 11, 2016, 11:50:20 AM »
What kind of Vera do you have?

I would do a fresh blank install to a new folder first and just enable and set up the Vera plugin to see if it works.  If it doesn't work then let me know.  If it does then we can try to figure out what you did to break it in your other setup.


IKROWNI

  • $upporter
  • Sr. Member
  • *****
  • Posts: 146
  • Karma: 2
    • View Profile
Re: Desktop Widgets
« Reply #8 on: September 11, 2016, 11:59:20 AM »
What kind of Vera do you have?

I would do a fresh blank install to a new folder first and just enable and set up the Vera plugin to see if it works.  If it doesn't work then let me know.  If it does then we can try to figure out what you did to break it in your other setup.

I have a vera lite

Did a fresh install and it is working.
« Last Edit: September 11, 2016, 12:05:05 PM by IKROWNI »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Desktop Widgets
« Reply #9 on: September 11, 2016, 12:01:15 PM »
In your original setup, try the following:

close VC
go to the VC\plugins\Vera folder and delete the file "EventSettings.json"

start VC again and see if it works.

IKROWNI

  • $upporter
  • Sr. Member
  • *****
  • Posts: 146
  • Karma: 2
    • View Profile
Re: Desktop Widgets
« Reply #10 on: September 11, 2016, 12:06:19 PM »
Before doing that i tried Just turning off the option "generate events" saved it and then turned the option back on and saved again and now it looks like its working. If this happens again ill try the other option you gave me. Thanks guys