Page 6 of 8

Re: Toon app: Home Assistant controller

Posted: Fri Oct 11, 2019 4:02 pm
by Luc_S
Phoolie wrote:Isn't it possible to use WinSCP and edit the files with Notepad ++?
Yes, you can also change the files and upload them with WinSCP.
Phoolie wrote:I didn't tried the other workaround, because JurnD said, it wont worked.

If you want, I can try it this weekend.


Thank you but I'm not that curious about why the workaround doesn't work :D Cheers!

Re: Toon app: Home Assistant controller

Posted: Fri Oct 11, 2019 4:06 pm
by Toonz
Hi all,

maybe some clarification on the images, toonstore and firmware versions is helpfull here.

From firmware version 5.x.x onwards, alle images must be included in the resourcefiles.
Absolute paths like file:///qmf/qml/apps/.../drawables or ./drawables won't workanymore.
Up to firmware 4.x.x all images where taken from the file system and app images had to be put in the drawables folder.

When I publish applications in the ToonStore I need to ensure compatibility with all firmwares.
I therefore make sure an app is running on firmware 4 before packaging for ToonStore.
Which means all references to images in the QML files should be in the form of "./drawables/" or "file:///qmf/qml/apps/xxx/drawables/"
All images should be included in the package in the drawables folder.

When the actual ToonStore package installer script detects that it is being installed on firmware 5 or higher, the installer will modify the source code of all QML files of that app after installation:
1. In the import section "QtQuick 1" will be replaced by "QtQuick 2".
2. all references to the drawables folder will be replaced by qrc:/tsc/ (tsc is a folder in the resourcefile where alle custom icons are located)
In this case the images will only be shown correctly in the app when these are present in the resourcefile.
You can find the list of actual images in the current resourcefiles here: https://github.com/ToonSoftwareCollective/tsc-images

Hope this explains a bit.
Summarizing: images should show correctly on firmware 4 at least when included in the package.
Reading all the above I might have forgotten to included newer images from Luc_S github in the latest update in ToonStore (assuming only QML files were changed).
I will check this in the weekend and correct it.
No manual copying of images should be needed normally.

New images will not be part of the resourcefile unless added to the github project above.

Kind regardz,

Toonz

Re: Toon app: Home Assistant controller

Posted: Sun Oct 13, 2019 9:02 pm
by hvxl
Toonz wrote:From firmware version 5.x.x onwards, alle images must be included in the resourcefiles.
This sounds slightly exaggerated to me. At least on version 5.0.4, most images can still be loaded from the file system by placing them somewhere under /HCBv2/qml/images/... and using a http://localhost/images/... URL, as described in chapter 2.3 of the DevelopingToonApps document. The only exception is the thumbIcon. That one really has to be in the resourcefile.

Re: Toon app: Home Assistant controller

Posted: Sun Oct 13, 2019 9:39 pm
by Toonz
That's indeed a nice option as well to use http indeed

Re: Toon app: Home Assistant controller

Posted: Thu Nov 07, 2019 12:50 am
by Toonz
hi all,

version 1.0.5 is released inToonStore.
No new functionality but all settings json files are now moved to the folder /mnt/data/tsc

Kind regardz,

Toonz

Re: Toon app: Home Assistant controller

Posted: Mon Dec 30, 2019 5:43 pm
by Toonz
Hi all,

version 1.0.6 is available in ToonStore 5 with bug fixes by mAiden.

Changelog:
- Images references changed to existing ones in the resource file (some will be available in future resource file releases).
JSON file is now filled correctly, so that Home Assistant works, by mAiden

Kind regardz,

Toonz

Re: Toon app: Home Assistant controller

Posted: Tue Jan 14, 2020 1:16 am
by xilvaro
Trying to get this working, but to no avail.

Am I doing something wrong here?

Rooted Toon with firmware 5.18.8 and HA Controller 1.0.6.

Whether I'm using token.txt with an active Long Living Token or the Legacy_API password, I'm getting the same notification in HA every time (see attached pic).

Anyone have any idea? I'm running out lol

Re: Toon app: Home Assistant controller

Posted: Fri Jan 24, 2020 11:13 am
by Luc_S
xilvaro wrote:Trying to get this working, but to no avail.

Am I doing something wrong here?

Rooted Toon with firmware 5.18.8 and HA Controller 1.0.6.

