After Home Assistant update or Fritzbox 7590 update FRITZ API in Node Red isn´t working

Hello
I am in trouble with FRITZ API in Node Red since 2 weeks after Home Assistant or Fritzbox Update
(i am not sure)
if I try to read the device list of
http://fritz.box
the answer now is :
device not ready

sorry I am a beginner and I was really happy that I could read all temperatures of DECT 440
and send it by Node Red via Modbus to my heating system.

Did someone else have the same trouble and maybe an idea what to do ?
Thanks in advance
Cord

Hi Troedler77,

being a 'pure' node red user (without Home assistant) I cannot refer to your problem directly. But what I can confirm is, that the recent updates of 7590 did not lead to any issues in my case. Still able to fully control my thermostats with node-red-contrib-fritzapi.

Regards

Thanks for reply

Hello
There is a new AVM HTTP Interface for Fritz OS 8.0

the command "getdevicelist" is now changed to "getdevicelistinfos"...

maybe there are more changes because nothing is working with fritzapi in node red.

Device not ready
getdevicelist failed
{ }

See Node-red-contrib-fritzapi - #2 by Steve-Mcl

Sorry for delay

Thanks for reply but i am a absolute beginner and have no idea about any commands in terminal.

So I need a step by step information.

for example :
how can I change into the Node Red directory ? cd ??

why it isn´t updated in Node Red Palette ?

You shoould do some reading on the basic commands for linux.

to cd to node-red directory
cd .node-red depending what directory you are in at the time.

You also would us the ls command with options to see what files and/or directories are in the directory.

1 Like

I let Cline run widly over the original package and just provided it the pdf with the api changes. Took some fixing and adjusting, but this is working now on my end:

github.com

GitHub - praul/node-red-contrib-fritzapi8

Contribute to praul/node-red-contrib-fritzapi8 development by creating an account on GitHub.

You can just download the .tgz in /dist and install it via upload on node-red


Sorry, it is not working

Can you share the log output of nodered? I admit, I can only test this with thermostats, but they are working fine on my end.

a0d7b954_nodered_2025-03-17T08-48-50.965Z.log (101.1 KB)
flows (19).json (703 Bytes)

Hello Praul
attached you will find my flows and the node red log file

Thanks a lot ...

update ...

getdevicelist ....Action is not possible !!!
see foto

Yeah, I see that it is missing. If your flow depends on it, this wont work. I'll have a look at it later

Great .... Thanks in advance

Maybe the update wasn't necessary after all, see: Node-red-contrib-fritzapi - #7 by Peter2

Hello Praul

I have done the latest Update from homeassistant.
I have disabled all fritz box items in homeassistant.
I have delete all my flows, take out the newest fritzapi, make a restart of node red
and installed the old fritzapi 0.52

I have made a new flow and try only to get info about fritzOS ...
Device not ready ...
I can choose whatever I want .... nothing works.

If I try to read a temperature of a repeater, heating thermostat or from DECT440.... i didn´t receive any info.

I think no one of the other use getdevicelist ... or new with FRITZ OS 8.02 getdevicelistinfos.

please have a look to my attached flow and see the new AVM HTTP Interface

flows (20).json (64.0 KB)
AVM-HTTP-Interface_2024.pdf (374.3 KB)

