SendHTTP through Mppgateways?

12 views
Skip to first unread message

DougC

unread,
Nov 1, 2025, 10:33:05 AMNov 1
to MppDevices
Hi. It's been a while since I asked a dumb question. I have an Mpp custom device that I send commands to using SendHTTP from my AM server.. However I now want to connect that device via an MppGateway. Is there a way to achieve this and still get the HTTP commands through?   Or is there now actually a better way to be sending commands to the device (it's  been a number of years since I set it up)

Mike P 4 MPP

unread,
Nov 2, 2025, 7:30:44 PMNov 2
to MppDevices
Yep, you can still send some commands to the remote device, use the target UDN as the resource.  get/state and subscribe are intercepted but any put or post is passed through if the remote device is connected to the gateway.

DougC

unread,
Nov 2, 2025, 11:21:20 PMNov 2
to MppDevices
Thanks Mike that's great. You know what I love about the Mpp suite is the huge amount of inbuilt functionality just waiting for me to use. I just wish I understood it better.

DougC

unread,
Nov 30, 2025, 3:29:53 AMNov 30
to MppDevices
Actually a follow up to the last question.  So I can send htpp commands to gateway attached devices by targeting their friendly UDN and that works great. Question is, can I send http to non-gateway attached devices by using the UDN rather than the ip address?

Mike P 4 MPP

unread,
Nov 30, 2025, 2:01:48 PMNov 30
to MppDevices
I'm not sure I understand the question... If you're asking can you direct a general HTTP message from a gateway device to a non-gateway IP directly, no, any messages (events or state/value messages) are only sent to the AM server through the gateway.  But you can setup a rule in AM triggered by a event, state, or value to use the sendHTTP action to any IP.

DougC

unread,
Nov 30, 2025, 2:28:48 PMNov 30
to MppDevices
ok. what i mean is about sending a command  from an AM server using the sendHTTP action in a rule.  It seems that I can send a command to a gateway attached device by specifying the gateway's address in the target URL and putting the attached device'ss UDN as the resource. I was wondering if there was a way to send the http command directly to a non gateway attached device by using it's UDN instead of it's ip in the URL.
So the URL would look like http://UDN:8898/whatever with AM I guess translating the UDN to the correct ip

Mike P 4 MPP

unread,
Nov 30, 2025, 10:15:35 PMNov 30
to MppDevices
Oh I see, no, that won't work.  The gateway knows the devices it manages because it's the DHCP server for them on the .4.* address range.  It keeps a table of device UDNs and their local IPs when they join and check in so it routes using that.  AM keeps a table of UDN to IP (location) so it can find devices, but it sends HTTP messages from rules out raw.
There's a beta version of a new MPP version on my site that uses MQTT to communicate though I haven't implemented all of the devices yet and there's no automatic update function for firmware levels.  And you'd need an MQTT broker, I've implemented a rudimentary one (no security) that runs on an ESP32.

DougC

unread,
Dec 1, 2025, 1:12:45 AMDec 1
to MppDevices
thanks Mike. sounds like I may have a wee tinkering project for the dark winter nights and a use for the ESP32 i've had in a drawer for many years.
Reply all
Reply to author
Forward
0 new messages