PDA

View Full Version : Getting to grips with NetRemote and NetRemote dynamic



Yoggi
November 16th, 2016, 01:35 PM
Hi Ron, I haven’t seen you answering questions in the forum for quiet a while, I hope this is due to a well deserved vacation and nothing else!

I am now quiet happy with the way my Girder 6 back-end is working (running nicely on the pi 3), so I have been looking into NetRemote and NetRemote Dynamic.

I have quite many questions and some ideas so I feel that I can't ask them all at ones. I am hoping we could start with the most pressing ones and later move on to other NetRemote related questions in this forum thread (might be helpful for other new NetRemote users in the future).

At the moment my biggest issue is NetRemot Dynamic becoming unresponsive (not sending events to Girder) after a short stress test were I press a few buttons. In order to get it working again I need to quit NetRemot and restart it (I don't do anything to girder as it run just fine).

I have this problem with two Android phones, one is a Nexus 4 running 5.1.1 and the other is a Galaxy Nexus running 4.4.4.

When I run NetRemote from my wifi connected Windows 10 pc I can't duplicate the problem, NetRemote appears to be quite stable on windows.

An issue that might be related is I can't connect NetRemote manually (ip numer, port etc.), I can only connect when raspberrypi/girder back-end has announced it self (when girders back-end is run on window it's available almost directly) and this can take up to minute.

A lot of times Netremote needs to reconnect after being minimize / put in the background (android phone) and this just like starting the app from scratch (same long delay).

Question 1:
What could cause NetRemote to be unresponsive? Is Qt on Android less stable then on Windows (and what about the stability on iOS devices)? Would I be better of using a non android device?

Question 2:
Why dose it take so long for the back-end (when running on the pi 3) to announce it self on the network, and is there anything I can do to speed it up?

Regards,

Joachim

Ron
November 16th, 2016, 11:11 PM
Hey Joachim, I've been very busy here with various aspects of the business. But the forum has been quiet yes.

1. I'm not sure what is causing that. Maybe a Qt issue, I'll see if I can rebuild against a more recent Qt version and do a release.

2. Not sure why it takes so long to announce. However you should be able to do the manual link as well, do a netstat -an to see what port Girder is bound to. It's probably not on the port you think it is.

Yoggi
November 17th, 2016, 12:39 PM
Hi Ron,

You were right, Girder was not running on the port I thought it was. I can now log on manually. When NetRemote is logged on manually it appears to be more resilient to my stress test but k v values are not updated all the time. It might not be more stable, I might just have been lucky.

Would it make sense to you that it would be more stable when logged on manually compered to using the announced log in?

Suggestion:
If a custom background image that has a display of some sort is used in NetRemote Dynamic it would be nice to be able to place a transparent label with only the text visible. This label text in combination with k v values would make it look like the display is working like the real thing.

From my limited reading up on qml I found that the rectangles color properties used to create the “Label” in NetRemote Dynamic can be used to make the "button looking" part of the label invisible if set to “transparent”. Well almost invisible, the label still has a border.

So I edited ControlProperties.qml an added an extra field for border with a spinbox with a minimum value of 0. Being able to set the border width to 0 and color 1 and color 2 to “transparent” (color 3 determines the font color) gives me the fully transparent label.

The only problem is that this only works on NetRemote on Windows. I assume that these qml files are baked in (not transferred over from the back end) with NetRemote on Android and therefore can't be edited.

C:\Program Files\Promixis\Girder 6\ui\dynamicButtons\ControlProperties.qml

So next time you update the NetRemote app could you please add Border to “Label”!

Regards,

Joachim

Yoggi
November 23rd, 2016, 03:09 PM
NetRemote costume qml

I have girder back-end running on a Pi 3 and I am using NetRemote on an Android phone.

I started to play around with my own qml file and this is what I figured out so far.

I created a folder named “test” and placed it in Girders web sever root folder (httpd). This folder contains “main.qml” and “Button.qml” I also copied some images into the folder.

I need to create a file named “qlmdir” in the folder named “test”, in this file I have this line.


// qmldir
Button 1.0 Button.qml

Information found here:
11.1.1. Networked Components
http://qmlbook.github.io/ch11/index.html#networked-components

Importing QML Document Directories
http://doc.qt.io/qt-5/qtqml-syntax-directoryimports.html#remotely-located-directories

If I don't have this file I would get “Button is not a typ” error from NetRemot on Windows and on Android I would only get “Could not load request file. Please check your url: http//...” (so NetRemote on Windows is a little bit more helpful).

