Skip to content

Commit

Permalink
Merge pull request #37 from foxthefox/2.1.0
Browse files Browse the repository at this point in the history
2.1.0
  • Loading branch information
foxthefox authored Apr 5, 2023
2 parents 1d1515d + 0aacfec commit 39e8648
Show file tree
Hide file tree
Showing 7 changed files with 666 additions and 175 deletions.
49 changes: 48 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,56 @@ const logout = await fritz.logout_SID();
see the example.js.

## API Calls
* todo for 1.0.3
### reading FB

|API-call|implements FB call|
|:----|:---|
|getDeviceListInfos()| getdevicelistinfos|
|getTemplateListInfos()| gettemplatelistinfos|
|getTriggerListInfos()| gettriggerlistinfos|
|getColorDefaults()| getcolordefaults|
|getDeviceInfos(ain)| getdeviceinfos|
|getBasicDeviceStats(ain)| getbasicdevicestats|
|getSwitchList()| getswitchlist|
|getSwitchState(ain)| getswitchstate|
|getSwitchPresent(ain)| getswitchpresent|
|getSwitchPower(ain)| getswitchpower|
|getSwitchEnergy(ain)| getswitchenergy|
|getSwitchName(ain)| getswitchname|
|getTemperature(ain)| gettemperature|
|getHkrTsoll(ain)| gethkrtsoll|
|getHkrKomfort(ain)| gethkrkomfort|
|getHkrAbsenk(ain)| gethkrabsenk|
|getUserPermissions()| not a FB call|

### commands to FB

|API-call|implements FB call|
|:----|:---|
|applyTemplate(ain)| applytemplate|
|setSwitchOn(ain)| setswitchon|
|setSwitchOff(ain)| setswitchoff|
|setSwitchToggle(ain)| setswitchtoggle|
|setSimpleOn(ain)| setsimpleonoff&onoff=1|
|setSimpleOff(ain)| setsimpleonoff&onoff=0|
|setSimpleToggle(ain)| setsimpletoggle|
|setTempTarget(ain, temp)| sethkrtsoll|
|setHkrBoost(ain, time)| sethkrboost|
|setWindowOpen(ain, time)| sethkrwindowopen|
|setBlind(ain, target)| setblind|
|setLevel(ain, level)| setlevel|
|setColorTemperature(ain, temp)| setcolortemperature|
|setColor(ain, saturation, hue)| setcolor|
|setUnmappedColor(ain, saturation, hue)| setunmappedcolor|
|setTriggerActive(ain, active)| settriggeractive|

## Changelog
### 2.1.0
* (foxthefox) new functions setSimpleToggle, setLevelPercentage, setUnmappedColor, setTriggerActive
* (foxthefox) remove spaces in ain if part of the function call
* (foxthefox) extended testing
* (foxthefox) debug-flag as new parameter during instantiation

### 2.0.1
* (foxthefox) forgotten "this." at apiresponse

Expand Down
2 changes: 1 addition & 1 deletion example.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const Fritz = require('./index.js').Fritz;

const fritz = new Fritz('admin', 'password', 'http://localhost:3333');
const fritz = new Fritz('admin', 'password', 'http://localhost:3333', false);

async function test() {
const login = await fritz.login_SID().catch((e) => {
Expand Down
Loading

0 comments on commit 39e8648

Please sign in to comment.