Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

terRemote - Android remote app for EventGhost

Questions and comments specific to a particular plugin should go here.
mpg732
Experienced User
Posts: 92
Joined: Mon Aug 05, 2013 6:59 pm

Re: terRemote - Android remote app for EventGhost

Post by mpg732 »

Thanks for the reply. I got just about every thing working last night, including the progress slider. I used a min value of 0 and a max value of 1 and set the increments to .1. Works very well. I did not go to 100 because well the honest reason I was having problems with dividing two variables and then trying to multiply that by 100 to give me a % in the python script. I know it had some thing to do with integers but kinda gave up on trying to multiply by 100. LOL

As for running the script every 5 to 10 seconds, I have not yet purchased Tasker. I did try using the Timer in terRemoteto send out a command to EG to run the script . I started the timer when I navigated to the DirecTV pages and stopped the Timer when I left the pages. . It did work pretty well and did not seem to tie up terRemote to much. I don't think that this is the best way to do it. LOL I will have to try Tasker.

I do have a few questions.

Is there a way to import and or display graphics with variables? What I would like to do is to display the TV channel LOGO of what I am currently watching.

In the return data, the line pertaining to date may come back one of two ways.
First being this
"date": "2008",
the other way would be
"date": "20080112",

I have no control on which one will be in the return data, it depends on the shows data.

Using the python script of,

eg.plugins.NetworkSender2.plugin.Send("Dir.date", [unicode(date)])

will grab every thing. I do not want every thing, just the year. That will always be the first 4 digits. Can you help me with the script of just pulling out the first 4 digits from the returned data?
Javier
Experienced User
Posts: 73
Joined: Sun Dec 01, 2013 3:45 pm

Re: terRemote - Android remote app for EventGhost

Post by Javier »

You can change the icon of a widget with a macro in terRemote.

In tasker you can update a html file with a variable containing the name of the image which you would like to display in a terRemote webview (using URL file:storage/sdcard0/NAME_OF_THE_FILE_.html). Also you can change the date with the "Variable selection" action (form=1,Lenght=4)
Javier
Experienced User
Posts: 73
Joined: Sun Dec 01, 2013 3:45 pm

Re: terRemote - Android remote app for EventGhost

Post by Javier »

Javier wrote: Second terRemote does not show events in the log when (1)the screen turns off with app running, (2) the screen turns on and app is running, (3)you leave the app, or (4)you re-enter the app without automaticly changing the current layout by going to the default home layout, So some of the tasks may continue to run until they are stopped by the feedback from the direct TV values, you change layouts, or they hit a maximum value defined to stop a loop.
Chris,
Would it be possible to add the above events to terRemote?

This would ensure any widgets/layouts that requests data will be up to date.

Thanks
mpg732
Experienced User
Posts: 92
Joined: Mon Aug 05, 2013 6:59 pm

Re: terRemote - Android remote app for EventGhost

Post by mpg732 »

Javier wrote:You can change the icon of a widget with a macro in terRemote.

In tasker you can update a html file with a variable containing the name of the image which you would like to display in a terRemote webview (using URL file:storage/sdcard0/NAME_OF_THE_FILE_.html). Also you can change the date with the "Variable selection" action (form=1,Lenght=4)
Don't understand how to use "Variable selection" action (form=1,Lenght=4) how do I use that with the variable date?
mpg732
Experienced User
Posts: 92
Joined: Mon Aug 05, 2013 6:59 pm

Re: terRemote - Android remote app for EventGhost

Post by mpg732 »

Never mind I used

date = date[:4]
mpg732
Experienced User
Posts: 92
Joined: Mon Aug 05, 2013 6:59 pm

Re: terRemote - Android remote app for EventGhost

Post by mpg732 »

Javier wrote:You can change the icon of a widget with a macro in terRemote.

In tasker you can update a html file with a variable containing the name of the image which you would like to display in a terRemote webview (using URL file:storage/sdcard0/NAME_OF_THE_FILE_.html). Also you can change the date with the "Variable selection" action (form=1,Lenght=4)
So I can manually load the icons, with file:mnt/sdcard/download/Channel/file.jpg.

So can I update file name with a variable directly with in terRemote?

Example is some thing like this,

file:mnt/sdcard/download/Channel/"variable".jpg

just not sure on how
Javier
Experienced User
Posts: 73
Joined: Sun Dec 01, 2013 3:45 pm

Re: terRemote - Android remote app for EventGhost

Post by Javier »

The link to the file on the SD card was for use in an Html file you could create with tasker. Sorry for any confusion

In terRemote I was sugesting you have the variable come in as a payload in an event, then have a macro with the Actions>Type=Internal Command=Invoke Event, Name=${payload.0} (if this is the payload used). Then it will create a new event with the name of the payload. You can then setup a macro for every event using Actions>Type=Widget Data, Widget=NAME_OF_WIDGET_YOU_WANT_TO_CHANGE, Set=Checked, Change=Icon, Icon=THE_ICON_YOU_WANT.
(not sure if there is another way to do this)