To load my custom ui in NetRemote (Android) I needed to create “source button” (so I can't do away with the Dynamic part of NetRemote) and link to my main.qml file (http://192.168.1.10:8080/test/main.qml).

I also need to have girder run its web server (I assume these files can be hosted on any web server that NetRemote has access to).

Question 1:
Could the qml source selection be moved to NetRemotes log in page in the future (Android)?

Better still would be if NetRemote had a folder on the phone were qml and image files could be placed (e.g. from computer over usb cable), and NetRemote would look in that folder, if empty NetRemote would start in Dynamic mode else in custom mode. This folder could store log in information so that NetRemote would start direct with custom ui. This would give NetRemote a more polished / professional feeling!

From what I can see this should be possible:
https://developer.android.com/training/basics/data-storage/files.html

Question 2:
Is there any other way to transfer qml and image files then using a web server? Couldn’t the transfer be achieved with out running a web server (I assume NetRemote and Girder already have a tcp connection of some sort)?

Yoggi
November 23rd, 2016, 06:17 PM
NetRemote Dynamic Page Properties bug

Using NetRemote Dynamic on Nexus 4 and Galaxy Nexus, it is not possible to change any Page Properties (in NetRemote Dynamic editing mode) as the Apply and Cancel buttons are outside the phone screen. Nor is it possible to exit and return to NetRemote without quitting the app.

7039

Yoggi
November 29th, 2016, 08:12 PM
Hi Ron,

I understand that Promixis is a small company but I hope you could find time to work on NetRemote and maybe include some of my suggestions and look at the bug I found.

If and when you work on it, maybe you could make a NetRemote module, see earlier request below! I think this would be a great addition for more advanced users that would like to make professional looking remote interfaces for any mobile platform.

https://www.promixis.com/forums/showthread.php?21887-Qt-Creator-as-NetRemote-designer&p=150558#post150558

Yoggi
December 12th, 2016, 05:26 AM
Hi Ron,

The bug I mention in previews post (buttons being outside screen) is also present on larger devices but only in landscaped mode (tested on a Nexus 7 2013 tablet). If you have time please review my suggestions for NetRemote in previous posts!

Joachim

Yoggi
December 20th, 2016, 07:07 AM
Hi Ron,

Did you see the post regarding the NetRemote bug?

I am getting a bit concerned for my investment in the Girder software do to the lack of Promixis present and lack of answers to questions on the forum (I see other peoples question goes unanswered to).

Should I/we be concerned for the future of Girder? I understand the Promixis is a small company but it would be nice with some response that at least the request/bug has been read/received.

Regards,

Joachim

Ron
December 20th, 2016, 07:39 PM
I've seen your messages. I just haven't had time to work on them.

As far as your questions go:

Q1 -> No. We need a Girder connection first.

Q2 -> No. iOS doesn't support local files As far as I know. ( the code base is the same for Android and iOS )

Bug -> change settings on a Windows machine as a work around for now.

jndreu
January 5th, 2017, 01:48 PM
Hi Ron,

You were right, Girder was not running on the port I thought it was. I can now log on manually. When NetRemote is logged on manually it appears to be more resilient to my stress test but k v values are not updated all the time. It might not be more stable, I might just have been lucky.

Would it make sense to you that it would be more stable when logged on manually compered to using the announced log in?

Suggestion:
If a custom background image that has a display of some sort is used in NetRemote Dynamic it would be nice to be able to place a transparent label with only the text visible. This label text in combination with k v values would make it look like the display is working like the real thing.

From my limited reading up on qml I found that the rectangles color properties used to create the “Label” in NetRemote Dynamic can be used to make the "button looking" part of the label invisible if set to “transparent”. Well almost invisible, the label still has a border.

So I edited ControlProperties.qml an added an extra field for border with a spinbox with a minimum value of 0. Being able to set the border width to 0 and color 1 and color 2 to “transparent” (color 3 determines the font color) gives me the fully transparent label.

The only problem is that this only works on NetRemote on Windows. I assume that these qml files are baked in (not transferred over from the back end) with NetRemote on Android and therefore can't be edited.

C:\Program Files\Promixis\Girder 6\ui\dynamicButtons\ControlProperties.qml

So next time you update the NetRemote app could you please add Border to “Label”!

Regards,

Joachim


Ron, will you be releasing a new version of NRD that allows the removal of the button border (to make the button completely transparent) per the suggestion above?