Toon APP: zonneboilerStats

Forum about forum-provided applications on Toon

Moderators: marcelr, TheHogNL, Toonz

Post Reply
msx4ever
Starting Member
Starting Member
Posts: 23
Joined: Fri Mar 15, 2019 12:44 pm

Toon APP: zonneboilerStats

Post by msx4ever »

Hi All,

I've created an app for reading the temperature of my solar boiler. It makes use of a sensor connected to a Raspberry Pi (seperate project) as the solar boiler does not have its own temperature sensor which can be read. An interval can be set on how often the temperature data has to be refreshed on the Toon.

Purpose
Reading the temperature of the water in the solar boiler

Current version
Version 0.0.1
Initial release

Example
On the Toon a tile can be added which gives the following information:
Meting zonneboilerStat.jpg
Meting zonneboilerStat.jpg (69.69 KiB) Viewed 6724 times
Settings
In the settings of the app you need to specify the IP-address and the refresh ratel so that Toon knows where to get the temperature data and how often it needs to renew it.

Project location
https://github.com/Ray-Hoo/zonneboilerStats
oepi-loepi
Advanced Member
Advanced Member
Posts: 628
Joined: Sat Feb 09, 2019 7:18 pm

Re: Toon APP: zonneboilerStats

Post by oepi-loepi »

Although i do not own a solar boiler myself, i looked at your code and have to make compliments. It is good to see other people making apps like this for the community. Well done, thumbs up for you!
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon APP: zonneboilerStats

Post by Toonz »

Well done, I can add the app to the ToonStore if you want (I will fork your repo to our github location) ?
Probably also good to share what you did on the Pi so other users could implement this as well.

Kind regardz,

Toonz

EDIT: I really appreciate you save your settings to the standard location and implemented Toon1 and Toon 2 compatibility. Thumbs up!

EDIT 2: can you rename your repository to zonneboilerstats (lower case) instead of zonneboilerStats for compatibility with the ToonStore?
member of the Toon Software Collective
msx4ever
Starting Member
Starting Member
Posts: 23
Joined: Fri Mar 15, 2019 12:44 pm

Re: Toon APP: zonneboilerStats

Post by msx4ever »

Yes, please add it to the Toonstore.

