<div dir="ltr">something like this format is what i was trying to get:<div><br></div><div>ID:TEMP:LIGHT:VALVE:BATTERY<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-05-30 9:38 GMT+02:00 Damon Hart-Davis <span dir="ltr"><<a href="mailto:dhd@exnet.com" target="_blank">dhd@exnet.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> On 30 May 2015, at 07:31, Bo Herrmannsen <<a href="mailto:bo.herrmannsen@gmail.com">bo.herrmannsen@gmail.com</a>> wrote:<br>
><br>
> btw in what file are the non json output nade up? have an idea i want to try<br>
<br>
They are converted to ASCII in Control.cpp for now, but those messages are populated from a structure, and have a particular on-wire format.<br>
<br>
Rgds<br>
<br>
Damon<br>
<br>
<br>
<br>
    // Look for binary-format message.<br>
    FullStatsMessageCore_t stats;<br>
    getLastCoreStats(&stats);<br>
    if(stats.containsID)<br>
      {<br>
      // Dump (remote) stats field '@<hexnodeID>;TnnCh[P;]'<br>
      // where the T field shows temperature in C with a hex digit after the binary point indicated by C<br>
      // and the optional P field indicates low power.<br>
      serialPrintAndFlush(LINE_START_CHAR_RSTATS);<br>
      serialPrintAndFlush((((uint16_t)stats.id0) << 8) | stats.id1, HEX);<br>
      if(stats.containsTempAndPower)<br>
        {<br>
        serialPrintAndFlush(F(";T"));<br>
        serialPrintAndFlush(stats.tempAndPower.tempC16 >> 4, DEC);<br>
        serialPrintAndFlush('C');<br>
        serialPrintAndFlush(stats.tempAndPower.tempC16 & 0xf, HEX);<br>
        if(stats.tempAndPower.powerLow) { serialPrintAndFlush(F(";P")); } // Insert power-low field if needed.<br>
        }<br>
      if(stats.containsAmbL)<br>
        {<br>
        serialPrintAndFlush(F(";L"));<br>
        serialPrintAndFlush(stats.ambL);<br>
        }<br>
      if(0 != stats.occ)<br>
        {<br>
        serialPrintAndFlush(F(";O"));<br>
        serialPrintAndFlush(stats.occ);<br>
        }<br>
      serialPrintlnAndFlush();<br>
    }<br>
_______________________________________________<br>
OpenTRV-dev mailing list<br>
<a href="mailto:OpenTRV-dev@lists.opentrv.org.uk">OpenTRV-dev@lists.opentrv.org.uk</a><br>
<a href="http://lists.opentrv.org.uk/listinfo/opentrv-dev" target="_blank">http://lists.opentrv.org.uk/listinfo/opentrv-dev</a><br>
</blockquote></div><br></div>