It is possible to connect your own eWON device to Databoom through the Data Management functionality (available since firmware 5.6s3).
Procedure in Databoom
You need to do the following steps in Databoom:
- Create a new device choosing the type eWON in (click on Devices in the side menu, then click the Add device button on the top right of the device list)
- Click on the newly created device that appears in the list
- Device detail is shown, note down the Token field, it will be requested next in eWON configuration
- Access the profile page by clicking the user's image on the top left
- Move to the API key section and copy its last 10 characters with the apposite button
Retrieved the device token and the API key, you can proceed with eWON configuration.
Procedure in eWON device
Once the procedure in Databoom is done, access eWOM management interface by typing its IP address in a browser. Authentication is required, if they've not been updated, default credentials are:
Username: adm Password: adm
Tag Setup in the eWON
In order for the data to be forwarded correctly, in Configuration -> Tag Setup, ensure yourself that at least a group (Group A/B/C/D) is assigned to the tag and that the Historical Logging is enabled.
In eWON firmware newer versions it is possible to access tag settings following the steps:
- Access the Values screen below Tags in left side menu
- Enable configuration mode by clicking the button next to MODE, SETUP will be displayed
- Select the variable you want to forward and access its configuration section by clicking the gear icon on the top of the list. Historical Logging section will be among the sections in the panel that appears on the right
- In the same panel also the Tag Groups section is available, below the Tag Visibility section
Access Data Management section from the side menu Configuration -> System Setup -> General -> Net Services -> Data Management.
In eWON firmware newer versions you can access Data Management from the side menu Setup -> System -> Main -> Net services -> Data Management
Form fields must be filled as follows:
- eWON Data Management ID, the token generated by Databoom for the device (visible in the detail page);
- Password, the last 10 characters of the device creator's API key (visible in the user profile);
- Server URL, deedicated Databoom server address is ewon.databoom.com, on port 8080, so we use ewon.databoom.com:8080;
- Upload interval, Databoom uses a minimum interval of 1 minute between one value and the next one, other values will be ignored.
- Select tag group(s), while creating a variable in Tag Setup, it is required to specify one or more groups of belonging. Only the tags belonging to the selected groups will be forwarded to the server.
WARNING! If no group has been selected or the variables have no group of belonging setted, no data will be sent.
If the functionality is active, Databoom automatically detects the NTP settings of the eWON. Data will be stored using the time offset specified, and the parameters stored in the device on the platform. You must set offset according standard time (winter time). For example, if you want your eWON to record data with the Italian timezone, the time offset required is -1.00 (that is UTC+01:00) regardless daylight saving (summer time).
In eWON firmware newer versions you can access NTP settings from the side menu Setup -> System -> Main -> Net services -> NTP
If the functionality is disabled, you can still set an offset in Databoom while creating the device or in the settings in the edit screen of the same device.
WARNING! In order to record data correctly, if NTP is enabled, ensure yourself the time offset used in the eWON configuration to be the one you need; if NTP is disabled, ensure yourself the time offset used in the configuration of the device in Databoom to be the one you need. If no time offset is specified, eWON local time (except of UTC+00:00) cause inconsistency in the recorded data.
WARNING! After enabling NTP setting, is strongly recommended to run the ntpsync command from the script section to first sync the clock.
Through eWON Data Management function, the tags values are sent. You can follow two approaches:
- No signals created ADVISED CHOICE, in this case a new signal is created for each forwarded tag.
- Creation of apposite signals, in Databoom it is possible to create signals rappresenting the tags of the device before the connection. In this case, in order to match data, it's required to edit their token following the model <DEVICE TOKEN>.<ID TAG>.<TAG NAME>. The <DEVICE TOKEN> is available in the device details page, the <TAG NAME> is the name of the tag, viewable in the eWON in the list at Configuration -> System Setup, while <ID_TAG> is available in var_lst.txt or var_lst.csv on the eWON in Files Transfer.
WARNING! Once the signals have been created in Databoom, any edits on the tags in the eWON is not reccomended as the token mismatch leads to the creation of new signals.
Once the procedure has been completed, Databoom starts to record data from the eWON. To examine your data and have a correct representation, follow the instructions in Edit/validation of a signal.
It is possible to remote control eWON signals from Databoom, follow the instructions in the proper article.
If the firmware doesn't have this function (old versions), it is still possible to forward data writing a brief Script.
Data Forwarding Script (only if Data Management is not available)
Go to the eWON management page (from the browser, typing the eWON IP address) and go to Configuration -> Script Setup (In eWON firmware newer versions you can access script management from the side menu Setup -> BASIC IDE, ensure that Script Execution is on RUNNING so that the script is executed). To forward your device tags you have to perform the following steps:
- Init section, in the "Init" section create a timer for the execution of the "Post" section, that will do the actual data forwarding. We will have:
ONTIMER 1,"goto Post"
- Post, create a new section "Post", that will contain the script part performing the request. The code must follow the model:
b$ = "apikey=<API KEY>"
b$ = b$ + "&device=<DEVICE TOKEN>&date=" + TIME$
b$ = b$ + "&name=<SIGNAL TOKEN 1>&value=" + STR$ <TAG NAME>@
b$ = b$ + "&name=<SIGNAL TOKEN 2>&value=" + STR$ <TAG NAME>@
REM ... altre tag
PUTHTTP "<SERVER DATABOOM>", "/script",b$, "","POST failed"
The example has two tags, you can add more by following the same procedure. REM is a comment, you can remove it or replace it with other tags.