terRemote - Android remote app for EventGhost

Questions and comments specific to a particular plugin should go here.
Javier
Experienced User
Posts: 73
Joined: Sun Dec 01, 2013 3:45 pm

Re: terRemote - Android remote app for EventGhost

Post by Javier » Sun Feb 09, 2014 6:36 pm

1) First you need to send an event (Your_Event) to terRemote with Your_EG_Global_Variable as a payload though a python script

Code: Select all

eg.plugins.NetworkSender.plugin.Send("Your_Event", [str(eg.globals.Your_EG_Global_Variable)])
After writing the above execute the script so it will show in the terRemote event_log.

2) Create a button in terRemote and in Widget_Properties:
Click "Text" so it expands the selection (as some times the "Internal_Settings do not show up properly when the "Text" properties are not expanded. Maybe this is just my devices, maybe Chris will fix in the future)
Click "Internal settings":
enabled = 'checked'
Identifier = "Unique_Widget_Name"

3) In terRemote Menu->Macros->+(new_macro).
Name=Name_Your_Macro
Enabled='checked'
Event (click from log and select) = "Your_Event"
Actions->Widget_Data:
Widget = "Unique_Widget_Name" (from the Identifier above)
Set = 'checked'
Change = "Text"
To = ${payload.0} (if this was the only payload that came in with the event, second would be ${payload.1}, third ${payload.2} ect)
Click "done" and "Save" to save the macro

I may have left some things out such as Network Setup. You may want to have a macro which calls eventghost to lookup and return values when a layout is opened so eventghost is not sending information when the device is not on the network as others have mentioned that this can tie up eventghost. You may want to use a webveiw instead of a button.
Image
Above image is current home temp in a webview with furnace and air conditioner setpoints
Javier
Last edited by Javier on Sun Feb 09, 2014 7:11 pm, edited 1 time in total.

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

Re: terRemote - Android remote app for EventGhost

Post by mpg732 » Sun Feb 09, 2014 7:06 pm

TerRemote has been crashing a lot on me lately. So when it does, a box pops up and asks me if I want to report the problem. It seems to go through the Play Store. Is that the best way to do this? Or do you you prefer a different method?

Mike

Pliind
Experienced User
Posts: 50
Joined: Tue Dec 31, 2013 7:40 pm

Re: terRemote - Android remote app for EventGhost

Post by Pliind » Sun Feb 09, 2014 9:05 pm

Javier wrote:1) First you need to send an event (Your_Event) to terRemote with Your_EG_Global_Variable as a payload though a python script

Code: Select all

eg.plugins.NetworkSender.plugin.Send("Your_Event", [str(eg.globals.Your_EG_Global_Variable)])
After writing the above execute the script so it will show in the terRemote event_log.

2) Create a button in terRemote and in Widget_Properties:
Click "Text" so it expands the selection (as some times the "Internal_Settings do not show up properly when the "Text" properties are not expanded. Maybe this is just my devices, maybe Chris will fix in the future)
Click "Internal settings":
enabled = 'checked'
Identifier = "Unique_Widget_Name"

3) In terRemote Menu->Macros->+(new_macro).
Name=Name_Your_Macro
Enabled='checked'
Event (click from log and select) = "Your_Event"
Actions->Widget_Data:
Widget = "Unique_Widget_Name" (from the Identifier above)
Set = 'checked'
Change = "Text"
To = ${payload.0} (if this was the only payload that came in with the event, second would be ${payload.1}, third ${payload.2} ect)
Click "done" and "Save" to save the macro

I may have left some things out such as Network Setup. You may want to have a macro which calls eventghost to lookup and return values when a layout is opened so eventghost is not sending information when the device is not on the network as others have mentioned that this can tie up eventghost. You may want to use a webveiw instead of a button.
Image
Above image is current home temp in a webview with furnace and air conditioner setpoints
Javier
Thanks soo much! Off to the store to buy me some more thermometers! :)

I'll just enable and disable the script depending if im home or not then, should solve the issue no?

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

Re: terRemote - Android remote app for EventGhost

Post by Javier » Mon Feb 10, 2014 3:46 am

Pliind wrote: I'll just enable and disable the script depending if im home or not then, should solve the issue no?
It should work, I have not experienced the tie up issues. "leothlon" brought up a few pages back that using the broadcast plugin instead of the Network Event Sender plugin would also work because of the way TCP works vs UDP. I have not tried the UDP approch as I only request data when a layout is opened because most of my data request go to Tasker and only a few to eventghost.

User avatar
terRemote
Experienced User
Posts: 183
Joined: Tue May 22, 2012 8:13 pm

Re: terRemote - Android remote app for EventGhost

Post by terRemote » Wed Feb 19, 2014 5:23 pm

mpg732 wrote:TerRemote has been crashing a lot on me lately. So when it does, a box pops up and asks me if I want to report the problem. It seems to go through the Play Store. Is that the best way to do this? Or do you you prefer a different method?
There will be a new update this week, taking care of some of the reported crashes. I'm working on it :)

