sympthom / valley.net.protocols.meterbus Goto Github PK
View Code? Open in Web Editor NEWM-Bus (meter bus, meterbus, mbus) C# project for communicating and parsing M-Bus (EN 13757-2 and EN 13757-3)
License: MIT License
M-Bus (meter bus, meterbus, mbus) C# project for communicating and parsing M-Bus (EN 13757-2 and EN 13757-3)
License: MIT License
if a device is responding a user defined VIF 0x7c (Plain Text) is not supported and causes all next records to be broken or causen an exception!
See https://m-bus.com/assets/downloads/MBDOC48.PDF page 42.
It can be reproduced with following device response:
"68 56 56 68 08 5F 72 91 91 01 19 77 04 14 16 A0 00 00 00 0C 78 91 91 01 19 0D 7C 08 44 49 20 2E 74 73 75 63 0A 20 20 20 20 20 20 20 20 20 20 04 6D 00 0C 8A 26 02 7C 09 65 6D 69 74 20 2E 74 61 62 4A 14 04 14 0D 7A 05 00 04 94 7F 00 00 00 00 44 14 57 B0 04 00 0F 00 01 1F 22 16"
Is it possible to use this library with wM-Bus, currently it looks like wM-Bus is not supported, am I right?
If yes, is there a possibility if you can add support for wM-Bus in this library?
Hello.
In the lib, the serializer responsible for creating the ControlFrame data, it seems like the Control frame, Address, and ControlInformation is missing.
I added it to my code, should anyone not get a response from the meter, using this ControlFrame, be aware that this critical data pieces is missing.
EDIT: PR link: #15
We are testing library for data below:
"68 47 47 68 08 FD 72 03 01 47 01 AE 4C 51 07 6C 60 00 00 0E 13 30 54 46 00 00 00 0E 93 3C 29 00 00 00 00 00 04 3B 21 00 00 00 0C 78 03 01 47 01 0C FD 10 00 00 00 00 04 6D 0A 12 6D 2C 0D FD 0C 09 4D 20 41 49 44 49 53 45 52 1F ED 16"
Library couldn't parse this frame. Could you fix it, please?
Regard,
I am using the TcpBinding and interacting with a Moxa (TCP to Serial) converter to read one MBUS Device.
To intialisation of the MBusMaster I use following code:
var serializer = new MeterbusFrameSerializer();
endpoint = new IPEndPoint(IPAddress.Parse(โ192.168.100.41โ), 4001);
binding = new TcpBinding(endpoint,serializer);
binding.Error += Binding_Error;
binding.IoCompleted += Binding_IoCompleted;
master = new MBusMaster(binding);
master.Meter += Master_Meter;
Afterwards I am calling RequestData every five seconds:
var response = master.RequestData((byte)MBusAdr, TimeSpan.FromSeconds(3)).Result as VariableDataPacket;
This works only for the first call. The second call rises following exception (Socket Exception):
AggregateException SocketException: A request to send or receive data was prevented because the socket is not connected and (when sending via a datagram socket with a sendto call) no address was specified
Is there anything wrong in my workflow or code?
I've detected an error on this class. and I fixed it.
(update line 174)
case DataTypes._24_Bit_Integer:
System.Diagnostics.Debug.Assert(value.Data.Length == 3);
//record.Value = BitConverter.ToInt32(new byte[] { 0 }.Concat(value.Data).ToArray(), 0); // Orj.
#region Coskun edit
byte[] temp = new byte[4];
temp[0] = value.Data[0];
temp[1] = value.Data[1];
temp[2] = value.Data[2];
record.Value = BitConverter.ToInt32(temp, 0);//coskun
#endregion
break;
for example;
input value = 0x112233;
bug result = 0x11223300;
update result=0x00112233;
Hi and thank you for your repo.
Quick question, is Wireless MBus supported?
I want to use MBusMaster
with Serial port, From current code it looks like it is not possible. Would be a useful feature when using UART MBus receivers.
Hello, could You add some example how to use the serial protocol communication and binding please ?
Kind regards for help
Piotr
I am using this MBus implementation with the UdpBinding:
var serializer = new MeterbusFrameSerializer();
endpoint = new IPEndPoint(IPAddress.Parse(Address), Port);
binding = new UdpBinding(endpoint,serializer);
binding.Error += Binding_Error;
binding.IoCompleted += Binding_IoCompleted;
master = new MBusMaster(binding);
master.Meter += Master_Meter;
I am interacting with a Moxa (TCP to Serial) converter to read one MBUS Device. This device send the data to fix port. So I have to configure the receiving (listening) port additionally to the IPEndpoint.
Hi,
i just discovered that my merge request seems not or not fully part of the 1.0.3 package version. When I request the heat meter values I still have AveragingDuration as the name for VIF 74h. According to my fix it should be ActualityDuration. Can you please check?
Hello,
i've created some fixes and would like to create a pull request for it. Unfortunately I always get 403 when I try to create a pull request from within Visual Studio. Whats the right workflow to do it? I've cloned the repository and made the changes on a local branch. Can I pull / merge request these changes somehow?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.