Skip to content
This repository has been archived by the owner on Jul 1, 2018. It is now read-only.

Help FAQ

Thomas E edited this page Jan 20, 2018 · 8 revisions

Help

If there are any questions about using or installing measureit where no answer is in the wiki feel free to ask them :) There are a lot of already solved problems

If you believe you found a bug take a look here if the bug is already known. If not create a new issue

If you are interested in measureit notifications about f.e. updates you can follow @measureit on twitter.

FAQ

All commands had to be done as user root. On the Raspberry PI you can change to root with

sudo bash

How do I update my measureit installation?

Since Version 117 measureit is a git repository. This means you can update it without replacing files manually. The main version 117 will be online until there are really important changes at the operating system.

If you need to update to a new base system f.e. 118 you get instructions how to do this here

To update your installation to the latest version online you can use git. You can do this every time when there are new commits. Changes will be pushed to this rss url

The owner of the web directory and the git repository on the pi is web. So first became user web. You had to be root when doing this.

su - web

Then change to the measureit directory

cd /web/measureit

Now you can update your installation with

git pull

If there a changes online they will be merged to your local installation and your measureit is up to date. New files will be added automatically.

To change back to user root you can do this with

exit

Does my system support the USB cable?

Plug in the cable and run the following command in your konsole:

lsusb

You should see a entry like this:

Bus 002 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

Then your USB cable should be supported from your system

Does my system receive data from my currentcost device? Something is not working. Why not? How do I get debug information?

Measureit writes infos into a logfile. There you can see error messages or debug informations. To get detailed informations you must start the grabber manually.

To run the grabber manually you had to stop the currently running measureit process first! On the PI image you can do this with

svc -d /service/measureit

To start it after debugging do a

svc -u /service/measureit

This will write debugging information in the measure.log

/usr/bin/python /web/measureit/measureit_system_files/python/data-input.py debug

You should now see the xml data stream and in the log are detailed informations. Press ctrl+c to get back control of the konsole

To create a log file from the XML Output from your Current Cost device you can do the following. This will write the original XML into the file /tmp/mylogfile.txt

/usr/bin/python /web/measureit/measureit_system_files/python/data-input.py > /tmp/mylogfile.txt

If you want to see very detailed informations you can start it with "debug v". This will create very very very much informations in the log. It is not necessary in the most cases.

How can I read the measureit.log?

You have several options to do this.

If you want to read the log in real time you can open a second console to your system and do a

tail -f /tmp/measureit.log

To show the complete log you can do a

cat /tmp/measureit.log

Or if the log is too long you can read it in parts. Every time you press space you get the next part

cat /tmp/measureit.log | more

I receive no data although the system supports the USB cable

You can try to load the USB driver again. Do this with the following command.

sudo modprobe -r pl2303 sudo modprobe pl2303

The baud rate from the the USB interface should be 57600. Set this with the following command.

sudo stty -F /dev/ttyUSB0 57600

I receive the XML data but nothing was displayed on the website

Control that your appliance id is the same like the sensor id in measureit. 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

In the xml data you will find the device id from your transmitter and how it 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><tmpr>20.3</tmpr>_**<sensor>1</sensor>**_<id>01674</id><type>1</type><ch1><watts>00236</watts></ch1></msg>

In this example make sure that your sensor has id 1. The start screen from the envi is sensor 0.

I get a white browser screen

If you get a white page with no information after installing there is something wrong with the php part from measureit

You can call the follwing URL to get a clear error message:

http://YOUR-CURRENT_URL/php/measureit_functions.php?do=navigation_main

See also

Security

I believe that the most of you will use measureit with a public dyndns domain. There is no problem with this idea but note that everyone who knows this domain or find it with a search engine can add sensor or sensor positions or if this is a evil person can delete all your data!

To make shure that this is not happend open the file php/measureit_functions.php with a text editor and replace the following line at the beginning of the script:

replace

$demo = false;

with

$demo = true;

After changing this line it is not possible to do the following actions:

see/download/create/delete backups, add/delete sensors, add/delete sensor positions

Change the mysql password!

The setup from measureit set a default password with the value "measureitpasswd". If you decide to make measureit available in the internet you MUST change it. Replace the XXXXXXXXXXXXXX with your new password. If you use phpMyAdmin you can change the password from the mysql user in phpMyAdmin. You will find it in the user rights settings.

mysql -uroot -p use mysql; update user set Password = password('XXXXXXXXXXXXXX') where User = 'measureit'; flush privileges;

