iot icon indicating copy to clipboard operation
iot copied to clipboard

Input method with a complex parameter.

Open mostafabarmshory opened this issue 1 year ago • 3 comments

I have a device that sends many data at a time. For example, it sends x, y, and z related to an employee id. So the value itself is a dict with many entries.

If the input action accepts JSON request, then we can pass a complex value such as a dict.

The current implementation accepts FORM data.

In the other case, we could call an input action with many parameters.

mostafabarmshory avatar Jul 22 '23 18:07 mostafabarmshory

@etobella I find a way to support parameters as JSON (key, vals). How can I add it to the branch 16.0?

My main need is to connect ThingsBoard MQTT queue to odoo. And TB supports JSON in its rule chain. So, JSON parameter is a good choice for me.

My new approach supports both, form and JSON request body.

It may be useful for others too.

mostafabarmshory avatar Oct 07 '23 01:10 mostafabarmshory

Sure! Make a PR and I will review it

etobella avatar Oct 07 '23 06:10 etobella

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

github-actions[bot] avatar Apr 07 '24 12:04 github-actions[bot]