npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

livebox-collect

v0.0.3

Published

Get interesting data out of the Orange Livebox DSL Modem

Readme

Introduction

Ce simple module NodeJS permet de collecter un certain nombre de données et de métriques sur le modem-router Livebox 4 d'Orange. Je l'utilise personnellement pour récupérer les données de ma Livebox, les injecter dans une base InfluxDB et construire des tableaux de bord avec Grafana.

Méthodes

Quatre méthodes asynchrones sont actuellement disponibles. Des exemples d'informations recueillies sont disponibles plus bas.

  • connect( callback( err ) ) pour effectuer la connexion à la Livebox
  • deviceInfo( callback( err, data ) ) pour obtenir des informations générales sur la Livebox
  • getDSLStats( callback( err, data ) ) pour obtenir des métriques sur la qualité du lien ADSL
  • getMibs( mib, callback( err, data ) ) pour interroger certaines mib internes de la Livebox. Je n'interroge pour ma part que la mib 'dsl'.

Installation

npm install livebox-collect

Utilisation

Voici un exemple de structure de code pour l'utilisation de ce module.

var Livebox = require( 'livebox-collect' );
var livebox = new Livebox( '192.168.1.1', 'admin', 'motdepasse' );

livebox.connect( function( err ) {

  // Vérifier les erreurs
  if( err ) {
    process.exit( 1 );
  }

  livebox.deviceInfo( function( err, data ) {

    // Vérifier les erreurs
    if( err ) {
      process.exit( 1 );
    }

    // Play with data
    console.log( data );
  }
}

Exemple de données recueillies

Voici un exemple des données que l'on peut recueillir à l'aide de chacune des méthodes décrites plus haut. Les informations sensibles ont volontairement été masquées.

deviceInfo

{ status: 
  { Manufacturer: 'Sagemcom',
    ManufacturerOUI: '904D4A',
    ModelName: 'SagemcomFast5360_MIB4',
    Description: 'SagemcomFast5360_MIB4 Sagemcom fr',
    ProductClass: 'Livebox 4',
    SerialNumber: '****',
    HardwareVersion: 'SG_LB4_1.1.0',
    SoftwareVersion: 'SG40_sip-fr-2.15.14.1_7.21.3.1',
    RescueVersion: 'SG40_sip-fr-2.14.8.1',
    ModemFirmwareVersion: '',
    EnabledOptions: '',
    AdditionalHardwareVersion: '',
    AdditionalSoftwareVersion: 'g0-f-sip-fr',
    SpecVersion: '1.1',
    ProvisioningCode: '******',
    UpTime: 286928,
    FirstUseDate: '0001-01-01T00:00:00Z',
    DeviceLog: '',
    VendorConfigFileNumberOfEntries: 1,
    ManufacturerURL: 'http://www.sagemcom.com/',
    Country: 'fr',
    ExternalIPAddress: '***********',
    DeviceStatus: 'Up',
    NumberOfReboots: 10,
    UpgradeOccurred: false,
    ResetOccurred: false,
    RestoreOccurred: false
  }
}

getDSLStats

{ status: 
  { ReceiveBlocks: 610430,
    TransmitBlocks: 444088,
    CellDelin: 0,
    LinkRetrain: 1,
    InitErrors: 0,
    InitTimeouts: 0,
    LossOfFraming: 0,
    ErroredSecs: 170,
    SeverelyErroredSecs: 15,
    FECErrors: 4910041,
    ATUCFECErrors: 75314,
    HECErrors: 0,
    ATUCHECErrors: 0,
    CRCErrors: 1174,
    ATUCCRCErrors: 38
  }
}

getMibs( 'dsl' )

{ dsl0:
  { LastChangeTime: 232559,
    LastChange: 55132,
    UpstreamCurrRate: 9191,
    DownstreamCurrRate: 65262,
    LinkStatus: 'Up',
    UpstreamMaxRate: 12776,
    DownstreamMaxRate: 66156,
    UpstreamAttenuation: 386,
    DownstreamAttenuation: 371,
    DownstreamLineAttenuation: 374,
    UpstreamLineAttenuation: 396,
    UpstreamNoiseMargin: 94,
    DownstreamNoiseMargin: 81,
    UpstreamPower: 20,
    DownstreamPower: 145,
    FirmwareVersion: '****',
    StandardsSupported: 'G.992.1_Annex_A, G.992.1_Annex_B, G.992.1_Annex_C,T1.413, T1.413i2,ETSI_101_388, G.992.2,G.992.3_Annex_A, G.992.3_Annex_B, G.992.3_Annex_C, G.992.3_Annex_I, G.992.3_Annex_J,G.992.3_Annex_M, G.992.4,G.992.5_Annex_A, G.992.5_Annex_B, G.992.5_Annex_C, G.992.5_Annex_I, G.992.5_Annex_J, G.992.5_Annex_M, G.993.1,G.993.1_Annex_A, G.993.2_Annex_A, G.993.2_Annex_B',
    StandardUsed: 'G.993.2_Annex_B',
    DataPath: 'Interleaved',
    InterleaveDepth: 0,
    ModulationType: 'VDSL',
    ChannelEncapsulationType: 'G.993.2_Annex_K_PTM',
    ModulationHint: 'VDSL',
    CurrentProfile: '17a',
    UPBOKLE: 140
  }
}