Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including youless with all npm packages installed. Try it out:

// testing from runkit is not (yet) supported. // please try testing from a desktop // INSTRUCTIONS FOR TESTING FROM DESKTOP: // install node ( // install this package: > npm i youless // run the test: > npm test [password] const YoulessSession = require('youless'); const youless = new YoulessSession('password'); // 'password' can be passed optionally youless.getInfo() .then(console.log) .catch(console.log); youless.login() .then(() => { youless.getBasicStatus() .then(console.log) .catch(console.log); youless.getAdvancedStatus() .then(console.log) .catch(console.log); }) .catch(console.log);

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

youless v2.2.1

Node package to interface with Youless energy monitor devices (LS110 and LS120)

Nodejs package to communicate with Youless energy monitors LS110 and LS120.

It allows you to:


  • device information, including firmware version
  • live energy readings of analogue and digital meters
  • live energy and gas readings of P1 smart meters (LS120 only)
  • live readings of the S0 input (LS120 only)
  • live readings of the optical sensor
  • historic logs of power
  • historic log of gas (LS120 only)
  • historic log of S0 (LS120 only)


  • meter type to Digital or Analogue
  • power pulses per KwH value
  • power counter value
  • S0 pulses per KwH value (LS120 only)
  • S0 counter value (LS120 only)


  • discover the device in a local network
  • login with or without password (password LS120 only)
  • synchronize the device time with the internet
  • reboot the device (LS120 only)


This package has been developed and tested with the Enelogic (-EL) firmware. Other firmware versions (-PO, -PO2 and -EO) might not be fully supported, especially for the function getAdvancedStatus().


If you don't have Node installed yet, get it from:

To install the youless package:

> npm i youless


From the folder in which you installed the youless package, just run below command. If you have no password set in the device, use '' as password. If you do not know the ip address, use '' to attempt autodiscovery.

> npm test devicePassword deviceIp


// create a youless session, login to device, fetch basic power info
    const Youless = require('youless');

    const youless = new Youless();

    async function getPower() {
        try {
            // fill in the password of the device. Use '' if no password is set in the device
            // fill in the ip address of the device, e.g. ''
            // do not fill in an ip address if you want to autodiscover the device during login
            await youless.login('devicePassword', 'deviceIp');
            const powerInfo = await youless.getBasicInfo();
        } catch (error) {


Detailed documentation:

Detailed documentation

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free