Lightmeter-Driver

From hms.sternhell.at
Revision as of 18:13, 14 April 2018 by GuentherWuchterl (Talk | contribs)

Jump to: navigation, search

To run your lightmeter you need to install a driver on your computer. This page describes how to do that and which options you have.

Lightmeter installation instructions for Ubuntu 18.04 - Bionic Beaver --GW (talk) 19:07, 14 April 2018 (CEST)

Contents

Lightmeter Mark 2.3l - the post IYA-Version (since Oktober 2010)

Software installation instructions for Lightmeter (Mark 2.3l)

Instructions for Ubuntu 18.04 - Bionic Beaver

   Download LightmeterMark2.3l_2018.zip
 
  Follow instructions in README.
  --GW (talk) 19:13, 14 April 2018 (CEST)

Other similar linux pre 2018

Download LightmeterMark2.3l.zip

For newer linux Ubuntu 12.04 and later download: LightmeterMark2.3l_2013.zip; --GuentherWuchterl 19:48, 27. Jul. 2013 (UTC)

Unzip to a place where you want to keep the software and follow the instructions in the README.

To run the lightmeter open a terminal and type:

  lightmeter_mark23l

Description of the output

The output will look like:

  # HOSTNAME: myhostname
  # Locating Microchip(tm) PICDEM(tm) FS USB Demo Board (vendor 0x04d8/product 0xfcb7)
  # Found USB PICDEM FS USB Demo Board as device '006' on USB bus 002 -  Communication established. :Son Nov 21 15:32:34 CET 2010
  21.11.2010;15:32:34;26,0;°C;1629360;0;0;ok;
  21.11.2010;15:32:35;26,1;°C;1632240;0;0;ok;
  21.11.2010;15:32:36;26,1;°C;1632240;0;0;ok;
  21.11.2010;15:32:37;26,1;°C;1631160;0;0;ok;
  21.11.2010;15:32:38;26,1;°C;1631160;0;0;ok;

... and so on. Optionally you can specifiy the measurement interval in seconds as an extra parameter. For output every 5 seconds and writing in a file type

  lightmeter_mark23l > lightdata.csv

See the README file or the linux instructions for previous versions for more information of how to run operate your lightmeter conveniently under linux.

Columns (separated by ";") as previously for the linux version:

   Col  
   1          2        3    4  5       6 7 8 
   date       time     temp tc counts  d d status
   21.11.2010;15:32:34;26,0;°C;1629360;0;0;ok;
   1  date and time           I recommend to run the lightmeter-controller under UTC for simplicity;
   2  time
   3  temp                    The sensor temperature (needed for reference and daytime calibration);
   4  tc                      indictator string for temperature beeing in degrees celsius;
   5  counts                  the light-sensor counts; see the calibration section for how to get W/m² or Lux;
   6  d                       dummy column (kept for consistency with the IYA data format); 
   7  d                       dummy column (kept for consistency with the IYA data format);
   8  status                  "ok" if usb-comm was succeful; "err" otherwise.

Notes

  1. the dummy columns 4,6,7 are kept for consistency with earlier data from the IYA version that had two daylight sensors intended to help with the daylight calibration (above full moon level). These daylight sensors have been removed from the Mark2.3l version for lack of interest, simplicity and to avoid a communication bug between the temperature-sensor and the daylight sensor that occurs for temperatures abouve 46.7°C.
  2. For more info on the installation you can have a look at the Mark2.3 and Mark2.2 linux installation instructions as most instructions are identical, except for the naming and the daysensor of the Mark2.3
  3. On Ubuntu 9.04 (Jaunty) and 10.04 (Lucid Lynx) compilation worked only after installation of packages libusb++-0.1-4c2 and libusb++-dev. Possibly one of them is enough.

--GuentherWuchterl 15:28, 21. Nov. 2010 (UTC)

Suggestions for improvement

  1. readout lightmeter ID and put into header
  2. include option to remove the dummy columns
  3. include options for automatic spliting of the file in regular intervals (maybe better put in python)
  4. output system timezone identifier (I recommend to set system to UTC)
  5. put international decimal separator for the temperature

Lightmeter Mark 2.3 - the IYA-Version (August 2009)

