Sending json from rule engine -- how to

Can I send a json payload from RuleMachine?

There has to be WAY More to that query than you're showing... :smiley:

The Json has to go somewhere.. that's what a driver would do. So you would write a driver to take commands that RM offers and convert them into a json in the driver and sent it on it's way.

That's my best wild ass guess. :smiley:

Where does the son payload come from?

Yeah sorry, I'm trying to control a remote device that takes json in a POST.
This works in the address bar of chrome
http://irsender2/json?plain=[{"data":"E0E09966",type:"SAMSUNG","length":32,"address":0}]

but if I plug this into rule engine I get the error...
java.lang.NullPointerException: Cannot get property '"data":"E0E09966",type:"SAMSUNG","length":32,"address":0' on null object (allHandler)

Which tells me that somewhere in there groovy is attempting to interpret the open curly brace.

I suppose I COULD write a driver, but that seems like a PITA for a fixed Http GET

Curly brackets are used for Global Variables in RM. You could try setting a Global Variable equal to the whole thing (with curly brackets) and then putting the name of the GV inside the curly brackets of your HTTP request. Just an idea. No idea if it will work.

You could simply use the Hubitat Public http GET driver as a starting point, and modify it to issue a POST instead.

Lol, my hub lost it's database reset last night .. and it was occasionally running slow, and hanging before that.
Since I've only had it a couple of weeks I'm rebuilding, this is now on the bottom of my list . though I will keep working at it. Will repost if I get it working "as is"

And in response to

You could simply use the Hubitat Public http GET driver as a starting point, and modify it to issue a POST instead

Duh! Slaps Head!