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 - PegLegTV

Pages: 1 2 [3] 4 5 ... 34
31
as far as I can remember I have three commands that needed changed for Kodi 18 the two I posted for Select and Back, and then the new method for handling playlist with Kodi 18

this is where I found the fix for loading playlist in kodi 18 (and possibly moving forward)
https://forum.kodi.tv/showthread.php?tid=315249&pid=2694920#pid2694920
from what I gathered this has to be done as the new video player has "broken" the json api, but I'm not 100% sure on that


add / replace the playlist name for payload one
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.5-->
<command id="976" name="Play Playlist (Kodi 18)" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Playlist.Clear</param>
      <param>"playlistid": 1</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw/</cmdType>
    <params>
      <param>Playlist.Add</param>
      <param>"playlistid": 1, "item": {"recursive":true, "directory":"special://profile/playlists/video/{1}.xsp"}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>player.open</param>
      <param>"item":{"playlistid":1,"position":0}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

at some point (if I can find the time ;)) I can go through the stock kodi build for VC and the commands that I have and send you guys an updated list. as I'm sure that I have some commands and actions that are not included in the main build and I might have a few that aren't posted in the forum either

32
No problem, at some point I'll need to post the new method needed for loading playlist as Kodi changed how they are handled in Kodi 18

33
When I updated to Kodi 18.0 I had to change the select and back command (I must have forgotten to post them a while back), I use these commands for kodi on windows and android.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.5-->
<commandGroup open="True" name="Kodi 18 updated commands" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="807" name="Select" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>Input.ExecuteAction</param>
        <param>"action":"select"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
  <command id="808" name="Back" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>Input.ExecuteAction</param>
        <param>"action":"back"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
</commandGroup>

34
Integration Ideas / Re: Home Theater using Beam and Beam Ray
« on: May 28, 2019, 02:15:40 AM »
Thanks guys, I finally had some time to update the first post with more information, just in-case someone wanted more information on how everything was done.

35
Integration Ideas / Home Theater using Beam and Beam Ray
« on: May 24, 2019, 01:47:46 PM »
I've spent the last couple of weeks building a giant floating shelf for my motorized 110" projector screen that we now use in our living room, this video is a demo of our new Theater Experience using Kodi, Voxcommando, Beam, and Beam ray. at the end of the video there are some photos of the shelf during the building process, it was a tight fit. the shelf is 107 inches long, 9.25 inches deep, and 7 inches tall.





Homegear Projector Screen

Optoma HD142X Projector

Beam

Beam "Ray"


the shelf does amplify the motor sound but for me it is worth it, I use the beam to control my projector screen, the screen uses 433MHz, American standard is usually 315MHz so if you are going to control it with a beam make sure your beam has the 433MHz chip. in the photos at the end of the video you can see that I mounted the wall control inside the shelf, I used double sided tape to hold it in place, and then used Velcro zip ties to hold the wires in place so they won't interfere with the screen, I added an outlet on the wall that is concealed inside the shelf so no cords are visible, because of this I added a hidden door on that end of the shelf to be safe.



I control the projector with the Beam "Ray" that I painted black to blend in, I had to modify my Beam "Ray" because my projector had a small IR receiving angle and I didn't have a good spot to put the Beam "Ray", so I modified the Beam "Ray" by de-soldering one of the IR emitters and soldered an emitter cable in its place, then used hot glue to fill the whole so the wire was less likely to be damaged and used double sided tape to mount the Beam "Ray" on top of my projector.



Thanks Jitterjames, nime5ter and kalle for the awesome software and hardware you guys rock




36
Other Plugins / Re: Weather Underground - WUnder Plugin
« on: April 05, 2019, 11:24:45 AM »
I would think that 50 calls a day would be more then adequate for the every day user.

I only request the weather maybe three times a day on average, morning wake up call, powering on my living room system and then asking the weather later In the day if I didn't catch the other two.

The 50 calls per day could be stretched if you store some of the information in a map table (High, Low, Sunrise, Sunset...) and use that through out the day, that's how I'm using IFttt right now and it works well.

I'd be willing to help test the plugin when needed

37
One on one support / Re: python integer sorting
« on: March 15, 2019, 12:52:20 PM »
That did it! You are awesome  8) :yay


Quote
By the way it's fine to use {CR} but I think you only need one per line
I was using {CR}{CR} instead of {CR} because one of my other python strings had the double line break so I thought it was needed but you where right only one line break ({CR}) is needed


Quote
also you should be able to use multiple PY.ExecString actions in a macro if you want. The Python state is not reset between calls. Even between multiple voice commands variables and other things like function definitions will persist until VoxCommando is restarted.