Software for Lightmeter (Mark 2.3)

Windows XP/NT/2000

April 2011 Mark 2.3 Windows-XP Software --- use only this for Mark 2.3 (2009, IYA) lightmeters under windows

This is the present version of the simple Windows-XP software.

It removes a bug that occurs at sensor temperatures above ~50°C. It may occur during hot summer days. (The exact problem temperature is 46.7°C).

Please use only this Version for the Mark 2.3 IYA-Lightmeter under Windows-XP.

Installation Instructions:

Case 1, For an existing installation

  1. Download the media:Lightmeter_Mark23_Summer2011.zip
  2. Unpack the .zip
  3. Replace your old .exe file by the new one
  4. Run the lightmeter bei clicking on the new .exe

Case 2, New installation:

  1. Download the media:Lightmeter_Mark23_Summer2011.zip
  2. Unpack the .zip
  3. Plug the Lightmeter into a USB-port
  4. Wait for the Windows installer to pop up
  5. Guide the installer into the new, unpacked folder
  6. Finish the installation
  7. Run the lightmeter bei clicking on the .exe in the new folder

Note 1: If sensor-temperatures above 46.7°C do not occur at your site the update is not necessary but it is recommended because even at latitude 50 sensor temperature that high may occur during heat-waves.

Note 2: To ensure continuous monitoring the programme will automatically issue a reboot of your computer in case an error occurs. Put a link to the .exe file into your Autostart folder of the XP-Start-Menu. That was found to be the most effective way to ensure permanent monitoring under windows XP.

--GuentherWuchterl 15:04, 17. Apr. 2011 (UTC)

Original Mark 2.3 Windows-XP Software (2009), now obsolete

All in one package:

  1. Install:
    1. Download the Lightmeter.zip.
    2. Unpack it to your favorite location, e.g. the Desktop.
    3. Plug the Lightmeter into a USB port.
    4. Wait for the windows installer and guide it to the Lightmeter_install folder that is contained in the unpacked Lightmeter-folder.
    5. Complete installation with the windows installer dialogue.
  2. Run and see:
    1. Navigate into the Lightmeter_run folder .
    2. Start (double click) the Lightmeter.exe: the Lighmeter will start recording and create a .csv-file with date and time as a unique name.
    3. To acces the data click [BEENDEN] button to stop recording.
    4. Open the results-file (.csv with semicolon, ";" as separator) in the Lightmeter_run folder by double clicking e.g. with your favourite spreadsheed (Excel or OpenOffice) or any other software.
    5. You will see the following columns in the files produced by the Lightmeter:
      1. Date;
      2. Time;
      3. Temperature;
      4. °C-Symbol;
      5. Main sensor counts;
      6. Daysensor visual counts;
      7. Daysensor near infrared counts;
      8. Status message, i.e. "ok" or "err".


Notes:

  1. The simple software will reboot your computer in case a USB-error occurs to make sure measurements continue with minimal interuption if the computer is not supervised. To make that work properly you have to put a link to Lightmeter.exe into your Autostart folder and follow the instructions to activate automatic login:Instructions; on the computer that runs the Lightmeter if that is not already activated.
  2. The simple software does not allow access to the data while running. If you need that use Skysensor or the Linux-Version.
  3. The present software version possibly puts out the temperature in decimal numbers in the German-language convention, i.e. with the comma, "," as decimal separator. Set your spreadsheet to the comma as decimal separator or replace all "," by "." (with a script or editor) for processing. We will change the software to language sensitive decimal separators asap.

Alternatively:follow instructions as before. Then download the AutostartV61a.zip, unpack it, copy it into your Luxmeter_run folder, plugin the Lightmeter and double click the AutostartV61a.exe to start.

Problems: lightmeter@astronomy2009.at

January 2010 update of simple driver software that reads Lightmeter ID

For Mark2.3 Lightmeters with serial numbers 086 and above, the ID has been stored into the instrument. With an update for the .exe the ID can be read automatically and is put into the first line of every data-file

Jan 2010 update for simple Lightmeter-driver software for Windows XP/NT/2000, a zip-archive with TestV62.exe and README that contains a sample output. TestV62.zip.

