[OpenTRV-dev] stats outs

Bo Herrmannsen bo.herrmannsen at gmail.com
Sat May 30 07:31:37 BST 2015


btw in what file are the non json output nade up? have an idea i want to try

Den fredag den 29. maj 2015 skrev Damon Hart-Davis <dhd at exnet.com>:

> Don’t try and write a JSON parser by hand, there will be lots of free ones
> that you can use.
>
> 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.
>
> battery is in millivolts,
> T temperature in 16ths of C, tT is target temperature in whole C
> vC is *cumulative* movement, v is current valve position
>
>
> > On 29 May 2015, at 21:40, Bo Herrmannsen <bo.herrmannsen at gmail.com
> <javascript:;>> wrote:
> >
> > oki, will try tomorrow.... for simplicity sake can you tell how i look
> for:
> >
> > Battery -  I assume i go for B|mV and then the number that follows
> > Temp - guess but T|C and then the number directly after C
> > Valve Open - vC|% and the number before C ?
> > Light - :350 ?
> >
> > 2015-05-29 22:35 GMT+02:00 Damon Hart-Davis <dhd at exnet.com
> <javascript:;>>:
> > 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.
> >
> > You have to parse as a JSON map and pick out the values you want, when
> they are sent.
> >
> > Rgds
> >
> > Damon
> >
> >
> > > On 29 May 2015, at 21:24, Bo Herrmannsen <bo.herrmannsen at gmail.com
> <javascript:;>> wrote:
> > >
> > > hmm
> > >
> > > one of the nodes does not display the valve open all the time
> > >
> > > {"@":"0950","+":2,"B|mV":2771,"T|C16":350,"O":1}
> > >
> > >
> > > then some lines later:
> > >
> > > {"@":"0950","+":1,"v|%":0,"tT|C":15,"vC|%":0}
> > >
> > >
> > > are there a cartain way the JASON is build so i can make the script
> match?
> > >
> > > 2015-05-29 22:22 GMT+02:00 Damon Hart-Davis <dhd at exnet.com
> <javascript:;>>:
> > > Valve open % is only in the JSON stats (starting with ‘{‘), yes.
> > >
> > > Rgds
> > >
> > > Damon
> > >
> > >
> > > > On 29 May 2015, at 20:39, Bo Herrmannsen <bo.herrmannsen at gmail.com
> <javascript:;>> wrote:
> > > >
> > > > 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?
> > >
> > > _______________________________________________
> > > OpenTRV-dev mailing list
> > > OpenTRV-dev at lists.opentrv.org.uk <javascript:;>
> > > http://lists.opentrv.org.uk/listinfo/opentrv-dev
> > >
> > > _______________________________________________
> > > OpenTRV-dev mailing list
> > > OpenTRV-dev at lists.opentrv.org.uk <javascript:;>
> > > http://lists.opentrv.org.uk/listinfo/opentrv-dev
> >
> > _______________________________________________
> > OpenTRV-dev mailing list
> > OpenTRV-dev at lists.opentrv.org.uk <javascript:;>
> > http://lists.opentrv.org.uk/listinfo/opentrv-dev
> >
> > _______________________________________________
> > OpenTRV-dev mailing list
> > OpenTRV-dev at lists.opentrv.org.uk <javascript:;>
> > http://lists.opentrv.org.uk/listinfo/opentrv-dev
>
> _______________________________________________
> OpenTRV-dev mailing list
> OpenTRV-dev at lists.opentrv.org.uk <javascript:;>
> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opentrv.org.uk/pipermail/opentrv-dev/attachments/20150530/b2b9377d/attachment.html>


More information about the OpenTRV-dev mailing list