This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Automatic meter reading AMR
#2
Hi,

You can create a trend to your metering datapoints and set resolution to 1 hour.

With script you can fetch data from the trends, and with this fetched data you can make either a csv file and send it by mail, or you can build a html energy report on the fly and insert the data from the trends into your html template.

This way you can send any data you like to any format you like.

Samples about how to use trend.fetch or mail csv file are here plenty on the forum...

I included a script to fetch data with script, see attachments.

Here is a short sample how to create a HTML setup and insert on the VAR0 to VAR16 fields your data and check the other dynamic fields, this HTML can be added to a mail message.

Code:
htmldata = [[<html style="font-family:Arial">
<body>

<h1>SSHN Energieoverzicht</h1>

<p>Geachte heer/mevrouw,</p>
<p>Hieronder vindt u de energie- en verbruiksrapportage van ]] .. VAR0 .. [[ locaties studentenhuisvesting xxxx. Na de omschrijving volgt het verbruik van de afgelopen periode (sinds de vorige rapportage die ]] .. old_date .. " om " .. old_hourandseconds .. [[ verstuurd is). Daarachter staat het totale verbruik vanaf de eerste rapportage.</p>
<table style="width:100%">
    <tr>
        <td><b>Omschrijving</b></td>
        <td><b>Verbruik</b></td>
        <td><b>Meterstand</b></td>
    </tr>
    <tr>
        <td>Studentenhuisvesting locatie A - Gasverbruik</td>
        <td>]] .. VAR1 .. [[ m3</td>
        <td>]] .. VAR2 .. [[ m3</td>
        </tr>
    <tr>
        <td>Studentenhuisvesting locatie B - Gasverbruik</td>
        <td>]] .. VAR3 .. [[ m3</td>
        <td>]] .. VAR4 .. [[ m3</td>
    </tr>
    <tr>
        <td>Studentenhuisvesting locatie C - Gasverbruik</td>
        <td>]] .. VAR5 .. [[ m3</td>
        <td>]] .. VAR6 .. [[ m3</td>
    </tr>
    <tr>
        <td>Studentenhuisvesting locatie D - Gasverbruik</td>
        <td>]] .. VAR7 .. [[ m3</td>
        <td>]] .. VAR8 .. [[ m3</td>
    </tr>
    <tr>
        <td>(...)</td>
        <td>(...) m3</td>
        <td>(...) m3</td>
    </tr>
</table>

<p>Onderstaand vindt u het rendement en het aantal draaiuren weergegeven van de ketels van ]] .. VAR0 .. [[ locaties studentenhuisvesting xxxxx. Bij het aantal draaiuren volgt na de omschrijving eerst het aantal draaiuren vanaf de vorige rapportage ]] .. old_date .. [[ en daarna het totale aantal draaiuren. Bij het rendement volgt eerst het rendement van de afgelopen periode en vervolgens het gemiddelde rendement over de gehele looptijd.</p>

<table style="width:100%">
    <tr>

        <td><b>Omschrijving</b></td>
        <td><b>Sinds Datum</b></td>
        <td><b>Totaal</b></td>
    </tr>
    <tr>
        <td>Studentenhuisvesting locatie A - Rendement ketel</td>
        <td>]] .. VAR9 .. [[ %</td>
        <td>]] .. VAR10 .. [[ %</td>
    </tr>
    <tr>
        <td>Studentenhuisvesting locatie A - Draaiuren ketel</td>
        <td>]] .. VAR11 .. [[ uur</td>
        <td>]] .. VAR12 .. [[ uur</td>
    </tr>
    <tr>
        <td>Studentenhuisvesting locatie B - Rendement ketel</td>
        <td>]] .. VAR13 .. [[ %</td>
        <td>]] .. VAR14 .. [[ %</td>
    </tr>
    <tr>
        <td>Studentenhuisvesting locatie B - Draaiuren ketel</td>
        <td>]] .. VAR15 .. [[ uur</td>
        <td>]] .. VAR16 .. [[ uur</td>
    </tr>
    <tr>
        <td>(...)</td>
        <td>(...)</td>
        <td>(...)</td>
    </tr>
</table>

<p>Wanneer u vragen heeft over deze rapportage kunt u contact opnemen met xxxxxx. Dit kan door te bellen naar xxxxxx of door te antwoorden op dit bericht.</p>
<p>Deze rapportage is verzonden op ]] .. current_date .. [[ om ]] .. current_hourandseconds .. [[ uur.</p>
</body>
</html>]]

Small tip: Next time consider ( Schneider iEM (; ) modbus meters, they are a lot cheaper then KNX meters, they contain more data and the dataflow is not impacting your KNX bus...

BR,

Erwin

Attached Files
Reply


Messages In This Thread
Automatic meter reading AMR - by Max - 24.02.2017, 13:06
RE: Automatic meter reading AMR - by Erwin van der Zwart - 24.02.2017, 13:21
RE: Automatic meter reading AMR - by Max - 24.02.2017, 13:37

Forum Jump: