New plugin for reading the gas and electricity usage from a Dutch Smart meter

I am really going to be honest by saying that I really dont know anything much about this stuff.
I usually stick with zwave but this was an easy addition… well it was…
The cable type should be the correct one right?
I will try to get the V6 P1 datalogger to work on my old laptop (battery=dead) tomorrow but I hope I can figure out what to do exactly…
Is there any easy way to see on my Vera if it is receiving data?

Yes, in the vera logging there should be some action

Tried the cable in a old laptop with the software etc.
Does not show any activity ???
The Chip can be accessed with the pc and the signal is inverted but it does not seem the actual meter is giving signals??
Could by P1 port be defective or something?
Any idea how i can check this or how to troubleshoot?

Did you reverse the signals and cycle port after programming the port (FTDI tool)

http://forum.micasaverde.com/index.php/topic,10736.msg74910.html#msg74910

@bfromdruten; can you assist in the following;

have changed the p1 connection from usb to tcp by using a tll/tcp adapter
the info is now coming from an IP adress (192.168.2.80:1470)

what need i to change in your files to get it working
thanks
huib

have changed the usb input into netwerk input. have changed the input from p1 into ttl>tcp and via a fixed ip adress i read now the data

i have changed the files from original ino input via ip

only i get a lot of warnings in the log file

e[31;1mluup_iop_open 0xe67360 args 3 bad device/ip/porte[0m <0x2f96a680>

some body some advice?

huib

Huib hope you get a response quickly. I’ve experienced this part of the forum not so responsive.

Hi all, snotneus has offered me a help. Thanks for that snotneus, but I think it is not so applicable for me, is it? However, if you or anone can help me to alter the file to proces data every 1/3 of the time? That would be very great! Thanks in advance.

[quote=“SanderL, post:114, topic:171668”]I have issues with my Vera. After contacting MCV they come back with:

I’ve checked the logs from our servers and it seems that your issue is related to : “Sensor Meterkast Verbruik Master”, “Sensor Teruglevering Dag - Powermeter ExportRate2”, “Sensor Teruglevering Nacht - Powermeter ExportRate1”, “Sensor Verbruik Dag - Powermeter ImportRate2” and “Sensor Verbruik Nacht - Powermeter ImportRate1”. Each of these 5 devices are reporting the values every 10 seconds to Vera.

Can you please try to increase the report interval for those 5 devices and see if you still encounter this issue?

How do I increase the interval from 10 to lets say 30 secs?[/quote]

[quote=“Snotneus, post:116, topic:171668”]I have used this plugin myself for a while, but have changed the way the plugin works.
It is still processing the incoming data every 10 seconds, but I first wait until all data has arrived (wait for end of message character “!”) giving a more smooth processing.[/quote]

Could you post your implementation file? I am curious what you have changed to wait for end of message character “!”
I also made modifications to the file for the PV-installation.

Hi,

I have attached the implementation file.
I had to make a copy because I had to remove some Email addresses, which are used to send the meter values once each month.
For the rest the source is as it runs fine on my Vera2.

Waiting for the end of message character “!” is copied in below (it is part of the attached file):

###########################################
function doProcess(data)
if (string.find(data, strImpMeterKwh1) ~= nil) then
smImpMeterKwh1 = data;
elseif (string.find(data, strImpMeterKwh2) ~= nil) then
smImpMeterKwh2 = data;
elseif (string.find(data, strExpMeterKwh1) ~= nil) then
smExpMeterKwh1 = data;
elseif (string.find(data, strExpMeterKwh2) ~= nil) then
smExpMeterKwh2 = data;
elseif (string.find(data, strImpCurWatt) ~= nil) then
smImpCurWatt = data;
elseif (string.find(data, strExpCurWatt) ~= nil) then
smExpCurWatt = data;
elseif (string.find(data, strImpMeterM3) ~= nil) then
smTimeStampM3 = data --Bijv: 0-1:24.3.0(130315180000)(00)(60)(1)(0-1:24.2.1)(m3)
doGasReading = true;
elseif (doGasReading == true) then
doGasReading = false;
smImpMeterM3 = data;
end;

if (string.find(data, strComplete) == nil) then
	return;
end;

###########################################

The function continues of course, but look at the last three lines.
strComplete is defined as local strComplete = “!” at start up of the program.
Also the strings like strImpMeterKwh1 etc are initialised at startup

So as long as no character “!” has been recieved, processing of data is interrupted.

When the incoming data from the Smartmeter is handled this way, it is also very easy to limit updating the device and its children by just adding a counter after the last three lines, which also escapes from further processing, until the counter is greater then three, or whatever.

Hope this makes sense.

If something is not clear, let me know and I will try to explain.

Regards.

@Snotneus I renamed the file to I_dutchSmartMeter, can I leave D_dutchSmartMeter.(xml/json) and S_dutchSmartMeter.xml as the where?
and I have also a gas meter. Do I have to change local doGasReading = false; to “true”

@Peter, no, the I_EnergyMeter.xml does not match with the original files and the variable “doGasReading” should not be changed. It only exists to indicate that the next incoming string is gas data.

I have shared the source code only as an example how it would be possible to get a smoother processing of incoming data (at least to my opinion) and to show a possibility to add a kind of delay in updating the device.

The I_EnergyMeter.xml is developed to accommodate my own special needs and not to have a universal meter reading device.
You will be better off to use the original smartMeter plug-in.

You can however use some parts of the I_EnergyMeter to change the I_DutchSmartMeter.xml, but be carefull to use the right variables.

Regards.

@Snotneus Thank you. I will look at the code to see if I can find a Way to reduce the number of measurements.

@peter, if you succeed PLEASE let me know how

Has anyone had any success with a DSMR 4.0 smart meter? I’ve gotten one and I’m not getting any information from the port.

Hi, for the DSMR 4 meters you should set the serial port to 115200 8N1. Works for me after some start up issues. Nice app!

If I now can figure out to show the output of my Enphase Envoy solar system I would be a happy camper.

Cheers Rene.

Hi you all,

recently i had a Kaifa smart meter installed and with the cable from wireless wonen, the beta 2b plugin and settings of the serial port to 115200 8N1, I’m receiving data about the electricity. however the gasmeter doesn’t show updating info and stays on 0 m3.

Any suggestions (using vera 3)

Thnx so far

Is the gasmeter connected to the electricitymeter?

Yeah it’s one of thos landys gyr or so, connects over the air