Recording/Logging OptiSmart Output

73 views
Skip to first unread message

Andrew Kirkby

unread,
Jan 12, 2014, 5:43:37 PM1/12/14
to meas...@googlegroups.com
Hi,

I starting using this script last year after purchasing a OptiSmart sensor for my Envir monitor. However, looking at the underlying data in the MySQL tables I see that the readings provided by the OptiSmart sensor do not appear to be recorded?

Is this something that the software should be recording or are there any options to enable it? I would like to check and see how accurate the OptiSmart readings are against my actual meter...

Thanks again for a very good application,

Andrew

Below is an example of the output from the Envir showing the OptiSmart data -


<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:22</time><tmpr>23.7</tmpr><sensor>9</sensor><id>02494</id><type>2</type><imp>0001639775</imp><ipu>1000</ipu></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:24</time><tmpr>23.7</tmpr><sensor>1</sensor><id>00305</id><type>1</type><ch1><watts>00211</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:25</time><tmpr>23.7</tmpr><sensor>2</sensor><id>00699</id><type>1</type><ch1><watts>00005</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:27</time><tmpr>23.7</tmpr><sensor>3</sensor><id>01957</id><type>1</type><ch1><watts>00132</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:27</time><tmpr>23.7</tmpr><sensor>0</sensor><id>00268</id><type>1</type><ch1><watts>00923</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:30</time><tmpr>23.7</tmpr><sensor>1</sensor><id>00305</id><type>1</type><ch1><watts>00193</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:31</time><tmpr>23.7</tmpr><sensor>2</sensor><id>00699</id><type>1</type><ch1><watts>00005</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:33</time><tmpr>23.7</tmpr><sensor>3</sensor><id>01957</id><type>1</type><ch1><watts>00132</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:33</time><tmpr>23.7</tmpr><sensor>0</sensor><id>00268</id><type>1</type><ch1><watts>00905</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:36</time><tmpr>23.7</tmpr><sensor>1</sensor><id>00305</id><type>1</type><ch1><watts>00191</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:38</time><tmpr>23.7</tmpr><sensor>2</sensor><id>00699</id><type>1</type><ch1><watts>00005</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:39</time><tmpr>23.7</tmpr><sensor>3</sensor><id>01957</id><type>1</type><ch1><watts>00132</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:42</time><tmpr>23.7</tmpr><sensor>1</sensor><id>00305</id><type>1</type><ch1><watts>00190</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:44</time><tmpr>23.7</tmpr><sensor>2</sensor><id>00699</id><type>1</type><ch1><watts>00005</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:44</time><tmpr>23.7</tmpr><sensor>0</sensor><id>00268</id><type>1</type><ch1><watts>00905</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:45</time><tmpr>23.7</tmpr><sensor>3</sensor><id>01957</id><type>1</type><ch1><watts>00132</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:48</time><tmpr>23.7</tmpr><sensor>1</sensor><id>00305</id><type>1</type><ch1><watts>00210</watts></ch1></msg>
<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:49</time><tmpr>23.7</tmpr><sensor>9</sensor><id>02494</id><type>2</type><imp>0001639782</imp><ipu>1000</ipu></msg>


Thomas

unread,
Jan 15, 2014, 12:39:36 PM1/15/14
to meas...@googlegroups.com
Hi Andrew,

the data from type 1 should be ok. It looks like the output from the envi.

<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:48</time><tmpr>23.7</tmpr><sensor>1</sensor><id>00305</id><type>1</type><ch1><watts>00210</watts></ch1></msg>

This output I never see before. Do you know what kind of data this is and if it is normal that the sensor is 9? On the envi you can define sensors up to sensor 9.

<msg><src>CC128-v1.29</src><dsb>00788</dsb><time>23:43:49</time><tmpr>23.7</tmpr><sensor>9</sensor><id>02494</id><type>2</type><imp>0001639782</imp><ipu>1000</ipu></msg>

Andrew Kirkby

unread,
Jan 15, 2014, 4:22:40 PM1/15/14
to meas...@googlegroups.com
Hi,

I believe the values shown on the line are the actual impulse counts taken from the digital meter with an optical output. 

Total number of impulses counted - <imp>0001639782</imp>
Number of impulses per unit - <ipu>1000</ipu>

What I would like to see is the <imp> value recorded in the MySQL database - I can then process that data remotely.

It would also be nice to be able to show the counter value on the web GUI :-) (being able to set a starting offset to match the meter reading would be good).

Andrew.

Thomas

unread,
Feb 21, 2014, 3:51:08 PM2/21/14
to meas...@googlegroups.com
Hi Andrew,

this should not be a big effort to collect the data from the digital meter.
But there are a lot of questions I have which I could not find out by myself f.e. of the missing hardware.

The sensor id in your data is 9. What will happen if a sensor already use this id. You can connect up to 10 sensors to a envi
What does the data told me? Is there a relation to a sensor and if so where can I see this relation.
Is it possible to have more than 1 device that sends impulses and does the total count is over all devices or did the device reset his counter after some time?

I can implement this but I can not test it and I believe it will be broken after some times because of things like the id is changing or something else...

What do you want to do with the data remotely? I do not understand which information I get from this counter.

Greetings
Thomas
Reply all
Reply to author
Forward
0 new messages