Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - monkee

Pages: [1] 2 3
1
Hi, sorry, I was doing more experimentation and figured it out!  Thank you for the reply.

I am, indeed, using Client.Connect.  I needed to increase the delay when using Client.Write, maybe it was closing the connection before I got the response. 

However, my response is followed by \x00\x00\x00 about 20 times, which I do not get in a normal telnet response.  Is there a way to stop that from coming through or do I have to regex the result?  I have to anyway but hopefully there is a better way to get rid of the \x00\'s or not see them at all?

2
Hi, I'm having trouble getting VC to recognize the response from my receiver using the TCP plugin.  I can successfully send it "(VOL U)" command and the volume goes up.  Then my receiver spits out the current volume, I can see the info in Wireshark, but I cannot see it in VC and my lastresult stays empty.  What can I try?  I'd like to use any incoming volume changes to trigger events. 

Thanks so much!

3
I tried this a few years back and wasn't able to get it to work.

you could look into Join by joaoapps and tasker, I'm not sure how well it will work as a remote structure though.

Join has a rest Api so you can use it with VC, I use it for notifications, and tasker actions.

your work flow might be something like this:

VC (Join API(Tasker actions)) > Tasker (on Shield TV) > Tasker send ADB cmd.

Join and Tasker are paid apps, I paid $3.00 USD each I believe.


Join Actions group:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.3.0.3-->
<commandGroup open="False" name="Join - Notifications" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="746" name="Join Basic Notification" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="{1}= Device Name&#38;#38;#xD;&#38;#38;#xA;{2}=Title&#38;#38;#xD;&#38;#38;#xA;{3}=Text&#38;#38;#xD;&#38;#38;#xA;{4}=Icon&#38;#38;#xD;&#38;#38;#xA;{5}=Notification Bar Icon">
    <action>
      <cmdType>Tools.Encode.URI</cmdType>
      <params>
        <param>https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?deviceNames={1}&amp;text={3}&amp;title={2}&amp;icon={M:JoinNotification.{4}}&amp;smallicon={M:JoinNotification.{4}Icon}&amp;apikey={M:apiKeys.Join}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Join.Notification</event>
  </command>
  <command id="809" name="Join Tasker Command" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="{1}= Device Name&#38;#38;#xD;&#38;#38;#xA;{2}= Tasker command (text)">
    <action>
      <cmdType>Tools.Encode.URI</cmdType>
      <params>
        <param>https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?deviceNames={1}&amp;text={2}&amp;apikey={M:apiKeys.Join}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Join.Tasker</event>
  </command>
  <command id="810" name="Join Tasker (all Androids)" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="{1}= Tasker command">
    <action>
      <cmdType>Tools.Encode.URI</cmdType>
      <params>
        <param>https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?deviceId=group.android&amp;text={1}&amp;apikey={M:apiKeys.Join}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Join.Tasker.Group</event>
  </command>
  <command id="817" name="Join android App" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="{1}= Device Name&#38;#38;#xD;&#38;#38;#xA;{2}= App Name">
    <action>
      <cmdType>Tools.Encode.URI</cmdType>
      <params>
        <param>https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?deviceNames={1}&amp;app={2}&amp;apikey={M:apiKeys.Join}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Join.Android.App</event>
  </command>
  <command id="846" name="Join Set Device Clipboard" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="{1} Device name&#38;#38;#xD;&#38;#38;#xA;{2} Tasker &quot;Event&quot;">
    <action>
      <cmdType>Tools.Encode.URI</cmdType>
      <params>
        <param>https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?deviceNames={1}&amp;clipboard={2}&amp;apikey={M:apiKeys.Join}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Join.Clipboard</event>
  </command>
  <command id="812" name="Join Say" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="{1}= Device Name&#38;#38;#xD;&#38;#38;#xA;{2}= What to say">
    <action>
      <cmdType>Tools.Encode.URI</cmdType>
      <params>
        <param>https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?deviceNames={1}&amp;say={2}&amp;apikey={M:apiKeys.Join}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Join.Say</event>
  </command>
  <command id="789" name="Join set volume Android Devices" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?deviceId=group.android&amp;mediaVolume=100&amp;ringVolume=100&amp;alarmVolume=100&amp;apikey={M:apiKeys.Join}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
  <command id="844" name="Join Link" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="NOTIFICATION&#38;#38;#xD;&#38;#38;#xA;{1}=Device Name&#38;#38;#xD;&#38;#38;#xA;{2}=Title&#38;#38;#xD;&#38;#38;#xA;{3}=Text&#38;#38;#xD;&#38;#38;#xA;{4}=Icon&#38;#38;#xD;&#38;#38;#xA;{5}=url">
    <action>
      <cmdType>Tools.Encode.URI</cmdType>
      <params>
        <param>https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?deviceNames={1}&amp;text={3}&amp;title={2}&amp;url={5}&amp;dismissOnTouch=true&amp;icon={M:JoinNotification.{4}}&amp;smallicon={M:JoinNotification.{4}Icon}&amp;apikey={M:apiKeys.Join}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Join.Link</event>
  </command>
</commandGroup>

there are multpile commands in the group above they will all require your Join API key,

replace {M:apiKeys.Join} with your API Key

Thanks so much for the additional options, I'll let you know if I get it working, one way or another!

4
I don't know much about sending ADB commands or the protocols involved but I  doubt it is something that you cando  directly from VC unless there is a python script that works in IronPython.

But if you are able to send commands using a command prompt then I woud try to initiate them from VC the way we do other command prompt actions.

Thanks James, if VC can't do it directly from a plugin, I was thinking I would interact with the app I linked to using batch files, triggered by VC, but it sounds like I can skip the batch files and interact with the command prompt directly from VC.  I'll have to look into that when I'm ready to give this a shot.  Thank you!