Then edit /usr/local/measureit/measureit.cfg.php and change the password

$database_passwd = "measureitpasswd"; $database_passwd = "XXXXXXXXXXXXXX";

You had to restart the grabber

How can I stop the python grabber?

If you are using the Raspberry Pi image from measureit you can do:

Stop:

svc -d /service/measureit

Start:

svc -u /service/measureit

Restart:

svc -t /service/measureit

On unix / linux machines without daemontools you must kill the process.

Find the ProcessID

ps auxf | grep data-input

You will get something like this

root 3959 2.5 2.0 48988 9176 ? Sl Feb11 91:56 /usr/bin/python /usr/local/measureit/python/data-input.py

In this case The PID is 3959

kill -9 3959

Does measureit supports IAMS (Individial Appliance Monitor)?

Yes. IAMs are the same like a sensor. Pair your IAM with your Envi and add a sensor in the admin menu from measureit. Then restart the grabber.

Measureit does not work with Internet Explorer version X

The Internet Explorer is a bug and not a browser. I do not waste any private lifetime to get things working with IE. Measureit works with Safari, Firefox, Chrome and Opera.

Measureit does not upload data to PVOutput

To find out why no data will be uploaded to PVOutput you can start the grabber manually with the debug parameter.

You should see informations about the sensor and systems setting found by measureit in /tmp/measureit.log. This will look like this:

2014-05-24 09:05:31,318 INFO Try to get sensor settings from sensor_settings_get 2014-05-24 09:05:31,344 INFO Sensor 0 Check if there are any PVOutput settings for this sensor 2014-05-24 09:05:31,350 INFO Sensor 0 has a PVOutput ID 2014-05-24 09:05:31,355 INFO XXXXX 2014-05-24 09:05:31,361 INFO Sensor 0 Now checking if there is a PVOutput API key 2014-05-24 09:05:31,366 INFO Sensor 0 has no PVOutput API. Next check if there is a global API key 2014-05-24 09:05:31,375 INFO Found PVOutput API key in the system settings. 2014-05-24 09:05:31,380 DEBUG XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 2014-05-24 09:05:31,400 INFO Using PVOutput for this sensor

Measureit uploads data every 5 minutes to PVOutput. If everything is fine you will see something like this:

2014-05-24 09:10:13,842 INFO Try to update PVOutput from sensor : 0 Output: OK 200: Added Status 2014-05-24 09:10:13,850 DEBUG http://pvoutput.org/service/r2/addstatus.jsp?key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&sid=XXXXX&d=20140524&t=11%3A10&v2=92&v5=27.9

If not you will see the error message that returns from PVOutput.

HTTPError: HTTP Error 400: Bad Request

If you can see this error in the measure it.log there is something wrong with the settings in PVOutput in your system. Mostly you send more watts that are possible with your system settings in PVOutput.

Then copy the URL under this error and paste it in your browser. There you can get a detailed error.

Detailed infos about the error you can found here in the part "Error Messages"

After adding a sensor / clamp there is "null" displayed as clamp name

The sensor / clamp name is displaying the latest position from the sensor. If you do not add a position in the sensor / clamp settings it will display "null"

How to install phpMyAdmin to make the SQL stuff easier?

Use adminer instead of phpMyAdmin. Adminer is in my opinion the best solution currently to make sql administration over the web. It is a single file and very fast....

There is always the newest version installed in measureit.
Just open "http://YOUR_ADDRESS/php/adminer.php"

If you want to use phpMyAdmin nevertheless do not try to get it running with apt-get. The measureit image is designed to be fast with no overhead installed. If you do it with apt-get a lot of useless software is installed too and sometimes you can get problem with missing dependents.

You can just download it and move the extracted folder into /web/measureit and then you can use it.

http://measureit/phpMyAdmin

WARNING! If your measureit installation is reachable to the internet RENAME the folder to something like:

/web/measureit/you_can_not_guess_how_my_name_is

This is because of there are many automated bots outside there that are scanning for folder names like "phpMyAdmin" or "pma" to broke into your system with known security issues

Can I use webmin on your image

Yes you can but you should not!

This means not that the measureit image is not compatible with it. This is because of it will doing things in the background you possible do not understand and you are not the first user of measureit that click on a update button and then the image is crashed and not longer working.

It is a cool software that helps to learn how things are working but it is nothing you want to use on a production system :)

Is there a API to use the usage data in other applications?

Yes. Take a look here: https://code.google.com/p/measureit/wiki/API_Documentation