rdmenezes / measureit

Automatically exported from code.google.com/p/measureit
0 stars 0 forks source link

first sensor is 0 #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
i had problems trying to use the program and i found that my main sensor is 0 
and the program have a minimum sensor number of 1

here is one example of my reading:

<msg><src>CC128-v1.30</src><dsb>00168</dsb><time>17:57:13</time><tmpr>27.3</tmpr
><sensor>0</sensor><id>00077</id><type>1</type><ch1><watts>00273</watts></ch1></
msg>
<msg><src>CC128-v1.30</src><dsb>00168</dsb><time>17:57:19</time><tmpr>27.3</tmpr
><sensor>0</sensor><id>00077</id><type>1</type><ch1><watts>00274</watts></ch1></
msg>

to fix i increment the sensor detected in the data-input.php, after parsing:

$sensor = preg_replace( '/.+<sensor>(\d+)<\/.*/ism', "$1", $line );
$sensor++;

so this way all sensors gets one up and should match what the apps is expecting

(ps: sorry about the overload of bug reports) 

Original issue reported on code.google.com by dmotale...@gmail.com on 23 Aug 2011 at 5:02

GoogleCodeExporter commented 9 years ago
This is not really a solution for your problem. I tried to get an answer from 
currentcost what exactly sensor 0 is but I get no answer. It seems that sensor 
0 is the first sensor you connect to the base station. I use more sensors and I 
do not really know how to get all sensor data to the sensor 0 device if this is 
possible. The sensor 0 is called "whole house" ....

It seems that you have just one sensor. Try to connect it with the base station 
on sensor position 1. With your hack you will get a lot of problems with 
measureit because of the complete software is based on the sensor id

Take a look at my post in the faq " I receive the XML data but nothing was 
displayed on the website"

"

If you have only 1 transmitter from currentcost make sure to to pair it with 
the "Appliance 1" display. You reach it by press the up/down button on your 
currentcost device. You will find the appliance id in the right bottom corner ( 
Envi ). See the instructions from the currentcost website how to pair a device. 
Here you will find the installation from the envi
http://currentcost.com/product-envi-installation.html

In the xml data you will find the device id your transmitter is paired with 
your currentcost device. There you find something like this:

<msg><src>CCdsb>00385</dsb><timemsg><src>CC128-v0.12</srtime>06:52:19</time><tmp
r>20.3</tmpr><sensor>2</sensor><id>01674</id><type>1</type><ch1><watts>00236</wa
tts></ch1></msg>

Make sure that your sensor has id 1. The start screen from the envi is sensor 0.

<sensor>1</sensor>

Measureit does not consider any data from sensor 0

"

I am not shure what exactly I should do with sensor 0. Maybe an other email to 
currentcost with no answer. That sucks....

Original comment by lalelu...@gmail.com on 23 Aug 2011 at 7:46

GoogleCodeExporter commented 9 years ago
Hi
It seems Sensor 0 is the sum of all the other sensors, hence it is called Whole 
House, so it is your total usage. I have three IAMs and one main sensor. Thus 
Sensor 0 is the main sensor, showing my total usage, whilst Sensors 1 - 3 are 
my three IAMs. By excluding Sensor 0 measureit is actually failing to record 
total energy usage for people with more than one sensor.

I got around this by adding Sensor 0 to the mysql measure_sensors and this 
means I now get the data for Sensor 0, but I still don't get the Sensor 0 
measure in the measure_data_now table....

Original comment by r.plumri...@gmail.com on 2 Jan 2012 at 1:29

GoogleCodeExporter commented 9 years ago
It will not work to add sensor 0 to the database. The rest of the code does not 
use it. 

I will change measureit to use sensor 0 as soon as I can. In my first tests it 
seems "whole house" is just a name and does not display the data from all 
sensors. If I rewrite measureit to use sensor 0 I will also include a feature 
that really display all data from all sensor. 

Original comment by lalelu...@gmail.com on 2 Jan 2012 at 5:46

GoogleCodeExporter commented 9 years ago
Ahh, it works for me coz I am only the python script to pull the currentcost 
data in to  a mysql database, I am not using the rest of the measureit 
functionlity (in fact, I am just running the python code). 

Also, I got my description slightly wrong. Sensor 0 doesn't only show the 
collective reading from all the sensors, it shows the overall power usage, as 
Sensor 0 should be the transmitter attached to your main power cable by the 
electriciy meter.

Original comment by r.plumri...@gmail.com on 2 Jan 2012 at 6:23

GoogleCodeExporter commented 9 years ago
added the ability to use sensor 0 in version 112 that is now online

Original comment by lalelu...@gmail.com on 10 Jul 2012 at 5:45