Software: modifications and extensions Toon

Everything about software tools, new software development and toolchains. For developers, mostly.

Moderators: marcelr, TerrorSource, Toonz, TheHogNL

Re: Software: modifications and extensions Toon

Postby roykaandorp » Sun May 20, 2018 9:05 pm

Is it possible to send a command to show (fullscreen) an jpeg image?
I've connected my doorbell to an raspberry pi, when someone presses the button it plays a sound, sends a notify to the mobile and mails a picture.
It would be great if it also shows that picture on the toon. The webcam app comes close, but too slow to be usable for this kind of use.
Last edited by roykaandorp on Sun May 20, 2018 11:05 pm, edited 1 time in total.
roykaandorp
Starting Member
Starting Member
 
Posts: 7
Joined: April 2018

Re: Software: modifications and extensions Toon

Postby marcelr » Sun May 20, 2018 9:28 pm

There has been an app called "imageviewer", made by Quby, on toon. It has never been activated in production guis, although the code had been installed on toon. Not sure if it has ever worked at all, but you might give it a shot. Just check out /qmf/qml/apps/ and look for a directory called imageviewer or similar. Add it to /qmf/qml/qb/base/Globals.qml, and see what happens.
marcelr
Global Moderator
Global Moderator
 
Posts: 1082
Joined: May 2012
Location: Ehv

Re: Software: modifications and extensions Toon

Postby roykaandorp » Sun May 20, 2018 10:00 pm

marcelr wrote:There has been an app called "imageviewer", made by Quby, on toon. It has never been activated in production guis, although the code had been installed on toon. Not sure if it has ever worked at all, but you might give it a shot. Just check out /qmf/qml/apps/ and look for a directory called imageviewer or similar. Add it to /qmf/qml/qb/base/Globals.qml, and see what happens.

I've tried it, it came available as a menu option. From there it shows that you have to upload your picture /qmf/var/qt-gui/apps/imageViewer/ when i did that i can open the image but it's not possible to close it. And because it's an app within the qt-gui it's not possible to kill that process. Is it possible to call an app from the gui from command line?
roykaandorp
Starting Member
Starting Member
 
Posts: 7
Joined: April 2018

Re: Software: modifications and extensions Toon

Postby Toonz » Sun May 20, 2018 11:22 pm

marcelr wrote:There has been an app called "imageviewer", made by Quby, on toon. It has never been activated in production guis, although the code had been installed on toon. Not sure if it has ever worked at all, but you might give it a shot. Just check out /qmf/qml/apps/ and look for a directory called imageviewer or similar. Add it to /qmf/qml/qb/base/Globals.qml, and see what happens.

Image viewer works fine....
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1310
Joined: December 2016

Re: Software: modifications and extensions Toon

Postby Toonz » Sun May 20, 2018 11:25 pm

HansS wrote:I have a Tile, with some text, and an Item, and in that Item are two buttons with an Image. When the screen dims, the tile and text disappear, but the buttons stay visible, which is what I want. But, the button background stays white, which is not what I want. I would like the buttons to not be visible, but the images to stay visible. Something like change the button's background colour in dimState. But I cannot seem to find how to do that. I cannot change the button color, in any mode. Any ideas?

You can turn an image into a button by defining a mousearea for the image

sample:
Code: Select all
   Image {
      id: idName
      source: <image file name>
      anchors {
         baseline: parent.top
         right: parent.right
      }
      cache: false
      visible: true
      MouseArea {
         id: idMouseAreawhatever
         anchors.fill: parent
         onClicked: {
            <do what you want to do>
         }
      }
   }
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1310
Joined: December 2016

Re: Software: modifications and extensions Toon

Postby TheHogNL » Mon May 21, 2018 10:52 am

roykaandorp wrote:Is it possible to call an app from the gui from command line?


You can trigger an app using a file. For example, let the app check the contents of a file each second. If that file contains a line pointing towards a image file it then can show that image.
You only need something to push the image file and the controle file to the Toon but that is not so hard to do.

You can probably use an external url for that trigger and the image file also.
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1386
Joined: August 2017

Re: Software: modifications and extensions Toon

Postby roykaandorp » Mon May 21, 2018 11:41 am

TheHogNL wrote:
roykaandorp wrote:Is it possible to call an app from the gui from command line?


You can trigger an app using a file. For example, let the app check the contents of a file each second. If that file contains a line pointing towards a image file it then can show that image.
You only need something to push the image file and the controle file to the Toon but that is not so hard to do.

You can probably use an external url for that trigger and the image file also.

Thank you, that could be a possibility, but will that not slow down the gui? If there is no other way I will try to make something like that and find out.
Is it possible to compile an imageviewer? that would be much easier, so i can command the raspberry to open the image and kill that process after a while.
btw i've been looking at quby for open source but the files are not available to download anymore, is there another place to download these?
roykaandorp
Starting Member
Starting Member
 
Posts: 7
Joined: April 2018

Re: Software: modifications and extensions Toon

Postby TheHogNL » Mon May 21, 2018 6:04 pm

roykaandorp wrote:Thank you, that could be a possibility, but will that not slow down the gui? If there is no other way I will try to make something like that and find out.
Is it possible to compile an imageviewer? that would be much easier, so i can command the raspberry to open the image and kill that process after a while.
btw i've been looking at quby for open source but the files are not available to download anymore, is there another place to download these?