your right again, when I was testing I wasn't having any luck breaking them up so I though it had to all be with in one action, I was able to break it into 3 actions and it worked


here is a group of commands as examples for others

Replace     1, 3, 4, 2, 5       with         your numbers    that you want sorted

Python Numbers Sorting Examples
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.5-->
<commandGroup open="True" name="Python Number sorting Examples" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="916" name="Sorting for Lowest Number" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>numbers = [1, 3, 4, 2, 5] </param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>numbers.sort()</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>result=numbers[0]</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
  <command id="918" name="Compressed Sorting for Lowest Number" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>numbers = [1, 3, 4, 2, 5] {CR}numbers.sort(){CR}result=numbers[0]</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
  <command id="917" name="Sorting for Highest number" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>numbers = [1, 3, 4, 2, 5] </param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>numbers.sort(reverse = True)</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>result=numbers[0]</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
  <command id="950" name="Compressed Sorting for Highest number" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>numbers = [1, 3, 4, 2, 5] {CR}numbers.sort(reverse = True){CR}result=numbers[0]</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
</commandGroup>

38
One on one support / Re: python integer sorting
« on: March 14, 2019, 01:52:43 PM »
Thank you for the link, I appreciate the response especially since your not at a windows pc, I know that helping with something like this can be frustrating with out the resources in front of you (the master  ;)) and some one who doesn't know python (the student  :bonk)

warning
I don't know much about python at all, so I'm reaching trying to even do something like this

I did some testing with the link you shared.

if I run the action below I'm able to get the sorted list to show up in the py plugin log, but I'm not sure how to get that information in my VC Command
Code: [Select]
PY.ExecString&&numbers = [1, 3, 4, 2] {CR}{CR}numbers.sort(){CR}{CR}print(numbers)
I've tried using PY.GetVar and PY.GetList but they return LastResult as "IronPython.Runtime.List"
Code: [Select]
PY.GetVar&&numbers        and        PY.GetList&&numbers

Copy of the command I've tested:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.5-->
<command id="1164" name="New python sorting Test" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="IronPython.Runtime.List">
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>result=[1, 3, 4, 2] {CR}{CR}result.sort(){CR}{CR}print(result)</param>
    </params>
    <cmdRepeat>0</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>result=numbers = [1, 3, 4, 2] {CR}{CR}numbers.sort(){CR}{CR}print(numbers)</param>
    </params>
    <cmdRepeat>0</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>numbers = [1, 3, 4, 2] {CR}{CR}numbers.sort(){CR}{CR}print(numbers)</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.GetVar</cmdType>
    <params>
      <param>numbers</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>System.SetClipboardText</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>What's it like out there?</phrase>
</command>


It's not a big deal if I need to wait for your help, the command that needs this is for naming youtube videos as episodes so I can view them in Kodi later on.



also I have a py file in my python folder that I use for CPU load (made either by you or nime5ter I believe), I'm not sure if that would be helpful or not but thought it was worth noting


39
One on one support / python integer sorting
« on: March 14, 2019, 02:22:23 AM »
UPDATE:

Thanks to Jitterjames impressive help, here are some examples of sorting numbers with python.

here is a group of commands as examples for others

Replace     1, 3, 4, 2, 5       with         your numbers    that you want sorted

Python Numbers Sorting Examples
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.5-->
<commandGroup open="True" name="Python Number sorting Examples" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="916" name="Sorting for Lowest Number" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>numbers = [1, 3, 4, 2, 5] </param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>numbers.sort()</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>result=numbers[0]</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
  <command id="918" name="Compressed Sorting for Lowest Number" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>numbers = [1, 3, 4, 2, 5] {CR}numbers.sort(){CR}result=numbers[0]</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
  <command id="917" name="Sorting for Highest number" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>numbers = [1, 3, 4, 2, 5] </param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>numbers.sort(reverse = True)</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>result=numbers[0]</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
  <command id="950" name="Compressed Sorting for Highest number" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>numbers = [1, 3, 4, 2, 5] {CR}numbers.sort(reverse = True){CR}result=numbers[0]</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
</commandGroup>

===================================================================================================
Original Post:

I gotta say I thought this would be a simple task  :biglaugh  :bonk

I'm trying to sort a list of integers using python

list:
5, 3, 9, 4, 2, 6, 8, 7, 11, 10, 1

wanting:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11

