1

Create command, wialon api

Тема: Create command, wialon api

Good afternoon, I can't create a request to get or create a command for one object through Postman. I need to create a command for the object id - 600932328, name - lyuba, command type - custom_msg, channel - virtual, message - setparam:777.
I've already tried a bunch of options for both creating and viewing already created commands, the requests don't work when viewing, I see the object with all the settings (including sensors and arbitrary fields) but there are no commands.
I also tried via https://sdk.wialon.com/playground/demo/commands to at least view the commands but it says that the objects are not found although all other requests on the playground work.
Access rights to the object are full, I can see the commands directly in Wialon and I can create them (token from the same account).

2

Create command, wialon api

Re: Create command, wialon api

I figured it out with https://sdk.wialon.com/playground/demo/commands (rights are required not only on the account but also on the token), creation and viewing work, but I still can't make a working request through Postman.

3

Create command, wialon api

Re: Create command, wialon api

I partially figured it out, {{host}}?svc=unit/update_command_definition&params={"itemId":600932328,"callMode":"create","n":"lyuba","c":"custom_msg","l":"virtual","p":"setparam:777","a":255}&sid={{sessionId}} this request works and creates a command but the other request {{host}}?svc=unit/update_command_definition&params={"itemId":600932328,"callMode":"create","n":"lyuba","c":"custom_msg","l":"virtual","p":"%%AAi2<y:NMABDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMMM2LMM6OLMpMNLuNOACAAAAAAAAAAAAANQ4MQQGAAAAAAWQddU+NQMuQAABXXX-XXX-XXX-","a":255}&sid={{sessionId}} no longer works, probably a very long line, if I enter the command %%AAi2<y:NMABDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMMM2LMM6OLMpMNLuNOACAAAAAAAAAAAAANQ4MQQGAAAAAAWQddU+NQMuQAABXXX-XXX-XXX- directly into the wialon then everything works.
is it possible to send such a long command via the api?

4

Create command, wialon api

Re: Create command, wialon api

I also figured out the command length, when I create a command in python code, it is added in Wialon but it cannot be executed.

5

Create command, wialon api

Re: Create command, wialon api

found a mistake, you need to write vrt instead of virtual. Now everything works.