Callbacks not working - NodeRED

Hello,

I have a my Nuki lock controlled with NodeRed, using the node-red-contrib-nuki (node-red-contrib-nuki (node) - Node-RED), wich then I connect to Homeseer. The lock actions work fine, I can lock, unlock, unlacht…

The problem I have is getting the status of the lock using callbacks. I have succesfully registered callbacks in the bridge:
http://192.168.1.56:8080/callback/list?token=T****R gives me:

{
    "callbacks": [
        {
            "id": 0,
            "url": "http://192.168.1.45/nuki"
        },
        {
            "id": 1,
            "url": "http://192.168.1.72/nuki"
        },
        {
            "id": 2,
            "url": "http://192.168.1.45:8080/nuki/17E1C9A2"
        }
    ]
}

192.168.1.56 is the IP of the nuki bridge, and 192.168.1.45 is the IP of the computer running NodeRED.
Then I have this flow:

I haven’t got into parsing the JSON to update device status, just trying to get some response from the bridge when the lock state changes. No matter what I try I dont get any callback from the bridge.

Thanks,

Alex.

EDIT: In the bridge log I see this entries whenever y perform an action on the lock:
{“timestamp”: “2021-08-05T21:37:57+00:00”, “type”: “HTTP-Post”, “nukiId”: “184CA51D”},

Does this means the callbacks are being sent? In that case the error is in the way I’m trying to read the callback? Any suggestions so I can test it rather than using node-red? Is the only method I know.

Yes, this should be the entries for the callbacks.
The payload of the callback is always a JSON in the documented format, so everything should be working for you.

Does Node-Red have any built in tools to test if the “HTTP-in” is receiving requests?

That is what Im trying to do, test with node-red the HTTP, with a debug node. If I poll the lock I can get the lockstatus with the debug node. Adding a POST node to receive the callback and then a debug note, but nothing is coming in.
Don’t know what could be wrong, I used the flow from a user in this forum…Node-RED / Redmatic (Homematic) integration listening to callbacks
@ueffchen maybe he can give me a hand… thanks

The first thing I can think off is the path.
Are the entries in your callback pointing to the right path?
If you look at your http-in node, you have nuki/17E1C9A2, which gets added to your relative path. In my case that is addons/red. You see that when you look in the http-in node edit window.
In my case, running nodered on a homematic, this would mean: addons/red/nuki/17E1C9A2
What is you relative path for the http-in mode?
You need to make sure that the whole path is entered as callback URL. I don’t have 8080, but it might depend on your redmatic
Can you export your nodered flow and post it here?

The callback path is http://192.168.1.45:8080/nuki/17E1C9A2, as shown from the bridge when doing http://192.168.1.56:8080/callback/list?token=T****R

Then, on the node red http-in node I just set as relative path nuki/17E1C9A2. I am running node-red on a windows computer. Maybe I should have a different relative path?

Thanks for your help

in my case, the HTTP-in node shows below relative path.
2021-08-10 10_50_17-Node-RED _ 192.168.178.35 — Mozilla Firefox
How does yours look?

In my case, that is the complete path from root. I assume that a Nodered installation on a windows PC has a longer path, and I guess that must be added to the callback URL

Try to use curl and post any json data to your callback url. This is the easiest way to debug your receiving side.

Can you please elaborate? Where do I use the curl? In node red? Thank you.

From the shell, e.g.

Hi,

My callbacks are still not working.

Bridge and lock updated to the latest firmware.

But still there is no callback sent.

Any suggestions?

can you export your NodeRed flow and post it here?