lundi, février 13 2012

Overview of the EWZ Smart Meter after a couple of months

Here’s finally some feedback and further screenshots of the EWZ Smart Meter system after a little more than a month of usage.

As mentioned in the previous related article back in December, I set back then a new objective of 25 kWh per week. The historical overview below shows that this new target has only been exceeded in a major way once since then:

IMG_0638

This means that my annual consumption should be around 1300 kWh, way below the mean figure of a household of 2 to 3 people in Switzerland (between 3000 and 4000 kWh according to http://www.energie-umwelt.ch/elektrizitaet/strom-im-haushalt)

The historic overview gives a good insight into the consumption and allows understanding pretty closely when electricity was used:

IMG_0640

The measurement is very handy, as it shows in a graphical way the current electricity consumption, sampled every 2 seconds. In this example, we had a usage of around 130 w with a few spikes to 140 w. It’s especially helpful to see the impact of turning on some electricity demanding devices.

IMG_0641

IMG_0642

Either the current granularity is too low or there is an issue in the measurement, but my experiment to understand how much electricity my halogen lamp was using turned out to be a fiasco:

IMG_0643

Once the lamp was switched at its entire performance, I would have expected an increase in the graph. Nothing happened, every avec a couple of minutes. The graph remained stable at 130 w, not taking into account the newly light lamp. Below is the overview, as well as a picture of the eco-halogen bulb I’m using – still 230 w (instead of 300 w):

IMG_0644

So I’m now wondering, am I just an exception by using so little electricity or is there an issue in my setup?

jeudi, décembre 29 2011

Fixing pictures resolution issues with Windows Live Writer

While travelling a few years ago we extensively used Windows Live Writer to quickly post new blog articles including picture onto our blog.

Due to bandwidth constraints, we did not want to upload huge pictures each time and therefore set a maximum picture size of 640x480 for the biggest images. Now that we’re in the process of making a book using Blurb, we get into troubles as 640x480 is definitely not good enough for a printed media.

Instead of matching manually all pictures, I took a different approach as I had all my blog articles saved in My Documents\My Weblog Posts as .wpost files.

Opening these files in 7-zip shows that it’s a compressed zip files containing all the blog information under as a file structure. Worth mentioning aside the obvious is the ServerSupportingFileDir which contained the path on the server where these files were saved.

image

The subfolder SupportingFiles contains a folder per attached file where the file content and file name are stored.

Based on this, I quickly wrote two scripts:

  1. The first decompresses all the wpost files using 7-Zip
  2. The second parses the decompressed files, extracts all pictures and saves them in a file structure identical to that on the website.

The last operation is to upload these new files per FTP, so that we get a much better image resolution (Windows Live Writer saving all the picture at least with 1024x768px).

As you can see, there were a few issues along the way, such as converting the files from  Unicode encoding to ASCII and some file extensions issues, but they were all resolved within the batch file.

First script - extractJPGs.bat

rem sets the proper working folder
cd /d %0\..
cd %0\..
rem Define the path to the 7-zip command line executable
set z="c:\program files\7-zip\7z.exe"

rem loops through all the *.wpost files and decompresses them, without extension, into the temp file
for /r . %%f in (*.wpost) do %z% x "%%f" -o"temp\%%~nf\"


pause

Second script - renameAndMoveJPGs.bat

@echo off
rem sets the proper working folder
cd /d %0\..
cd %0\..\temp

rem iterates through all the folders and calls handleFolder with the directory's name
for /d %%d in (*) do call :handleFolder "%%d"

goto :eof

:handleFolder
    echo %1
    cd %1
    rem The standard file is not ASCII encoded. We need to make an ASCII compliant copy of it via type
    type ServerSupportingFileDir > ServerSupportingFileDir_v2

    rem We store the folder name of the server withint the uploadFolder variable
    set /p uploadFolder=<ServerSupportingFileDir_v2
   
    rem For each found file matching "SupportingFileName", we call the handleFiles with the file name and upload folder as argument
    for /r . %%f in (SupportingFileName) do call :handleFiles "%%f" "%uploadFolder%"
    echo %uploadFolder%
    cd ..
    rem pause
    goto :eof

:handleFiles
    if exist %1    call :handleFiles2 %1 %2
    goto :eof
   
:handleFiles2
    rem echo on
    rem Stepping into the current folder
    cd %1\..

    rem The standard file is not ASCII encoded. We need to make an ASCII compliant copy of it via type
    type %1 > %1_v2

    rem We store the file name within the variable
    set /p fileName=<%1_v2

    rem We create the output folder
    if not exist ..\..\..\..\forWeb\%2 mkdir ..\..\..\..\forWeb\%2

    rem Quick trick - during the copy, we don't fully rely on the file extension found in the file.
    rem I had quite a few .JPG files according to SupportingFileName, but on the server they were known as .jpg.
    rem We therefore take all the filename but the last 3 characters and force our own file extension.
    copy SupportingFileContents ..\..\..\..\forWeb\%2\%fileName:~0,-3%jpg
    cd ..\..
    goto :eof
   
:eof

samedi, décembre 17 2011

Overview of the Smart Meter application

Here are a few screenshots of the application running on the Archos 7. It is composed of 5 tabs:

The first tab is composed of an indication of the current electricity consumption and a summary of how much power has been used this week. We’ll see in the last part where the number of 50.0 kWh comes from.

IMG_0595

The second tab gives an insight into the historical data collected by the smart meter. According to the information given in the documentation, the smart meter is able to collect up to a month of data before it gets overwritten. A part of the role of the tablet is to store for the full duration of the study these records.

Going back to this tab, the graph can be setup per hour, day, week, month, three month or year. It also gives an insight into the power costs for the given period.

IMG_0596

The third tab gives an overview of the power usage versus a target consumption. We’ll see later that we can set ourselves the target for the upcoming week.

IMG_0597

The forth tab gives the ability to track ever update from the smart meter. It is also possible to press the start button to record the variation and calculate the overall expenture.

IMG_0599

Finally, the last tab is about configuration and shows a summary of this week and allows to set a new target for the upcoming week. In our case, we decided to lower the target from 50 kWh to 25 kWh next week.

This will affect from next Monday on the weekly summary displayed on the first screen.

IMG_0598

- page 3 de 15 -