On the Github page there is a link to another Github repository ( https://github.com/Ray-Hoo/zonneBoiler ) where I describe what I did to get the temperature by using a Raspberry Pi.

I renamed the project, so it is all in lower case now.
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon APP: zonneboilerStats

Post by Toonz »

Hi all,

version 0.0.1 is now available in the ToonStore.

P.S. @msx4ever, I send you a pull request to add two files for the version number and changelog (needed to control updates via the ToonStore).

Kind regardz,

Toonz
member of the Toon Software Collective
oepi-loepi
Advanced Member
Advanced Member
Posts: 628
Joined: Sat Feb 09, 2019 7:18 pm

Re: Toon APP: zonneboilerStats

Post by oepi-loepi »

Op zich zou het ook heel eenvoudig zijn om een webservertje te maken op basis van een esp8266 (Wemos D1 Mini) en de digitale temperatuursensor DS18B20 . Die kan dan eenvoudig via websockets of via http requests de toon voeden van info. Een wemos is een stuk goedkoper dan een raspberry pi en de software zou een .bin kunnen zijn. Misschien een idee..
msx4ever
Starting Member
Starting Member
Posts: 23
Joined: Fri Mar 15, 2019 12:44 pm

Re: Toon APP: zonneboilerStats

Post by msx4ever »

oepi-loepi wrote:Op zich zou het ook heel eenvoudig zijn om een webservertje te maken op basis van een esp8266 (Wemos D1 Mini) en de digitale temperatuursensor DS18B20 . Die kan dan eenvoudig via websockets of via http requests de toon voeden van info. Een wemos is een stuk goedkoper dan een raspberry pi en de software zou een .bin kunnen zijn. Misschien een idee..
De Raspberry Pi had ik liggen vandaar de keuze. Ik zal binnenkort eens kijken of ik het met een esp8266 ook kan maken.
oepi-loepi
Advanced Member
Advanced Member
Posts: 628
Joined: Sat Feb 09, 2019 7:18 pm

Re: Toon APP: zonneboilerStats

Post by oepi-loepi »

[quote="msx4ever"

De Raspberry Pi had ik liggen vandaar de keuze. Ik zal binnenkort eens kijken of ik het met een esp8266 ook kan maken.[/quote]

Super dat je het wilt proberen. Evt kan ik ook wel wat helpen. Beste is wel ook een wifimanager te gebruiken zodat elke gebruiker eenvoudig zijn wifi kan instellen (op static ip). Ook is dan het beste een .bin te maken zodat de gebruiker eenvoudig kan flashen en niet zelf op zoek hoef naar de juiste libraries.
Pieterraxis
Starting Member
Starting Member
Posts: 21
Joined: Mon Jun 01, 2020 9:24 pm

Re: Toon APP: zonneboilerStats

Post by Pieterraxis »

Gonna remember your project!

Only sensor is build into my boiler. Don't know which type it is.

Thanks for the effort building this
msx4ever
Starting Member
Starting Member
Posts: 23
Joined: Fri Mar 15, 2019 12:44 pm

Re: Toon APP: zonneboilerStats

Post by msx4ever »

oepi-loepi wrote: Super dat je het wilt proberen. Evt kan ik ook wel wat helpen. Beste is wel ook een wifimanager te gebruiken zodat elke gebruiker eenvoudig zijn wifi kan instellen (op static ip). Ook is dan het beste een .bin te maken zodat de gebruiker eenvoudig kan flashen en niet zelf op zoek hoef naar de juiste libraries.
De esp is binnen, nu kijken voor wat vrije tijd om er iets mee te doen :-)
Hypermobile
Member
Member
Posts: 76
Joined: Sun Jan 14, 2018 5:12 pm

Re: Toon APP: zonneboilerStats

Post by Hypermobile »

i have my solar boiler info in Domoticz,

3x a Temparture Idx. (Collector temp, return fluid temp, boiler temp)

I would be cool if you app is compatible with the Json Api of Domoticz. so you can readout multiple Temp value's (with a custom name maybe)
then you can Create whatever TempTile you want.

(just like Oepie loopie's WaterMeter app. You can choose, Domoticz or Direct values.
ikookmaar
Starting Member
Starting Member
Posts: 38
Joined: Tue Mar 12, 2019 11:29 pm

Re: Toon APP: zonneboilerStats

Post by ikookmaar »

Hi, I am having some trouble getting zonneboilerstats to work.
At first I could'nt get the backend,
the zonneBoiler part on my rpi to function, but that's solved now. I can now see the result of the json query by browsing to http://ip-adres-raspberry-pi/get-temperature.php
Allthough I am not experienced in SQL, python and php programming, I managed to get so far by "correcting" some code :-)
Maybe they are usefull to you and others also...

Following the instructions all went wel up to creating the databas, but I couldn't get read-temperature.py to actually write values to it
But then I found a mistake in the line:

Code: Select all

sql = ("""INSERT INTO temperatuurLog (datum,tijd,temperatuur) VALUES (%s,%s,%s)""",(datewrite,timewrite,temperature))
I changed it to

Code: Select all

sql = ("""INSERT INTO temperatuurLog (date,time,temperature) VALUES (%s,%s,%s)""",(datewrite,timewrite,temperature))
, since your instructions about creating the database uses english names:

Code: Select all

CREATE TABLE temperatuurLog(date DATE NOT NULL, time TIME NOT NULL, temperature FLOAT(5,2) NOT NULL);
.

So then the sensor values are being written to the db, but I still couldn't read them out. The webpage at http://ip-adres-of-my-raspberry-pi/get-temperature.php gave me an http error 500
I couldn't find any reason in the apache errr.log or access.log (aprt from it beïng mentioned as error 500) so I did some troubleshooting with trial and error.
I found out that there were some punctuation marks you left-out in the script were the variables are defined:

Code: Select all

$serverip=ip-adres
$portnumber=port-number
They are correct in the instructions though: $serverip="ip-adres";
$portnumber="port-number"; Also the construction of IP-adress and port does not seem to be working in the mysqli: construct.
I left the port number (mine is the default 3306) out and changed

Code: Select all

$con=mysqli_connect($serverip:$portnumber,$username,$password);
to

Code: Select all

$con=mysqli_connect($serverip,$username,$password);
to get it working.
I guess it has to do something with the way the two are concatenated.

Now I am still left with a problem with the zonneboilerstats app on the Toon (type 1, firmwware version 5.46.4):
It doesn't seem to save any settings I configure, be it the IP-adress of my rpi, or the refresh rate.
It shows the IP adress I configured at ""voer hier het adres van de Zonneboiler in" after typing it on the virtual keyboard and pressing the checkmark after that, but after pressing "Save..." It doesn't show on the next screen "Zonneboiler instellingen".
"Opslaan" doesn't seem to do anything there either.
I tried removing and reinstalling the app, but to no avail.
The tile "Zonneboiler stats" still notes "empty settings"
B,t.w. The toggle for show icon works as expected, i guess... It takes me back to the settings, since they are not set (?). So does the tile


What could be (or am I doing) wrong?

Cheers!
msx4ever
Starting Member
Starting Member
Posts: 23
Joined: Fri Mar 15, 2019 12:44 pm

Re: Toon APP: zonneboilerStats

Post by msx4ever »

Sorry for the late reply... I have fixed the saving part in a new version which I am trying to push out into the store.
oepi-loepi
Advanced Member
Advanced Member
Posts: 628
Joined: Sat Feb 09, 2019 7:18 pm

Re: Toon APP: zonneboilerStats

Post by oepi-loepi »

I can see you have created an update to your own repo. Can you create a pull request to : ToonSoftwareCollective/zonneboilerstats ?
Post Reply

Return to “Toon Apps”