Skysensor for Mark 2.3 Lightmeter (frozen at an unstable version)

NOTE: This is a beta version. It runs OK on about 2 out of 4 Windows-installations. Often running as administrator improves things. Some features including the automatic calibration are not fully implemented and not tested. Auto-calibration does not yet work. It is good for a quick look but have an eye on it if you use it.

Lightmeter Software for Sensor Mark 2.3 (beta): Download

Problems on some systems have been reported. E.g. no protocoll-file written) on some. If any problems arise use the simple software above.

Works fine on Windows XP home edition 2002 with Service Pack3, Netbook with Intel Atom. --GW als Gast 16:32, 19. Mär. 2010 (UTC)

Linux

Linux installation as before but with a new .c, by Stefan Kimmeswenger (Univ. Innsbruck).

Download the .c and the makefile: LightmeterLinuxMark2.3_install2013.zip (updated --GuentherWuchterl 00:02, 8. Okt. 2013 (UTC), use this version!)

(Obsolete previous version for reference: LightmeterLinuxMark2.3.zip do not use this version unless you have very good reasons!)

Follow the [installation instructions] as previously and read lightmeter_usb as lightmeter_usb5 in the README / instructions.

Start measurements and recording by:

   lightmeter_usb5 > my_measurements.csv

I modified the makefile to yield a new application name: lightmeter_usb5 (Version 5 of Kimmeswenger's software).

That allows to run an old (Mark 2.2) lightmeter (after installation of the Mar 2.2 (old) linux driver) by e.g.:

   lightmeter_usb > Mark22_measurements.csv &

and simultaneoulsy a new (Mark 2.3) lightmeter by e.g.:

   lightmeter_usb5 > Mark23_measurements.csv &

The two daylight-channels (vis/NIR) are the two columns before the "ok" in the file.

A recommended (after André Müller) command line looks like

 lightmeter_usb5 1 > L001_`date +%Y_%m_%d_%H_%M`.csv &

and produces 1s sampling writing into a file name labelled with instrument number and date.

Note: On Ubuntu 9.04 (Jaunty) compilation worked only after installation of packages

  libusb++-0.1-4c2 and 
  libusb++-dev . 

Possibly one of them is enough.

Trouble shooting

For the following error output

 # HOSTNAME: myhost
 # Locating Microchip(tm) PICDEM(tm) FS USB Demo Board (vendor 0x04d8/product 0x000c)
 # Found USB PICDEM FS USB Demo Board as device '004' on USB bus 001 - Fatal error> Error setting USB configuration. 

Stefan Kimmeswenger found the following solution:

... in a discussion I found in the Web giving also the device vendor ID of the USB board used in the Lightmeter I found, that the module ldusb may block the attachment. On my computer it is not running. According to your listing it is running in your case - but not used by any device. You should try a

  rmmod lsusb

before attaching it. http://www.microchip.com/forums/printable.aspx?m=106426&mpage=2

New pre-calibrated Daylight Sensor

Mark 2.3 contains two daylight channels that allow you to directly obtain calibrated Lux-values for day-time reference and calibrating the non-linear daylight part of the Mark 2.3 main sensor.

The manufacturer, TAOS gives a calibration in the manual: http://www.taosinc.com/downloaddetail.aspx?did=140. Tests have shown that this calibration has to be multiplied by a factor 21 to obtain Lux-values from the sensors as they are built-in into the Mark 2.3 frame (the eye in the aluminium frame).

Here is a python function to calculate the Lux from the readings in the two last columns before the ok/err in the final column:

   def Lux_from_Daysensor(Ch0,Ch1):
       """ Calculates Lux from the TAOS, www.taosinc.com TSL2560/TSL2561 two band light sensor
           for the TMB-package"
       """
       Chr= Ch1 / Ch0
       # Apply calibration recommended by manufacturer for different channel-ratios (IR-correction for vis-sensor to get Lux)
       #
       if Chr <= 0.50:                        Lux=0.0304  *Ch0  - 0.062*Ch0*(Ch1/Ch0)**1.4
       elif (0.50 < Chr) and (Chr  <= 0.61):  Lux=0.0224  *Ch0  - 0.031  *Ch1
       elif (0.61 < Chr) and (Chr  <= 0.80):  Lux=0.0128  *Ch0  - 0.0153 *Ch1
       elif (0.80 < Chr) and (Chr  <= 1.30):  Lux=0.00146*Ch0  - 0.00112*Ch1
       elif 1.30 < Chr:                       Lux=0
       else: print "Invalid daysensor channel ratio."
       
       Faktor = 21.0 # calibration with Voltcraft handheld vs. Lightmeter Mark 2.3 No. L001 TAOS-daysensor
       return Lux*Faktor

--GuentherWuchterl 12:27, 2. Sep. 2009 (UTC)

Extension of the USB-cable

USB-extension using other USB-cables may sometimes cause errors, depending on the environment, since USB-2 is specified to 5m only.

For long extensions (40m) we recommend USB-ethernet extenders. For example:

Improvements

Option for no file splitting at midnight


If possible, I want the lightmeter.exe program to be improved.At midnight, the program closes a data file of the day (ex.20100711-0000.csv) and opens a data file for the new day (ex.20100712-0000.csv).

The problem is that the computer at Bisei station occasionally opens the new data file as 20100711-0000, so the data of the past day will be lost. It may be due to the time correction by Windows (synchronizing with an internet time server at midnight).So, it is helpful if the lightmeter.exe opens the new file by another name (ex.20100711-0000(2).csv) (only when the filename already exists).

--GuentherWuchterl 20:00, 30. Okt. 2010 (UTC), from Email by Nobuaki Ochi.

Language sensitive decimal-sepatator needed

For the output of the sensor-temperature, presently the german decimal sepatator "," (comma) is used instead of "." (dot) and you need to replace the "," --> "." for non-german language settings and automatted IO. --GuentherWuchterl 13:21, 5. Sep. 2009 (UTC)

Bug in Temperature logging for negative Temperatures

Output-Example:

 31.01.2010;10:26:42;511,9;°C;2213760;39901;12196;ok;
 31.01.2010;10:26:43;511,9;°C;2214000;39901;12196;ok;
 31.01.2010;10:26:44;0,0;°C;2213760;39905;12202;ok;
 31.01.2010;10:26:45;511,9;°C;2213880;39905;12202;ok;
 31.01.2010;10:26:46;511,9;°C;2213640;39868;12189;ok;
 31.01.2010;10:26:47;0,0;°C;2213880;39868;12189;ok;
 31.01.2010;10:26:48;511,9;°C;2213760;39884;12196;ok;
 31.01.2010;10:26:49;0,0;°C;2213640;39884;12196;ok;
 31.01.2010;10:26:50;0,0;°C;2213640;39862;12188;ok;

The result are temperatures logged as 5xx. A possible cure is to use T = x - 512 for x > 256.

Firmware update needed.

Lightmeter Mark 2.2 - 30 piece prototype series (August 2008)

Linux

Installation using Linux Drivers

Linux driver for the 2008 Lightmeter Mark 2.2 prototye series with updated install script for newer linux systems (e.g. Ubuntu 2012 versions and later). Download and follow README: LightmeterLinux_install2013.zip (New Version of zip-Archive that removed trailing blank/space at end of directory name that may have caused difficulties in the automatic install procedure --GW (talk) 12:50, 15 March 2017 (CET))

(Obsolete previous version for reference: LightmeterLinuxMark2.3.zip do not use this version unless you have very good reasons!)

Linux driver (version 4.1: 21.5.2009) for the Lightmeter (now obsolete, do not use unless you have very good reasons; given for reference here) Download: Media:LinuxLight_V4.1.zip

  • The code works an outputs the same format as the XP-code to stdout
with one exception - since version 4.1 it add a '#' at the beginning
of every "non data" line for easier filtering of a plot program
and it gives date & time of USB errrors / resets.
  • The libusb that is needed is listed in the header.
  • Tested under Fedora 10 (64 bit) and Ubuntu 9.04 (32 bit und 64 bit).

change to destination directory e.g.:

   cd /usr/local

unpack source and compile it

   unzip LinuxLight_V4.1.zip
   cd LightmeterLinux

follow instructions in README

Stefan Kimeswenger

Note: On Ubuntu 9.04 (Jaunty) compilation worked only after installation of packages libusb++-0.1-4c2 and libusb++-dev . Possibly one of them is enough. Works beautifully! --GuentherWuchterl 02:31, 1. Jun. 2009 (UTC).

Installation using a virtual Windows machine under Linux

First result: Ubuntu 8.04, Hardy Heron + Sun xVM Virtual Box 2.1.0 + "guest additions" installed + USB activated ; then install as for windows

See Linux Installation with VirtualBox for details

Windows-XP , Windows 2000, Windows NT

Installation

  1. download: Media:Luxmeter.zip;
  2. unzip to get the Luxmeter folder;
  3. plug-in the USB-plug of the Luxmeter/Lightmeter and wait for the windows-installer window to appear;
  4. guide it into the Luxmeter and into the Luxmeter_install folder. The installer should then find the respective files and allow you to OK and install the drivers.
  5. double-click 'test2' (test2.exe) in the 'Luxmeter_run' folder;
  6. select sampling rate (seconds)
  7. click [START] button; data will be written in a file called test.txt
  8. click [STOP] button; then [BEENDEN] button
  9. rename test.txt to e.g. mydata_1.csv. (this is important; the next start will create a new test.txt and overwrite any existing data).

'AutostartLux': replaces test2.exe and cures USB-errors by a reboot

Features:

  • starts measurments on click (no need to press 'START' button) - suited to be put in autostart folder for automatic start of measurements on boot;
  • writes unique file name (no more overwrites): yyyymmdd_hhmm.csv;
  • USB-error-handling by reboot when errors occur.

Installation:

  1. make sure drivers are installed (see basic installation above)
  2. download 'AutostartLux': media:AutoStart-LuxM.zip; unzip and put in 'Luxmeter_run' folder (same place as the old 'test2.exe');
  3. create a link to AutostartLux.exe and put into the Autostart-folder in

the program-MENU.

Note: real-time access and data-display during data-taking: use 'Skysensor'

'test2.exe' and 'AutostartLux' do not allow access to the data-files as data are taken and the files are written.

With Windows use 'Skysensor' if you want to display the data as they are taken, e.g. to generate web-graphics. You can copy, open and read the result-files that the 'Skysensor' software writes.

The Linux-software also allows access to the data files while they are written.

--GuentherWuchterl 12:06, 18. Jul. 2009 (UTC)

Feature Requests

- Dateiname soll keine Uhrzeit enthalten, wie es jetzt der Fall ist. Das macht einen Umgang mit später großen Datenmengen einfach schwieriger. - Die individuellen Dateien sollten von 12 Uhr Mittags bis 12 Uhr Mittags geschrieben werden. Jetzt ist ja immer die Nacht in 2 Dateien aufgespalten. Das finde ich nicht "schön".

Die Uhrzeit im Dateinamen macht Sinn, wenn der Luxmeter instabil läuft, und damit gerechnet werden muss, dass der PC nach einem USB-Fehler öfters neu gestartet werden muss. Dann würde die vor dem Neustart gesammelten Daten mit den neuen Daten überschrieben werden. (Ausser die Software ist so schlau, dass sie eine vorhandene Datei gleichen Namens erkennt, und die Daten anfügt, anstatt die Datei zu überschreiben.) --HerbertRaab 20:33, 19. Feb. 2009 (UTC)

Skysensor Software

thumb|Skysensor software operating the L11 lightmeter under Ubuntu 8.10 with a Windows-XP virtual machine Windows 2000 and Windows XP compatible.

  • New Version 1.2.4.19 available (May 18th): Download
  • Lightmeter Software for Sensor Mark 2.3 (beta): Download

Removed bugs and new features

  • Automatic reboot on error as option
  • Values stored in ini-File in same directory as Skysensor.exe
  • Calibration parameters functional
  • The sampling interval is set to 100ms by default and might be decreased to 50ms. Lower values are experimental and might produce unpredictable results.
  • Graph shows counts, Temperature, Range, Lux, Magnitudes or Limiting magnitudes. Conversion is done by using the equations given on the Wiki.

Features

  • daily files YYYYMMDD.txt (fixed spaced)
  • file format: YYYY-MM-DD hh:mm:ss temp counts pgarange
  • flush to disk every minute
  • Up to 20 measurements per second will be averaged. The rate con be controlled by the Delay sliders
  • Real time graph with zoom (drag rectangle)
  • The driver lacks an asynchronous communication to the device. To overcome this problem the application is programmed to use the idle times of the CPU. This has two effects: The software does not hang if an event is missed, but no data is recorded if the CPU load is too high.

Known Bugs

  • Temperature is not updated on increasing counts, maybe H/W bug.
  • Software hangs on usb disconnect
  • Single point downward excursions in flux-value when T-value changes,--GuentherWuchterl 15:07, 23. Dez. 2008 (UTC)
  • Two lightmeters running parallel at the same location, connected to two DIFFERENT computers (but computers connected to the same 230V connection) give BOTH USB-errors within a time span of about hour or less (sometimes within the same minute).

Feature Requests

  • parameter for averaging (on/off, number of points in average)

Please send bug reports to mailto:joerg.weingrill@oeaw.ac.at

All in one package : Lightwatch

Download the Lightwatch-package .

It contains a .zip archive with all drivers and software available Feb.15th:

  • Windows-Install files (in Luxmeter_install folder)
  • Autostart-LuxM (and the old version test2)
  • Skysensor (and old version Skysensor 1.0)
  • Lightwatch.py script

See below for details about Lightwatch.py

Troubleshooting

No / Constant Signal during the Night

If you don't measure any signal or just a constant value during a moonless night (see following figures) then your observing site is probably close to a transmitter mast that could affect the circuitry.

No solution found yet.

USB Errors

If errors during a measurement arise concerning the USB connection, try one of the following solutions:

1.) use an USB Hub (I'm using an USB 4 Port HUB from HAMA, available for less than 5 Euro)

2.) in case of an old PC use an stabilized power supply or power socket