If you really try hard you can probably write directly to the frame buffer, however qt-gui will overwrite that also.
Just using the timing is not that hard for the toon. If you would only know how much this is already used in some apps :)

The open source is at https://www.quby.com/open-source/ and they point to the web-archive (duh...)
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1386
Joined: August 2017

Re: Software: modifications and extensions Toon

Postby roykaandorp » Mon May 21, 2018 6:24 pm

TheHogNL wrote:If you really try hard you can probably write directly to the frame buffer, however qt-gui will overwrite that also.
Just using the timing is not that hard for the toon. If you would only know how much this is already used in some apps :)

The open source is at https://www.quby.com/open-source/ and they point to the web-archive (duh...)

ok i get it, I'm not really a developer but shall take a look how far i come by copying and editing. I've seen the webcam app using the timing indeed, but don't know yet how to let it open the picture at fullscreen automatically at the moment there is a picture. Yesterday i looked at https://www.quby.com/open-source/ then it wasn't working at all, now it's downloading the openembedded file but the readme is not available.

Edit:
I've seen that when you type "./show-fb-image restart" from /etc/inittab it shows the boot image. Only the things thats changes (like the time, wattage, temp) comes through the image, that's good enough for me. Now finding out, what format the images are.
roykaandorp
Starting Member
Starting Member
 
Posts: 7
Joined: April 2018

Re: Software: modifications and extensions Toon

Postby marcelr » Mon May 21, 2018 8:08 pm

The framebuffer images are just that raw framebuffer data, gzip compressed.
If you make raw images 800x480, 24bit BGR (IIRC), and compress them using gzip, you should see something.
Or you can just look into the code that shows the image (it's just a shell script), take the parts you need from that, and roll your own image viewer.
marcelr
Global Moderator
Global Moderator
 
Posts: 1082
Joined: May 2012
Location: Ehv

Re: Software: modifications and extensions Toon

Postby roykaandorp » Tue May 22, 2018 3:40 pm

marcelr wrote:The framebuffer images are just that raw framebuffer data, gzip compressed.
If you make raw images 800x480, 24bit BGR (IIRC), and compress them using gzip, you should see something.
Or you can just look into the code that shows the image (it's just a shell script), take the parts you need from that, and roll your own image viewer.

Thanks, I've converted a picture to raw bgr and was able to show it on the Toon with the (simple) command "cat converted.raw > /dev/fb0", but the image is upside down and mirrored and double (side by side), so i guess i have to add some other options to the converter (imagemagick). I've been googling for it, but didn't find anything about how to resolve it yet. Does someone have an idea?
Edit:
Found out I used the wrong converting options, right now I'm using these commands to convert the jpeg with imagemagick
convert doorbell.jpeg -depth 24 -resize 800x480 -channel B -flip -channel RGB converted.bmp
stream -map r -storage-type long converted.bmp converted.raw (before I used instead of long the short option)
then I scp it to the toon and then "cat converted.raw > /dev/fb0" the only problem now is that it's grey, so almost there
Last edited by roykaandorp on Tue May 22, 2018 6:20 pm, edited 1 time in total.
roykaandorp
Starting Member
Starting Member
 
Posts: 7
Joined: April 2018

Re: Software: modifications and extensions Toon

Postby marcelr » Tue May 22, 2018 5:57 pm

Will check this for you, but it will take some time.
marcelr
Global Moderator
Global Moderator
 
Posts: 1082
Joined: May 2012
Location: Ehv

Re: Software: modifications and extensions Toon

Postby Luc_S » Tue Jun 05, 2018 10:13 pm

Hey guys, a few weeks ago I bought a second hand Toon because of this forum. Thank you all who are contributing to making this thermostat integrate with custom home automation :D

I've built a first version of the application I planned to make once I had a rooted Toon on my wall. Instead of integrating Toon into Home Assistant I wanted to have some functionalities of Home Assistant available through my Toon. You can check out the result on the url below. Oh, don't expect the code to be top notch, still learning :P

https://github.com/Luc-S/Toon-HASS

Cheers!
Luc_S
Starting Member
Starting Member
 
Posts: 44
Joined: June 2018

Re: Software: modifications and extensions Toon

Postby TerrorSource » Wed Jun 06, 2018 6:55 am

Luc_S wrote:Hey guys, a few weeks ago I bought a second hand Toon because of this forum. Thank you all who are contributing to making this thermostat integrate with custom home automation :D

I've built a first version of the application I planned to make once I had a rooted Toon on my wall. Instead of integrating Toon into Home Assistant I wanted to have some functionalities of Home Assistant available through my Toon. You can check out the result on the url below. Oh, don't expect the code to be top notch, still learning :P

https://github.com/Luc-S/Toon-HASS

Cheers!


Can you make a seperate topic for this so all information/questions about this app is concentrated in 1 topic?

Looks like a great app tho!
TerrorSource
Member
Member
 
Posts: 326
Joined: May 2017

Re: Software: modifications and extensions Toon

Postby Luc_S » Sun Jun 17, 2018 9:48 pm

Hey all, is there any way to open an app directly from the dim-state window?
Luc_S
Starting Member
Starting Member
 
Posts: 44
Joined: June 2018

PreviousNext

Return to Toon software development

Who is online

Users browsing this forum: No registered users and 0 guests