How to get data from API?

Hi there, I want to get data from my Homey, via API.

I have made the flow below, according to this guide:

But as you see in the debug, i only get the homey verson and ID. What am I doing wrong?

Maybe try to set the header like this:

grafik

[{"id":"e3a9f717e0dbab8a","type":"http request","z":"94c514c2ac360b08","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://127.0.0.1:1880","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"token"}],"x":650,"y":640,"wires":[["5e3560e9ef6ea6de"]]},{"id":"845b669fc551b684","type":"inject","z":"94c514c2ac360b08","name":"token from msg","props":[{"p":"token","v":"Bearer <your api key>","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":460,"y":640,"wires":[["e3a9f717e0dbab8a"]]},{"id":"5e3560e9ef6ea6de","type":"debug","z":"94c514c2ac360b08","name":"debug 17","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":900,"y":640,"wires":[]},{"id":"28ed30cd1ae7351e","type":"http request","z":"94c514c2ac360b08","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://127.0.0.1:1880","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Authorization","keyValue":"","valueType":"other","valueValue":"Bearer <your api key>"}],"x":650,"y":760,"wires":[["39d0db7f58423862"]]},{"id":"64f769a1b796fd68","type":"inject","z":"94c514c2ac360b08","name":"token from node","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":460,"y":760,"wires":[["28ed30cd1ae7351e"]]},{"id":"39d0db7f58423862","type":"debug","z":"94c514c2ac360b08","name":"debug 18","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":900,"y":760,"wires":[]},{"id":"e2d9a5f9f8bd91d1","type":"comment","z":"94c514c2ac360b08","name":"or","info":"","x":650,"y":700,"wires":[]}]

Nothing apart from not using the different classes with your http request HomeyAPIV3Local - Homey Web API.

192-168-1-116
??????????????????????

Oddly enough that is the way the server can be addressed and is in the example given in the API docs. It's part of a host name and not an IP address!!!

Bit of a frightening address though as it refers to an external domain to access a device internally and who knows what happens if you change the address or two devices have the same one (given lots of home routers default to 192.168.0.0/24 or 192.168.1.0/24 it must happen and be managed somehow).

Just hope it does not use ARP poisoning to determine location!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.