3.) you can try (in case of an old PC), if the use of an USB PCI Card or the change of the battery on the motherboard will avoid future errors

4.) Increase the intervall between measurements (try 60, 120, 600s) --GuentherWuchterl 10:37, 13. Dez. 2008 (UTC)

USB-Fehler am Linzer Luxmeter

Bei unserem Linzer Luxmeter tritt immer dann ein Fehler auf, wenn das Licht (Leuchtstoffröhren) in der Sternwarte ein- oder ausgeschaltet wird. Der Luxmeter sitzt an der Spitze eines 3,5m hohen Metallmasts, und ist über eine 7m USB-Verlängerung an einen PC in der Sternwarte angeschlossen.

Zunächst sind wir davon ausgegangen, dass die Ausfälle mit mangelnder USB-Unterstützung von Windows 2000 zusammenhängen, und die Störsignale über das Stromnetz übertragen werden. Wir haben daher drei verschiedene Computer (Desktop PCs mit Windows 2000 und USB-Karte, Desktop-PC mit Windows XP, und Laptop mit Windows XP) ausprobiert. Die Computer wurden über einen Netzfilter und auch über eine unabhängige Stromversorgung an Netz angeschlossen, auch die Verwendung eines USB-Hubs (direkt nach dem PC) wurde versucht, leider ohne Erfolg.

