Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

youless

2.2.1 • Public • Published

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

It allows you to:

get:

  • 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)

set:

  • 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)

do:

  • 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)

Note:

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().

Install:

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

To install the youless package:

> npm i youless

Test:

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

Quickstart:

// 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. '192.168.1.50'
            // 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();
            console.log(powerInfo);
        } catch (error) {
            console.log(error);
        }
    }

    getPower();

Detailed documentation:

Detailed documentation

Install

npm i youless

DownloadsWeekly Downloads

0

Version

2.2.1

License

MPL-2.0

Unpacked Size

55.4 kB

Total Files

11

Last publish

Collaborators

  • avatar