You less device

Postfossil BV from the Netherlands:

offers a meter reading device at:

In germany the device is available via:

and can be ordered via Amazon at

although the device is offered much cheaper via the vendor in the netherlands. The device has a lan interface and can be used with analog ferraris meters as well as digital S0 input.


You less software

This is a screen shot of the web interface offered:

Connection to volkszaehler

I (Wolfgang - wf (at) am currently trying it out and intending to connect it to the volkszaehler solution. I'll post any news here.

data format

has information on how to access the device


In my environment the youless device has the ip address

Using the url

the json response is:


The json encoded information has the current meter count / kWh in „cnt“ and the current power level in Watts in „pwr“. This information needs to be converted to volkszaehler format and posted to the middleware - this is what the code below does.

php code for posting to middleware

The following code is an attempt to read data from the youless logger and post it to the volkszaehler middlware. As of version 1.14 it's working in my (Wolfgang's) environment.

There are three files used:

  • php file: vzapihelper.php
  • php file: yl.php
  • shell script yl

the yl script is to be used for testing or to be called regularly from a crontab entry - it needs to be configured while the yl.php and vzapihelper.php files should work generaly as of the state of Volkszähler software in May 2014.

You might want to set:

  • $url - the url to read the youless from
  • $vzurl - the url your middleware runs at
  • $cuuid_pwr - the channel id to post the power reading in Watt to
  • $cuuid_cnt - the channel id to post the power reading in Wh to (resolution 1000)
  • $delay - how long to wait between posts default: 5 secs / 12 readings per minute
  • $cnt_modulo - how often to send the kwH reading default: on every 12th reading / once per minute

To use the code copy the two script parts to a „vzapihelper.php“ and „yl.php“ and then start with e.g.

loop call
php yl.php \
  --url="" \
  --vzurl="http://localhost/vz/middleware.php/data" \
  --cuuid_pwr="0cca0870-e695-11e3-8c38-xxxx" \
  --cuuid_cnt="b8192a00-e71e-11e3-be31xxxx" \
  --delay=5 \
  --cnt_modulo=12 \
call from cron
cd /home/wf/youless
php yl.php \
  --url="" \
  --vzurl="http://localhost/vz/middleware.php/data" \
  --cuuid_pwr="0cca0870-e695-11e3-8c38-xxxx" \
  --cuuid_cnt="b8192a00-e71e-11e3-be31-xxxx" >> /var/log/energymeter.log

For the current version of the middleware (04/2017) the path to the middleware has changed to http://localhost/middleware.php/data So you should edit this line

  --vzurl="http://localhost/vz/middleware.php/data" \

to this line

  --vzurl="http://localhost/middleware.php/data" \

the output should look like:

2017-04-29 10:59:00 YL:   640 Watt     50.595 kwH
2017-04-29 10:59:05 YL:   639 Watt     50.596 kwH
2017-04-29 10:59:10 YL:   639 Watt     50.597 kwH

For any feedback please contact me at wf (at) Enjoy …

   * read meter data from youless device
   * and post it to volkszaehler
   * $Header: /home/wf/youless/RCS/yl.php,v 1.14 2014/06/01 10:40:37 wf Exp wf $
// common code for reading and posting
require __DIR__.'/vzapihelper.php';
    * read the meter
   function readyouless($url) {
    // get the meter reading
    $meter=json_decode($json, true);
    // Will dump a beauty json :3
    // comment out next line if you'd like to debug the json message
    // var_dump($meter);
    return $meter;
    * transfer youless reading to vz middleware
    *   param 1: url to read from youless
    *   param 2: vzurl - middleware url of volkszaehler
    *   param 3: channel uuid for power reading in Watt
    *   param 4: channel uuid for energy reading in kWh
    *   param 5: shall we post the cnt reading?
   function youless2vz($url,$vzurl,$cuuid_pwr,$cuuid_cnt,$post_cnt) {
     // read data from youless
     // get values 
     // the level is not interesting for digital meters
     // if you have an analog meter you might want to use and show this
     // $lvl=$meter["lvl"];
     // convert to php compatible value
     // calculate Wh from kWh
     // get human readable time stamp 
     $now=date("Y-m-d H:i:s");
     // display progress (comment if you use this in cron job)
     printf("%s YL: % 5d Watt % 10.3f kwH\n",$now,$pwr,$cnt);
     // post data to middleware according to: 
     # first post the power reading in Watt
     # then the energy reading in Wh
     if ($post_cnt) {
  // possible command line options
  // --loop --url= --vzurl= --cuuid_pwr= --cuuid_cnt= --delay= --cnt_modulo=
  // the url to read the youless device from (json option)
  // the volkszaehler middleware url
  // channel uuids
  // power (watts)
  // energy (kWh)
  // loop option - if no set just one shot (e.g. in cron)
  if ($doloop) {
    // how often to post to middleware
    // delay in seconds between posts 
    // how many delays for posting a kwH reading
    $maxloop=2147483647; // MAXINT
  } else {
  // run once or in a loop
  while ($loop<$maxloop) {
    youless2vz($url,$vzurl,$cuuid_pwr,$cuuid_cnt,$loop % $cnt_modulo==0);
    if ($doloop) {

helper functions to talk to middleware and evaluate command line options

   * vzapi helper functions
   * $Header: /home/wf/youless/RCS/vzapihelper.php,v 1.3 2014/05/30 06:57:23 wf Exp $
   * get a curl channel
  function curl($url) {
    //  Initiate curl
    $ch = curl_init();
    // Disable SSL verification
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    // Will return the response, if false it print the response
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    // Set the url
    curl_setopt($ch, CURLOPT_URL,$url);
    return $ch;
   * read the given url
   * @param $url:the url to read from
  function readUrl($url)  {
    // Execute
    return $result;
   * post to the given url
  function postUrl($url,$fields) {
     //url-ify the data for the POST
    foreach($fields as $key=>$value) { 
      $fields_string .= $key.'='.$value.'&'; 
    rtrim($fields_string, '&');
    curl_setopt($ch,CURLOPT_POST, count($fields));
    curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);  
    return $result;
    * post data to vz middleware
    *   param 1: vzurl - middleware url of volkszaehler
    *   param 2: channel uuid 
    *   param 3: value to post
   function post2vz($vzurl,$cuuid,$value,$debug=false) {
     // post data to middleware according to: 
     // adapt timestamp to volkszaehler conventions
     # first 
     $fields=array("ts"=>$timestamp,"value" => $value );
     if ($debug) {
       echo $presult;
   * check that option $opt is available in $options
   * return the value if available
  function checkoption($opt,$options) {
    if (array_key_exists($opt,$options))
      return $options[$opt];
      die("option $opt missing!\n");
hardware/controllers/youless.txt · Zuletzt geändert: 2017/04/29 11:02 von tiedi