<div dir="ltr">it worked...<div><br></div><div>so we can update down to one thing at a time...</div><div><br></div><div>you asked about names? hmm.... Temp, Light, Valve Open, Battery</div><div><br></div><div>open to suggestions thou... not clear what the unit have to offer :-P</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-01 11:02 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">Hi Bo,<br>
<br>
Do you think it would be possible to send the values through one at a time, even if I happen to get them in groups, ie send power then temp then whatever as separate HTTP calls?<br>
<br>
Not massively efficient, but might get something working.<br>
<br>
And what names should those values have for your case?<br>
<br>
Rgds<br>
<br>
Damon<br>
<br>
<br>
> On 31 May 2015, at 12:03, Bo Herrmannsen <<a href="mailto:bo.herrmannsen@gmail.com">bo.herrmannsen@gmail.com</a>> wrote:<br>
><br>
> one small catch... the driver have to buffer the data until it has everything.... or emoncms will timestamp everything wrong and insert 0 where it does not get data<br>
><br>
><br>
><br>
> 2015-05-31 12:49 GMT+02:00 Damon Hart-Davis <<a href="mailto:dhd@exnet.com">dhd@exnet.com</a>>:<br>
> Maybe I’ll have a little time later today, if you’re around, to sketch out a OEM driver for the Java stuff and we could even try to get the Java server running.<br>
><br>
> Rgds<br>
><br>
> Damon<br>
><br>
> > On 30 May 2015, at 09:49, Bo Herrmannsen <<a href="mailto:bo.herrmannsen@gmail.com">bo.herrmannsen@gmail.com</a>> wrote:<br>
> ><br>
> > anyways off to have lunch @ my parents... will be home late afternoon/evening<br>
> ><br>
> > everything is ready to go.. except for the import to emoncms part<br>
> ><br>
> > 2015-05-30 9:54 GMT+02:00 Bo Herrmannsen <<a href="mailto:bo.herrmannsen@gmail.com">bo.herrmannsen@gmail.com</a>>:<br>
> > oki.... was going to use the java stuff but i know you are busy as hell and might not have time for this...<br>
> ><br>
> > when is it most fitting that i start to pester you about it?<br>
> ><br>
> > the format emoncms like are:<br>
> ><br>
> > $url = 'http://********/emoncms/api/post?apikey=*******&node=$id&json={Temp:' . $temp . ',Light:' . $light . ',?:' . $gid . '}';<br>
> ><br>
> > i have set node id to be same id as the units... makes it easy to know where the stats comes from... the above is just a crude example....  you can add as many variables you want<br>
> ><br>
> > 2015-05-30 9:50 GMT+02:00 Damon Hart-Davis <<a href="mailto:dhd@exnet.com">dhd@exnet.com</a>>:<br>
> > The Java server-side code parses the current format(s) as-is.  If you change anything, especially the leading character, you will not be able to use any of that stuff.  Plus of course you’ll be on your own maintaining your own code!<br>
> ><br>
> > Please note that the first character on each output line indicates the format of the rest of the line as things stand.<br>
> ><br>
> > Rgds<br>
> ><br>
> > Damon<br>
> ><br>
> ><br>
> > > On 30 May 2015, at 08:43, Bo Herrmannsen <<a href="mailto:bo.herrmannsen@gmail.com">bo.herrmannsen@gmail.com</a>> wrote:<br>
> > ><br>
> > > something like this format is what i was trying to get:<br>
> > ><br>
> > > ID:TEMP:LIGHT:VALVE:BATTERY<br>
> > ><br>
> > > 2015-05-30 9:38 GMT+02:00 Damon Hart-Davis <<a href="mailto:dhd@exnet.com">dhd@exnet.com</a>>:<br>
> > ><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>
> > ><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>
> ><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>
> ><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>
><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>
><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>
<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>