In general, I receive the reports over the play store. Since the automatically generated reports are not very precise, a user description is incredibly helpful in most situations. A way faster way for me to fix the problem is writing me a mail. Also easier for me since I can then send follow-up questions and beta versions.

lostramblin
Posts: 3
Joined: Fri Apr 11, 2014 7:48 pm

Will not receive commands from EG

Post by lostramblin » Fri Apr 11, 2014 8:32 pm

Hey there

Really like the idea of your app. I have a wild plan of having the wall mounted tablets playing a sound when motion is detected on the surveillance cameras.

While I am able to send commands to EG from the tablet, I'm not able to receive commands. terRemote scans and finds EG fine, password tests and works. Yet no combination of tests, python scripts can i send a command to the android tablet.

Here's what I've tried :

Changing the Port (have tried 1023, 143, 4444)
- If I use the 1024 port, I don't get any errors in EG. any other port, i get a red error
Turning off Firewall
Changing Password
Creating "Map" action

All without any luck.

I'm new to python and fairly new to EG, so it's possible my send command is poorly formatted :
eg.plugins.NetworkSender.plugin.Send("Motion")

But other than that, I'm stumped.

Any ideas would be GREATLY appreciated. Thanks!

User avatar
terRemote
Experienced User
Posts: 183
Joined: Tue May 22, 2012 8:13 pm

Re: terRemote - Android remote app for EventGhost

Post by terRemote » Sat Apr 12, 2014 7:49 am

Hi,

first of all, thanks for using the app and welcome to this forum. The python code is fine. The problem must lie somewhere in the communication.

Please check the following points:
- In the terRemote options: Is "Listen to network events" enabled and does the port and password match the one you put in the NetworkSender plugin in EG?
- In the terRemote status page: Does it say "listening to network events" under "Running Services"?
- Does anything appear in the terRemote log when you try to send from EG to tR?

When you tried different ports, what was the "red error" message you received? Is there any other app on your device which could be using the port 1024?

Best
Chris

lostramblin
Posts: 3
Joined: Fri Apr 11, 2014 7:48 pm

Re: terRemote - Android remote app for EventGhost

Post by lostramblin » Sat Apr 12, 2014 7:18 pm

terRemote wrote:Hi,

first of all, thanks for using the app and welcome to this forum. The python code is fine. The problem must lie somewhere in the communication.

Please check the following points:
- In the terRemote options: Is "Listen to network events" enabled and does the port and password match the one you put in the NetworkSender plugin in EG?
- In the terRemote status page: Does it say "listening to network events" under "Running Services"?
- Does anything appear in the terRemote log when you try to send from EG to tR?

When you tried different ports, what was the "red error" message you received? Is there any other app on your device which could be using the port 1024?

Best
Chris
Chris :

thanks for your quick response :
1. "Listen to Network Events" is enabled - Port and password match
2. status shows "listening to network events"
3. nothing appears in log.

When I've changed ports (and made sure to match in terRemote), I've received "NetworkSender Failed" errors. Today I'm getting NetworkSender failed errors regardless of port.

I've been doing some googling on "networksender failed" errors and didn't find a heck of a lot.

The suggestion that something else on the tablet is using port 1024 is interesting. It's pretty much stock android 4.2.2 running "imperihome" to talk to my vera lite and squeezeserver. Also a squeezebox control app. I went through both and didn't see any settings for specific port(s).

Is there any way i can check / tell?

Thanks for helping!

lostramblin
Posts: 3
Joined: Fri Apr 11, 2014 7:48 pm

Re: terRemote - Android remote app for EventGhost

Post by lostramblin » Sat Apr 12, 2014 7:27 pm

Man you have some magic, 5th reboot during testing seems to have taken and the log is now showing commands. Thanks!

piert
Experienced User
Posts: 277
Joined: Tue Jun 14, 2011 2:53 pm

Re: terRemote - Android remote app for EventGhost

Post by piert » Sun Apr 27, 2014 1:06 pm

I am having exact the same problem. Tried switching off the firewall, tried from two different PC's (windows 7 and XP).
I thought the 'is another app using port 1024' was an interesting remark, so I tried changing EG/Teremote to ports 1025, but this also did not help.

I always get the same error:
Image

I am using EG 0.4.1 r1640 on Win 7 machine
I am using EG 0.4.1 r1610 on Win XP machine

You say it was magically solved after several reboots? Rebooting of the PC or the Android device?

Edit: and yes, the first two of below boxes are ticked, but I (obviously') get no entries in the terRemote log:
Please check the following points:
- In the terRemote options: Is "Listen to network events" enabled and does the port and password match the one you put in the NetworkSender plugin in EG?
- In the terRemote status page: Does it say "listening to network events" under "Running Services"?
- Does anything appear in the terRemote log when you try to send from EG to tR?

Pliind
Experienced User
Posts: 50
Joined: Tue Dec 31, 2013 7:40 pm

Re: terRemote - Android remote app for EventGhost

Post by Pliind » Mon Apr 28, 2014 9:01 am

I tried the networkevent sender for my temperatures, even tough i was enabling and disabling that plugin if i was home or not it did not work that well.

What you can do is use autoremote (receiver message in autoremote, send via tasker to terremote)

I solved my problem (further up in the thread) when Tellstick made it possible to read out temps in RemoteStick (you can export variables with it) :)

