PDA

View Full Version : Netremote Dynamic - Replace a Button with an image?



jndreu
January 5th, 2017, 01:06 AM
How can I completely replace a button with an image in NRD? If I enter an image in the button properties, it just overlays that image over the button. I want the button to BE the image... Right now I can make all of the button colors clear, and remove the caption, but the grey outline of the button remains. How do I get rid of that as well so all I see is the image?

Yoggi
January 5th, 2017, 11:24 AM
If you are using NRD on a Windows device edit ControlProperties.qml see post #3 (https://www.promixis.com/forums/showthread.php?22251-Getting-to-grips-with-NetRemote-and-NetRemote-dynamic&p=153008#post153008)

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

Edited file
7043

jndreu
January 5th, 2017, 02:47 PM
Perfect thanks!

jndreu
January 5th, 2017, 03:10 PM
If you are using NRD on a Windows device edit ControlProperties.qml see post #3 (https://www.promixis.com/forums/showthread.php?22251-Getting-to-grips-with-NetRemote-and-NetRemote-dynamic&p=153008#post153008)

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

Edited file
7043


After doing some testing with this modified file, I discovered something weird. If I set the border size to "0" (making the button completely transparent) it works however if I navigate away to another page and then come back to the page with the button, the border returns to the button. Like the value does not save if you leave the page and come back. Any idea why that is happening or how to fix it?

jndreu
January 5th, 2017, 03:23 PM
Another question... is it also possible to toggle between two images on a device manager button? For example, replace the button with an image of a light bulb. When light is on, display a yellow light bulb image. When light is off, display a grey light bulb image?

Yoggi
January 5th, 2017, 06:07 PM
I think we need to figure out how NRD saves values and were. If you export a NRD page everything is in tabels/lists, maybe kv values are used. I noticed from my page export that border property is missing and there for is gone when the page is reloded (when one goes back).

jndreu
January 6th, 2017, 12:12 AM
Hopefully Ron will read this and respond with a fix. I posted this same request in your other thread as well.

NR Dynamic is good but it just needs a little more care and feeding to be great. I am still running G5 with the old Netremote simply because the touch screen interface I was able to create with NR Designer is something I still cannot exactly replicate using Dynamic. Designer had a bit of a learning curve but it still did not really require any coding skills for the most part (something I cannot do). There is no way I can use QML, that's way out of my league. I voiced these concerns about a year ago and sadly there hasn't been much of any further progress on NRD since then. I thought I'd give Dynamic another go but I still am unable to fully commit and make the switch to G6.

FYI - all of those KV buttons and sliders - those were added by Ron following my original requests after playing with NRD... a thread that has received almost 10,000 views since my first post back on April 22, 2015!!

https://www.promixis.com/forums/showthread.php?21765-NetRemote-Dynamic/page2&highlight=jndreu

Ron
January 6th, 2017, 01:19 AM
NRD saves all it's values as JSON tables in the KV system.

The design goal for NRD was to create a simple to use front-end for Girder. Simple to use precludes have a lot of options to change things. So if you need something that is not in there at the moment you might have graduated to the next level! The next level can be one of two things.

