1

New Wialon SDK features

Тема: New Wialon SDK features

As far as Wialon Hosting GUI is going own way, I would like to present some new features that are avaible in Wialon Hosting/Kit remote API and JS SDK. These features are for software developers only. Some of them may not be used by Wialon Hosting GUI at that moment.

1. Most important is somwhere related to topic Приложение на Wialon Hosting доступ с клиентского ПК We changed this duplicate/login methods with IP to another technology. So now if you need to create duplicate of some session you can just use couple of methods:
- create authorization hash: http://sdk.wialon.com/api/index.html#wi … hod_public
(API method: core/create_auth_hash)
- use it to initiate session from any server:
http://sdk.wialon.com/api/index.html#wi … hod_public
(API method: core/use_auth_hash, parameters: {authHash: text})

Auth hash can be used from any IP address (valid for 2 minutes). Additionally (for Apps) in Apps settings you can checkbox Authorize hash in Additional URL params session, so that you can instantly use generated auth hash in your App.

I recommend to switch all Apps to this new methodology.

2. Second phone number for double-SIM devices. Same as primary phone number in most operations. We defined special flags for unit commands in order to store-defaults/select to which phone number SMS should be delivered. more avaible in documentation.

3. Admin fields. This is special thing now avaible in most types of items (units, users, accounts) where you can store some special information that should be hidden from user. It can be used absolutelly same way as custom fields, but have own data-flags, acl flags, etc.
In own applications I recommend to use it to store accounting information about customers, like company name, billing options, some admin parameters, etc.

Do not hesitate me if you have questions about how to use new features.

At the dark side of telematics...
2

New Wialon SDK features

Re: New Wialon SDK features

Kwa nini katika Kiingereza?

3

New Wialon SDK features

Re: New Wialon SDK features

One more feature that appeared, but not yet documented is that we now able to give persistent state of object in terms of message parameters. E.g. each new received message is parsed and update appropriate parameters state.

So we can monitor parameters state instead of catching new messages and receive information about how much time passed from the moment of last change. This can be used to show how much time unit is staying, time of last message from dirver, current value for fuel tank parameters if any, etc.

Remote API Method unit/calc_last_message will be updated in nearest future to use this methodic for calculations.

How to use:
Remote api & JS:
1. To receieve last-known message parameters for unit use data flag: wialon.item.Unit.dataFlag.messageParams: 0x00100000.
2. Parameters are located at prms property in unit's JSON.
3. JScript: to get parameters use getMessageParams method and bind to changeMessageParams event to monitor changes.
4. prms object has next format: {paramName: {at: 1366190444, ct: 1366190444, v: 0}, ...}
at - time of last message that had paramName
ct - time of last change of parameter value
v - current parameter value

At the dark side of telematics...
4

New Wialon SDK features

Re: New Wialon SDK features

Updated Wialon SDK features developed and installed in May:

Possibility to execute report with template configuration on the fly e.g. without creating real report template object.

At the dark side of telematics...
5

New Wialon SDK features

Re: New Wialon SDK features

Hi,

When I am trying to visit custom app from "dev.hosting.wialon.com" using below api method to authorize, always getting Error code 1 - Invalid session.


Please find the below API method which I have used for login,


svc : core/use_auth_hash
params : {"authHash":"0333331555e65555506733333bbcf555", "operateAs":"PM Trucking Admin", "checkService":""}

Kindly help me to fix this issue. Thanks.

6

New Wialon SDK features

(01/04/2017 00:45:41 отредактировано cerpas)

Re: New Wialon SDK features

What will happen with the core  duplicate method?

My apps use authHash but in some part of apps i need use  core/duplicate

7

New Wialon SDK features

Re: New Wialon SDK features

When you work with dev.hosting.wialon.com - you need to send requests to http://dev-api.wialon.com instead of http://hst-api.wialon.com.
SID from dev is not compatible with hosting and vice versa. That's why you get 1 code.

Head of Wialon Local Department
Gurtam