Author Topic: Not sure if widget or figment of Paul's imagination  (Read 10823 times)

0 Members and 1 Guest are viewing this topic.

MrWolf

  • $upporter
  • Sr. Member
  • *****
  • Posts: 209
  • Karma: 4
    • View Profile
Not sure if widget or figment of Paul's imagination
« on: August 10, 2015, 08:02:10 AM »
Hello boys and girls!

I was just playing with my new phone and thought I'd look through the widgets and was surprised to see a voxwav widget!

It doesn't seem to do anything though. It looked like it might add some buttons to my home screen for commonly used phrases so I could use my phone as a remote for Vox. This would be really useful in my bedroom for when Neesha is asleep and I need to get Alexander to perform a command like turn the lights off,  or start the waterfall. I always used Eventghost to do this previously but this would be a much better option.

Sadly I can tick the buttons but it doesn't add them to the home screen when I press back and I can't see any menu to save them. I've looked around the forum and the instructions for voxwav but can't see any mention of such a widget.

Is it not compatible with the galaxy S5 or is the widget not even supposed to be there?

Xxx
Home automation guides for idiots like me by an idiot (me)...
https://www.youtube.com/user/wolfsweb

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Not sure if widget or figment of Paul's imagination
« Reply #1 on: August 10, 2015, 09:17:03 AM »
Sorry there is no such functionality.  It's not your imagination per se.  Just the side effects of the beginnings of a failed experiment.

If you want to send commands to VC from your Android though there are lots of ways to accomplish this.  If you can be more specific about your goal maybe I can suggest something.

For example, does it need to be a widget specifically?  Or could it be an app with a bunch of buttons.

Do you just need to trigger a few key macros that you can enter by hand, or do you want access to all your commonly spoken voice commands?

Would a web page work?
« Last Edit: August 10, 2015, 10:34:02 AM by jitterjames »

MrWolf

  • $upporter
  • Sr. Member
  • *****
  • Posts: 209
  • Karma: 4
    • View Profile
Re: Not sure if widget or figment of Paul's imagination
« Reply #2 on: August 10, 2015, 02:17:43 PM »
Hey man,

The goal is as few swipes as possible to be able to get to a remote of my most useful buttons I guess.

On my old phone I spent some time setting up Eventghost on the phone to trigger a few key commands, I'd created the Eventghost "home shortcuts" for them all, but for some reason the phone shrunk the icons which made them a bit sad to look at and an all round cheaper experience but they were livable.  I guess primarily I was just hoping the functionality was there to save me setting up Eventghost on my new phone.

The buttons I'd set up before were:
A button to trigger the existing voice command that starts the waterfall sound ("help me to sleep")
PC volume up and down buttons
An XBMC pause/resume button
Jump forward a few seconds in XBMC
Jump backwards a few seconds in XBMC
Main lights on and off
Side lights on and off
Start listening (Vox)

I know most of that is already in Kodi's remote and in the 3rd party Yatse which I use heavily at present, but having it all on one of my home panels in one place is the ideal and if it was powered by Voxwav then even better.

I'll see what the icons come out like from Eventghost on the new phone, maybe the S5 won't shrink them.

Thanks as always for your ponderance.

xxx
Home automation guides for idiots like me by an idiot (me)...
https://www.youtube.com/user/wolfsweb

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Not sure if widget or figment of Paul's imagination
« Reply #3 on: August 10, 2015, 02:49:32 PM »
Hi Paul, Irule (www.iruleathome.com) is a configurable softremote for iOS and Android, but a bit expensive  :o
But they have a 15 days trial to test. The app for the mobile is for free, but the cloud based Software (editor) cost some bucks - starts at 50$ for 3 handsets.
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Not sure if widget or figment of Paul's imagination
« Reply #4 on: August 10, 2015, 03:15:42 PM »
For your purposes I recommend using one of these options.

1-  Use the TCP plugin with the simple web server and a web page with your buttons on it and putting a shortcut to the page on your phone's home screen.  The TCP webserver comes with a sample web page.  I'm actually surprised no one has done more with this options.

2 - Use Tasker widgets and the UDP plugin to send commands to VC.  If you don't already have Tasker it's not expensive and most people find it useful for other things anyway.

3 - I think I have an experimental app that I made called "sender" around here somewhere.  I have it installed on my tablet but I'm not sure if I still have the apk.  To use that you create an xml file by hand and plop some matching png files into a folder on your Android.  It just creates a gird of buttons, no drag and drop etc. but it works... and you can send commands directly to the HALX too.

