Toon app: DomoticzBoard

Forum about forum-provided applications on Toon

Moderators: marcelr, Toonz, TheHogNL, TerrorSource

Re: Toon app: DomoticzBoard

Postby Joskep » Tue Sep 29, 2020 5:55 pm

Is there already someone who wants to add this?
It would be very nice if no only switches but also sensors etc will show on the Toon
Joskep
Member
Member
 
Posts: 90
Joined: March 2019

Re: Toon app: DomoticzBoard

Postby Joskep » Sat Oct 17, 2020 10:39 am

Okay, think not then ;-)

Another question;
I would like to have only 1 'shortcut' so only 1 switch visible at the homescreen in stead of 2.

I.m looking within the .qml files, but i can.t figer it out.

I see an line with "switch2Option" , is this the correct way to simply turn the second shortcut off?

I am using the switch only to turn ON/OFF my Domoticz alarmsystem and its very annoing if i touch the wrong switches like for exaple the sunscreen.

Maybe somebody can advise which line i can comment 'out' via an # or on another way.

Thanks
Joskep
Member
Member
 
Posts: 90
Joined: March 2019

Re: Toon app: DomoticzBoard

Postby Toonz » Sat Oct 17, 2020 12:50 pm

at minimum you need to set the visible property of the second switch to 'false' in the Tile.qml (2x)
still doesn't solve the issue if you accidentally press another switch on the screen.
If you know the idx of the switch you always want on the tile, you can hardcode that in the /mnt/data/tsc/domoticzboard.usersetting.json file and uncomment the code to change it in the DomoticzScreen.qml (remove the Mouse area: lines 180-201).

Remember to repeat this each time you install a new version of DomoticzBoard.
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1559
Joined: December 2016

Re: Toon app: DomoticzBoard

Postby Joskep » Sat Oct 17, 2020 3:02 pm

Thanks, that worked fine!

If you need someone to test with others sensors, like Solarpanels etc let me know!
Joskep
Member
Member
 
Posts: 90
Joined: March 2019

Re: Toon app: DomoticzBoard

Postby Joskep » Sun Oct 18, 2020 7:05 am

edit:

Goodmorning, an extra question.
I did as you discribed, removed the lines AND within the domoticzboard.usersetting.json file is removed the second switch (TileIdx2":"121" AND "TileType2":"Light").\
It works but only until you select another switch, then there are 2 switches.

I hoped bij removing the lines 180-200 that this was 'hardcoded'.

Do you have an suggestion?

Thanks
Joskep
Member
Member
 
Posts: 90
Joined: March 2019

Re: Toon app: DomoticzBoard

Postby Toonz » Sun Oct 18, 2020 9:49 am

have you changed the visibility property lines of switch 2 on the Tile to false?
you can ignore the second switch data in the json, this is standard saved by default but not used in your case
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1559
Joined: December 2016

Re: Toon app: DomoticzBoard

Postby Joskep » Sun Oct 18, 2020 12:30 pm

thanx voor youre reply;

do you mean: DomoticzboardTile.qml (directory: dirqmf/qml/apps/domoticzboard-1.1.12) ?

I can't find that specific setting;

here the complete conentent:

------------
import QtQuick 2.1
import qb.components 1.0


Tile {
id: domoticzTile
property bool dimState: screenStateController.dimmedColors

onClicked: {
stage.openFullscreen(app.domoticzScreenUrl);
}

function simpleSynchronous(request) {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", request, true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
app.refreshScreen();
}
}
}
xmlhttp.send();
}

function iconToShow(status) {

if (status == "On") {
return app.tilebulb_onvar;
} else {
return app.tilebulb_offvar;
}
}

