android app TOON
Moderators: marcelr, TheHogNL, Toonz
Re: android app TOON
We just need someone to write a proper app. The newer firmware (5.x) now also supports QtWebsockets which gives much more options for a mobile app to communicate with Toon.
Just need someone ti build such an app.
In the meantime you can consider using x11vnc on Toon.
You have then full remote control over your Toon (you will need to open up your firewall at home to allow incoming connections on port 5900 to Toon).
A good working client for Android devices is bVNCfree for instance, on a PC you can user TigerVNC but I gues sthere will be many others
Just need someone ti build such an app.
In the meantime you can consider using x11vnc on Toon.
You have then full remote control over your Toon (you will need to open up your firewall at home to allow incoming connections on port 5900 to Toon).
A good working client for Android devices is bVNCfree for instance, on a PC you can user TigerVNC but I gues sthere will be many others
member of the Toon Software Collective
Re: android app TOON
x11vnc works great with bVNC Free on my android Phone. Thanks!
Re: android app TOON
I've updated the app which vlabianski started.
I, however, don't have an rooted Toon yet so I'm not 100% sure it will work.
(I have an issue while I was rooting my Toon viewtopic.php?f=104&t=12044)
You can either build your own from the code or download the APK from here:
https://github.com/Inversion-NL/Toon-Android
It's a beta version for now until I get someone willing to solve the issue on my Toon (paid, offcourse).
I, however, don't have an rooted Toon yet so I'm not 100% sure it will work.
(I have an issue while I was rooting my Toon viewtopic.php?f=104&t=12044)
You can either build your own from the code or download the APK from here:
https://github.com/Inversion-NL/Toon-Android
It's a beta version for now until I get someone willing to solve the issue on my Toon (paid, offcourse).
Re: android app TOON
Thanks. Great you picked this up. It is not crashing anymore at startup which is good.RoadXY wrote:I've updated the app which vlabianski started.
I, however, don't have an rooted Toon yet so I'm not 100% sure it will work.
(I have an issue while I was rooting my Toon viewtopic.php?f=104&t=12044)
You can either build your own from the code or download the APK from here:
https://github.com/Inversion-NL/Toon-Android
It's a beta version for now until I get someone willing to solve the issue on my Toon (paid, offcourse).
If I may give you some remarks:
When Away/sleep/home/comfort is selected it is almost not visible that it is selected. Maybe change color background or change color text on button, like on Toon.
Right to the degrees is displayed "At <time> on 0.00". That (0.00) is not correct when on my Toon is "Om 23:00 op Slapen". Also 1 decimal should be enough.
1 decimal is also enough for both degrees at the left side.
When changing something it is giving an error below which is disappearing too fast. Something about responsedata or responseheader is null.
When you tell me which url you use I can give you the respons if you want.
When touch refresh icon, it is not giving any feedback. So unsure if it is doing anything.
Re: android app TOON
Could you create some screenshots please?
I also noticed that the intro library that I used doesn't respond to touches, at least it doesn't on my Pixel 3 XL running Android Q.
I also noticed that the intro library that I used doesn't respond to touches, at least it doesn't on my Pixel 3 XL running Android Q.
Re: android app TOON
From the error I cannot make e screenshot.RoadXY wrote:Could you create some screenshots please?
I also noticed that the intro library that I used doesn't respond to touches, at least it doesn't on my Pixel 3 XL running Android Q.
Like poster below, Power usage is indeed alsways zero.
Last edited by glsf91 on Sat Mar 30, 2019 8:43 pm, edited 1 time in total.
Re: android app TOON
Nice work. I don't have the error as described above, however is "stroom nu" not working. It's stays zero. I agree with the decimal places. One should do it. Keep up the good work!RoadXY wrote:I've updated the app which vlabianski started.
I, however, don't have an rooted Toon yet so I'm not 100% sure it will work.
(I have an issue while I was rooting my Toon viewtopic.php?f=104&t=12044)
You can either build your own from the code or download the APK from here:
https://github.com/Inversion-NL/Toon-Android
It's a beta version for now until I get someone willing to solve the issue on my Toon (paid, offcourse).
Re: android app TOON
I can solve the powerusage if I change this in mainactivity:RoadXY wrote:Could you create some screenshots please?
I also noticed that the intro library that I used doesn't respond to touches, at least it doesn't on my Pixel 3 XL running Android Q.
Code: Select all
if(aDevicesInfo.getElecProdFlowHigh() > 0){
currentElectricUsage = aDevicesInfo.getElecProdFlowHigh();
String text = decimalFormat.format(aDevicesInfo.getElecProdFlowHigh()) + " watt";
txtvCurrentPowerUse.setText(text);
} else {
currentElectricUsage = aDevicesInfo.getElecProdFlowLow();
String text = decimalFormat.format(aDevicesInfo.getElecProdFlowLow()) + " watt";
txtvCurrentPowerUse.setText(text);
}
I also think why the error is coming:
Code: Select all
protected void onPostExecute(Object o) {
if(o instanceof String) {
ResponseData responseData = null;
switch (method) {
case "getthermostatinfo":
responseData = Converter.convertFromTemperature((String) o);
break;
case "getzwavedevices":
responseData = Converter.convertFromDeviceInfo((String) o);
break;
case "setschemestate":
break;
case "setsetpoint":
break;
}
if (responseData != null && responseHandler != null) {
responseHandler.onResponse(responseData);
} else
responseHandler.onResponseError(new NullPointerException("response data or responseHandler is null"));
And for selected button background color I would propose this: <color name="colorPresetAccent">#DDDDDD</color>
I also see the problem with: "At <time> on 0.00"
In ThermostatInfo there is a mistake in nextSetPoint. This must be nextSetpoint.
So private int nextSetPoint; should be private int nextSetpoint;
And also in:
Code: Select all
public double getNextSetPoint(){
return nextSetpoint;
}
-
- Member
- Posts: 76
- Joined: Wed Nov 07, 2018 1:53 pm
Re: android app TOON
That "zero" issue can be solved easily by just fetching the information from /happ_pwrusage?action=GetCurrentUsage. This keeps a track of the current usage.
I've got no gas, so I won't see any gas usage. Seems like the page even shows power production (for people with solar panels).{"result":"ok",
"powerUsage": {"value":276, "avgValue":373.76},
"powerProduction": {"value":0, "avgValue":0.00},
"gasUsage": {"value":0, "avgValue":0.00}
}
Re: android app TOON
Got also a error here. When i start the app, once the connection is established, the app crashes immediately.
Running Android 9. Will try to make a video of it.
Running Android 9. Will try to make a video of it.
Member of the Toon Software Collective
Re: android app TOON
I've created an issue for this (to keep track) here:glsf91 wrote:When Away/sleep/home/comfort is selected it is almost not visible that it is selected. Maybe change color background or change color text on button, like on Toon.
https://github.com/fabianblom/Toon-Android/issues/5
I've created an issue for this here:glsf91 wrote:Right to the degrees is displayed "At <time> on 0.00". That (0.00) is not correct when on my Toon is "Om 23:00 op Slapen". Also 1 decimal should be enough.
1 decimal is also enough for both degrees at the left side.
https://github.com/fabianblom/Toon-Android/issues/6
I'll have an look when my bricked Toon is up and running again.glsf91 wrote:When changing something it is giving an error below which is disappearing too fast. Something about responsedata or responseheader is null.
When you tell me which url you use I can give you the respons if you want.
These messages (toasts) are there for debugging right now.
I could create an toast message (those messages at the bottom of the screen which dissapear after a few seconds), if that helps?glsf91 wrote:When touch refresh icon, it is not giving any feedback. So unsure if it is doing anything.
I didn't display an waiting screen because that just blocks further use of the app until the request to Toon is finished.
Now it'll queue up commands and execute them in order.
Last edited by RoadXY on Mon Apr 01, 2019 1:19 pm, edited 1 time in total.
Re: android app TOON
I've already fixed this in 0.5.1RoadXY wrote:Could you create some screenshots please?
I also noticed that the intro library that I used doesn't respond to touches, at least it doesn't on my Pixel 3 XL running Android Q.
Re: android app TOON
Thanks, when my Toon is up and running again I'll checkWickedMaster wrote:That "zero" issue can be solved easily by just fetching the information from /happ_pwrusage?action=GetCurrentUsage. This keeps a track of the current usage.
I've got no gas, so I won't see any gas usage. Seems like the page even shows power production (for people with solar panels).{"result":"ok",
"powerUsage": {"value":276, "avgValue":373.76},
"powerProduction": {"value":0, "avgValue":0.00},
"gasUsage": {"value":0, "avgValue":0.00}
}
Re: android app TOON
Code: Select all
case R.id.btnPlus:
TemperatureController.getInstance().setTemperatureHigher(0.5);
break;
case R.id.btnMin:
TemperatureController.getInstance().setTemperatureLower(0.5);
break
Bron: https://github.com/Inversion-NL/Toon-Android/blob/master/app/src/main/java/com/toonapps/toon/view/MainActivity.java
Member of the Toon Software Collective
Re: android app TOON
I'm not sure if I can follow you here.glsf91 wrote:I can solve the powerusage if I change this in mainactivity:Code: Select all
if(aDevicesInfo.getElecProdFlowHigh() > 0){ currentElectricUsage = aDevicesInfo.getElecProdFlowHigh(); String text = decimalFormat.format(aDevicesInfo.getElecProdFlowHigh()) + " watt"; txtvCurrentPowerUse.setText(text); } else { currentElectricUsage = aDevicesInfo.getElecProdFlowLow(); String text = decimalFormat.format(aDevicesInfo.getElecProdFlowLow()) + " watt"; txtvCurrentPowerUse.setText(text); }
What did you change and where?
Thanks, I'll look into it.glsf91 wrote:At my toon dev_3.6 is used for low electricty.
Which error do you mean?glsf91 wrote:I also think why the error is coming:In this part responseData will be always null when setschemestate or setsetpoint is used.Code: Select all
protected void onPostExecute(Object o) { if(o instanceof String) { ResponseData responseData = null; switch (method) { case "getthermostatinfo": responseData = Converter.convertFromTemperature((String) o); break; case "getzwavedevices": responseData = Converter.convertFromDeviceInfo((String) o); break; case "setschemestate": break; case "setsetpoint": break; } if (responseData != null && responseHandler != null) { responseHandler.onResponse(responseData); } else responseHandler.onResponseError(new NullPointerException("response data or responseHandler is null"));
I'm not sure if I follow.glsf91 wrote:And for selected button background color I would propose this: <color name="colorPresetAccent">#DDDDDD</color>[/qoute]
Thanks, I'll look into it.
glsf91 wrote:I also see the problem with: "At <time> on 0.00"
In ThermostatInfo there is a mistake in nextSetPoint. This must be nextSetpoint.
So private int nextSetPoint; should be private int nextSetpoint;
And also in:Code: Select all
public double getNextSetPoint(){ return nextSetpoint; }
There is no 'nextSetpoint' in my code?