You also have the option of creating a web page on the HALX but that is a pain to set up, and I don't even really remember how anymore!

Of course there are a lot of other ways to do the same thing.  iRule can make great interfaces but it is difficult to set up and expensive and I think it is overkill for what you want.

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: Not sure if widget or figment of Paul's imagination
« Reply #5 on: August 10, 2015, 05:02:48 PM »
James, as I told you before, this subject is of great interest to me. I know VC is about voice control, but I need also a way for silently controlling the house or reading status of its sensors, preferably in a way that I can do that from the internet too.

That's why I already started to plan for something similar to the option 1 that you mentioned, by building some scripts to get all the commands from voicecommands.xml using some specific criteria to filter what commands should be "scanned". Then the script would automatically create a static web page with all my desired commands and their respective payloads available on drop downs (payloads would not be available for media however due to too large payloads).

Option 3 seems interesting too. Please post the apk if you still have it.

Thanks!

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: Not sure if widget or figment of Paul's imagination
« Reply #6 on: August 11, 2015, 12:25:12 AM »
I use Tasker and made an app for my lights, Volume control, speaker control and a Panic button

commercial photography locations



Buttons:
Living Room:
tap- toggles my living room lights
Long press- sends off command (in case your not sure if they are on)
slider 1, Dims living room lights

Master Bedroom:
toggles my living room lights
Long press- sends off command (in case your not sure if they are on)
slider 2, Dims Master bedroom lights

***Panic***,
long press- Sets off a panic alarm and makes my lights start flashing red (no noise when long pressing)
tap- turns off the alarm


Inside/All Off
tap- sets speakers to inside
Long press- Sets Speakers to all off

Outside/All On
tap- sets speakers to outside
Long press- Sets speakers to all on

Vol +
tap- Vol up 3 times
Long press- Vol up 10 times

Vol-
tap- Vol down 3 times
Long press- Vol down 10 times


It wasn't to difficult to set up and I just use VC's TCP server, the only down side is that the sliders don't match the actual state of the lights (I would need VC to communicate with Tasker what it is set to)

if you want more info on how to set it up let me know and I could put something together


« Last Edit: August 28, 2017, 07:53:35 PM by PegLegTV »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Not sure if widget or figment of Paul's imagination
« Reply #7 on: August 11, 2015, 08:30:23 AM »
@PegLegTV -- Maybe if you add autoremote to the mix you can get some feedback from VC wrt light or volume state?

I believe you can use scrape actions to send messages to autoremote.

http://autoremotejoaomgcd.appspot.com/

Might not be instantaneous, but probably OK.
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)

Dave

  • $upporter
  • Sr. Member
  • *****
  • Posts: 139
  • Karma: 31
    • View Profile
Re: Not sure if widget or figment of Paul's imagination
« Reply #8 on: August 11, 2015, 05:56:04 PM »
1-  Use the TCP plugin with the simple web server and a web page with your buttons on it and putting a shortcut to the page on your phone's home screen.  The TCP webserver comes with a sample web page.  I'm actually surprised no one has done more with this options.

I used the webserver solution with EG and just adapted my web page to work with VC instead today, since VC got so powerful that I don't need EG anymore  8)

MrWolf

  • $upporter
  • Sr. Member
  • *****
  • Posts: 209
  • Karma: 4
    • View Profile
Re: Not sure if widget or figment of Paul's imagination
« Reply #9 on: August 11, 2015, 06:11:45 PM »
Thank you all, this has been a massive help as always

I had already paid for tasker a long time ago but hadn't had a lot of use for it outside of the NFC stuff I'd done until today.

Never used the UDP functionality of Vox before, it's taken Eventghost out of the equation for my mobile solutions. The icons that come with Tasker are also nice enough and appear at a sensible size when used as widgets.

Great stuff. Thanks all.

Xxx
Home automation guides for idiots like me by an idiot (me)...
https://www.youtube.com/user/wolfsweb

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: Not sure if widget or figment of Paul's imagination
« Reply #10 on: August 11, 2015, 06:23:57 PM »
Some nice ideas, thanks guys! I'll try it myself as soon as I finish many other things  :bonk

@Paul, I've had some good laughs with your video of the burglar. Thanks!  :biglaugh

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Not sure if widget or figment of Paul's imagination
« Reply #11 on: August 19, 2015, 12:20:55 PM »
For those who don't want to have to start from scratch, but who would like to implement a web server solution (as Dave demonstrated above), I am attaching an example here that you're welcome to adapt. It should be mobile-friendly.

