<div dir="ltr">is there any way i could replace occupancy with something else? only speaking about the non json output<div><br></div><div>for a dummie like me that is manageable... i know the string is complete each time and i can just split it up and send it </div><div><br></div><div><div>@1008;T19C9;L59;O1</div></div><div><br></div><div>and if the order is the same each time i dont even need the letters.. like "L" can go since i know that will be light every time... Temp could also be send like "19.9"</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-05-29 22:52 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">Don’t try and write a JSON parser by hand, there will be lots of free ones that you can use.<br>
<br>
The JSON stats are in the form of a JSON object or map, ie a set of key-value pairs.  Most values are numeric, the ID is a string.<br>
<br>
battery is in millivolts,<br>
T temperature in 16ths of C, tT is target temperature in whole C<br>
vC is *cumulative* movement, v is current valve position<br>
<br>
<br>
> On 29 May 2015, at 21:40, Bo Herrmannsen <<a href="mailto:bo.herrmannsen@gmail.com">bo.herrmannsen@gmail.com</a>> wrote:<br>
><br>
> oki, will try tomorrow.... for simplicity sake can you tell how i look for:<br>
><br>
> Battery -  I assume i go for B|mV and then the number that follows<br>
> Temp - guess but T|C and then the number directly after C<br>
> Valve Open - vC|% and the number before C ?<br>
> Light - :350 ?<br>
><br>
> 2015-05-29 22:35 GMT+02:00 Damon Hart-Davis <<a href="mailto:dhd@exnet.com">dhd@exnet.com</a>>:<br>
> If there are too many values to fit in one frame then available values are rotated through the output, attempting to show changed values as soon as possible.<br>
><br>
> You have to parse as a JSON map and pick out the values you want, when they are sent.<br>
><br>
> Rgds<br>
><br>
> Damon<br>
><br>
><br>
> > On 29 May 2015, at 21:24, Bo Herrmannsen <<a href="mailto:bo.herrmannsen@gmail.com">bo.herrmannsen@gmail.com</a>> wrote:<br>
> ><br>
> > hmm<br>
> ><br>
> > one of the nodes does not display the valve open all the time<br>
> ><br>
> > {"@":"0950","+":2,"B|mV":2771,"T|C16":350,"O":1}<br>
> ><br>
> ><br>
> > then some lines later:<br>
> ><br>
> > {"@":"0950","+":1,"v|%":0,"tT|C":15,"vC|%":0}<br>
> ><br>
> ><br>
> > are there a cartain way the JASON is build so i can make the script match?<br>
> ><br>
> > 2015-05-29 22:22 GMT+02:00 Damon Hart-Davis <<a href="mailto:dhd@exnet.com">dhd@exnet.com</a>>:<br>
> > Valve open % is only in the JSON stats (starting with ‘{‘), yes.<br>
> ><br>
> > Rgds<br>
> ><br>
> > Damon<br>
> ><br>
> ><br>
> > > On 29 May 2015, at 20:39, Bo Herrmannsen <<a href="mailto:bo.herrmannsen@gmail.com">bo.herrmannsen@gmail.com</a>> wrote:<br>
> > ><br>
> > > also i might tackle this the wrong way... i want to log also the valve open % and for that i need to look at the json data i get right?<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>
<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>