It is a lot of work. That is why I suggested using tasker. In tasker you could write a simple html file with an img tag and just change the name of the img file with a tasker variable (the same name as your image file) and have terremote just load the URL in a terRemote webview.

Javier
Javier
Experienced User
Posts: 73
Joined: Sun Dec 01, 2013 3:45 pm

Re: terRemote - Android remote app for EventGhost

Post by Javier »

@mpg732

I just noticed you can also place the variable from a payload In the URL of a terRemote macro
E.g. URL=file:storage/sdcard0/${payload.0}.jpeg but you will have to format the IMG first and change the name to match the payload.
mpg732
Experienced User
Posts: 92
Joined: Mon Aug 05, 2013 6:59 pm

Re: terRemote - Android remote app for EventGhost

Post by mpg732 »

Javier wrote:@mpg732

I just noticed you can also place the variable from a payload In the URL of a terRemote macro
E.g. URL=file:storage/sdcard0/${payload.0}.jpeg but you will have to format the IMG first and change the name to match the payload.
Maybe I am doing my macros wrong, but I have about 20 different variables coming from EG. I am sending the varables from EG to TerRemote via this sample command of eg.plugins.NetworkSender2.plugin.Send("Dir.date", [unicode(date)]) So that just sends one variable out of many. So if I understand the info coming from EG would be Dir.date${payload.0} which I then update the text field of the widget. The way I am doing it does work, all the fields do update and stay till till they are updated again. So how do you use I used different "payload" Or how do I make differential between the different ${payloads.0} of all my different variables? If I make that change to the macro with in terRemote, the feedback for that one variable does not work.
Javier wrote:@mpg732

I just noticed you can also place the variable from a payload In the URL of a terRemote macro
E.g. URL=file:storage/sdcard0/${payload.0}.jpeg but you will have to format the IMG first and change the name to match the payload.
Yep already have all the pictures named properly for this to work. I used to do this via a PHP and Apache web server web server. So I had most of the work done, just now learning Python scripts.
Javier
Experienced User
Posts: 73
Joined: Sun Dec 01, 2013 3:45 pm

Re: terRemote - Android remote app for EventGhost

Post by Javier »

It does not sound like you are doing anything wrong (there are may ways to do the same thing). With payloads you can have more then one in an event i.e. {payload.0},{payload.1}.{payload.2}. {payload.0} is just the first payload, {payload.1} would be the second. This should not affect other events as the payload is just the cargo attached to the event.http://en.wikipedia.org/wiki/Payload_(computing).

It sounds like you got everything working!
mpg732
Experienced User
Posts: 92
Joined: Mon Aug 05, 2013 6:59 pm

Re: terRemote - Android remote app for EventGhost

Post by mpg732 »

Still having problems loading the graphic.

In the Widget I have , the URl set to " file:mnt/sdcard/download/Channel/${payload.1}.jpg and the "Internal setting" "Identifier" as "Channel Logo".

In the Macro I have two actions, one ${payload.0} and the other ${payload.1} now in the ${payload.1} settings I have "type set" to "Widget Data", "widget" set to "channel logo", "change set" to "Text" and to "set" to "${payload.1}"


Now if i use file:mnt/sdcard/download/Channel/SCFIHD.jpg, it does display a graphic, so I am pretty sure I got that part right, LOL
Javier
Experienced User
Posts: 73
Joined: Sun Dec 01, 2013 3:45 pm

Re: terRemote - Android remote app for EventGhost

Post by Javier »

The widget is a webview right?

"Change" Should be set to "Url", and then "Url" (which will appear after the first Url is selected) should be set to "file:mnt/sdcard/download/Channel/${payload.1}.jpg" (now every time said event activates a Macro and ${payload.1} changes the url will be changed. (note that payload.1 will only work if it is being set in the event, if not use payload.0 if it is the only payload being sent)

Also you may want to set the widget (identifier "Channel Logo") in the layout to a url without the ${payload.1} (or leave it blank) as there is no way for the layout to know what ${payload.1} means. It will update as soon as the macro runs.
mpg732
Experienced User
Posts: 92
Joined: Mon Aug 05, 2013 6:59 pm

Re: terRemote - Android remote app for EventGhost

Post by mpg732 »

That did it, thanks so much.
Javier
Experienced User
Posts: 73
Joined: Sun Dec 01, 2013 3:45 pm

Re: terRemote - Android remote app for EventGhost

Post by Javier »

Your welcome,
When your done maybe you could post a link to a screen shoot of your layout. I'm interested to see where this all went.
Javier
mpg732
Experienced User
Posts: 92
Joined: Mon Aug 05, 2013 6:59 pm

Re: terRemote - Android remote app for EventGhost

Post by mpg732 »

Javier wrote:Your welcome,
When your done maybe you could post a link to a screen shoot of your layout. I'm interested to see where this all went.
Javier
Funny that you said that, with out reading this post I took a screen shot to post what I did.
Image
Post Reply