[OpenTRV-dev] stats outs

Bo Herrmannsen bo.herrmannsen at gmail.com
Sat May 30 08:15:00 BST 2015


is there any way i could replace occupancy with something else? only
speaking about the non json output

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

@1008;T19C9;L59;O1

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"

2015-05-29 22:52 GMT+02:00 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>
> 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>:
> > 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>
> 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>:
> > > 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>
> 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
> > > http://lists.opentrv.org.uk/listinfo/opentrv-dev
> > >
> > > _______________________________________________
> > > OpenTRV-dev mailing list
> > > OpenTRV-dev at lists.opentrv.org.uk
> > > http://lists.opentrv.org.uk/listinfo/opentrv-dev
> >
> > _______________________________________________
> > OpenTRV-dev mailing list
> > OpenTRV-dev at lists.opentrv.org.uk
> > http://lists.opentrv.org.uk/listinfo/opentrv-dev
> >
> > _______________________________________________
> > OpenTRV-dev mailing list
> > OpenTRV-dev at lists.opentrv.org.uk
> > http://lists.opentrv.org.uk/listinfo/opentrv-dev
>
> _______________________________________________
> OpenTRV-dev mailing list
> OpenTRV-dev at lists.opentrv.org.uk
> 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/ae910488/attachment.html>


More information about the OpenTRV-dev mailing list