Page 2 of 18

Re: Toon app: DomoticzBoard

Posted: Tue Jul 18, 2017 9:53 pm
by TerrorSource
klaphekje wrote:I have mailed the zip file to you.
What kind of functionality do you like to add to DB? I probably don't have the required knowledge or skills available but i wouldn't be surprised if we want similar things.

Maybe i can help in some way.
Thanks, i've replied :)

Working on a 0.6.1 version as a "temp"-fix for your issues.
Also thinking about the big update, got the ideas but need to program it while i dont have the knowledge yet :)

Re: Toon app: DomoticzBoard

Posted: Tue Jul 18, 2017 11:07 pm
by klaphekje
My thoughts are also to to get the info of the available switches and sensors automatically from domoticz.

However, in my case this will generate a lot of unnecessary switches so there is also a sort of config page needed to select which idx's to show on toon.
Because of the greater number of switches a scrollbar or 2nd page is probably needed. I'd also like to show some sensor data on Toon.

I have a lot of idea's but my programming skills are very limited. Maybe Toonz can offer some assistance?

Re: Toon app: DomoticzBoard

Posted: Wed Jul 19, 2017 10:19 am
by Toonz
Added to the to-do list..... (first enjoy the rest of my holidays)

Re: Toon app: DomoticzBoard

Posted: Sat Jul 22, 2017 1:59 pm
by klaphekje
Blacky's Boss wrote:
klaphekje wrote:Maybe i can help in some way.
Yeah, me too. I have some programming skills, but this language is new to me. But if I get DomoticzBoard working in the first place, then I would be happy to take a look at making it even better!
@klaphekje: Can I get your changes too?
Sure, just keep in mind that TerrorSource is working on an update so regard this version as "unofficial".

@Toonz,
That would be great, Enjoy your holiday!

Re: Toon app: DomoticzBoard

Posted: Sun Aug 27, 2017 9:19 am
by georon
Thanks for this current release. Working as expected.

Re: Toon app: DomoticzBoard

Posted: Fri Sep 22, 2017 2:38 pm
by walberg
DomoticzBoard does not have a .ipk on board. Is it sufficient to transfer only the map to /HCBv2/qml/apps and then put a row in Globals?

Re: Toon app: DomoticzBoard

Posted: Fri Sep 22, 2017 2:55 pm
by Toonz
walberg wrote:DomoticzBoard does not have a .ipk on board. Is it sufficient to transfer only the map to /HCBv2/qml/apps and then put a row in Globals?
Yes

Re: Toon app: DomoticzBoard

Posted: Fri Sep 22, 2017 4:09 pm
by walberg
Toonz wrote:
walberg wrote:DomoticzBoard does not have a .ipk on board. Is it sufficient to transfer only the map to /HCBv2/qml/apps and then put a row in Globals?
Yes
Globals.qml
// Base set of apps that is available on all displays
var appsToLoad = [
"homescreen",
"systray",
"thermostat",
"clock",
"buienradar",
"temperaturelogger",
"toonstore",
"systemSettings",
"thermostatSettings",
"internetSettings",
"DomoticzBoard",
"eMetersSettings",
"settings",
"graph"]
I put "DomoticzBoard", on the programs to load, too bad when adding a tile i could not find Domoticzboard and Toon is duplicating another existing Tile so now i have 2 tiles with Gas prices

Re: Toon app: DomoticzBoard

Posted: Mon Sep 25, 2017 2:47 pm
by walberg
Tried to install Domoticzboard but nothing is done, how does this program knows on which ip adres Domoticz is? There is also not a source to make a tile for Domoticzboard.

Re: Toon app: DomoticzBoard

Posted: Mon Sep 25, 2017 10:45 pm
by DennisD
Then you haven't installed it correctly, did you reboot after you edited it? Did you edited the file DomoticzBoardApp.qml within the domoticzboard folder , because there you have to set the ip of you domoticz, and edit the switches and scenes you want to have. DomoticzBoard doesn't has a tile but it will appear in the top right corner

Re: Toon app: DomoticzBoard

Posted: Tue Sep 26, 2017 10:42 am
by walberg
I have domoticz on my Synology and there it is on 192.168.178.28:8084 Also i got 2 zwave switches with idx 23 and 24

I don't get a switch screen on my Toon, For this moment i had only edit DomoticzBoardApp.qml not yet DomoticzScreen.qml

property string hostName: "192.168.178.28"
property string portNum: "8084"
//Stop editing here!

property string switch1idx: "24" //put IDX of switch/wall plug here
property string switch1StatusIcon
property string switch1Name

property string switch2idx: "23" //put IDX of switch/wall plug here
property string switch2StatusIcon
property string switch2Name

Re: Toon app: DomoticzBoard

Posted: Tue Sep 26, 2017 4:35 pm
by walberg
I had also made a rule in Globals.txt
"DomoticzBoard",
But looking at the directory in Filezilla i saw the map was called DomoticzBoard-06, So now i removed the -06.

Now it works although i just have only 2 switches as i have namely most sensors in Domoticz. I also don't have Scenes.

Re: Toon app: DomoticzBoard

Posted: Wed Oct 18, 2017 10:25 am
by sattinus
Hi, does this work only with a bridge? Have entered the IDX number of my kaku components, as well as the ip address and port number, all started up but nothing happens from Domoticz. Also, in Domoticz, I see an incoming connection of the Toon in the log...

Thanks

Re: Toon app: DomoticzBoard

Posted: Thu Oct 19, 2017 10:37 pm
by Timeless
Great work! I've tested the application and modified it to my needs (only have 4 switches and 2 scenes, so I removed 1 switch and 1 scene block)

Something I want to add, this version of DomoticzBoard uses no authorization.
I have the LoginPage of Domoticz enabled so basic-auth is not possible. But it is still needed to use JSON parameter authorization:
documentation

Which basically means adding 2 parameters (DomoticzBoardApp.qml):

Code: Select all

property string username: "dXNlcm5hbWU=" //Base64 encoding of "username"
property string username: "cGFzc3dvcmQ=" //Base64 encoding of "password"
And then edit all the request with:

Code: Select all

username="+username+"&password="+password+"&
or

Code: Select all

username="+app.username+"&password="+app.password+"&
Example (DomoticzBoardApp.qml):

Code: Select all

xmlhttp.open("GET", "http://"+hostName+":"+portNum+"/json.htm?username="+username+"&password="+password+"&type=devices&rid="+idx, true);
Example (DomoticzScreen.qml)

Code: Select all

simpleSynchronous("http://"+app.hostName+":"+app.portNum+"/json.htm?username="+app.username+"&password="+app.password+"&type=command&param=switchscene&idx="+app.scene2idx+"&switchcmd=Off");
Ps. I tried to use functions like:

Code: Select all

 btoa("username")
but unfortunately this did not work and I had to hardcode the Base64 values.[/i]

I think this would be a nice addon feature. I've not tried HTTPS yet. But for now base64 auth is enough for me.

Re: Toon app: DomoticzBoard

Posted: Sat Oct 21, 2017 12:53 pm
by RomMon
@Timeless

Understood that https is not supported by (the qml version used by) Toon.
For kodiRemote (patch) I didn't had to use Base64 encoding.
(I have not looked why kodiRemote it is not working for Kodi17. Guess https?)