piert
Experienced User
Posts: 277
Joined: Tue Jun 14, 2011 2:53 pm

Re: terRemote - Android remote app for EventGhost

Post by piert » Mon Apr 28, 2014 12:19 pm

Thanks for the response.

I am hesitant to add yet another communication application in parallel with terRemote and communicating with Tasker. I am doing that now already with terRemote and Pushbullet. The problem is that sending from EG-PC to Android does currently not work for terRemote (above-described problem with using the networksender plugin in EG-PC) and is slower than I would like with Pushbullet (sometimes takes several minutes before I receive a message in Android; also the fact that files/notifications can not be mass-deleted is inconvenient).

Furthermore, I think I read somewhere that Autoremote's telegrams are not always reliably received in Android (can anyone confirm this?).

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

Re: terRemote - Android remote app for EventGhost

Post by Javier » Tue Apr 29, 2014 4:43 am

Hi piert,

Sometimes network sender will stop working on my devices and usually restarting the tablet/phone fixes the problem. I have a few questions that may help me or somebody else find your problem. You may have already tried some of these things.

I see you have 2 computers running EG. Does network sender send TCP Events from one PC to the other PC?

Are you running the latest version of terRemote? Are you using the paid or free version?

Have you tried adding another instance of the Network Sender Plugin (Plugin: Network Event Sender #2) and setting it up to match your device (i.e. Host=ip_of_your_device, Port="1024", Password=your_password)?

Just to be sure in terRemote->Options under Network listener service
Listen to network events is checked
Server configuration->Port="1024", Password=your_password. Then click save, then back-out of options and restart device.

In EG make a new action with the new instance of the Network Sender Plugin (Network Event Sender #2) map action. Event name to send = "Test". Make sure terRemote is open on device and screen is on, then execute the EG action.

Jaiver

piert
Experienced User
Posts: 277
Joined: Tue Jun 14, 2011 2:53 pm

Re: terRemote - Android remote app for EventGhost

Post by piert » Tue Apr 29, 2014 6:58 am

Thanks for your help, Javier.

Your last remark about saving the listener service and rebooting the Android tablet did the trick!! I am definitely sure I have rebooted the Android tablet several times before during my attempts to get it working, but now, when having worked methodically through your list, this has made the difference and now I do receive the notifications in terRemote.

For your information: yes, I am running the latest paid/pro version, 1.42a
Sometimes network sender will stop working on my devices and usually restarting the tablet/phone fixes the problem
This concerns me, as I need the best possible reliability since I am using this as an 'alarm notification device' for my surveillance system. By this I mean that, when motion is detected, I now receive a 'per detector' sound and notification message. I am enthusiastic about the fact that this also seems to work when the Android tablet is in standby mode (Samsung Galaxy Note automatically goes into screen off/standby mode when the magnet-fitted cover is closed), which means the detector/alarm system is portable and can run more than a day on a battery charge. The Tasker plugin provides even more possibilities.
It would be a pity if the connection drops intermittently, which would mean the detection can become unreliable at any point in time, without me knowing about it.

Can you elaborate a bit more on your experience, like how often the drop-outs occur and if you always need to reboot to get it solved?

Thanks again and best regards,
Perry

piert
Experienced User
Posts: 277
Joined: Tue Jun 14, 2011 2:53 pm

Re: terRemote - Android remote app for EventGhost

Post by piert » Tue Apr 29, 2014 11:31 am

Following up on my own post, I have disappointing findings from testing:

When I get the notification to work, I can switch off the Samsung tablet screen by closing the cover of the magnetic case and I can keep sending audible notifications for a while (all testing is done with a closed case cover)
However, after an unknown time interval (I estimate around 10 minutes), it becomes no longer possible to reliably send notifications and I suddenly will get the "NetworkSender Failed" in the Eventghost log. Then, when I keep sending notifications with a few seconds intervals, suddenly one does trigger again in Android, sometimes after the 20th attempt???
When the connection has been 're-established' like this in the before step, the notifications can be sent reliably (i.e. 20 attempts will all succeed without fail) again for a while. After that, things become shaky again.

Needless to say that this unreliable behavior is useless for my 'alarm notification system' needs.

I will keep doing some experimenting but I am pessimistic about the outcome. If anybody has ideas about improving reliability I would appreciate it.

EDIT UPDATE:
Just let the tablet sit with closed cover without sending any notifications to it for more than one hour, then did some more testing:
-with tablet case cover still closed: tried 60 times to send notifications to the tablet, each time resulting in "NetworkSender Failed" in Eventghost log of PC.
-with tablet case cover opened (just opening the cover; not further touching the device): tried 58 times unsuccessfully, after 58 times the next attempt was successful again..... :shock:

Surely, if you guys are having the same performance, this network sending is really useless for everybody as a notification method in terRemote???!!!??
Last edited by piert on Tue Apr 29, 2014 12:43 pm, edited 4 times in total.

Post Reply