Page 1 of 29

Toon App: Water

Posted: Wed Feb 03, 2021 11:48 pm
by oepi-loepi
Measure your water usage with a cheap proximity sensor and a Wemos D1 mini.

SOFTWARE UPDATE TO 1.4.35. To flash this new version first flash 4 mb blank of reset to factory defaults before flashing the new firmware.

If you are not able to build the device yourself, please send me a pm or email. I can deliver complete sets.
https://link.marktplaats.nl/m1678038347

Image

1. Update your Toon
2. Flash a Wemos D1 Mini with the .bin (see link below)
3. Install the app from the toonstore
4. Start the Wemos and select wifi Autoconnect and goto 192.168.4.1
5. Fill in your wifi credentials at the portal and select a static IP adress
6. Select your regular WIFI
7. Goto http://esp-toonwater.local or the selected static ip and click "instellen and "opslaan"".
8. On toon install the app toonWater.
9. On toon Install a new tile “water TXT” from the section Algemeen.
10. On Toon click the new tile and go to the settings, fill in the Wemos IP adress and the current water counter value.
11. Click save

Image

Image

Image

Image

Image

parts:
sensor : https://nl.aliexpress.com/item/32880606083.html
wemos :https://nl.aliexpress.com/item/4000037046508.html

mounting: to mount the sensor i have used a stauff 12 mm block which i taped to a acryl glass plate. The acryl glass has been clamped to the water meter. The tip of the sensor has been grinded a bit to take ab. 1mm of. This way it gets a little closer to the "wheel" of the meter.

ESP part can be found here:
download latest file here

*********** LET OP: software is niet bestemd voor verkoop ! **************


TO BUILD:

Connections:
Sensor Black ----> Wemos D2
Sensor Brown ----> Wemos +5V
Sensor Blue ----> Wemos ground (g)

To flash the bin to wemos. Read here:
https://github.com/oepi-loepi/water_ESP_part

As bonus: from the setup menu (wemos) you can also fill in Domoticz credentials. Create a water flow meter and a regular (!) counter (so 2x IDX)

For HA users:
The json output is written to /water.html like this:

{"waterflow":"0","waterquantity":"2295565"}

So you can add sensors in HA like this:

sensor:
- platform: rest
resource: http://192.168.1.130/water.html
name: Waterflow
value_template: "{{ value_json.waterflow}}"
unit_of_measurement: "l/m"

sensor:
- platform: rest
resource: http://192.168.1.130/water.html
name: Watermeter
value_template: "{{ value_json.waterquantity | float / 1000 }}"
unit_of_measurement: "M3"

IMPORTANT: Wemos program setup requires to set a STATIC (FIXED) ip adress. NOT DHCP

**** LET OP: software is niet bestemd voor verkoop ! **************

Re: Toon App: Water (available soon)

Posted: Fri Feb 05, 2021 5:05 pm
by Edgar
Very interesting and it looks like it’s quite easy to install. Maybe you can feed the Wemos from the ‘ketel module’? Or it’s different Voltage?

Cheers,

Edgar

Re: Toon App: Water (available soon)

Posted: Fri Feb 05, 2021 9:37 pm
by oepi-loepi
Edgar wrote:Very interesting and it looks like it’s quite easy to install. Maybe you can feed the Wemos from the ‘ketel module’? Or it’s different Voltage?

Cheers,

Edgar
Best is the Wemos to have it s own power supply if 5 VDC. It is a standard telephone power supply with micro USB connector. Most people have about 10 of those adapters lying in a drawer somewhere as spare. The power supply of Toon is 24 VAC so very different.

Re: Toon App: Water (available soon)

Posted: Sat Feb 06, 2021 4:17 pm
by rleunk
Great News, looking forward for the app, already bought an extra board and a 5V sensor, had one, but it is 6-30V
Keep up the good work!

Re: Toon App: Water (available soon)

Posted: Sat Feb 06, 2021 5:56 pm
by oepi-loepi
rleunk wrote:Great News, looking forward for the app, already bought an extra board and a 5V sensor, had one, but it is 6-30V
Keep up the good work!
Yes for all others: buy the 5vdc sensor and not the 6-30 vdc version: it will not work if connected to the 5vdc (i tried).

Re: Toon App: Water (available soon)

