android app TOON

Everything about external control, apps, VNC, etc goes here.

Moderators: marcelr, TheHogNL, Toonz

Martin101010
Starting Member
Starting Member
Posts: 38
Joined: Thu Nov 23, 2017 10:12 pm

Re: android app TOON

Post by Martin101010 »

Aad,

Thanks for the tip. There is an new release with fix.

https://github.com/jonkootje/toon-app

Regards,

Sander & Martin
Rudolf
Member
Member
Posts: 136
Joined: Mon Dec 04, 2017 8:50 pm

Re: android app TOON

Post by Rudolf »

Thanks for sharing. Looks great and works smoothly.

For me the slider (program on/off) and the buttons (home/away/comfort/sleep) aren't working. As soon as the refreshinterval passes the changes are reverted.
Keep up the good work; I hope he has some more free time to finish (and support) the app.

There's a typo in the url for setting the mode:

http://toon:10080/happ_thermstat?action ... ureState=3

In the current code it says 'thermostat'. Without the 'o' it works fine.

Pull-request created. 8) :lol:

FW 4.9.23
http://toonip
10080
globegrabber
Starting Member
Starting Member
Posts: 47
Joined: Thu Sep 21, 2017 9:14 pm

Re: android app TOON

Post by globegrabber »

Up and running,
FW Toon 4.7.23 android 6.0.1 marsmallow

Great job, nice app.

Grz. Globegrabber
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: android app TOON

Post by marcelr »

Still no joy.

My android is ancient, 4.2-something, maybe that's why.
Martin101010
Starting Member
Starting Member
Posts: 38
Joined: Thu Nov 23, 2017 10:12 pm

Re: android app TOON

Post by Martin101010 »

All,

There is an new release with the adjusted Url. happ_thermostat is now happ_thermstat

With my Toon FW 4.8.25 it made no difference, both are working.

Rg,

Sander & Martin
globegrabber
Starting Member
Starting Member
Posts: 47
Joined: Thu Sep 21, 2017 9:14 pm

Re: android app TOON

Post by globegrabber »

First i try to to run it in the lan ip setting, with the modified apk this was no problem en was with the first attempting bingo,
Then struggle some time with the wwan ip setting, and after port forwarding from my router to port 10080 http server, i had initial port 10080 on Toon opened as mansions in the form turtuals for Toon about the vcn turtual.
And then was accessing Toon with the android apk bulls-eye.

Grz Globegrabber
Screamhouse
Starting Member
Starting Member
Posts: 20
Joined: Mon Oct 22, 2012 10:35 am

Re: android app TOON

Post by Screamhouse »

Looks great! Any plans for Apple as well :)
michel30
Member
Member
Posts: 286
Joined: Fri Aug 25, 2017 4:42 pm

Re: android app TOON

Post by michel30 »

Hopefully somebody could build this for apple.
But I think there is an problem with that, the apple appstore.
with android you can always install apk files manual, with apple not the only way to do that is to jailbreak your apple device.
Martin101010
Starting Member
Starting Member
Posts: 38
Joined: Thu Nov 23, 2017 10:12 pm

Re: android app TOON

Post by Martin101010 »

Great to hear that it's working.
Be aware there is no security at all if you portforward your toon to the outside world.
Thats wy I use an VPN to connect to my lan.
It would be nice if the toon webserver could handle SSL en authentication, but I dont now how?

PS: Sorry to say but a IOS app is not within our possibilities
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: android app TOON

Post by marcelr »