1. You can change the source code of NRD (It's just .qml files).
2. You can build from scratch, QML is very powerful and you can create exactly what you want! Without a compiler or other investment. It's a markup language with embedded Javascript.

jndreu
January 7th, 2017, 08:26 PM
I don't know what a JSON table is... hopefully Yoggi does! ...or better yet, if you can release a new version of NRD that would allow for the removal of the border on the buttons so we only see the image?

And per my other question - is it also possible to toggle between two images on a device manager button? For example, replace the button with an image of a light bulb. When light is on, display a yellow light bulb image. When light is off, display a grey light bulb image?

Yoggi
January 8th, 2017, 12:17 PM
Hi Ron and jndreu,

I have manage to edit the NDR files (ControlProperties.qml, DynamicButtons.qml & EditableRectangle.qml) in order to save the invisible border (border.width 0). I still have some small issues that I hope I can correct, and when I do I will upload the edited files.

I never planed on using NRD for my final solution, it's merely a stopgap solution for me but for other users NRD might be essential.

Making changes to NRD files as I understand it is only possible on Window devices (maybe Linux devices) where one can get to the code. On Android devices from what I have manage to deduct this is not possible as the NDR files are included in the app download.

I always planed on using a NetRemote with custom qml files but I am now considering dropping Girder all together.

My problems with NetRemote/Girder

A. NetRemote custom user interface requires a web server to serve the qml files.


Why not use the already existing NetRemote Girder connection.
I don't want to run a web server on my system as I want to minimize risks.

B. Custom user interface requires a NetRemote Dynamic page with a button to load the qml files.


I would want a more professional looking solution were my user interface is the fist screen I see (not a connect to Girder and then a NRD intermediate screen with one button to take me to my user interface).

Couldn’t this be achieved with a configuration file of some sort that stores Girders location and what qml file to load? From what I can see ios can retrive a config file. (http://codewithchris.com/tutorial-how-to-use-a-remote-configuration-file-for-your-ios-app/)


I still think uploading the qml files to NetRemote would be the nicest solution. ios has iTunes File Sharing for apps and Android has the capability to upload files. Yes I understand that the code base for NR is the same (ios and Android) and that it would need to deviate her but it would be so much more professional looking.

I am still dreaming of 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

C. As I not a programer I find the incomplete examples in the documentation frustrating.


One example of the top of my head is regarding the qml web server example were information regarding the file named "qlmdir" was missing.

https://www.promixis.com/forums/showthread.php?22251-Getting-to-grips-with-NetRemote-and-NetRemote-dynamic&p=153012#post153012


Don't get me wrong, I really like Girder. As I mention before I am not a programer and I understand that I wouldn’t stand a chance of achieving what I want if it wasn’t for a program like Girder.

I am technically savvy enough to understand that Girder can do all I want it to do but it's frustrated that I can't achieving what do to lack in documentation and good examples.

I wonder how many potential customer/users that are like me (technically savvy but not programmer) that you might be missing out on?

I am still hoping that Girder will take me were I want to go as it is still the best all-round solution I have come across!

Regards

Joachim

Ron
January 8th, 2017, 01:24 PM
A. If you enter "girder" as the hostname the webserver does not need to run. It uses the existing connection.

B. Currently that is a design limitation unfortunately. Also I 'm not sure I'd pass the iOS app requirements displaying external documents directly.

C. Yes me too.

You might not realize this but I'm at least as frustrated as you about all this. Promixis is a tiny company not raking in big cash. We have to make due with what money comes in and can spend development time in accordance with what makes money. You have to realize that we are now directly competing with Amazon, Apple, Google and Samsung, Philips, Wemo, SmartThings, etc..., with extremely deep pockets. That is a pretty tough spot to be in for a small business.

Yoggi
January 8th, 2017, 03:23 PM
Hi Ron,

Thanks for taking the time to answer!

Did you see my edited text (bold text) in my post?

Regarding your answer to question A, I didn’t know of that option. I might have missed that (although I do my best to read the documentation) or not understood the documentation. Thanks I will try that!

I understand Promixis is a small company and that you are in a fight with the big dragons. I don't want Amazon, Apple, Google Samsung … etc. I want something like Girder, so I ask how can I as a Promixis customer help?

Could we start a pay for feature request? Have a kick starer like approach and when the amount needed for the development of a certain feature is meet the development starts!

I wouldn’t mind contributing if I could get a feature I wanted!

Encourage user to write guides and upload code and working examples!

Regards,

Joachim

Ron
January 8th, 2017, 03:44 PM
I have not previous seen the iTunes file sharing part. Do apps have access to that data? If so that would be a way forward.

I would love to have more user involvement, there are simply too many protocols out there for me to keep up. What do you think would encourage people to contribute docs/code?

Pay for feature - that is probably a good idea. Historically software companies have two ways of doing this. Pay for Plugins ( aka nickle and diming your customer ) or new major versions. The customer knows exactly what they get as it's already done. The downside risk is that the company could be developing a feature people don't want and will not pay for. The 'kick-starter' model allows customer to vote on features with their money. If a feature reaches the milestone the company gets the money and implements it. If a feature doesn't reach the milestone the company doesn't waste development time. Sounds like a win for everyone.

The income generated by 'kick-starting' a feature would not cover the development cost ( development is expensive in time, and time is money ), so I would not price a feature to cost but scale it with development cost to some reasonable number that 10 people putting money down ( each <= $50 ) could put together. Once feature is developed it goes into the G6 code base and becomes available for everyone.

Yoggi
January 8th, 2017, 08:06 PM
Thanks, adding "girder" worked fine once I figured out how to write the link/path (http://girder/test/test.qml), file "qlmdir" is still needed but that’s fine now that I know.

Info related to above problem: Folder named "test" placed it in Girders web sever root folder (httpd), Girder web server not running .


In order to encourage people to contribute I think a wiki functionality is needed. The current forum is thread based and this makes it hard to find or add information so that it can be found. A wiki would allow us to collaborate, create and publish content.

I can see my self adding to a wiki just for the convenience of knowing were to find all information I gathered last time I had a problem and need to retrace my steps.


scale it with development cost to some reasonable number that 10 people putting money down ( each <= $50 ) could put together. Once feature is developed it goes into the G6 code base and becomes available for everyone.

This sounds just fine to me, I have nothing against paying <= $50 to vote for a development of feature that goes into the code base. This way I might get the feature I want, our I might get it faster than I otherwise would.

Joachim

Ron
January 8th, 2017, 10:08 PM
Wiki is up.

https://www.promixis.com/wiki/index.php/Main_Page

Yoggi
January 10th, 2017, 07:56 AM
Hi jndreu,

I have iron out the problems i had and it appears to work just fine. There might still be some issue that I haven't found, but the problems I faced was mainly hiding the border value field (in the user interface part of label, button and other components in editing mode) for controls that didn’t have/used borders.

I can send you files if you are interested, but before you try out the modified files you need to backup your current NRD user interface (export *.dyb file from NRD) as there is a risk it might get damage/deleted.

These modified files will not work for NRD on Android or ios as there is no way to get to the .qml files ("baked in with the app") and edit them, at least not that i know of.

Joachim

Rename your current "dynamicButtons" in order not to overwrite it, and keep it as a backup.

C:\Program Files\Promixis\Girder 6\ui\dynamicButtons


7048

Yoggi
January 10th, 2017, 09:01 PM
I realized that I answered a previous question of yours (https://www.promixis.com/forums/showthread.php?21765-NetRemote-Dynamic&p=151663#post151663)(that I read in an another post), toggle image button.

Hi jndreu,

Regarding your question, Netremote Dynamic - Replace a Button with an image?

If you have saved your current NRD user interface (and you know how to reinstate it) and you have the two image files "lightbulb_0.png" and "lightbulb_1.png" in your "httpd" folder (C:\Program Files\Promixis\Girder 6\httpd) you can try to import 7047 (this will overwrite current file so make sure to backup).

This should more or less give you what you are asking for, there is the problem of the border but the answer to that is in my previous post!

I had to zip home2.dyb in order to upload it so it needs to be unzipped (file of file typ .dyb gave me an error message).

If you study the settings of the KV button I am sure you can recreate it!

Joachim

jndreu
January 11th, 2017, 04:29 PM
Thanks, I'll have a look at your files...

I have figured out how to toggle an image on a KV button using info Ron provided in a previous post to my question and the two image files. However the two things I would like to know now are:

1) Have you or Ron figured out how to make the border on the button go away for good, and not come back after leaving and coming back to a NRD page?

2) Is it possible to do the same image toggle that I'm doing on a KV button for a Device Manager button?

Ron
January 14th, 2017, 09:28 PM
I've taken the wiki back down. I was just fighting spam. Anyone that wants to contribute can do so on the forum and I am more than happy to make a sub forum with useful posts.

Yoggi
January 16th, 2017, 06:16 PM
Hi jndreu,

Did you have any luck with border 0 (post #16 (https://www.promixis.com/forums/showthread.php?22263-Netremote-Dynamic-Replace-a-Button-with-an-image&p=153111#post153111))?

jndreu
January 16th, 2017, 10:24 PM
Unfortunately I didn't have a chance to look at it yet, sorry... hopefully will get to it soon. I'm still on the fence as to whether or not NR Dynamic can meet my needs - the interface I built (and still use) with the old NR Designer and G5 simply cannot me matched with NR Dynamic and I'm not sure what I'm going to do at this point.

Yoggi
February 12th, 2017, 08:23 AM
Hi Ron,

You might have thought of this and decided not to.

What about opening up Girder for third party remote control apps like NetIO (http://www.netioapp.com/de/), iRule (http://www.getirule.com), iridium (https://www.iridiummobile.net/) etc.

My thinking is that users that are caught between what can be done with NRD and the hurdle of learning qml would be able to get the interface they want but this might also allow users of these third party control apps to use a Girder as a backend to control things they wouldn’t otherwise be able to use and this might generate new customers for you.

I remember asking you if the control protocol between NetRemote and Girder was a secret and your answer was that it wasn’t but you didn’t want it public since that would prevent you from making changes to it.

What if you clearly declare that the protocol might change and that users that use it needs to be aware that they might need to update their control app code that communicates with Girder if there is an update to Girder. Or create a costume protocol for third party control apps that might not change unless it has to.

Just my two cents.

Joachim

Yoggi
April 11th, 2017, 10:07 AM
Hi Ron,

Did you see my post? Any chance you could answer? What I am hoping for is a more open way of using Girder, as I don’t want to lose the grate capabilities Girder is providing but I would like see easier integration with other home automation software (easy two way communication). Maybe a two way plugin?

Regards,
Joachim

Ron
April 11th, 2017, 11:02 PM
We have a HTTP interface available... gir/deviceManager.lhtml and gir/triggerEvent.lhtml

Yoggi
April 12th, 2017, 03:51 AM
Hi Ron,

Yes I know, but I am trying to stay away from the use of an additional web server. Please consider making Girders communication interface public (the one used between NetRemote and Girder)!

Any upgrades/new features to Girder and NetRemote in the pipelines?

Regards,
Joachim

metacube
July 5th, 2017, 07:21 AM
NRD saves all it's values as JSON tables in the KV system.

The design goal for NRD was to create a simple to use front-end for Girder. Simple to use precludes have a lot of options to change things. So if you need something that is not in there at the moment you might have graduated to the next level! The next level can be one of two things. simple process to claim (https://www.flightserenity.co.uk/)

1. You can change the source code of NRD (It's just .qml files). best web post (http://headphonepit.com/best-wireless-headphones/)
2. You can build from scratch, QML is very powerful and you can create exactly what you want! Without a compiler or other investment. It's a markup language with embedded Javascript.

I'm also tying to change the button with my own custom image. Don't know much about QML other than the fact that it's used to design UI in Qt. But since you've said it's a markup language with embedded Java script I'll install Qt creator and see what I can tweak.