OK.
Thanks but i need to do it FROM node-red in order to get that number and later on publish on a MQTT topic that uses the number in the topic
e.g;: project/gatewayNumber/data-to-be-sent
But using node-red i do not see how .
Any idea ?
EDIT:
i tried using
inject node — http request node –debug node
with
GET method
https://192.168.2.3/api/system/deviceId
and basic authentication with username and password.
JSON
The best answer i get is
{ “code”: 401, “error”: “not logged in”, “status”: “fail” }
Same with http:// (not httpS).
although usename and password are correct.
EDIT2:
using
GET https://192.168.2.3/api/login?username=admin&password=admin
i got success but still cannot get the id of the gateway. I think the token given in the result of last command is to be used somehow but dunno what to do with it.
any other way or idea ?
Thanks
-
This reply was modified 8 years, 6 months ago by
magouero. Reason: add information after trial
-
This reply was modified 8 years, 6 months ago by
magouero. Reason: add information after 2nd trial