Martin101010 wrote:Great to hear that it's working.
Not with everyone :-(
Martin101010 wrote: It would be nice if the toon webserver could handle SSL en authentication, but I dont now how?
Toon's webserver (lighttpd) has ssl support built in. You just have to switch it on and redirect all outside communication through port 443. No big deal, if you ask me. Maybe you need to get a bunch of ssl certificates.
Martin101010
Starting Member
Starting Member
Posts: 38
Joined: Thu Nov 23, 2017 10:12 pm

Re: android app TOON

Post by Martin101010 »

Marcel,

We used https://websitetoapk.com/ to create the app.
I've noticed that other users complain about malware false positives.
I have a Galaxy S6 with Android 7 where the app is not working.
The difference is, on that phone the anti-malware is enabled and also reconizes the app as malware.
Maybe that’s also your problem.

furthermore, we like to enable the app to auto login while using ssl
First step is to enable ssl on toon. I've tried your example in this tread;
domoticaforum.eu/viewtopic.php?f=87&amp ... tpd#p82479
unfortunately, the server becomes unreachable on port 80 and 443. No clue why. As soon as I comment out the changes in the config file, port 80 is working again.
Any ideas why?
Martin101010
Starting Member
Starting Member
Posts: 38
Joined: Thu Nov 23, 2017 10:12 pm

Re: android app TOON

Post by Martin101010 »

I probably found the cause.

When I manually start lighttpd, I get the message; ssl requested but openssl is not compiled in.

Code: Select all

# /HCBv2/bin/lighttpd -D -m /HCBv2/lib/lighttpd -f /HCBv2/etc/lighttpd/lighttpd.conf
[hdrv] libhcb_drv          v0.1 r336   (Sep  7 2017 10:48:44) [master#4ff9b18d14]
[hcom] libhcb_com          v0.1 r114   (Jul  3 2017 08:34:25) [master#893be971f0]
[hbxt] libhcb_boxtalk      v0.1 r115   (Jun 30 2017 16:59:48) [master#8a175d01f2]
[hxml] libhcb_xml          v0.1 r98    (Jun 21 2017 18:17:16) [master#ef293b2d11] (ezxml 0.8.6)
[hbas] libhcb_base         v0.1 r287   (Sep  7 2017 11:00:16) [master#de173cbd21]
2018-01-05 13:13:22: (../../../src/network.c.400) SSL: ssl requested but openssl support is not compiled in
I am on: lighttpd/1.4.33-devel-b27-3-g2da0ff3
Installed using lighttpd_1.4.33-28_qb2.ipk

Is there an ipk that I can use that has openssl compiled in?
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: android app TOON

Post by marcelr »

According to the executable it has ssl support built in. It should be enabled manually in /HCBv2/etc/lighttpd/lighttpd.conf. It's disabled by default.
Martin101010
Starting Member
Starting Member
Posts: 38
Joined: Thu Nov 23, 2017 10:12 pm

Re: android app TOON

Post by Martin101010 »

marcelr wrote:According to the executable it has ssl support built in. It should be enabled manually in /HCBv2/etc/lighttpd/lighttpd.conf. It's disabled by default.
Marcel,

I did exacty what you discribed in an other tread;

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Create the directory /HCBv2/etc/lighttpd/ssl, cd into it and issue:

Code: Select all

openssl req -new -x509 -keyout lighttpd.pem -out lighttpd.pem -days 365 -nodes
This creates a certificate, valid for one year, for your https server.
Add ssl support to lighttpd by adding the following to its config file ( the part from #added onwards, until # end):

Code: Select all

..
    server.document-root        = "/HCBv2/www"

    $SERVER["socket"] == ":10080" {
    server.document-root = "/HCBv2/www"
    }

    #added  MR! 20170526

    $SERVER["socket"] == ":443" {
    server.document-root = "/HCBv2/www"
    ssl.engine  = "enable"
    ssl.pemfile = "/HCBv2/etc/lighttpd/ssl/lighttpd.pem"
    }
    # end add


    ## where to send error-messages to
    server.errorlog             = "/tmp/lighttpd_error.log"
    ...

Reboot the machine.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
unfortunately lightttp will not start when I do that. That's why tried to start it manually to see what the error was with;
# /HCBv2/bin/lighttpd -D -m /HCBv2/lib/lighttpd -f /HCBv2/etc/lighttpd/lighttpd.conf

That's when I get the response;
2018-01-05 13:13:22: (../../../src/network.c.400) SSL: ssl requested but openssl support is not compiled in
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: android app TOON

Post by marcelr »

So you have a version that differs from mine. Is there a pressing need for this functionality? It would mean a rebuild of the daemon and ssl libraries. It's possible, but it takes time, and that's a rare commodity as of this weekend.
Post Reply

Return to “Toon external control”