Toon app: Home Assistant controller

Forum about forum-provided applications on Toon

Moderators: marcelr, Toonz, TheHogNL, TerrorSource

Re: Toon app: Home Assistant controller

Postby Luc_S » Fri Oct 11, 2019 3:02 pm

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!
Luc_S
Starting Member
Starting Member
 
Posts: 45
Joined: June 2018

Re: Toon app: Home Assistant controller

Postby Toonz » Fri Oct 11, 2019 3:06 pm

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
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1488
Joined: December 2016

Re: Toon app: Home Assistant controller

Postby hvxl » Sun Oct 13, 2019 8:02 pm

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
hvxl
Senior Member
Senior Member
 
Posts: 1311
Joined: June 2010

Re: Toon app: Home Assistant controller

Postby Toonz » Sun Oct 13, 2019 8:39 pm

That's indeed a nice option as well to use http indeed
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1488
Joined: December 2016

Re: Toon app: Home Assistant controller

Postby Toonz » Wed Nov 06, 2019 11:50 pm

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
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1488
Joined: December 2016

Re: Toon app: Home Assistant controller

Postby Toonz » Mon Dec 30, 2019 4:43 pm

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
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1488
Joined: December 2016

Re: Toon app: Home Assistant controller

Postby xilvaro » Tue Jan 14, 2020 12:16 am

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 1903 times
xilvaro
Starting Member
Starting Member
 
Posts: 1
Joined: January 2020

Re: Toon app: Home Assistant controller

Postby Luc_S » Fri Jan 24, 2020 10:13 am

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?
Luc_S
Starting Member
Starting Member
 
Posts: 45
Joined: June 2018

Re: Toon app: Home Assistant controller

Postby mAiden » Fri Jan 24, 2020 12:15 pm

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.
mAiden
Member
Member
 
Posts: 291
Joined: July 2017

Re: Toon app: Home Assistant controller

Postby jozg » Fri Jan 24, 2020 7:48 pm

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
jozg
Member
Member
 
Posts: 52
Joined: November 2017

Re: Toon app: Home Assistant controller

Postby Scar1k » Sun Feb 16, 2020 2:00 pm

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?
Scar1k
Starting Member
Starting Member
 
Posts: 1
Joined: February 2020

Re: Toon app: Home Assistant controller

Postby TerrorSource » Sun Feb 16, 2020 3:52 pm

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?
TerrorSource
Member
Member
 
Posts: 427
Joined: May 2017

Re: Toon app: Home Assistant controller

Postby Luc_S » Tue Feb 25, 2020 12:11 pm

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.
Luc_S
Starting Member
Starting Member
 
Posts: 45
Joined: June 2018

Re: Toon app: Home Assistant controller

Postby Toonz » Sun Mar 01, 2020 12:03 pm

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
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1488
Joined: December 2016

Re: Toon app: Home Assistant controller

Postby dEADkIRK » Mon Mar 02, 2020 2:54 pm

Thanks Toonz, I'm also working on making the full app compatible. Will raise a pull request when tested and ready.
dEADkIRK
Starting Member
Starting Member
 
Posts: 2
Joined: March 2020

PreviousNext

Return to Toon Apps

Who is online

Users browsing this forum: No registered users and 1 guest