Software: modifications and extensions Toon

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

Moderators: marcelr, TheHogNL, Toonz

roykaandorp
Starting Member
Starting Member
Posts: 8
Joined: Tue Apr 24, 2018 11:42 pm

Re: Software: modifications and extensions Toon

Post by roykaandorp »

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 Mon May 21, 2018 12:05 am, edited 1 time in total.
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Software: modifications and extensions Toon

Post by marcelr »

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.
roykaandorp
Starting Member
Starting Member
Posts: 8
Joined: Tue Apr 24, 2018 11:42 pm

Re: Software: modifications and extensions Toon

Post by roykaandorp »

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?
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Software: modifications and extensions Toon

Post by Toonz »

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
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Software: modifications and extensions Toon

Post by Toonz »

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
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Software: modifications and extensions Toon

Post by TheHogNL »

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
roykaandorp
Starting Member
Starting Member
Posts: 8
Joined: Tue Apr 24, 2018 11:42 pm

Re: Software: modifications and extensions Toon

Post by roykaandorp »

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?
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Software: modifications and extensions Toon

Post by TheHogNL »

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
roykaandorp
Starting Member
Starting Member
Posts: 8
Joined: Tue Apr 24, 2018 11:42 pm

Re: Software: modifications and extensions Toon

Post by roykaandorp »

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.
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Software: modifications and extensions Toon

Post by marcelr »

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.
roykaandorp
Starting Member
Starting Member
Posts: 8
Joined: Tue Apr 24, 2018 11:42 pm

Re: Software: modifications and extensions Toon

Post by roykaandorp »

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 7:20 pm, edited 1 time in total.
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Software: modifications and extensions Toon

Post by marcelr »

Will check this for you, but it will take some time.
Luc_S
Starting Member
Starting Member
Posts: 45
Joined: Tue Jun 05, 2018 6:57 pm

Re: Software: modifications and extensions Toon

Post by Luc_S »

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!
TerrorSource
Administrator
Administrator
Posts: 494
Joined: Thu May 04, 2017 9:28 pm

Re: Software: modifications and extensions Toon

Post by TerrorSource »

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!
Luc_S
Starting Member
Starting Member
Posts: 45
Joined: Tue Jun 05, 2018 6:57 pm

Re: Software: modifications and extensions Toon

Post by Luc_S »

Hey all, is there any way to open an app directly from the dim-state window?
Post Reply

Return to “Toon software development”