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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ziggo-connectbox

v1.0.2

Published

A Ziggo Connectbox V2 (Sagemcom) reversed API library!

Downloads

9

Readme

Ziggo Connectbox V2 (Sagemcom F3896LG) reversed API.

The Connectbox V2 Sagemcom API reversed in order to find devices by hostname or get a list of all hosts connected to the network. Sharing this because it may help others that were struggling doing the same as I was. Check out #Experimenting documentation to see why I started playing around with this project. This may prove totally useless but I guess it's interesting in a way haha.

Additional information...

This project is under a lot of maintenance still and may not be maintained further. As I said, it's a project of passion so I may only develop it to where I need it myself but feel free to open a new issue to suggest changes!

How to use

The package is available in NPM under the name ziggo-connectbox and you should be able to do npm i ziggo-connectbox in order to install this package to your project.

Within the index.ts file there's a function called Example(). I'll show it here as well.

const Modem = require("ziggo-connectbox");

//* Create new instance of a modem.
const modem = new Modem();

//* Login to the instance of the modem (required for most API endpoints)
await modem.Login("YourPasswordHere.");

//* Find by hostname (if connected).
const SleepyPC = await modem.FindByHostName("Sleepy's PC");
console.log(SleepyPC);

//* Show all the hosts currently connected.
const allHosts = await modem.getConnectedHosts();
console.log(allHosts);

//? Always end with logging out, otherwise a restart or 15 minutes waiting time is required to login again.
await modem.Logout();

REST Endpoints

POST:Login

For the vast majority of the REST API you'll need to authenticate yourself through the login, luckily this is merely just a JSON body with the password parameter. JSON body example:

{
  "password": "WhichEverPasswordHere123?"
}

GET:Hosts

Login required! This returns the hosts back to the consumer and you're able to add ?connectedOnly=true to show connected only, this is better because in some cases it may return older devices that share the same hostname and it makes it a bit puzzling sometimes.

Experimenting documentation

I started working on this because of the mere fact that my camera is not able to be detected through Windows for some reason. I can't even find it by MAC address and I've tried a whole bunch of modules that ended up wasting my time and not working. I started looking into my modem, which is a brand new one that we're offering with the internet service nowadays, and if there was a way to actually get the hosts list as provided by the admin panel.

Luckily as soon as I entered the password in, I found everything I needed and right on the homepage too! From here I just went through everything and ended up falling over some hiccups every once in a while as the token does not expire without logging out, so you'll be stuck on a page where it errors out when logging in because "someone else is already active in the dashboard".