5
Hi, I'd like to use VC to control my Android device using ADB over my home network.  This should be possible but is broadcasting ADB commands over the network something Voxcommando can do?  Maybe with a plugin?

I'm using a Shield TV and want to control Play/Pause/rewind etc via voice.  I know how to do it, including using this handy app: Minimal ADB and Fastboot, (more info here and here) to send the ADB over the network and without rooting the android device too, but it would be much better to do it straight from VC. 

Thanks in advance!
Kevin

6
Thanks!  I'll see what I can do with EG and hit you up later if I can't :)

7
I think I can do this with eventghost but would like to do it in VC if I can.

Thanks in advance!!

8
RegEx (Regular Expressions) / Problem scraping https page
« on: June 27, 2019, 03:02:53 PM »
Hi, this used to be an intermittent problem but now the scrape fails every time. 

I can access the page in my browser, no problem, but when setting the RegEx Source to the following URL I get the below error.

https://api.coinmarketcap.com/v1/ticker/litecoin/

System.Net.WebException: The request was aborted.  Could not create SSL/TLS secure channel.
  at System.Net.HttpWebRequest.GetResponse()
  at eval_.eval_(String A_0)

How can I fix this?

Thanks!

9
Feature Requests / blinking taskbar icon
« on: May 14, 2017, 10:32:58 PM »
I would find it very useful if the VC taskbar icon could blink when a command is successfully recognized/executed.  I have one instance of VC running on my laptop that sends some commands to my main instance on my HTPC.  I'd love to not have to open up VC all the time to confirm that my command was recognized.  I simple blink of the icon would solve this.  Any chance of adding something like that??

10
Of course it helps if you know what an integer is.  An integer is a whole number without any decimal places so that is definitely not what you want because you would end up with 0.

Basically Python is using scientific notation and you want to suppress scientific notation.  It's a Python formatting thing.

The solution is just to put '%f' %  ( ... ) around your number.

So in your example the parameter code would be:
Code: [Select]
result='%f' %  (0.012345-0.012344)
I found the answer here: http://stackoverflow.com/questions/658763/how-do-i-suppress-scientific-notation-in-python

True, true, haha.  I was definitely not searching using the correct terminology.  Thank you SO much.  I hadn't even come across the "f" thing in anything I'd read so I was far from solving this myself.  Thank you again, it works!!

11
This is a Python question so you'll find a Python answer. Search Google for Python convert to integer.

For example: https://www.digitalocean.com/community/tutorials/how-to-convert-data-types-in-python-3

If you want us to give you a more specific answer we need to see all your code that sets the variables etc.

Thanks and yes I'd spent at least 5 hours over the last few days on at least a dozen python websites trying to figure out how to make this work before posting here.  While I certainly have a better understanding of why this happens, I still have not found a solution that works.  I very much appreciate your time and don't post on sites if I haven't nearly exhausted my other options first.  I love figuring things like this out but sometimes you need to hit that "hint" button to progress :)

I figured out that the variables don't matter.  I actually still get the same error using numbers directly, counter to what I thought in my first post.  I think at this point it's probably a syntax error.  I've tried inserting "int" every conceivable way, as well as at least a hundred variations of this "simple" subtraction line. I'm sure it's something basic and fully prepared to *facepalm* when I see the correct way to do it. 

Thank you again very much and sample code is below.  Please show me how to format it to get the correct answer 0.000001 :)

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.2.9-->
<command id="423" name="newcommandname" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>result=0.012345-0.012344</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{lastresult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

12
Ok, So I'm getting crazy answers to simple math I'm trying to do in Python.  After researching, it seems python does math in a strange way that noobs like myself find confusing (floating point).  I use python math in several VC commands so it's strange I'm just running into this problem for the first time now. 

The PY.ExecString action that is giving me trouble is this one:

Code: [Select]
result=({Var.var1}-{var.var2})
where both var 1 and 2 are decimals (ie. 0.123456)

When I replace them with the actual numbers instead of variables, the math works fine so for some reason the variables must be in float format instead of integers, I guess? 

Anyway, how do I tell that PYExecString to force the result to be an integer and not super long floating point numbers? 

I've spent hours on this so I hope someone can help!  Thank you!

13
Thanks very much.  The new line using OSD.AddText is working like a charm.  Sorry I didn't figure that out myself.  I did look!

I REALLY wish I could independently control the lines' text color, I'd be done with this project already but the new line will do until I figure out a better option. I'll check out RoboBrowser.  This is the first I've heard of it and it looks interesting.  Since you seem to have to create a local HTML file, would I still be able to scrape from an API, regex, do PY math etc. within VC before it is shown on the OSD?  If it's possible I'll work on figuring it out :)

I was wondering how the OSD did what it did without stealing focus so that's pretty interesting.  Thanks foe explaining it.  I'm not too worried about RoboBrowser stealing focus, I have pretty robust focus reclaiming macros so giving focus back to whatever had it prior to RoboBrowser popping up shouldn't be too hard.

Thanks again!


14
General / Re: the "Supporters" group
« on: May 10, 2017, 11:51:07 PM »
me too please!  thanks, one of the best software purchases i have made and tbh, more fun to tinker with than any game :)

15
Hi, is it possible to have two instances of OSD.ShowText appear at the same time?  In my experiments, I couldn't do so.  Also, if that is possible, can I set a different text color for each instance??  I need to do both of these things for my latest project :)

If neither of the above are possible, can I at least make the OSD.DisplayText show a second line? 
Code: [Select]
<p>,<br> do not work.

Thanks in advance!!

*edit* also is it possible to move the text display horizontally?  I can move it vertically but not horizontally.

Pages: [1] 2 3