rscada/libmbus

Arduino.

Closed this issue · 10 comments

A lot of people are looking for an arduino library !!
Have you ever thing to pot the library for www.arduino.cc microcontroller ?
Another question, is there a cheap m-bus converter ?
I can find only commercial one to 70€ each...
Let me know !
Thankyou Niomix

I have not looked into compiling libmbus for arduino so I'm not sure if there any problems with that. My guess would be is at least that the protocol part of the library should be fine, it is only C code and has no external dependencies. You might have to replace the transport code (serial/socket is used there, don't know if the arduino OS/environment provides that).

As for the m-bus converter, there is a schematic in https://github.com/rscada/libmbus/tree/master/hardware, if you want to build your own. Also the Mbus 10 http://www.a2s.pl/en/m-bus-10-p-3150.html I think is quite affordable and has been working well for me.

From my point of view it doesn't make sense to spend time in porting libmbus to Arduino. The library isn't designed for such tiny hardware. It's necessary to write a M-Bus library for this platform from the scratch.

Thank you steven, you're right. Bad news. I've no competence to create
a library from stretch, it could have an interesting commercial use
also.
May be someone should be interested. Have a nice day !
Simone

2012/11/24, Stefan Wahren notifications@github.com:

From my point of view it doesn't make sense to spend time in porting libmbus
to Arduino. The library isn't designed for such tiny hardware. It's
necessary to write a M-Bus library for this platform from the scratch.


Reply to this email directly or view it on GitHub:
#27 (comment)

Inviato dal mio dispositivo mobile

*AVVERTENZE AI SENSI DEL DLGS 196/2003 *Le informazioni contenute in questo
messaggio di posta elettronica e/o nel/i file allegato/i sono da
considerarsi strettamente riservate. Il loro contenuto è consentito
esclusivamente al/i destinatario/i del messaggio. Qualora riceveste questo
messaggio senza esserne il destinatario/i Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vs. sistema; costituisce comportamento contrario
ai sensi dell'art 616 c.p.che ai principi dettati dal Dlgs. 196/2003 il
trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo ad
altri soggetti, copiarlo, od utilizzarlo per finalità diverse.This e-mail
may contain confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify the
sender immediately and destroy this e-mail. Any unauthorized copying,
disclosure or distribution of the material in this e-mail is strictly
forbidden.

I'm interested in your use case(s) of a M-Bus library on Arduino. Do you need a M-Bus master, slave or both?

The slave device are tipical the water meter, kcal meter, or any other
metering system.
Tipically they're not powered and the m-bus circuit provide a 30v DC power
over the same data bus.
The master are tipically some expensive device (here the cheapest one
http://www.a2s.pl/en/m-bus-10-p-3150.html), it provide an interface between
the slave m-bus device to an rs232.
I've an eagle cad working circuit that is able to act as a master, i can
sent it to you if you need it, i also have the java code.
The idea of using arduino is add the consumption monitor to my house.
Should be interesting convert the eaglecad circuit for an arduino shield,
and offer it as a service for the gas/wather/etc.. metering.
Thake a look of my actual metering (near real time) using "internet of
thing site" http://sen.se/nio
Let me know !
Ciao ;)

On Sat, Nov 24, 2012 at 6:45 PM, Stefan Wahren notifications@github.comwrote:

I'm interested in your use case(s) of a M-Bus library on Arduino. Do you
need a M-Bus master, slave or both?


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-10680455.

Okay, i understand. You want to implement a M-Bus gateway. As commercial devices they are very expensive.

If you plan to create the hardware by yourself, than a M-Bus module can be an option for you ( example: http://www.solvimus.de/smart-metering/m-bus-master/ ). I think this is cheaper than an extra device, but i'm not very good in hardware issues.

One of the main problems in your use case is, that the M-Bus devices are powered by battery. This results in a highest data refresh rate of 15 minutes for each device. So you need a background process to fetch the data and save them.

Another problem is that the M-Bus datapoints are not so good standarized as they could be. Some meters have this datapoints with this units and other meters have other datapoints with that units. For your use case the software should filter only the relevant datapoints and normalize them.

With other words you need a lot of limitation to run this on your platform and that is against a general approach of a library.

Thankyou Stefan.
The device (slave) are usually powered directly by the m-bus, (some one
have battery, but only for clock purpose not for the communication) the
device just record the value, do not broadcast the informations, i try to
use a commercial one, you can get the information just call the device
number (as a mac address).
So you don't need a background process, but just get the data based on a
poller, and i think it's should be quite easier.
Regarding the standard implementation.. i'ts not so nice...
Thank you for the hardware i'll investigate.

Another use shoud be use a raspberry pi (debian based to do that)...
Thank you.
S

On Sun, Nov 25, 2012 at 1:30 PM, Stefan Wahren notifications@github.comwrote:

Okay, i understand. You want to implement a M-Bus gateway. As commercial
devices they are very expensive.

If you plan to create the hardware by yourself, than a M-Bus module can be
an option for you ( example:
http://www.solvimus.de/smart-metering/m-bus-master/ ). I think this is
cheaper than an extra device, but i'm not very good in hardware issues.

One of the main problems in your use case is, that the M-Bus devices are
powered by battery. This results in a highest data refresh rate of 15
minutes for each device. So you need a background process to fetch the data
and save them.

Another problem is that the M-Bus datapoints are not so good standarized
as they could be. Some meters have this datapoints with this units and
other meters have other datapoints with that units. For your use case the
software should filter only the relevant datapoints and normalize them.

With other words you need a lot of limitation to run this on your platform
and that is against a general approach of a library.


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-10692932.

I think i know what you mean. Currently libmbus doesn't support datapoint selection. Maybe this could be a new feature in the near future.

Ok !
Let me know for the library evolution !
Thank you.
Simone.

On Sun, Nov 25, 2012 at 10:58 PM, Stefan Wahren notifications@github.comwrote:

I think i know what you mean. Currently libmbus doesn't support datapoint
selection. Maybe this could be a new feature in the near future.


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-10699107.

Just for the protocol, at the following project someone tries to port M-Bus to Arduino (based on libmbus):

https://github.com/gcanitezer/Mbus