- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
Could this free app help?
https://play.google.com/store/apps/deta ... live&hl=en
https://drive.google.com/drive/folders/ ... y01eVBKeHM
the problems about receiving network events only working after reboots seems weird. I'll have some tests whether I can reproduce this.
The problem of piert and Javier is of a different kind. Android can close background processes if there aren't enough system ressources. Tasker has a warning message which tells you when this happens. If you use Tasker, try enabling this warning and see if it appears. I'll check if I can implement such a message in terRemote.
Of course it could also be that the WiFi is just shutting down for energy saving. In this case, the proposal from krambriw might work. Or just try if you find something in your device's power saving settings.
terRemote has the behavior that whenever the background process is shut down by Android, it will be restarted once there are enough ressources. What piert described sounds exactly like this. I could maybe give the option for a more "aggressive" behavior, which is in general not recommended but may be what you need for the reliability.
Can you check somehow if you have enough ressources like available RAM? This behavior happened on my old Galaxy but so far never on my Nexus 4.
For your information, I have a Galaxy Note 10.1 2014 edition, which has 3 GB of RAM, so this really should not be an issue. Could be power saving feature issue, but I have checked and tried a number of settings already, to no avail yet.
As Chris and Krambriw mentioned check your Wi-Fi settings in android Wireless & Networks->Wi-Fi->Menu->Advanced->"Keep Wi-Fi on during Sleep" set to Always.
In terRemote->Options under General settings, Use background service is checked then back-out of options and restart device.
As Chris mentioned my issue is usually related to android as when terRemote stops receiving Events other apps such as "IP Cam Viewer" will also stop working. In previous versions of terRemote there were times when the service would stop receiving events after editing macros or buttons but I have been very busy lately and have not had time to edit my layouts so I'm not sure if this happens in the new version. Anyway this is where the restart would fix the problem.
That being said my devices usually keep there connections as long as they are restarted at least once a week.
I did install the app and set it to always keep Wifi alive. I had already previously checked there were no battery saving options active and the standard Android 'always keep Wifi active' was already selected.
I am sad to say I have tried and implemented all suggestions and unfortunately none of them were able to ensure reliable and durable notification communication.
I would be interested to see if Chris can brew some stronger medicine in this regard.
Thanks and best regards,
EDIT: update 2014-05-01 #1 after some more testing with the Event log in terRemote (sorry, before I said this was in tasker log):
the Event log in terRemote receives events intially after a restart of the Android tablet, but after a while (probably as soon as the tablet goes into standby mode/screen off), the following message appears in the Event log (with a 'stop sign icon'): "Can not listen to EventGhost events."
In eventghost at the PC, this results in 'Networksender failed' messages when trying to send events to Android.
EDIT: update 2014-05-01 #2 - trying what it takes to get terRemote to receive events from Evengthost again after above message appears:
1. When the terRemote eventlog shows "Can not listen to EventGhost events.", terRemote STATUS tells me:
"listening to network events" (although the terRemote Event log says "Can not listen to EventGhost events.")
"listening to Tasker events"
Global Variables 'none'
Running Processes 'none'
2. After using taskmanager in Android and stopping terRemote and then restarting terRemote, I am able to send from PC to Android again and receive the message in the terRemote event log.
3. When I send an event to Android, which is received and then immediately use the 'standby button' on the Android tablet to switch off the display (which sends the device into standby mode), and then within a few seconds send further events from PC, some of these are still received in Android and show up in the terRemote event log. However, most attempts show up in the EG-PC as 'networksender failed' and are not received in Android.
4. When testing as per the steps in 3., always and inevitably after a variable amount of time of trying (times ranging between approx. 10 seconds and up to 2 minutes) the terRemote event log shows (after waking the Android tablet obviously) again "Can not listen to EventGhost events." and testing is useless from this point on.
EDIT 2014-05-01 #3:
Interesting: I notice that, immediately after I hit 'standby button' on Android device, the network sender failed messages appear in the EG-PC event log when trying to send events from EG-PC. This indicates that the receiving of messages in Android is practically immediately interrupted after hitting standby in Android. HOWEVER, the event log in terRemote does not always show the icon with "Can not listen to EventGhost events." right away. This means that several messages can fail during standby of Android, but after switching back on the Android tablet, the messages are sent through again and are received in terRemote event log. There does not seem to be a consistent length of time that this can be done before terRemote is going back into "Can not listen to EventGhost events." - mode. Again, when this happens, the only solution is to stop terRemote in taskmanager and restart terRemote (or reboot the whole Android device, but this is not necessary).
As it is possible for the Android tablet to be in 'standby mode' (screen off) and still receive an audible alarm when I receive a Skype call, I am assuming it must be possible to keep the Android tablet awake and active to receive messages via Wifi under normal conditions.
Chris, have you got any ideas how to solve this issue and do you have any further questions or suggestions for my testing procedures?
Thanks and best regards,
Have you put some more thought into this? I am not able to get events from EG-PC to my Android tablet reliably, so I can not get 'feedback' from EG-PC to confirm actions back to the Android device.
If no improvements are possible, I will have to switch to using the (Tornado) webserver for control and feedback.
Although that would give me reliable control and feedback, it will not be possible to interact with Tasker the way I can with your terRemote app
there does not seem to be an obvious or even established way to do it. I will try to implement one or two of the options and see if there is any improvement. I might need some help testing, then.
Sorry for not having better news about this, yet. But it has priority since I want terRemote to be as reliable as possible. Unfortunately, my time is quite limited these days but I will have some on the next weekend.
It would be interesting to see if improvements can be achieved and I would surely be able to do some testing (although I have quite busy weeks ahead of me too).
I just uploaded a new beta version which contains some changes, including the first try for more stability of the background service.
Would be great if I could get some feedback on this, soon
Additionally, when "Show Status Bar" is unchecked on the new device, it is visible when the remote layouts are visible. However, it is hidden when the menu is visible. This is opposite of what I want and opposite of the first device.
Another thing I noticed is that when I do place an icon that I was able to import, it is not centering. The dimensions of the icon itself match the button size. Also, in the settings of the button, the icon size and button size are equal to this same resolution. There is no text in the button. Is there a way to fix this? It appears the icon is being pushed 21px to the right and 5 pixels up.
@therealbiglou: This looks weird. Does all this happen (only) with the new beta version? After the import: Are the icons available in the app or are they not even imported? Could you send me the exported file?
Also: in which menus is the status bar not showing? It could be that you have to close the app (force close by the OS) to get the behavior right. Can you check this? If it works, I will try to improve the behavior when changing this option.
Centering the icons is done quite weirdly by the Android OS. I haven't yet found a good way to fix it without a hack (which I don't really want to use). I have one more idea, though. Will check it.
As for the icons on importing, I still have an issue. I'm using terRemote Pro1.44beta on both devices, which are the same exact device. Here is a copy of the export.ter file: https://drive.google.com/file/d/0B-xbdq ... sp=sharing
I did notice that from the original device, when I try to export, I receive this message:
There are warnings.
Could not find the picture s0ush5ihsoam145t
However, all my icons are named human friendly names like "stop.png" and "play.png".