
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
smartfritz-promise
Advanced tools
SmartHome for Fritz!Box and Dect!200 Node to communicate with AVM FritzBox over the aha-http-interface
Node module to communicate with a AVM Fritz!Box and various smart home devices like Fritz!DECT 200 outlet, FRITZ!Powerline 546E WLAN set and CometDECT thermostat providing the following functions:
getSessionID
)getDeviceListInfo
) >FritzOS 6.10getDeviceList
) >FritzOS 6.10getDevice
) >FritzOS 6.10getTemperature
) - polyfillNote
getTemperature
is not available on the FRITZ!Powerline 546E WLAN set and will always return NaN
.
getSwitchList
)getSwitchState
)setSwitchOn
)setSwitchOff
)getSwitchPower
)getSwitchEnergy
)getSwitchPresence
)getSwitchName
)For controlling AVM Fritz!DECT 200 devices the actuator identification number (AIN) is needed. the AIN can be obtained using getSwitchList
which returns a list of AINs or the more general getDeviceList
function which returns a verbose device list structure as JSON.
Thermostat functions are only available as of FritzOS 6.36
getThermostatList
) - polyfillsetTempTarget
), supports 'ON'/'OFF' to enable/disable thermostatgetTempTarget
)getTempComfort
)getTempNight
)getBatteryCharge
)Note
As of FritzOS 6.36 there is are no official function to obtain a list of thermostats, neither to get the thermostat's temperature. Also the switches getSwitchTemperature()
function is not working in that firmware version.
For an alternative approach the getTemperature()
polyfill function was added which supports both switches and thermostats.
getGuestWlan
)setGuestWlan
)Note
getGuestWlan
returns a structure containing all wifi settings found in the Fritz!Box UI. The setGuestWlan
function accepts either a settings structure such as this or a single boolean value.
All functions have been tested on FritzOS 6.20/6.36/6.51 using the Fritz!Box 7390. The WLAN functions may be less stable.
As of version 0.5.0 the getSwitchTemperature
function has been replaced with getTemperature
which works for outlets and thermostats both.
npm install smartfritz-promise
As of version 0.7.0 smartfritz supports both the legacy functional interface as well a new object-oriented interface. The new object interface is the recommended way of using smartfritz.
Get the list of switch AINs using a customer Fritz!Box address:
var Fritz = require('smartfritz-promise').Fritz;
var f = new Fritz("user", "password", "192.168.178.1");
f.getSwitchList().then(function(ains){
console.log(f.getSID());
console.log(ains);
});
Get the session ID using default Fritz!Box address (http://fritz.box):
var fritz = require('smartfritz-promise');
fritz.getSessionID("user", "password").then(function(sid) {
console.log(sid);
});
Get the list of switch AINs using a custom Fritz!Box address:
var options = { url:"192.168.178.1" };
fritz.getSessionID("user", "password", options).then(function(sid) {
console.log(sid);
// note that the options/url need be carries through every single api call
fritz.getSwitchList(sid, options).then(function(ains){
console.log(ains);
});
});
http://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/AHA-HTTP-Interface.pdf
Thanks to:
FAQs
SmartHome for Fritz!Box and Dect!200 Node to communicate with AVM FritzBox over the aha-http-interface
The npm package smartfritz-promise receives a total of 0 weekly downloads. As such, smartfritz-promise popularity was classified as not popular.
We found that smartfritz-promise 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
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.