Basically, you need to enable the TCP plugin, and within its settings enable the "simple web server".
  • Place the attached vox_remote.html file in your vc folder\plugins\TCP\html folder.
  • On your local network, you should then be able to navigate to this page from any web browser (only if VoxCommando is running!).
The URL will be
Code: [Select]
http://your VC machine's IP address:port number/html/vox_remote.html... or if your computers have names on the LAN, you can use that instead of the IP address usually. e.g.
Code: [Select]
http://HTPC/html/vox_remote.html
This interface is not as elaborate as Dave's, but it includes:

1. Buttons for turning VC to on/off/standby mode.
2. Two volume slider bars. Slide the handle to adjust the volume.

The way I've chosen to implement it, if you click on the slider bar's label, you can also get feedback about what the actual volume level is (e.g., if it is adjusted by some other means and you want to check what it is). The slider handle will also move to the corresponding position. This uses a function I've called 'getVCdata()'. This could actually be used to get any kind of info from VC -- if you want to know whether a light is on somewhere, or any VC action that returns a result, you can use this function if you like.

3. Two toggle switches.

For 2 & 3, I've chosen to trigger events (see screenshot) in VC so that on the VC end I can have more flexibility about what these switches actually do. You could instead have the switches in the UI execute specific actions or whatever you like.

4. A combobox (dropdown menu). This is the easiest thing to adapt if you're more of a novice with web stuff. Each menu option executes a VC.Tellvox action.

This can be used to execute any command in your configuration. If you already have a command like "Who's at the front door?", you can just enter that phrase in the html file where indicated and Bob's your uncle.

5. A text feedback area on the screen to provide some verification that your commands are being sent; I've also used it to display the data I'm getting back from VC (in my case, volume levels).

[NOTE: An updated version of this solution can be found here: http://voxcommando.com/forum/index.php?topic=2321.msg20213#msg20213]

« Last Edit: November 27, 2015, 05:18:15 PM by nime5ter »
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)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Not sure if widget or figment of Paul's imagination
« Reply #12 on: August 19, 2015, 12:21:29 PM »
**Here is a sample VC command group that uses the events from my vox_remote interface:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.7-->
<commandGroup open="True" name="VC automator web server" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="339" name="switch" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="I made sure that the element IDs for relevant tags in my html match the device names stored in my Vera Device map. So I can use {1} in my first action. {2} is 'on' or 'off' (values 0 or 1 in my html).">
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{3}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>{3}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>VC.Automator.Switch</event>
  </command>
  <command id="340" name="volume levels" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)==(B)</ifType>
      <ifParams>{1}&amp;&amp;master volume level</ifParams>
      <then>
        <action>
          <cmdType>Sound.SetVol</cmdType>
          <params>
            <param>{2}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>{3}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>{3}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>VC.StopMacro</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>MM.GetVolume</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>{1}&amp;&amp;MediaMonkey volume level</ifParams>
      <then>
        <action>
          <cmdType>MM.SetVolume</cmdType>
          <params>
            <param>{2}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>{3}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>Media Monkey is not responding.</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <event>VC.Automator.Levels</event>
  </command>
</commandGroup>
« Last Edit: August 21, 2015, 06:26:05 PM by nime5ter »
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)

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: Not sure if widget or figment of Paul's imagination
« Reply #13 on: August 19, 2015, 12:57:25 PM »
@nime5ter
 
looks awesome, cant wait to start playing around with it  :clap ::banana , doesn't look like your vc_remote.html is attached to your post, also I noticed that on the tcp address it is missing the port that you select when setting up the TCP Server

Code: [Select]
http://your VC machine's IP address:yourport/html/vc_remote.html
I've been doing some digging and it looks like there may be a method to get info from VC to Tasker using the TCP server
but with tasker's weaker regex engine (in my opinion) and the way it process the matches,
doesn't seem to be the best option, but I will upload what I found later on so others can use it, as of now I know for sure I can scrape the server to get info I'm still doing some testing to see if I can use the server to have tasker do something based on the server being updated

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Not sure if widget or figment of Paul's imagination
« Reply #14 on: August 19, 2015, 02:09:08 PM »
Thanks PegLegTV. Good point. If your VC web server is configured to use a port other than 80, you'll need to include the port number. (Mine is 80 so I didn't think of it.)

I was inspired by your solution above, actually -- initially, because I was thinking of ways to address the problem you were having with getting feedback from VC.

The file vox_remote.html is the first attachment on the first post. It's easy to overlook it because of the screenshot attachments.
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)