Toon app: Home Assistant controller

Forum about forum-provided applications on Toon

Moderators: marcelr, TheHogNL, Toonz

Luc_S
Starting Member
Starting Member
Posts: 45
Joined: Tue Jun 05, 2018 6:57 pm

Re: Toon app: Home Assistant controller

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

Re: Toon app: Home Assistant controller

Post 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
member of the Toon Software Collective
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Toon app: Home Assistant controller

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

Re: Toon app: Home Assistant controller

Post by Toonz »

That's indeed a nice option as well to use http indeed
member of the Toon Software Collective
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Home Assistant controller

Post 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
member of the Toon Software Collective
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Home Assistant controller

Post 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
member of the Toon Software Collective
xilvaro
Starting Member
Starting Member
Posts: 1
Joined: Tue Jan 14, 2020 1:12 am

Re: Toon app: Home Assistant controller

Post 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
Attachments
notify.jpg
notify.jpg (20.37 KiB) Viewed 8633 times
Luc_S
Starting Member
Starting Member
Posts: 45
Joined: Tue Jun 05, 2018 6:57 pm

Re: Toon app: Home Assistant controller

Post 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?
mAiden
Member
Member
Posts: 330
Joined: Mon Jul 10, 2017 10:22 am

Re: Toon app: Home Assistant controller

Post 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.
Member of the Toon Software Collective
jozg
Member
Member
Posts: 56
Joined: Wed Nov 15, 2017 1:13 pm

Re: Toon app: Home Assistant controller

Post 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
Scar1k
Starting Member
Starting Member
Posts: 1
Joined: Sun Feb 16, 2020 2:29 pm

Re: Toon app: Home Assistant controller

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

Re: Toon app: Home Assistant controller

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

Re: Toon app: Home Assistant controller

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

Re: Toon app: Home Assistant controller

Post 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
member of the Toon Software Collective
dEADkIRK
Starting Member
Starting Member
Posts: 2
Joined: Mon Mar 02, 2020 3:40 pm

Re: Toon app: Home Assistant controller

Post by dEADkIRK »

Thanks Toonz, I'm also working on making the full app compatible. Will raise a pull request when tested and ready.
Post Reply

Return to “Toon Apps”