Whether I'm using token.txt with an active Long Living Token or the Legacy_API password, I'm getting the same notification in HA every time (see attached pic).

Anyone have any idea? I'm running out lol
You have the Long Lived Token created in HA? Just to be sure (because I tried this when I started using the token), you are not changing the token when HA prompts you the token right? Because from what I remember you can't do that :)

In the token.txt you are not accidentally adding a space that shouldn't be there? Also don't add quotes at the beginning and end like ' or ".

Edit: Maybe try the original HA app on a smartphone to see if external access can be made with that?

Re: Toon app: Home Assistant controller

Posted: Fri Jan 24, 2020 1:15 pm
by mAiden
xilvaro wrote:Trying to get this working, but to no avail.

Am I doing something wrong here?

Rooted Toon with firmware 5.18.8 and HA Controller 1.0.6.

Whether I'm using token.txt with an active Long Living Token or the Legacy_API password, I'm getting the same notification in HA every time (see attached pic).

Anyone have any idea? I'm running out lol
Check the following file ip_bans.yaml. Chances are you have blocked yourself now.

Re: Toon app: Home Assistant controller

Posted: Fri Jan 24, 2020 8:48 pm
by jozg
Hello all,

I've had the same problem.
It's because the config file directory is moved in the Toon.

The files goes in /mnt/data/tsc
qb-xxxxxxxxxxxxxxxxxxxxxx:/mnt/data/tsc# ls home*
homeassistant.alarm.json homeassistant.switches.json
homeassistant.scenes.json homeassistant.token.txt
homeassistant.sensors.json homeassistant.userSettings.json
homeassistant.sliders.json

So move all the files to /mnt/data/tsc and it will work.

Regards

Re: Toon app: Home Assistant controller

Posted: Sun Feb 16, 2020 3:00 pm
by Scar1k
Hi all,

Is there anyone who can tell me how to correct the values in HomeassistantTile.qml, so that the tile is shown correctly on a Toon 2? I've been fiddling around with it, but I'm not quite the layout-wizard, so it seems.

The time rises above the tile when it goes to the dark mode and the sensorinfo is way to small to read. When I change the sensor fontsize from 12 to 24px, the size looks better, but the layout is distorted. The sensorinfo is moving to the absolute bottom of the tile, which looks crappy.

Or is the writer (Luc-S I think?!) planning to integrate the layout changes into the app in the ToonStore?

Re: Toon app: Home Assistant controller

Posted: Sun Feb 16, 2020 4:52 pm
by TerrorSource
Scar1k wrote:Hi all,

Is there anyone who can tell me how to correct the values in HomeassistantTile.qml, so that the tile is shown correctly on a Toon 2? I've been fiddling around with it, but I'm not quite the layout-wizard, so it seems.

The time rises above the tile when it goes to the dark mode and the sensorinfo is way to small to read. When I change the sensor fontsize from 12 to 24px, the size looks better, but the layout is distorted. The sensorinfo is moving to the absolute bottom of the tile, which looks crappy.

Or is the writer (Luc-S I think?!) planning to integrate the layout changes into the app in the ToonStore?
Can you post a screenshot or photo of this so we can see the issue?

Re: Toon app: Home Assistant controller

Posted: Tue Feb 25, 2020 1:11 pm
by Luc_S
I was trying to integrate this into the app however as I don't have a Toon 2 I can't really see what I'm doing so I stopped :D

What needs to be done is where you see a certain length, height, width or size in pixels add a if-then with isNxt to make the app choose the right dimensions

e.g.:

Code: Select all

switch1.height = 50;
becomes

Code: Select all

switch1.height = isNxt ? 75 : 50;
Toonz said somewhere on this forum to multiply the x-coordinates of screen elements by 1,28 for Toon 2, y coordinate by 1,33 and font sizes by 1,3.

Re: Toon app: Home Assistant controller

Posted: Sun Mar 01, 2020 1:03 pm
by Toonz
Hi all,

version 1.0.7 is available in the ToonStore.

Changelog:
- updated Tile layout for Toon 2 (thanks dEADkIRK for the pull request)

I haven't been able to test it myself as I am not using Homeassistant.

Kind regardz,

Toonz

Re: Toon app: Home Assistant controller

Posted: Mon Mar 02, 2020 3:54 pm
by dEADkIRK
Thanks Toonz, I'm also working on making the full app compatible. Will raise a pull request when tested and ready.