Author Topic: Using the Scrape action to control web-enabled device  (Read 4263 times)

0 Members and 1 Guest are viewing this topic.

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Using the Scrape action to control web-enabled device
« on: July 10, 2015, 01:13:01 PM »
Hey James and Kalle or any others savvy with vox, how would I get this command to run using the Launch.CMD in vox so it launches a hidden window and runs it and then closes but I think that happens automatically after running commands right?

I need to have this run when added as the parameter for Launch.CMD but placing just the full link below doesn't make it run so is there something I am missing out?

http://190.160.0.12:7979/?cmd=%7B%22api_id%22:1004,%22command%22:%22send_code%22,%22mac%22:%22b4:43:0d:30:a7:ee%22,%22data%22:%2226008c009494133713371237131213121312121312131237133713371212131213121312121312371337131213371213121213121312131213121237131213371238123713371300060395931337133712371312131213121312121312371337123812121312131213121312123713371312133712131212131213121312121313361312133713371237133713000d05000000000000000000000000%22%7D

Cheers.
Sim  8)
Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Using the Scrape action to control web-enabled device
« Reply #1 on: July 10, 2015, 03:38:43 PM »
You can't use Launch.Cmd with an URL.

 Launch is for running programs. I think you want to use the Scrape action.

Launch.openurl can be used but then you are opening a browser first and there is no option to hide it.
« Last Edit: July 10, 2015, 04:09:18 PM by nime5ter »

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Re: Using the Scrape action to control web-enabled device
« Reply #2 on: July 10, 2015, 04:58:00 PM »
Cheers james, I had to ask since part of the link had cmd in and thought it was for the command prompt, there is a url I can use that does the action but loading a web page compared to a command would be quicker and would help when the net is down.

I did use Robo Browser for opening up the url but each time I use a browser it runs the command for me by opening a url but it is sending some form of Json file when running the command and so keeps asking me to open it or save it.

I just want the web link to open for say 4 seconds and then close the robo browser window or I will end up with loads of different windows open.

Is there someway for vox to process the .json file that keeps getting downloaded each time I load the url?

 8)
Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Using the Scrape action to control web-enabled device
« Reply #3 on: July 10, 2015, 06:01:21 PM »
I'm not really following you at all.

Maybe it would help if we knew what you were trying to do.  I see that you have some kind of URL you want to use somehow.  That's about all I know.  What is this URL for? What it is supposed to do.  How is it normally used?

Is there some reason that you cannot use the Scrape action as suggested?

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Re: Using the Scrape action to control web-enabled device
« Reply #4 on: July 11, 2015, 11:49:40 PM »
Hi James, I have figured out a way to control one of my electronic devices by loading a url with a command for each action, when the link has loaded and the command has ran which is instant I am getting a .json file (its simply a confirmation message of success) attempt to download which I need to either have auto save and download so its off the screen or just open and close (since it has ran the command by the time it appears), other versions of Internet Explorer allowed an option to click and save downloads automatically but latest IE doesn't and I am getting the same prompt with chrome.

I am using a windows 8.1 PC and I have gone through the active x controls and internet security options but can't find a setting that lets the file just save and download. I did try disabling downloads on trusted sites for the url but then I get a prompt telling me downloads are disabled each time it trys to download the .json file, so I just end up replacing one window with another.

I've been searching for 2 days for a solution to it and the closest I have got is this article which basically says create a registry file to just accept the file type (.json in my case from my own trusted domain) automatically but it might as well be in another language to me since I am not a coder.

Surely there has to be an easier way to just get that prompt off the screen. I am using vox to load the command urls through a payload list, but each one gets that prompt I am trying to remove and asks if I want to save or open the .json file.


http://9to5it.com/internet-explorer-disable-do-you-want-to-open-or-save-this-file-prompt/

If you can give any suggestions for disabling the 'Do you want to open or save this file' box they are appreciated.  8)

Attached is an example of the .json file I get prompted to download after each url has loaded and ran a command.
« Last Edit: July 12, 2015, 12:01:14 AM by Simeon Tuitt »
Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Re: Using the Scrape action to control web-enabled device
« Reply #5 on: July 12, 2015, 03:11:59 AM »
How about waiting few seconds then send alt+s keys with one of the key emulation plug-ins
When Voice command gets tough, use hand gestures

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Using the Scrape action to control web-enabled device
« Reply #6 on: July 12, 2015, 08:07:50 AM »
@Simeon -- James asked whether you've tried using the standard Scrape action that we all use in order to control http-based home automation, but we still don't have an answer to that.

Have you tried to use that action yet?
http://voxcommando.com/mediawiki/index.php?title=Actions#Scrape

If it is not doing what you want, can you tell us what is happening? Perhaps post a log or roll over the error that you see in the history window to see what it says and report that here.
« Last Edit: July 12, 2015, 08:22:57 AM 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)

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Re: Using the Scrape action to control web-enabled device
« Reply #7 on: July 12, 2015, 10:40:22 AM »
Hi @nime5ter and James, just a quick heads up, the scrape action is working for me, so no more annoying download prompts, thanks for the help.

Sim  8)
Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.