function iconToShowDim(status) {

if (status == "On") {
return app.dimtilebulb_onvar;
} else {
return app.dimtilebulb_offvar;
}
}
Image {
id: switch1Button
anchors {
top: parent.top
topMargin: isNxt ? 25 : 20
left: parent.left
leftMargin: isNxt ? 25 : 20
}
width: isNxt ? 100 : 75
height: isNxt ? 100 : 75
source: dimState ? iconToShowDim(app.switch1Status) : iconToShow(app.switch1Status)
MouseArea {
id: switch1Mouse
anchors.fill: parent
onClicked: {
if (app.switch1Type == "Light") {
simpleSynchronous("http://"+app.connectionPath+"/json.htm?type=command&param=switchligh
} else {
simpleSynchronous("http://"+app.connectionPath+"/json.htm?type=command&param=switchscen
}
if (app.switch1Status == "On") {
app.switch1Status = "Off";
} else {
app.switch1Status = "On";
}
}
}
visible: (app.switch1Idx !== "*")

}

Text {
id: switch1Title
width: -10 + parent.width / 2
anchors {
top: switch1Button.bottom
topMargin: isNxt ? 12 : 10
left: parent.left
leftMargin: 5
}
horizontalAlignment: Text.AlignHCenter
font {
family: qfont.semiBold.name
pixelSize: isNxt ? 20 : 16
}
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
text: app.switch1Name.substring(0,11)
}

Text {
id: switch1Option
width: -10 + parent.width / 2
anchors {
top: switch1Title.bottom
left: parent.left
leftMargin: 5
}
horizontalAlignment: Text.AlignHCenter
font {
family: qfont.semiBold.name
pixelSize: isNxt ? 20 : 16
}
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
text: app.switch1Option
}

Image {
id: switch2Button
anchors {
top: parent.top
topMargin: isNxt ? 25 : 20
right: parent.right
rightMargin: isNxt ? 25 : 20
}
width: isNxt ? 100 : 75
height: isNxt ? 100 : 75

source: dimState ? iconToShowDim(app.switch2Status) : iconToShow(app.switch2Status)

MouseArea {
id: switch2Mouse
anchors.fill: parent
onClicked: {
}
horizontalAlignment: Text.AlignHCenter
font {
family: qfont.semiBold.name
pixelSize: isNxt ? 20 : 16
}
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
text: app.switch1Option
}

Image {
id: switch2Button
anchors {
top: parent.top
topMargin: isNxt ? 25 : 20
right: parent.right
rightMargin: isNxt ? 25 : 20
}
width: isNxt ? 100 : 75
height: isNxt ? 100 : 75

source: dimState ? iconToShowDim(app.switch2Status) : iconToShow(app.switch2Status)

MouseArea {
id: switch2Mouse
anchors.fill: parent
onClicked: {
if (app.switch2Type == "Light") {
simpleSynchronous("http://"+app.connectionPath+"/json.htm?type=command&param=switchligh
} else {
simpleSynchronous("http://"+app.connectionPath+"/json.htm?type=command&param=switchscen
}
if (app.switch2Status == "On") {
app.switch2Status = "Off";
} else {
app.switch2Status = "On";
}
}
}
visible: (app.switch2Idx !== "*")
}

Text {
id: switch2Option
width: -10 + parent.width / 2
anchors {
top: switch2Title.bottom
right: parent.right
rightMargin: 5
}
horizontalAlignment: Text.AlignHCenter
font {
family: qfont.semiBold.name
pixelSize: isNxt ? 20 : 16
}
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
text: app.switch2Option
}
}
Joskep
Member
Member
 
Posts: 90
Joined: March 2019

Re: Toon app: DomoticzBoard

Postby Toonz » Sun Oct 18, 2020 1:07 pm

really?

replace:
visible: (app.switch2Idx !== "*")

with:
visible: false

you can add the same visible line to the id: switch2Option component
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1559
Joined: December 2016

Re: Toon app: DomoticzBoard

Postby Joskep » Sun Oct 18, 2020 1:16 pm

Thanks for your answer. I was looking for the parameter 'true' : )
After i changed this the shortcut / tile doesn't work anymore.
I will reinstall the app and try again

EDIT:

Works!

Thanks!
Joskep
Member
Member
 
Posts: 90
Joined: March 2019

Re: Toon app: DomoticzBoard

Postby Joskep » Tue Nov 24, 2020 5:06 pm

Joskep wrote:Hello, finally the Domoticz works. Evenly both solarsystems (Enphase and Sma) are shown as an sensor, great!

But on the Toon i only see 'switches', even when the Solar Sensors al added to favorites.

Is it posible to sho sensors too?



Is there someone who wants to add this?
On my (v2) Toon i can see all switches, but for the status of my sensors (solar panels etc) i have to use my tablet or phone.
It should be very! nice if the Domoticzboard app on the Toonstore was able to show 'sensors' and not only 'switches' .

Thanks
Joskep
Member
Member
 
Posts: 90
Joined: March 2019

Previous

Return to Toon Apps

Who is online

Users browsing this forum: No registered users and 1 guest

cron