Toon app: temperature readings

Forum about forum-provided applications on Toon

Moderators: marcelr, TheHogNL, TerrorSource, Toonz

Re: Toon app: temperature readings

Postby rbak » Sat Feb 09, 2019 5:44 pm

I recently aquired and rooted a Toon 1. I love the additional features it offers and one of them is this application to provide a graphical overview of the temperature readings for the past 24 hours.

However after the initial installation I did not see any readings yet in the first hour or so. The next morning when I checked it showed some values but it does no longer seem to update the screen. So I expect the logging has stopped around 2 am. See the below screenshot.

Image

So I restarted my Toon and expected to see additional information in the next few hours. But unfortunately that was not the case. Not sure what caused the logging to stop and what I need to do in order to get this working again. Even after 10 hours it still does not show any additional data.

Also what about the < 4 0 > at the top left corner. Not sure what that is for but the left < is nearly off the side of the screen. Also touching it does not seem to have any effect.Is this supposed to show like this?

I am using the most recent version 1.3.3. Any suggestions what to check or what could cause this?
rbak
Starting Member
Starting Member
 
Posts: 13
Joined: December 2018

Re: Toon app: temperature readings

Postby Toonz » Sun Feb 10, 2019 11:47 am

It looks like the app cannot read the data anymore via the internal webserver.
Source: http://127.0.0.1:10080/happ_thermstat?a ... mostatInfo

Could it be your webserver crashed? Port 10080 is closed?
When you execute wget with the address above you should get a JSON dataset returned.

Hope this helps
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1026
Joined: December 2016

Re: Toon app: temperature readings

Postby rbak » Sun Feb 10, 2019 12:26 pm

I guess you are right. When I use the following (using port 10080) it fails
Code: Select all
wget http://127.0.0.1:10080/happ_thermstat?action=getThermostatInfo

But what I try using the same but using port 80 it seems to work.
Code: Select all
wget http://127.0.0.1:80/happ_thermstat?action=getThermostatInfo

Although I am a Linu noob I did find out last evening that in your scripts you are indeed using the mentioned HTTP request with port 10080. As part of the rooting I opened up that port from external on the firewall as well. Hence why I tried to the same request from my laptop using the ip address of the Toon instead. Using port 10080 that failed as well and using port 80 it worked. If so it retures code as below:
Code: Select all
{"result":"ok", "currentTemp":"2003", "currentSetpoint":"2000", "currentInternalBoilerSetpoint":"43", "programState":"2", "activeState":"0", "nextProgram":"1", "nextState":"1", "nextTime":"1549866600","nextSetpoint":"1900","randomConfigId":"1804289383","errorFound":"255","connection":"0","burnerInfo":"0","otCommError":"0","currentModulationLevel":"32"}

This morning I also uninstalled the temperature logger and rebooted the Toon using "shutdown -r now". After that I re-installed the temperature logger app but with the same result. The log still shows the same as in the posted screenshot. I checked again and it seems that port 10080 is still not responding so your comment makes absolute sense.

So in theory changing your script to use port 80 should resolve this I assume. However that seems only temporary as when the application is updated later I expect the script will be overwritten and using port 10080 again.

Now the key question is why is the webserver no longer listening on port 10080 and how can I resolve this.
rbak
Starting Member
Starting Member
 
Posts: 13
Joined: December 2018

Re: Toon app: temperature readings

Postby Toonz » Sun Feb 10, 2019 1:38 pm

feel free to change the port to 80 for now. The app hasn't had much revisions since a long time. Only small changes to maintain compatibility with newer firmware now and then.
Otherwise check your firewall and webserver settings...
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1026
Joined: December 2016

Re: Toon app: temperature readings

Postby rbak » Sun Feb 10, 2019 1:49 pm

OK to test the theory that the port 10080 is the issue (and instead I can use port 80) I have temporary modified the to use port 80 instead:
Code: Select all
vi /qmf/qml/apps/temperaturelogger-1.3.3/TemperatureloggerApp.qml

I have changed the following line in the code and updated it to use port 80:
Code: Select all
xmlhttpt.open("GET", "http://127.0.0.1:80/happ_thermstat?action=getThermostatInfo", true );
xmlhttpt.send();

I have restarted the Toon and see below the result.
Image
I do not see however what that would have to do with the firewal settings and I expect those are only valid for the external connections and not from internal. Nevevrteless

My iptables.conf file currently looks like this:

Image
But as the request is internal using 127.0.0.1 I do not expect that these firewall settings are in any way related. It would only be relevant for the connection from my laptop to this webservice.
rbak
Starting Member
Starting Member
 
Posts: 13
Joined: December 2018

Re: Toon app: temperature readings

Postby rbak » Sun Feb 10, 2019 2:51 pm

OK so the logger seems to be happy now but I am still puzzled why in the middle of teh night (2 am as it seems) the logger suddenly stopped working. So is there anything special happening around that time in the Toon?

As I use my Toon without Eneco and have disabled all the standard apps through teh TSC panel it wil be only the standard apps after rooting teh Toon and using the update-rooted script using the -f option. I am running on software version 4.22.7 with the Toonstore, Afvalkalemder and the temperatuur logger apps enabled. On top I have installed x11vnc but I only manually start this in case I need to create some screenshots.

THe only thing I can find that seems to happen around 2 am is in the Toonstore configuration:
Image
As you can see this is setup to update the apps automatically at that time. But having that said I have not enabled that feature. So it beats me why this webserver stopped responding on port 10080 and is listening on port 80.
rbak
Starting Member
Starting Member
 
Posts: 13
Joined: December 2018

Re: Toon app: temperature readings

Postby Toonz » Sun Feb 10, 2019 8:23 pm

in older versions Toon itself did something at the middle of the night at 2 or 3 o'clock. We never fully figured out what exactly is happening but some sort of internal housekeeping was started at that time.
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1026
Joined: December 2016

Re: Toon app: temperature readings

Postby rbak » Sun Feb 10, 2019 9:04 pm

OK still don't understand how this would affect the webserver to stop listening to port 10080. But never mind as from the other thread I opened (Webserver not listening on port 10080) I understand you will change the code of the temperature readings app to use port 80 as of the next release. In that case I will remove port 10080 from the "/etc/default/iptables.conf" file so it is no longer exposed to the outside world (well my local network that is)

I love the app by the way!
rbak
Starting Member
Starting Member
 
Posts: 13
Joined: December 2018

Re: Toon app: temperature readings

Postby Toonz » Mon Feb 11, 2019 8:09 pm

Hi all,

I just released version 1.3.4 on ToonStore:
Changelog:
- switched back to port 80 instead of 10080 when querying temperature data from Toon, now using:
http://127.0.0.1/happ_thermstat?action= ... mostatInfo

Kind regardz,

Toonz
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1026
Joined: December 2016

Previous

Return to Toon Apps

Who is online

Users browsing this forum: No registered users and 1 guest