
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
A NodeJS module for the new FreeboxOS API.
Please read also the doc : http://dev.freebox.fr/sdk/os.
Please consider it as a draft.
###freebox.connect(); You can start to use the module with these lines of code :
var freebox = require('./freebox/freebox');
freebox.connect();
freebox.on('ready', function(box) {
//Some stuff
});
You could also pass params. For example if you want to specifiy the address of the box, or if you alredy have an app_token for your app.
freebox.connect({
'ip' : 'mafreebox.freebox.fr', (optional)
'port' : 80, (optional)
'app_token' : '012345', (optional)
'track_id' : '12' (optional)
});
Before doing anything, you need to declare the app to the Freebox. A message will be prompt on the lcd screen asking the user to accept or deny.
freebox.register();
On can save appToken, trackId and status by listening at :
freebox.on('registered', function(params) {
console.log(params);
});
Echo freebox's stats. Example :
freebox.stats(temp, null, null, null, null, function(msg) {
console.log(msg);
});
date_start, date_end, precision and fields are optional. Please see http://dev.freebox.fr/sdk/os/rrd/ for all the options.
Echo download stats with :
freebox.downloadsStats(function(msg){
console.log(msg);
});
'Url' can be multiple. In this case, they have to be separated by a new line delimiter "\n" as below.
freebox.addDownloads(
"http://blog.baillet.eu/public/ciel-bleu-sans-avion-20100417-imgis5346.jpg\nhttp://www.8alamaison.com/wp-content/uploads/2013/04/z2354-carton-rouge3.gif",
null, false, null, null, null,
function(msg) {
console.log(msg);
}
);
You can manage download.
With no id submitted it returns the entire downloads list.
With an id you can manage the selected download.
Actions :
freebox.downloads(2, udpate, {"io_priority": "high","status": "stopped"}, function(msg){
console.log(msg);
});
Return all the calls save in the box.
freebox.calls(function(msg){
console.log(msg);
});
Manage a call. Actions :
Example : read a specific call
freebox.call(1, 'read', null, function(msg) {
console.log(msg);
});
Example : update a call
freebox.call(1, 'update', {'new' : false}, function(msg) {
console.log(msg);
});
FAQs
Freeboxos for nodejs
The npm package freeboxos receives a total of 3 weekly downloads. As such, freeboxos popularity was classified as not popular.
We found that freeboxos demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.