Um Probleme durch die USB-Verlängerung auszuschliessen, wurde die Verlängerung entfernt, das Luxmeter vom Mast abgenommen, und direkt am PC angeschlossen. Weder bei ausgelegtem, noch bei aufgerolltem Kabel liess sich der USB-Fehler beim Betätigen des Lichtschalters vermeiden. Versuchsweise wurde der Luxmeter mit aufgerolltem Kabel gleich neben dem PC in einem Metallkoffer gesteckt. Damit liessen sich die USB-Fehler verringern, aber nicht ganz vermeiden.

Günther Wuchterl hat uns einen zweiten Luxmeter geschickt. Damit treten die Fehler ebenso auf. Mit den beiden Luxmetern wurde auch folgender Versuchsaufbau geprüft: Das original Luxmeter wurde wieder am Mast montiert, und am Ende des Originalkabels (am Balkon der Sternwarte, ausserhalb des Gebäudes) wurde der XP-Laptop angeschlossen. Der zweite Luxmeter wurde mit aufgerolltem Kabel direkt neben den Laptop gelegt und auch dort angeschlossen. In beiden Fällen tritt der USB-Fehler wieder auf. Mit diesem Test sollte simuliert werden, ob der Ersatz der Verlängerung bzw. auch des Originalkabels mit einem geschirmten Netzwerk-Kabel das Problem beseitigt. Offenbar ist das aber nicht der Fall.