I thought I would be able to do it with python but I haven't had much luck, here's some of what I have tried

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.5-->
<command id="847" name="Python sorting" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Results.SetLastResult</cmdType>
    <params>
      <param>5, 3, 9, 4, 2, 6, 8, 7, 11, 10, 1</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>result=sorted={lastResult}</param>
    </params>
    <cmdRepeat>0</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>result=sorted{lastResult}</param>
    </params>
    <cmdRepeat>0</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>result=sorted({lastResult})</param>
    </params>
    <cmdRepeat>0</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>result=sort({lastResult})</param>
    </params>
    <cmdRepeat>0</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>result=sort{lastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

I'm needing to sort the list numerically, so I can get the highest number in the list for naming custom Youtube episodes, any help would be great  ::club  ;)

40
Bug Reports / Re: Weatherunderground.com plugin not working
« on: March 09, 2019, 05:47:06 PM »
While I was waiting for my API key to get activated I decided to test Weather underground through IFTTT, I had it trigger an event with some information and it looks like IFTTT still has accesses to Weather undergrounds API, so there may be a way for non "Super users" to get a daily event with sunrise, sunset, high and low temps, then set them to a map table to be used as they want.

they can get current weather and some other information but the event can only be triggered at a specific time, so you wouldn't be able request current weather, you would have to set the high and low for the day to a map or variable to be able to request it,


both commands you posted work well, I've been looking through the information in the response and it looks like it has a lot of the information that I'm after which is definitely good, but it looks like they aren't broken down by days (24 hour) they are broken down into three hour increments, so your second command gets the high temp of the current three hour window, it could be used for current weather, but determining today's high and low would be a little trickier.

I'm thinking it would be easiest to have IFTTT get:
Sunrise
Sunset
Today's High
Today's Low

and use openweathermap.org to get current conditions

as long as weather underground doesn't stop Ifttt from using their API, Then I think this will work



41
Bug Reports / Re: Weatherunderground.com plugin not working
« on: March 09, 2019, 11:11:49 AM »
Nice work, your awesome  8)! Going above and beyond as always, I'll test them out today

42
Bug Reports / Re: Weatherunderground.com plugin not working
« on: March 08, 2019, 12:12:40 PM »
Thanks for the reply, I completely understand, to bad they couldn't offer a free version with maximum quires like some other API's offer but business is business.

we mainly use the weather plugin to tell us the weather each morning when we wake up and then sunrise and sunset events. I'll have to do some digging and see what I can find.

43
Bug Reports / Weatherunderground.com plugin not working
« on: March 06, 2019, 06:00:39 PM »
Weatherunderground.com plugin isn't working, but site is up and running. I've tested with 2.241 and 2.245b and getting the same errors



I've tested it on two PC's running windows 10

anyone else having the same problem?

44
Integration Ideas / Re: Google Home / assistant and Voxcommando!
« on: February 22, 2019, 01:27:43 PM »
No problem at all, we use google minis with VC all the time now the wife and kids love the simplicity of it,

I didn't think to mention
Quote
Port forwarding should be very easy to set up, assuming your router allows UPNP (which I think most do) you can just tick a box in the TCP plugin settings in VoxCommando to set up port forwarding automatically.
just out of habit I always port forward manually, so thanks for pointing that out  :)

45
Integration Ideas / Google Home / assistant and Voxcommando!
« on: February 20, 2019, 01:46:58 PM »
UPDATE: This no longer works, Google disabled most 3rd party integration, and Ifttt can no longer use variables with googel assistant


Warning: To make this work, you need to enable port forwarding on your router. Depending on your security setting this could be a safety risk! At least everyone who knows your IP/Ddns and port will have access to VC! 




In this video I demo using Google home / google assistant with Voxcommando, and show how to setup Ifttt.

you will need:
Google Home device / google assistant
Voxcommando
Ifttt.com account
Ddns service.


Ddns and Port forwarding:
setup your Ddns before creating your Ifttt applet, and make sure that you set it to update on a regular interval, I have mine set to every 5 minutes, and have been using this method for over a year with no issues.


after you have your Ddns setup your next step will be to port forward your TCP Simple web server. There are to many different routers for me to cover an accurate how to, google is your friend for this, search "how to port forward router name and model number" and you should be able to find the instructions for your router


Ifttt setup:
Illegal character for Ifttt applet:
Code: [Select]
̢

Webhooks example:
Code: [Select]
http://YOUR.DDNS.ADDRESS:1234/api/android.phrases&&{{TextField}}*the port number used in webhooks is your external port number used when port forwarding your TCP simple webserver


If you have any commands that aren't working for you, then you need to check the phrases that are being transcribed by google assistant and make the changes to your VC phrases, I have one that I use in the morning "I'm Awake" and after it is transcribed then passes through Ifttt it would be "I ' m Awake" so I just added "I ' m" to my phrases as a choice and the problem was solved.

Pages: 1 2 [3] 4 5 ... 34