water meter Vitens in Dashticz

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
NilsNijenhuis
Posts: 81
Joined: Friday 10 July 2020 22:56
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

water meter Vitens in Dashticz

Post by NilsNijenhuis »

Hello,

i have been able to read my watermeter from vitens en get the liters in Domoticz and Dashticz.
The only problem i have is that the block is displaying the "total meter reading" instead of only the total day usage?

if i click on the block i can see the total day usage in the left upper corner (0,05m3), but i want tot show this directly on my dashboard.
and if its possible in liters...

Does anyone know how to do this?

Code: Select all

blocks[water_vandaag] = {}
//blocks[water_vandaag]['filter'] = 'day';
blocks[water_vandaag]['width'] = 6;
blocks[water_vandaag]['image'] = 'water.png';
blocks[water_vandaag]['title'] = 'water vandaag';
blocks[water_vandaag]['show_lastupdate'] = false;
blocks[water_vandaag]['protected'] = true;
blocks[water_vandaag]['popup'] = 'graph_92';

Code: Select all

// Definition 'water' graph
blocks['graph_92'] = {
  devices: [92],
  title: 'water',
  graph: 'bar',
  datasetColors: ['yellow'],
    legend: {
      'v_92': 'waterverbruik'
	}
}

Nils
Attachments
sensor watermeter.JPG
sensor watermeter.JPG (66.83 KiB) Viewed 1202 times
watermeter (2) dashticz.JPG
watermeter (2) dashticz.JPG (98.68 KiB) Viewed 1202 times
watermeter dashticz.JPG
watermeter dashticz.JPG (11.65 KiB) Viewed 1202 times
Sunhw
Posts: 3
Joined: Thursday 04 November 2021 10:53
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: netherlands 't Gooi
Contact:

Re: water meter Vitens in Dashticz

Post by Sunhw »

Nice job.

I am also working on reading my water meter.
The model I have here has no reflective pice on the wheels. Even no wheels at all.
A magnetic switch like you used did not work also.
A compas showed that there is a magnet moving deep inside the meter.
So I thought I use a i2c magnetic sensor.
Image
This works on my domoticz on a pi.
Now how to get the info to be visible in domoticz?




Verzonden vanaf mijn iPhone met Tapatalk
A pi a day keeps the doctor away
Lokonli
Posts: 2260
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: water meter Vitens in Dashticz

Post by Lokonli »

This is the Dashticz forum. Do you have it working in Domoticz already?
Sunhw
Posts: 3
Joined: Thursday 04 November 2021 10:53
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: netherlands 't Gooi
Contact:

Re: water meter Vitens in Dashticz

Post by Sunhw »

Yes, for over 10 years a working system with p1 meter solar panels and switches on a pi. Often browsed the forum for tips and found them.
I thought now it is time to connect my watermeter.
And found out it was more difficult than I thought.
Because the normal route by a magmatic switch I did not get this working up to 24v and no succes.
Also no other users had this meter working here in the Netherlands.
So I thought I attack that by i2c with a HMC5883L 3axe kompas.
The first adventure was quite disappointing, a lot of errors with with all the i2c tool libs, python3 stuff. Still no output from the compas.
Yesterday evening there was this eureka moment and after a nice tip I found the right driver (QMC5883) and now I have output on the. I2c bus. And data from the compas is interacting with the water flow.
Now I try to find a route to get this data so that it is readable by domoticz.
The data now is a running number from 2000 down to -2000
So a bit of value tweaking and there should be a form of on off value available.

My first idee was to let this value flip a gpio pin an connec this to an other gpio pin and read this into domoticz. Het is the short coming of my Python programming skills.
So I was after a idee to achieve this.

Regards
Hans

Sorry for the long read


Verzonden vanaf mijn iPhone met Tapatalk
A pi a day keeps the doctor away
whoami
Posts: 73
Joined: Tuesday 31 March 2020 22:31
Target OS: -
Domoticz version:
Location: Dutch
Contact:

Re: water meter Vitens in Dashticz

Post by whoami »

Hi Nils, did you find the solution to show only the day usage?
I now have the same setup- and have the same problem...
I only see the total used liters/m3 and not the daily usage in dashticz
NilsNijenhuis wrote: Thursday 10 June 2021 9:29 Hello,

i have been able to read my watermeter from vitens en get the liters in Domoticz and Dashticz.
The only problem i have is that the block is displaying the "total meter reading" instead of only the total day usage?

if i click on the block i can see the total day usage in the left upper corner (0,05m3), but i want tot show this directly on my dashboard.
and if its possible in liters...

Does anyone know how to do this?

Code: Select all

blocks[water_vandaag] = {}
//blocks[water_vandaag]['filter'] = 'day';
blocks[water_vandaag]['width'] = 6;
blocks[water_vandaag]['image'] = 'water.png';
blocks[water_vandaag]['title'] = 'water vandaag';
blocks[water_vandaag]['show_lastupdate'] = false;
blocks[water_vandaag]['protected'] = true;
blocks[water_vandaag]['popup'] = 'graph_92';

Code: Select all

// Definition 'water' graph
blocks['graph_92'] = {
  devices: [92],
  title: 'water',
  graph: 'bar',
  datasetColors: ['yellow'],
    legend: {
      'v_92': 'waterverbruik'
	}
}

Nils
whoami
Posts: 73
Joined: Tuesday 31 March 2020 22:31
Target OS: -
Domoticz version:
Location: Dutch
Contact:

Re: water meter Vitens in Dashticz

Post by whoami »

I used counter and not the incremental counter and it worked!
NilsNijenhuis
Posts: 81
Joined: Friday 10 July 2020 22:56
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: water meter Vitens in Dashticz

Post by NilsNijenhuis »

yes i have a day usage in the block of the water meter
watermeter.jpg
watermeter.jpg (6.05 KiB) Viewed 700 times

Code: Select all

// water meter = water_vandaag
blocks[water_vandaag] = {}
blocks[water_vandaag]['value'] = "<CounterToday>",
blocks[water_vandaag]['width'] = 6;
blocks[water_vandaag]['image'] = 'water.png';
blocks[water_vandaag]['title'] = 'Waterverbruik dag';
blocks[water_vandaag]['last_update'] = false;
blocks[water_vandaag]['protected'] = true;
blocks[water_vandaag]['popup'] = 'graph_92';

Code: Select all

// Definition 'water' graph
blocks['graph_92'] = {
  devices: [92],
  title: 'water',
	custom : {
        "maand": {
            range: 'year',
			datasetColors: ['yellow'],
			graph: 'bar',
            filter: '1 months',
            data: {
                m3: 'd.v_92',
				  }
		    },
		
		
        "afgelopen jaar": {
			graph: 'bar',
			datasetColors: ['yellow'],
			range: 'year',
			groupBy: 'month',
			aggregate: 'sum',
            data: {
                m3: 'd.v_92',	
				  }
		},
		
		
  	    "dag": {
			graph: 'bar',
		    datasetColors: ['yellow'],
            range: 'day',
			//filter: 'today',
            groupBy: 'hour',
			data: {
                m3: 'd.v_92',
            }
		},
		},
}
waterverbruik.jpg
waterverbruik.jpg (130.51 KiB) Viewed 700 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest