[OpenTRV-dev] Cant figure to complete a OEM sketch

Bo Herrmannsen EMAIL ADDRESS HIDDEN
Sun Sep 7 21:17:33 BST 2014


the data from the meter gets printed to serial in this section:

// kamReadReg - read a Kamstrup register
float kamReadReg(unsigned short kreg) {

and its called from here:

// check if it is time to do a poll
  if(millis() - lastpoll > POLLINTERVAL or lastpoll == 0) {


so you can set a interval of say 1 min or 30 sec... i just included check
of temp sensor at the same time...

then using the lbinker on the electricity meter and that one is on an
interrupt...



2014-09-07 22:13 GMT+02:00 Kevin Wood <EMAIL ADDRESS HIDDEN>:

> Hi Bo,
>
> I've just had a quick glance at it, but everything that goes to OEM is in
> the structure of type "Payload" called "emontx" that is declared at the top
> of the file. I'm guessing that you need to insert the return value from
> "kamDecode" into that structure somewhere.
>
> Not sure what that represents or whether it needs more conversion
> beforehand, but the contents of the "Payload" structure is what ends up in
> the RF message that is sent.
>
> Cheers,
>
> Kevin
>
> On 07/09/14 20:47, Bo Herrmannsen wrote:
>
>> I have looked at this sketch the hole day and have an idea on how it
>> works...
>>
>> but i cant figure on how to get the meter data to OEM... for now it just
>> prints to serial...
>>
>> anyone that have the time to tell me excatly how before i loose my mind
>> more than i have?
>>
>> sketch attached
>>
>> --
>>
>>                   |||||
>>                 @(~Ô^Ô~)@
>> -------------oOo---U---oOo-------------
>> |                                     |
>> |  Bo Herrmannsen                     |
>> |                                     |
>> |                                     |
>> | "blessed are the "cracked",         |
>> |  for its they who let in the light" |
>> |                         Ooo         |
>> |_________________ooO____(   )________|
>>                   (   )    ) /
>>                    \ (    (_/
>>                     \_)
>>
>>
>>
>>
>> _______________________________________________
>> OpenTRV-dev mailing list
>> EMAIL ADDRESS HIDDEN
>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>>
>>  _______________________________________________
> OpenTRV-dev mailing list
> EMAIL ADDRESS HIDDEN
> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>



-- 

                 |||||
               @(~Ô^Ô~)@
-------------oOo---U---oOo-------------
|                                     |
|  Bo Herrmannsen                     |
|                                     |
|                                     |
| "blessed are the "cracked",         |
|  for its they who let in the light" |
|                         Ooo         |
|_________________ooO____(   )________|
                 (   )    ) /
                  \ (    (_/
                   \_)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opentrv.org.uk/pipermail/opentrv-dev/attachments/20140907/0aa9553a/attachment.html>


More information about the OpenTRV-dev mailing list