Zur Zeit gibt es somit keine Lösung für das Problem. --HerbertRaab 18:15, 14. Nov. 2008 (UTC)

Wir haben heute am Windows 2000-PC das 'Autostart-LuxM.exe' installiert und mit dem zweiten Luxmeter (#25, direkt am PC angeschlossen) probiert. Wenn man den USB-Fehler durch ein- und ausschalten der Leuchtstoffröhren provoziert, erscheint eine Debug-Assertin in File 'filetext.cpp', Line 267. Die Programmausführung wird damit unterbrochen, der PC nicht neu gestartet.

Wir haben dann noch die Skysensor-Software von Jörg Weingrill probiert. Damit scheint der Reboot nach dem USB-Fehler zu klappen.

Der Original-Luxmeter (#3), der aussen montiert und über eine USB-Verlängerung mit dem PC verbunden ist, konnte leider nicht aktiviert werden, weil die Installation des Treiber immer fehlschlägt (Fehlercode 28). Nach Tauschen der Luxmeter verhalten sie sich genau umgekehrt: Das heisst, wenn einer der Luxemeter direkt am PC angeschlossen ist, funktioniert es. Wenn einer der Luxmeter über die Verlängerung angeschlossen ist, funktioniert es nicht mehr. Der Grund dafür ist unbekannt, da der Luxmeter über die Verlängerung ja bereits funktioniert hat. --HerbertRaab 21:09, 19. Feb. 2009 (UTC)

Am 21. April 2009 wurde der im Aussenbereich montierte Lightmeter (#3) über einen USB-Extender USB-RJ45 (10m) angeschlossen. Damit konnte die Verbindung zwischen Lightmeter und dem PC mit der Skysensor-Software hergestellt werden. Seid dem läuft der Lightmeter im Probebetrieb. --HerbertRaab 09:34, 22. Apr. 2009 (UTC)

Erste Ergebnisse aus dem Probebetrieb

Wenn das Licht ein- oder ausgeschaltet wird, dann bootet der PC sofort. Es ist so, als ob man den Reset-Taster am PC betätigt. Es scheint also nicht der kontrollierte Reboot zu sein, der in der Skysensor-Software vorgesehen ist: Einerseits, weil der Reboot auch erfolgt, wenn das entsprechende Häkchen in den Settings für die Software gar nicht gesetzt ist, und anderersiets sollte der kontrollierte Reboot ja erst 30 Sekunden nach dem Verlust des Signals erfolgen. Der Reboot erfolgt aber, wie erwähnt, praktisch gleichzeitig mit dem Betätigen des Lichtschalters. Es sieht also nach einem massiven Totalabsturtz aus. Was aber in unserem Fall aber gar nicht von Nachteil ist, weil nach dem Reboot die Messung ja weitergeht.

Manchmal (selten, aber doch), geht die Verbindung zum Luxmeter verloren, ohne dass es zum Totalabsturtz kommt. Da geht die Anzeige in der Statusleiste einfach von "OK" auf "Error". Wenn das entsprechende Häkchen in den Programmeinstellungen nicht gesetzt ist, kommt es dann auch zu keine Reboot. Es wäre daher günstig, wenn das Häcken nicht nach jedem Neustart manuell gesetzt werden müsste, sondern automatisch auf die letzte Einstellung zurückgesetzt wird.

Ausserdem scheint die Temperaturmessung manchmal (nicht immer) nicht korrekt zu funktionieren: Die gemessene Temperatur bleibt lange auf einem bestimmten, konstanten Wert, und springt dann plötzlich um 0,5°C oder mehr.

An sich läuft der Lightmeter jetzt aber mehr oder minder zuverlässig seit dem 21. April. --HerbertRaab 22:21, 15. Mai 2009 (UTC)

USB-error-controll at FOA with 1/60 Hz sampling

thumb|A week of measurments with L8 at the FOA (Leopold Figl Observatorium für Astrophysik) after increasing the intervall between measurments to 60s to eliminate USB-errors that previously had occured about daily with 1s sampling.

Am FOA traten bei Luxmeter L8 sporadische USB-Fehler auf die sekündliche Messreihen nach etwa einer Nacht unterbrachen.

Nach Erhöhung der Zeitabstände zwischen den Messungen, und damit der Verminderung der USB-Übertragungshäufigkeit konnte zuletzt mindestens neun Tage ohne USB-Fehler gemessen werden.

Thus: Increasing the intervall between the measurements to 60s or higher is worth trying to get rid of USB-errors.

G. Wuchterl after Email bei W. W. Zeilinger

Workaround for the USB errors

Idea

Solution:Skysensor Software plus automatic reboot on USB-Error.

The reboot of windows reactivates the lost USB-connection and allows continuation of measurements without manual intervention.

1. Activate automatic login: Instructions; Anleitung

2. Put link to "Skysensor" executable and a shutdown-script into autostart

3. Script to check data for consecutive zeros in current datafile and reboot (tbd)

  • reboot unter windows-command-line:
      shutdown -r -f

Implementation with python script Lightwatch

19. Jan. 2009: New Version Lightwatch 1.2 that recognises more errors by monitoring the growth of the data file. Download Lightwatch

The old version sometimes needed many hours to a few days to recongnise an error for L6, the Kuffner-Luxmeter during a month-long test-run in Dec/Jan. The new version recognises problems within a few minutes (duration can be set in the python script Lightwatch.py).

Lightwatch 1.2:features

  • The new Lightwatch.py
  1. recognises more errors and faster by monitoring data-file growth
  • Autostart-LuxM.exe (replaces test2.exe); new features:
  1. Measurements start immediately
  2. Unique datafile-name (avoids overwrites)
  3. Auto-reboot on error
  4. the old test2.exe is also in the package
  • Skysensor (newVersion)
  1. optional reboot on error
  2. corrected temperature
  3. adjustable sampling rate
  4. many new plot-features
  5. the old skysensor version is in the package as Skysensor_1.0.exe

Installation instructions

1. You need python on your machine. If it is not installed download the python installer for Windows standard PCs, double-click the .msi and install python.

Notes: The present script is tested for python 2.5.4 and the installer linked above. The script is very basic and should work for all python versions so try first if you have python already installed. Other versions: windows download section, python.org

2. Download the Lightwatch-package: media:Lightwatch.zip.

3. Unzip Lightwatch.zip e.g. to Desktop to get the Lightwatch-folder.

4. If you did not install Luxmeter/Skysensor before, plug-in the USB-plug and wait for the windows-installer. Guide it into the Lightwatch-folder and into the Luxmeter_install folder. The installer should then find the respective files and allow you to OK and install the drivers.

You can now use the Lightmeter/Luxmeter as usual. To controll USB-errors proceed to the next steps.

5. Go to the Lightwatch/Luxmeter_run folder. Create a link to the Lightwatch.py script and copy the link into your autostart folder in the programm menu. (For convenience also onto the Desktop).

6. Make sure autologin is enabled for Windows (no login screen appears at startup). If a login screen appears you need to be admin and follow the instructions to enable autologin: Instructions; Anleitung

Operating the Lightmeter with Lightwatch and Skysensor

Start the Lightwatch.py script (contained in Luxmeter_run folder) by double clicking on it or on the link on the Desktop (if you made one).

The Skysensor window will open and display the measurements and you will also see a console window where Lightwatch logs the status (every minute).

In case an error is detected Lightwatch writes a message into Lightwatchlog.log (also in the Luxmeter_run-directory) and initiates a reboot. You can check the Lightwatchlog.log if reboots occured and under which conditions.

Good Light!

If anybody knows how to put this into a windows installer are write the script as a windows/DOS-script, let me know. It would make installation easier.

Günther --GuentherWuchterl 00:21, 9. Jan. 2009 (UTC)