Help with HTTP request from Noolite Home Automation Gate

Hi. I have Noolite Home Automation Gate.
This device can send HTTP requests when receive data from linked devices like this:
  1. - server & page (i can change it)
  2. cell – device address
  3. cmd – received command from device
  4. fmt – received command format
  5. d0 – command data byte 0
  6. d1 – command data byte 1
  7. d2 – command data byte 2
  8. d3 – command data byte 3

How to get data from HTTP request to String Item Test? (All this line cell=1&cmd=0&fmt=0&d0=0&d1=0&d2=0&d3=0)

1 Like

@watou, you always help, please :pray:

OK, you want to have a piece of code that is listening and can translate the URL parameters (which I assume are hardcoded to be cell, cmd, fmt, d0, d1, d2, d3, and then turn that into a POST REST API call that sends a command to a specific item. You need to have some kind of web server to receive the call from the Noolite home automation gate.

Now there was a pull request for a Noolite binding which hasn’t been reviewed yet:

It might do this job nicely, but I haven’t looked at the code yet. So that ought to be investigated first I think. If for some reason it doesn’t address your need, then it’s possible to set up a simple endpoint to do the translation from received call from the device, to an openHAB REST API POST to send a command.

If there is an already built version of the above pull request, it would be good to try it. If you don’t find one, I will try to build that PR for you to try.

Sounds OK?

Yes, this is exactly what i looking for. But i didn’t suppose that this task so complicated.
Thank you @watou, i looked at this binding and seems it for Noolite usb adapter, not Noolite Ethernet Gateway i have.

Since your device is performing an HTTP request (I assume a GET request), you could use node.js something along the lines of what is described here and point your device at the IP address of the server it’s running on (probably the openHAB server could be a good choice) on port 3000, and make an endpoint to receive the request, and the POST to the openHAB REST API to translate the incoming command to openHAB. There are many other web servers and languages you could use instead that might be more to your liking. I hope this helps!

It’s too bad the device can’t let you substitute in those values into a “callback URL” that you specify. If that were possible, then the device could be sending commands or updating states directly without a “middleman” like the above. I know that DoorBird and Foscam are two of countless device makers that let you put in your own callback URL. Maybe you could ask the makers of the Ethernet gateway device if they could add that to their firmware as an option? (And also to allow POST vs. GET vs. PUT etc.).

Good idea, I try to ask makers.

Developers are very kind, i already received test FW with REST commands from Noolite gate.

1 Like

Could you share example this gate please?

Sorry, but they said out of time, and firmware cant be released.
All beta FW not works at all.
I use Apache webserver and 1 line of php code to translate POST request to openHAB REST API.