Posted: Sun Feb 07, 2021 7:51 pm
by Jasper
Great News, can't wait to try

Re: Toon App: Water

Posted: Mon Feb 08, 2021 11:43 am
by Jasper
Just flashed my Wemos (was already connected to watermeter and a DS temp sensor, I suggest you rename the files because I wasn't sure which to use or explain in readme.

Other question, Can't we use espeasy firmware for this or a push from domoticz/home assistant?

Re: Toon App: Water

Posted: Mon Feb 08, 2021 12:17 pm
by oepi-loepi
Jasper wrote:Just flashed my Wemos (was already connected to watermeter and a DS temp sensor, I suggest you rename the files because I wasn't sure which to use or explain in readme.

Other question, Can't we use espeasy firmware for this or a push from domoticz/home assistant?
Pushing is not possible. However the .bin can be flashed using espeasy flash tool. I will look into getting the data from Domoticz through REST api. That should be less problem. For HA i do not know how to do it. Maybe someone can advise or help how the REST api of HA looks like.

Re: Toon App: Water

Posted: Mon Feb 08, 2021 12:22 pm
by Jasper
So far on IP it works, Just added them in Toon.

To help others
What I did:

Go to TSC Store and download the Water app.

Added a new tile Water Nu on last page (not sure if the others on tiles page 2 also work?
clicked the new tile and settings opened.
Added the IP that you should look for on your router if not set during setup. (When doing it during setup use a IP that wasn't in use already or if the wemos already has been connected to your network like mine use that IP address.
Entered my watermeter counter value included the last 3 (2293.585)

Now waiting for it to show, It did show on webportal after flushing the toilet.

Re: Toon App: Water

Posted: Mon Feb 08, 2021 12:23 pm
by Jasper
oepi-loepi wrote:
Jasper wrote:Just flashed my Wemos (was already connected to watermeter and a DS temp sensor, I suggest you rename the files because I wasn't sure which to use or explain in readme.

Other question, Can't we use espeasy firmware for this or a push from domoticz/home assistant?
Pushing is not possible. However the .bin can be flashed using espeasy flash tool. I will look into getting the data from Domoticz through REST api. That should be less problem. For HA i do not know how to do it. Maybe someone can advise or help how the REST api of HA looks like.
Not an HA expert, Just started moving from Domoticz to HA
https://developers.home-assistant.io/docs/api/rest/

Re: Toon App: Water

Posted: Mon Feb 08, 2021 12:50 pm
by Jasper
If entered the ip address right, how long will it take before something show up on Toon?

I flushed the toilet and used 6L water though Toon still says 0 and meter value is also still the same.

Webportal did update so that part works imo
Toon WaterMeter
HTTP/1.1 200 OK Content-type:text/html Connection: close {"waterflow":0,"waterquantity":2300}

Re: Toon App: Water

Posted: Mon Feb 08, 2021 5:39 pm
by Jasper
Reset the wemos and tried again,

Set network ip, host ip and subnet.

Went back to Toon and set Counter Values and that came back to the web portal so there is definitely a good connection between Toon and the wemos, just don't see any water usage on Toon.
Screenshot_20210208-161104_Chrome_copy_270x570.png
Screenshot_20210208-161104_Chrome_copy_270x570.png (21.07 KiB) Viewed 51612 times
20210208_161201_copy_270x127.jpg
20210208_161201_copy_270x127.jpg (32.92 KiB) Viewed 51612 times
Screenshot_20210208-161222_Chrome_copy_270x570.png
Screenshot_20210208-161222_Chrome_copy_270x570.png (21.19 KiB) Viewed 51612 times

Re: Toon App: Water

Posted: Mon Feb 08, 2021 7:23 pm
by oepi-loepi
I have checked the bin files and have found an error in them. Sorry. I have changed them and put the online. Could you please check?

Re: Toon App: Water

Posted: Mon Feb 08, 2021 8:30 pm
by rleunk
Super, last update version 1.1.1 from aprox 18:50 on github did the trick, looks like it is working now, awesome!
I used my Sensus HRI-A4 puls sensor instead off the proximity sensor to send the puls to the D1 mini, works great.

Re: Toon App: Water

Posted: Mon Feb 08, 2021 8:35 pm
by PeJeWe
I have a water meter connected to my raspberry, is it possible to import this data from domoticz (json) ? to display it on my toon?