Page 31 of 37

Re: terRemote - Android remote app for EventGhost

Posted: Sun Jan 12, 2014 6:01 pm
by leothlon
Ok so after working with the pcp sender i have concluded i realy need to get it working with udp broadcasts, because if i eg tries sending info when i dont have the phone connected to wifi eg slows down and well simply put its just not working well.
So now i need help figuring out how to get terremote listening to UDP.

Re: terRemote - Android remote app for EventGhost

Posted: Sun Jan 12, 2014 6:06 pm
by mpg732
Maybe a little more info on what your trying to do would be help full. What are you trying to send to terRemote. I just use Network event sender. Yes EG will give an error in the log any time it try to send info to some thing that is not there. How ever that should not slow any thing down.

Re: terRemote - Android remote app for EventGhost

Posted: Sun Jan 12, 2014 9:50 pm
by terRemote
It's hard to tell what causes the UDP broadcast not to be received. Have you tried it with different devices / computers / WiFi networks? What about different ports?

Failed sending can cause EG to slow down since all actions are executed in the same thread. Not a perfect design in some situations, I guess. In what I am doing, this was never a problem. How many times per minute do you try to send things?
Until you get UDP to work, you can try to edit the EventGhost/plugins/NetworkSender/__init__.py and modify the line

Code: Select all

sock.settimeout(2.0)
to some lower value like

Code: Select all

sock.settimeout(0.5)
Note: Make a copy of the __init__.py first. After the changes, restart EG. Make sure it still works when you are on the network. Otherwise you have to take a higher value.

Hope it helps. Most of the time TCP should be preferred to UDP. I'll see if the terRemote plugin (to come) can have an option to use a completely different thread for sending.

Best
Chris

Re: terRemote - Android remote app for EventGhost

Posted: Sun Jan 12, 2014 9:53 pm
by mpg732
Not sure if this was asked, but is your tablet/phone on the same network as the PC. Make sure if its not on a cell network.

Re: terRemote - Android remote app for EventGhost

Posted: Mon Jan 13, 2014 7:03 am
by leothlon
Hi, yes they are on same network, same port (tried afew different ones).

The main reason why i want UDP is so i can have multiple units recieving the info. i'm looking to order 4x 7" tablets to use as my smarthome controllpanels on my halllway walls and such. so a udp broadcast would send for example "current song playing" to all my devices.

and as said with EG beeing single thread an error message seems to delay the other actions. and also from what i see EG network sender can only send to 1 ip? well ether way it would still need to send out the info ~6 times via tcp (4x to my controllpanels, 1x to my phone and 1x to my GF's phone).

Re: terRemote - Android remote app for EventGhost

Posted: Mon Jan 13, 2014 8:13 am
by terRemote
That does sound like an interesting and demanding setup. You can actually send to multiple IPs by loading the NetworkSenderPlugin more than once. It will appear as NetworkSender2, NetworkSender3, ... and can easily be used with these names.

About the UDP issues: Did you try sending from one EG Server to another using the Broadcaster plugin? Does the plugin react to itself when you enable this in its options?

Re: terRemote - Android remote app for EventGhost

Posted: Mon Jan 13, 2014 5:34 pm
by mpg732
So just to clarify, you got Network Event Sender to work, but not Broadcaster to work, Correct? You want to get Broadcaster to work, Correct? What are you using as "Command" and what are you using for "Payload" and what port are you sending it to?

Re: terRemote - Android remote app for EventGhost

Posted: Mon Jan 13, 2014 6:05 pm
by mpg732
OK, so I got Broadcaster working. Here is the strange thing, after I send the test event from EG, If I am in the Event Log on TerRemote, I have to hit the refresh button in order for it to show in the log. Also if I send a second sample, the first one disappears from the log and once again I have to hit the refresh button. I can get this to work on only one of my two android devices.

Re: terRemote - Android remote app for EventGhost

Posted: Mon Jan 13, 2014 10:23 pm
by terRemote
I'm starting to think there is an issue with the UDP Receiver on some devices or with some Android versions. I released a new beta version. It has some more information about the status of the receiver. Please check the log and the status page whether anything appears there.

Just a matter of time before this one's fixed ;)

Re: terRemote - Android remote app for EventGhost

Posted: Tue Jan 14, 2014 8:24 am
by terRemote
Alright, I received the first error report and released the second beta version, trying to fix it. Also, I got rid of this annoying "restart the app" necessity when you change the use of features. It should now work right when you change the preferences.

Re: terRemote - Android remote app for EventGhost

Posted: Tue Jan 14, 2014 8:38 pm
by leothlon
Command i send "test" no payload and port i have tested 33311 and 9870?(terremote default right)?

What is your setup you got to work?

Btw if it makes a difference i got samsung galaxy s4 with uptodate android version

Re: terRemote - Android remote app for EventGhost

Posted: Tue Jan 14, 2014 8:58 pm
by terRemote
Default port is 9876. Do you have the beta version? Otherwise you can send me a PM with your email adress. I'll send you a test version. If it does not work with it, we at least have more debug information.

Re: terRemote - Android remote app for EventGhost

Posted: Tue Jan 14, 2014 10:00 pm
by mpg732
Have you been able to duplicate the issues of the payloads being sent do not always show up properly. For example, if you have two different payloads to send. If the first payload is 10 charters long and the second is only 3 charters. If you send the first payload it shows up properly. When you send the second payload, the payload will show up with 3 charters from the second payload and the remaining 7 characters from the first. Hope this makes sense.

Re: terRemote - Android remote app for EventGhost

Posted: Wed Jan 15, 2014 5:50 am
by Javier
leothlon wrote:Command i send "test" no payload and port i have tested 33311 and 9870?(terremote default right)?

What is your setup you got to work?

Btw if it makes a difference i got samsung galaxy s4 with uptodate android version
Tested the UDP broadcaster on an S3 (not quite an S4) and it works (Also works on Nexus4,5 and 7). Tested UDP broadcasts from EventGhost and an ISY and both sent messages to my devices. I am getting the same errors as MPG732 where the longer payloads will remain at the end of a current payload until the device is restarted. Also terRemotes background service does not appear to listen to UDP when the screen is off.

@leothlon As for not receiving any UDP, did you change any of the broadcaster plugin settings (i.e. Broadcast Zone should be set to 255.255.255.255)? If you did not change the default settings can you change the Broadcast Zone to the IP of you phone to see if it will work on that device (maybe there is a problem with the broadcast zone)? Also as terRemote asked before does eventghost show the broadcasts in the log (when the plugin has "respond to self broadcasts"checked)?

@terRemote I am really enjoying the new features, Great Work!
I'm sure you are working on this but I just want to let you know of a few issues I am having with "action types" such as timer and flow control. They are not displaying correctly and are getting cut off at the bottom, if more then 1 action is added to "If False" they cannot be viewed of changed.
Thanks,
Javier

Re: terRemote - Android remote app for EventGhost

Posted: Wed Jan 15, 2014 7:29 am
by leothlon
EG displays the broadcasts with respond to self checked.
the settings for eg broadcaster is:

Event prefix: EG
zone: 255.255.255.255
UDP port: 33311 (tested 9876(terremote default), and 33333(EG default))
Listening adress: ip of pc running EG
respond to self broadcast checked.
Payload delimiter: &&


Broadcast action settings:
command: test
Payload: empty
udp port: 0 (uses default)

in terremote i go into "Features" under network listener service, i check the Listen to udp
UDP port: <same as EG>
Event prefix: UDP.


I'll pm you my mail for terremote beta.