Page 15 of 18

Re: Toon app: DomoticzBoard

Posted: Tue Sep 29, 2020 6:55 pm
by Joskep
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

Re: Toon app: DomoticzBoard

Posted: Sat Oct 17, 2020 11:39 am
by Joskep
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

Re: Toon app: DomoticzBoard

Posted: Sat Oct 17, 2020 1:50 pm
by Toonz
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.

Re: Toon app: DomoticzBoard

Posted: Sat Oct 17, 2020 4:02 pm
by Joskep
Thanks, that worked fine!

If you need someone to test with others sensors, like Solarpanels etc let me know!

Re: Toon app: DomoticzBoard

Posted: Sun Oct 18, 2020 8:05 am
by Joskep
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

Re: Toon app: DomoticzBoard

Posted: Sun Oct 18, 2020 10:49 am
by Toonz
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

Re: Toon app: DomoticzBoard

Posted: Sun Oct 18, 2020 1:30 pm
by Joskep
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
}
}

Re: Toon app: DomoticzBoard

Posted: Sun Oct 18, 2020 2:07 pm
by Toonz
really?

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

with:
visible: false

you can add the same visible line to the id: switch2Option component

Re: Toon app: DomoticzBoard

Posted: Sun Oct 18, 2020 2:16 pm
by Joskep
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!

Re: Toon app: DomoticzBoard

Posted: Tue Nov 24, 2020 6:06 pm
by Joskep
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

Re: Toon app: DomoticzBoard

Posted: Mon May 03, 2021 12:34 pm
by fluxdensity
Hi,

Do others have this as well? After the upgrade to version 2021.1 ( from 2020.2) the scene switch in Domoticzboard does not work anymore. The logfile in Domoticz states scene initiated but it does not activate the scene.

After some analysis with Wireshark, it seems that the Domoticz board does a switchscene Toggle command and Domoticz does not like that. A manual URL execution in a chrome browser gives back "status: err" instead of a :status: ok".
The manual in chrome execution of the switchscene command with "on" works fine and so do all the switches.

It could be a Domoticz thing but with scene only able to switch on and off a Toggle might not work anymore.

PS the github page from Domoticzboard is only version 1.0.0 whilst the Toon actually has version 1.1.12

Regards

Re: Toon app: DomoticzBoard

Posted: Sat May 08, 2021 5:00 pm
by Toonz
fluxdensity wrote:Hi,

Do others have this as well? After the upgrade to version 2021.1 ( from 2020.2) the scene switch in Domoticzboard does not work anymore. The logfile in Domoticz states scene initiated but it does not activate the scene.

After some analysis with Wireshark, it seems that the Domoticz board does a switchscene Toggle command and Domoticz does not like that. A manual URL execution in a chrome browser gives back "status: err" instead of a :status: ok".
The manual in chrome execution of the switchscene command with "on" works fine and so do all the switches.

It could be a Domoticz thing but with scene only able to switch on and off a Toggle might not work anymore.

PS the github page from Domoticzboard is only version 1.0.0 whilst the Toon actually has version 1.1.12

Regards
I'm running an older version of Domoticz but can change the toggle to on/off statements for scenes.
Does the toggle still work fine for switches?

N.B. I am maintaining the domoticz board app after the original developer abandoned the project. I can create a new version with this change.
The actual sources are on the TSC github : https://github.com/ToonSoftwareCollective/domoticzboard

Re: Toon app: DomoticzBoard

Posted: Sat May 08, 2021 5:14 pm
by Toonz
Hi all,

version 1.1.13 will be available in the ToonStore shortly after the approval process has completed.
Changelog:
- scenes can now be switched properly (using on/off instead of the toggle).

Kind regards,

Toonz

Re: Toon app: DomoticzBoard

Posted: Sat Jan 28, 2023 11:23 pm
by appelflap
Thanks for building the DomoticzBoard app! It has been a great tool to manage my lights in and around the house. One thing though: Domoticz authentication methods have been changed in current (beta) versions. Which means the basic auth cannot be used over HTTP, only over HTTPS. So I think DomoticzBoard will not be able to connect to Domoticz anymore. Are there plans for upgrading the authentication? Is HTTPS an option or is the Toon software not up to date enough for that?

Re: Toon app: DomoticzBoard

Posted: Sun Jan 29, 2023 5:18 pm
by Toonz
I will have a look when I have time. Personally I have very bad experiences with updating domoticz, so I am running a stable release for quite some time now and will only upgrade domoticz when something breaks (which hasn't happened yet) :-) so I didn't run into this auth issue myself.
Need to figure out if I can run the latest version of domoticz somewhere to test (for sure will not upgrade my production system).