I downgraded fritzapi to 0.52 and it does not support getdevicelist either.
Are you sure, you are not using node-red-contrib-fritz (it's another node) This is also working for me now, after removing the ghost device
Have you tried removing the unknown device in fritzbox webui?

I am using fritzapi 0.52 and not node-red-contrib-fritz.

Could you please explain step by step how i remove the unknown device in fritzbox webui .

Thanks a lot for your help

You mean in mesh overview of the fritzbox ?

I also have a fritzbox with a bunch of thermostate, but i'm on FritzOs 7.x

For preparing the upgrade, i made of "fallback" flow, if the fritzbox api node fail. Just too understand a bit more what happen in the fritzapi-node:

[{"id":"get_challenge","type":"http request","z":"fritzbox_login","name":"Get Challenge","method":"GET","ret":"txt","paytoqs":"query","url":"https://192.168.178.1/login_sid.lua","tls":"0a082ef2f887442b","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":360,"y":80,"wires":[["0e68abd928cc7a6a"]]},{"id":"parse_challenge","type":"function","z":"fritzbox_login","name":"Parse Challenge","func":"const xml = msg.payload\nconst challenge = xml.SessionInfo.Challenge[0]\nconst sid = xml.SessionInfo.SID[0]\n\nmsg.challenge = challenge;\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":160,"wires":[["generate_response"]]},{"id":"generate_response","type":"function","z":"fritzbox_login","name":"Generate Response","func":"const username = env.get(\"fritzbox_user\");\nconst password = env.get(\"fritzbox_password\");\n\nconst challengeResponse = `${msg.challenge}-${crypto.createHash(\"md5\").update(`${msg.challenge}-${password}`, \"utf16le\").digest(\"hex\")}`;\nmsg.url = `https://192.168.178.1/login_sid.lua?username=${username}&response=${challengeResponse}`;\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[{"var":"crypto","module":"crypto"}],"x":620,"y":80,"wires":[["get_sid"]]},{"id":"get_sid","type":"http request","z":"fritzbox_login","name":"Get SID","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"0a082ef2f887442b","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":620,"y":120,"wires":[["c83db5062d26beba"]]},{"id":"2871cbdd817f5eae","type":"debug","z":"fritzbox_login","name":"debug 4","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1360,"y":80,"wires":[]},{"id":"fceded092188dc6a","type":"inject","z":"fritzbox_login","name":"Get session","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":110,"y":80,"wires":[["get_challenge"]]},{"id":"0e68abd928cc7a6a","type":"xml","z":"fritzbox_login","name":"","property":"payload","attr":"","chr":"","x":370,"y":120,"wires":[["parse_challenge"]]},{"id":"49796c958398fbc8","type":"xml","z":"fritzbox_login","name":"","property":"payload","attr":"","chr":"","x":990,"y":80,"wires":[["bead0c2f3ef4bf05"]]},{"id":"bead0c2f3ef4bf05","type":"change","z":"fritzbox_login","name":"","rules":[{"t":"set","p":"session","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":80,"wires":[["2871cbdd817f5eae"]]},{"id":"b01fa3f885cda833","type":"http request","z":"fritzbox_login","name":"Fritzbox","method":"GET","ret":"txt","paytoqs":"query","url":"https://192.168.178.1/webservices/homeautoswitch.lua","tls":"0a082ef2f887442b","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":540,"y":440,"wires":[["7012015af001e3bc"]]},{"id":"68e2a7a6e1b03f0a","type":"function","z":"fritzbox_login","name":"getdevicelistinfos","func":"const session = flow.get(\"session\");\nconst sid = session.SessionInfo.SID[0]\nmsg.payload ={\n    \"switchcmd\": \"getdevicelistinfos\",\n    \"sid\": sid\n    }\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":310,"y":440,"wires":[["b01fa3f885cda833"]]},{"id":"7012015af001e3bc","type":"xml","z":"fritzbox_login","name":"","property":"payload","attr":"","chr":"","x":790,"y":440,"wires":[["e4a8193b391912dc"]]},{"id":"97dd6de18b7bab80","type":"function","z":"fritzbox_login","name":"gettemplatelistinfos","func":"const session = flow.get(\"session\");\nconst sid = session.SessionInfo.SID[0]\nmsg.payload ={\n    \"switchcmd\": \"gettemplatelistinfos\",\n    \"sid\": sid\n    }\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":310,"y":480,"wires":[["b01fa3f885cda833"]]},{"id":"efecd5c12f034bd3","type":"function","z":"fritzbox_login","name":"applytemplate","func":"const session = flow.get(\"session\");\nconst sid = session.SessionInfo.SID[0]\nlet ain = msg.ain || \"0000000000\"\nmsg.payload ={\n    \"switchcmd\": \"applytemplate\",\n    \"sid\": sid,\n    \"ain\": ain\n    }\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":320,"y":520,"wires":[["b01fa3f885cda833"]]},{"id":"a60a445d68ae3e07","type":"link in","z":"fritzbox_login","name":"applytemplate","links":[],"x":155,"y":520,"wires":[["efecd5c12f034bd3"]]},{"id":"2c9846baadb23e8a","type":"link in","z":"fritzbox_login","name":"gettemplatelistinfos","links":[],"x":155,"y":480,"wires":[["97dd6de18b7bab80"]]},{"id":"e0f2c50e4604fc7b","type":"link in","z":"fritzbox_login","name":"getdevicelistinfos","links":[],"x":155,"y":440,"wires":[["68e2a7a6e1b03f0a"]]},{"id":"e4a8193b391912dc","type":"link out","z":"fritzbox_login","name":"link out 2","mode":"return","links":[],"x":975,"y":440,"wires":[]},{"id":"c83db5062d26beba","type":"switch","z":"fritzbox_login","name":"","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":850,"y":120,"wires":[["49796c958398fbc8"],["18a1735dbac5f2fd"]]},{"id":"18a1735dbac5f2fd","type":"debug","z":"fritzbox_login","name":"Login Failed","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1010,"y":200,"wires":[]},{"id":"ef2fe93d915e4135","type":"inject","z":"fritzbox_login","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":660,"wires":[["0c1edd2645a2f5b6"]]},{"id":"0c1edd2645a2f5b6","type":"link call","z":"fritzbox_login","name":"","links":["e0f2c50e4604fc7b"],"linkType":"static","timeout":"30","x":630,"y":660,"wires":[["817cee61282d31d2"]]},{"id":"817cee61282d31d2","type":"debug","z":"fritzbox_login","name":"debug 6","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":900,"y":660,"wires":[]},{"id":"8171a8a0a4197357","type":"inject","z":"fritzbox_login","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":700,"wires":[["42dba7912eabe2f9"]]},{"id":"42dba7912eabe2f9","type":"link call","z":"fritzbox_login","name":"","links":["2c9846baadb23e8a"],"linkType":"static","timeout":"30","x":630,"y":700,"wires":[["039087463794c3ab"]]},{"id":"039087463794c3ab","type":"debug","z":"fritzbox_login","name":"debug 7","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":900,"y":700,"wires":[]},{"id":"b48a50e93289f670","type":"inject","z":"fritzbox_login","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":740,"wires":[["b87da673d8fefaa9"]]},{"id":"d6cea1cabcce5276","type":"link call","z":"fritzbox_login","name":"","links":["a60a445d68ae3e07"],"linkType":"static","timeout":"30","x":620,"y":740,"wires":[["7ab31fadfd8f7637"]]},{"id":"7ab31fadfd8f7637","type":"debug","z":"fritzbox_login","name":"debug 8","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":900,"y":740,"wires":[]},{"id":"b87da673d8fefaa9","type":"change","z":"fritzbox_login","name":"","rules":[{"t":"set","p":"ain","pt":"msg","to":"PLACEHOLDER","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":740,"wires":[["d6cea1cabcce5276"]]},{"id":"0a082ef2f887442b","type":"tls-config","name":"self-signed","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":""}]

I have checked all devices in Mesh ...
I couldn´t find a problem

FRITZ!Box 7590.pdf (277.3 KB)

Hello kitori

I tried your flow ...but i guess i have to make some adjustments.
Sorry I have no idea where I would find the parameter.