Preview only show first 10 pages with watermark. For full document please download

Exploitation Guide

   EMBED


Share

Transcript

OPERATING MANUAL WebdynRF Concentrator dedicated to smart metering and energy management OPERATING MANUAL – WebdynRF CONTENT 1 Remarks concerning this manual ..................................................................... 4 1.1 Scope ....................................................................................................... 4 1.2 Product versions ....................................................................................... 4 1.3 Target group ............................................................................................. 5 2 General operating principle .............................................................................. 5 3 Communication with the remote server............................................................ 6 3.1 Connection modes .................................................................................... 7 3.1.1 Management of the SIM card’s PIN code ............................................ 7 3.2 Remote FTP server .................................................................................. 8 3.3 Remote Web Services Server .................................................................. 9 3.4 Connection to the remote server............................................................... 9 3.4.1 Remote server uploading process (Upload) ...................................... 11 3.4.2 Inbox .................................................................................................. 13 3.5 Request button ....................................................................................... 13 4 Commands .................................................................................................... 14 4.1 Wavenis commands : Scan, TimeSync .................................................. 14 4.2 Specific Wavenis commands .................................................................. 17 4.3 Specific Modbus commands ................................................................... 18 4.4 Status command ..................................................................................... 19 4.5 Update command ................................................................................... 20 4.6 Dry contact command (digital output) ..................................................... 20 5 Configuration of the gateway ......................................................................... 20 5.1 Parameters ............................................................................................. 20 5.2 Configuration via SMS ............................................................................ 23 5.3 Local configuration.................................................................................. 26 5.4 Remote configuration.............................................................................. 26 5.5 Local access control ............................................................................... 27 5.6 Configuration of the ports ....................................................................... 28 6 Wavenis ......................................................................................................... 28 6.1 Transparent mode .................................................................................. 28 6.2 Wavenis modules supported .................................................................. 29 6.3 Wavenis configuration ............................................................................ 29 6.4 Wavenis alarms ...................................................................................... 30 6.5 Wavenis time management .................................................................... 31 6.6 WaveTIC modules support ..................................................................... 32 6.7 Wavenis communication errors............................................................... 32 7 Pulses ............................................................................................................ 32 8 Wired M-Bus .................................................................................................. 33 9 Wireless M-Bus .............................................................................................. 33 10 Active RFID tags ........................................................................................ 34 11 Modbus ...................................................................................................... 35 11.1 Configuration .......................................................................................... 36 11.2 Modbus datasets .................................................................................... 36 11.2.1 Variables ........................................................................................ 36 WebdynRF – Operating Manual - Version 2.0 2 OPERATING MANUAL – WebdynRF 11.2.2 Boundaries ..................................................................................... 38 11.3 Modbus slaves ........................................................................................ 38 11.4 Variables addresses ............................................................................... 39 12 Scheduler ................................................................................................... 39 13 Alarm engine .............................................................................................. 42 14 Log files ...................................................................................................... 44 15 Synchronization of the internal clock .......................................................... 46 16 Updating the gateway’s firmware ............................................................... 46 17 Support....................................................................................................... 47 18 APPENDIX A: XSD Diagram – Configuration............................................. 48 19 APPENDIX B: XML Example – Configuration ............................................ 70 20 APPENDIX C: XSD Diagram – Alarms....................................................... 76 21 APPENDIX D: XML Example – Alarms ...................................................... 88 22 APPENDIX E: XSD Diagram – Supervision ............................................... 94 23 APPENDIX F: XML Example – Supervision ............................................. 100 24 APPENDIX G: XSD Diagram – Data ........................................................ 103 25 APPENDIX H: CSV Format – Data .......................................................... 110 26 APPENDIX I: XSD Diagram – Commands ............................................... 111 27 APPENDIX J: XML Example – Commands .............................................. 125 WebdynRF – Operating Manual - Version 2.0 3 OPERATING MANUAL – WebdynRF 1 Remarks concerning this manual This guide describes the operation of a WebdynRF gateway. In particular, it describes the format of the files exchanged between the gateway and the remote server and the mechanism implemented in these exchanges. For the installation instructions, refer to the installation manual for the WebdynRF gateway (cf.: MI-WebdynRF.pdf). 1.1 Scope This technical description is valid for WebdynRF gateways from hardware version 1 and software version 2.1.3. onwards. 1.2 Product versions Depending on the type of GSM modem and radio card, there are several product versions: Wavenis radio card: Product references Versions WG0606-A01 2G modem - 868 MHz/25 mW Wavenis WG0606-A02 3G modem - 868 MHz/25 mW Wavenis WG0606-A03 2G modem - 868 MHz/500 mW Wavenis WG0606-A04 3G modem - 868 MHz/500 mW Wavenis WG0606-A11 2G modem - 915 MHz/25 mW Wavenis WG0606-A12 3G modem - 915 MHz/25 mW Wavenis WG0606-A13 2G modem - 915 MHz/500 mW Wavenis WG0606-A14 3G modem - 915 MHz/500 mW Wavenis WG0606-A21 2G modem - 433 MHz/10 mW Wavenis WG0606-A22 3G modem - 433 MHz/10 mW Wavenis Wireless M-Bus radio card: Product references Versions WG0607-A01 WebdynRF-WirelessMbus-868 MHz-2G WG0607-A02 WebdynRF-WirelessMbus-868 MHz-3G WG0607-A11 WebdynRF-WirelessMbus-169 MHz-2G WG0607-A12 WebdynRF-WirelessMbus-169 MHz-3G WebdynRF – Operating Manual - Version 2.0 4 OPERATING MANUAL – WebdynRF RFID radio card: Product reference Versions WG0608-A01 2G modem - RFID Accessories common to all products: Product references Versions AC0102-02 12V external power supply unit AC0103-00 24V DIN rail-mounted power supply AC0201-01 Remote dual-band GPRS antenna with 5m of cable AC0201-02 Remote dual-band GPRS antenna with 20m of cable AC0201-03 Remote dual-band GPRS antenna with 10m of cable AC0501-01 IP67 box, circuit breaker, 24V DC power supply, UPS unit and 12V lead batteries This manual covers all versions of the product. 1.3 Target group This guide is aimed at users/operators of the gateway, in order to enable them to process data fed back by the gateway and configure it remotely. 2 General operating principle The WebdynRF platform is the new range of Webdyn concentrators dedicated to wireless networks. Gathering data from meters or sensors, and checking I/Os are basic functionalities for the WebdynRF gateway. The services targeted by the WebdynRF gateway are remote meter reading, and building energy management. WebdynRF – Operating Manual - Version 2.0 5 OPERATING MANUAL – WebdynRF Technical Specifications: WebdynRF 3 Communication with the remote server The gateway communicates with a remote server via an FTP server and/or a Web Services server. Management of the Web Services server not implemented Each time its configuration is modified, the gateway can either upload it onto an FTP server, or send it to a Web Services (WS) server. Likewise, the alarms and data gathered may be uploaded onto an FTP server, or sent to a Web Services server. When you use FTP transfer, the gateway can also inform a Web Services server of any FTP upload. The server can also launch actions on the gateway by placing command files in an INBOX directory on the FTP server or by sending it commands when the gateway queries the Web Services INBOX. The commands are also sent to the gateway via SMS. WebdynRF – Operating Manual - Version 2.0 6 OPERATING MANUAL – WebdynRF 3.1 Connection modes The connection to a remote server can be established via Ethernet or a mobile network (GPRS or 3G, depending on the hardware configuration). Exchanges between the gateway and the remote server are still initiated by the gateway, but the remote server has various methods at its disposal for triggering an exchange (see section Erreur ! Source du renvoi introuvable.). The gateway can be configured for using the modem in one of the following four modes: On demand: In this mode, the PPP link is created when the gateway needs to communicate with the remote server. The link will be closed after communication with the remote server has been completed. Always On: In this mode, the PPP link will be maintained permanently and independently. In this mode, a keepalive mechanism may be activated in order to ensure that the link is working. Always On mode not implemented. Always Off: In this mode, the PPP link is never created. All communication with the server goes via the Ethernet interface. The modem (if a valid SIM card is installed) is however connected to the mobile network, and is ready to receive incoming calls and/or SMSs. Off: In this mode, the modem is powered down. Management of the SIM card’s PIN code The gateway may be configured to use a SIM card: 3.1.1    Without a PIN code: /com/modem/pin/mode=off With a PIN code: /com/modem/pin/mode=manual and /com/modem/pin/code= With an automatic PIN code: Automatic mode not implemented WebdynRF – Operating Manual - Version 2.0 7 OPERATING MANUAL – WebdynRF 3.2 Remote FTP server The gateway uses the following files on the FTP server: Name Description CONFIG/.xml The gateway’s current configuration. This file is transferred by the gateway each time its configuration is modified. Modifying this file has no effect on the gateway. The gateway will simply overwrite it next time its configuration is modified (see INBOX below). DATA/-..gz Data files uploaded by the gateway onto the remote server. ALARM/-.xml.gz Alarm files uploaded by the gateway onto the remote server. SUPERVISION/-.xml.gz Supervision files uploaded by the gateway onto the remote server (status reports and scan results). SUPERVISION/-.log.gz Log files uploaded by the gateway onto the remote server on request. INBOX//*.xml The gateway monitors this directory. Any file placed in it will be uploaded and processed by the gateway. BIN/ This directory contains the gateway’s firmware for carrying out an update In the table above, , and must be replaced respectively by the gateway’s unique ID, the upload time stamp, and the format selected (csv or xml). The time stamp format is “YYYYMMDD-HHMMSS” so that alphabetical sorting of the directory provides the chronological order. Files with the extension “.gz” are compressed. The gateway always uploads the files by following a 2-stage process:   The file is uploaded with an additional “.tmp” extension. The file is renamed by deleting the “.tmp” extension. This process enables the remote server to easily distinguish those files being uploaded from files that have been completely uploaded. WebdynRF – Operating Manual - Version 2.0 8 OPERATING MANUAL – WebdynRF The XML configuration diagram is shown in section 18. An example of an XML configuration file is shown in section 19. The XML diagram of the alarms is shown in section 20. An example of an XML diagram of the alarms is shown in section 21. The XML supervision diagram is shown in section 22. An example of an XML supervision file is sown in section 23. The data CSV format is shown in section 0. The XML diagram of the commands is shown in section 26. An example of a command XML file is shown in section 27. The XML diagrams specifying the format of the various XML files used by the gateway may be upgraded in future versions when new functionalities are added. These changes will be made so that the old XML files remain compatible with the new XML diagrams. Likewise, as the XML files generated by the gateway may contain additional elements, they must be processed so that the new elements may be ignored. 3.3 Remote Web Services Server Not implemented 3.4 Connection to the remote server A connection to the remote server may be initiated by one of the following events:      Connection scheduler An alarm being emitted Modification of the configuration Connection request SMS Request button (via Web pages or the box’s front panel button) WebdynRF – Operating Manual - Version 2.0 9 OPERATING MANUAL – WebdynRF Regardless of the triggering event, the following process is executed: Start Modem AlwaysOn Connection mode Ethernet Modem Connection NTP synchronisation Upload Inbox Connection mode Ethernet, Modem AlwaysOn Modem Disconnection End WebdynRF – Operating Manual - Version 2.0 10 OPERATING MANUAL – WebdynRF In the event of failure of the GPRS connection, a new connection will be attempted one hour later unless a new connection is launched in the meantime (upon an explicit request, or triggered by an alarm or a periodic transmission). This is illustrated below, specifying the disconnection timeframe: Failure Connection request Disconnected After disconnection delay Waiting Connecting Connecting Modem HW reset Disconnection s ces request Suc Failure Suc ces s Connected S uc ces s req u est s ces Suc Connecting Co nn ec tio n Connecting After 1 hour Waiting Failure 3.4.1 Remote server uploading process (Upload) The configuration, alarm, supervision and data are uploaded onto the remote server by the gateway independently, as described in the diagram below. In this diagram, X represents the type of uploading (configuration, alarm, supervision or data). After completing the uploading of a configuration, the flag associated with it is deleted. Once the uploading of an alarm, supervision, or data is completed, the related data are deleted. WebdynRF – Operating Manual - Version 2.0 11 OPERATING MANUAL – WebdynRF Start Upload X pending ? no yes FTP X upload method? FTP upload WS Notification ? WS WS call false true WS notification X uploaded ? no yes Clear X flag or associated data End Remark: Management of the WS mode is not implemented WebdynRF – Operating Manual - Version 2.0 12 OPERATING MANUAL – WebdynRF 3.4.2 Inbox The gateway checks the pending actions as follows: Start FTP Data Mode ? Check FTP Inbox Pending command ? WS Check WS Inbox no yes Pending commands ? yes FTP Get WS notification ? false true WS notification Process commands End 3.5 Request button By default, pressing the “Request” button will trigger a connection to the remote server and uploading, in addition to the pending data, and the status of the gateway. Both can be selectively deactivated using the following configuration parameters: /com/request/upload and /com/request/include_status. A status SMS may also be sent to the recipient specified by the following parameter: /com/request/sms_status_recipient Should this field be empty, no SMS will be sent. WebdynRF – Operating Manual - Version 2.0 13 OPERATING MANUAL – WebdynRF 4 Commands Commands can be sent via the remote server (FTP or WS) or via SMS. When the gateway receives an SMS, it checks the whitelist of authorized telephone numbers (caller_id). If it is authorized, the content of the SMS is processed. Command Description Feedback reboot Restarts the gateway None factory Restores the gateway’s factory parameters None update Launches the gateway’s firmware update Alarm (SW) scan Launches a scan of the instantaneous values of Wavenis modules, their RSSI levels, their battery levels, and/or their RTC clocks Supervision data (except for scan data) timesync Launches updating of the Wavenis modules’ RTC clocks Supervision data wavenis Specific Wavenis command (see below) Alarm status Gateway status transmission request Supervision data log Log data transmission request Log data config Modification of the gateway’s configuration (SMS only) Lodging the configuration connect Triggers a connection to the remote server (SMS only) Implicit (connection) The commands are not acknowledged when they are received. All the commands are recorded and an invalid command will trigger an alarm, which is uploaded to the remote server. All the commands accept two optional parameters: "uid" and "cid":   uid: Unique ID for the gateway cid: Command ID A command will be rejected if the uid parameter is included and it does not match the gateway’s uid. The cid may be freely chosen by the party that issued the command. It will be included with any related upload. The XML diagram of the commands is shown in section Erreur ! Source du renvoi introuvable.. An example of a command XML file is shown in section Erreur ! Source du renvoi ntrouvable.. 4.1 Wavenis commands : Scan, TimeSync A list of Wavenis modules may be specified for the “Scan” and “TimeSync” commands. Otherwise, the command is applied to all known modules. The commands can only be applied to known modules (all the unknown addresses are ignored). WebdynRF – Operating Manual - Version 2.0 14 OPERATING MANUAL – WebdynRF The data requested (except for immediate index data) will be uploaded onto the remote server as supervision data using the configured upload method (/upload/supervision/method). The immediate index data (scan data) will be uploaded onto the remote server as Wavenis data by using the configured upload method (/upload/data/method). Example: Update request for the RTC clock for two Wavenis modules: XML:
011A0A30AAA0
011A0A30AAA1
SMS: cmd=timesync cid=C_1234 address=011A0A30AAA0 address=011A0A30AAA1 The “scan” command must specify the types of information requested, including:      data: The instantaneous data rssi: The RSSI level life-counter: The battery lifespan meter rtc: The RTC clock value tic: Configuration profile For “rssi”, “life-counter” and “rtc”, the gateway will also retrieve information from the repeater(s) on the modules’ path. For “data”, an alarm command with error=”none” will be sent to indicate to the server that a command was executed. Example: Request for the RTC clock value and the battery lifespan meter for two Wavenis modules: XML:
011A0A30AAA0
011A0A30AAA1
SMS: cmd=scan cid=C_1235 mode=rtc,life-counter address=011A0A30AAA0 address=011A0A30AAA1 WebdynRF – Operating Manual - Version 2.0 15 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 16 OPERATING MANUAL – WebdynRF Example: Request for instantaneous data for all known Wavenis modules: XML: SMS: cmd=scan cid=C_1236 mode=data 4.2 Specific Wavenis commands The specific Wavenis commands may be sent to a known Wavenis module by using the "wavenis" command. The following is a list of the sub-commands supported: Sub-command Description moduflow-open Request for opening of the valve associated with a moduflow moduflow-close Request for closing of the valve associated with a moduflow moduflow-state Opening/closing status request for the valve associated with a moduflow raw Transmission of a Wavenis raw command The three moduflow commands may be sent to any known Wavenis module. The gateway will use the repeaters configured for the module. The gateway will not check whether the module supports the command but will report any error. XML:
011A0A30AAA0
SMS: cmd=wavenis cid=C_1237 subcmd=moduflow-open address=011A0A30AAA0 The result of the command will be reported on the server as a wavenis_cmd alarm. The result code contained in the alarm for the moduflow-open and moduflow-close commands may be: ok (meaning that the command has been accepted by the module), error (the command was rejected by the module) and unsupported (the command is not supported). The result code contained in the alarm for the moduflow-state command may be: open (the valve is open), close (the valve is closed) and unsupported (the command is not supported). WebdynRF – Operating Manual - Version 2.0 17 OPERATING MANUAL – WebdynRF The raw command contains an additional parameter which must be a hexadecimal chain starting with the Wavenis application command. It will be sent in a Wavenis REQ_SEND_FRAME request. For example, to read the application status byte (0x20) for a known module (011A0A30AAA0), you can use the 0x10 Wavenis application command (Read parameter): XML:
011A0A30AAA0
SMS: cmd=wavenis cid=C_1240 subcmd=raw data=10012001 address=011A0A30AAA0 The result code contained in the alarm for the raw command may be: ok (the command was accepted by the module), or error (the command was rejected by the module). If the command was accepted by the module, the response will be included in the alarm: 2011-05-27T20:00:00 C_1240 ftp raw
011A0A30AAA0
ok 10012001 9001200106
4.3 Specific Modbus commands The specific Modbus commands may be sent to a known Modbus module by using the “modbus” command. The command supported is: Sub-command Description write Write a value on a Modbus piece of equipment The addresses of the variables must be formatted as explained in section Erreur ! Source du renvoi introuvable.. WebdynRF – Operating Manual - Version 2.0 18 OPERATING MANUAL – WebdynRF 4.4 Status command Example: Gateway status transmission request: XML: SMS: cmd=status cid=C_1238 The following information is sent back to the requesting party: XML name SMS name Description - uid The gateway’s unique ID /app/version version The gateway’s software version /app/kernel kernel Linux kernel version /system/power power External power supply connected (Boolean) /system/defaults defaults Default codes separated by commas /com/modem/model m_model Name of the modem model /com/modem/firmware m_version Version of the modem firmware /com/modem/imei imei International Mobile Equipment Identity /com/modem/msisdn msisdn Mobile Subscriber ISDN Number (if available) /com/modem/rssi rssi Power of the signal received, in dBm /com/modem/csq csq Signal quality (CSQ, BER) /com/modem/ip m_ip IP address of the gateway on the modem interface (or the last address assigned). /com/ethernet/ip e_ip IP address of the gateway on the Ethernet interface /com/upload/last u_last Date of the last successful (periodic or triggered) connection to the remote server /com/upload/next u_next Date of the next periodic connection to the remote server /wavenis/address w_addr The gateway’s Wavenis address /wavenis/last w_last Date of the last successful Wavenis communication /wavenis/modules/count w_count The number of Wavenis modules When the status command has been sent via SMS, the status is sent back in a multiple SMS with one variable per line (name = value). When the status command comes from the Inbox (FTP or WS), the XML file is downloaded in the form of an XML supervision file. WebdynRF – Operating Manual - Version 2.0 19 OPERATING MANUAL – WebdynRF 4.5 Update command Gateway firmware update command: XML: wrf_wavenis_v101.bin c1fb7d81f3d53a8b7bf94098115249d3 SMS: cmd=update cid=C_1237 firmware=wrf_wavenis_v101.bin checksum=c1fb7d81f3d53a8b7bf94098115249d3 The firmware file must available in the BIN directory on the FTP server (see section Erreur ! Source du renvoi introuvable.). The checksum relates to checksum md5 for the file. 4.6 Dry contact command (digital output) Example: Open a dry contact for the gateway (digital output): XML: SMS: cmd=d_output cid=C_1239 subcmd=open 5 Configuration of the gateway 5.1 Parameters The gateway’s parameters are processed in a structured way. The configuration may be exported in an XML file. Installation of a new configuration and modification of the current configuration are carried out by using an XML file with the same format. The XML configuration diagram is shown in section 18. An example of an XML configuration file is shown in section 19. WebdynRF – Operating Manual - Version 2.0 20 OPERATING MANUAL – WebdynRF The gateway’s main parameters are listed below (the default values configured in the factory are indicated in bold): Name Value Description /uid The last 6 digits of the Ethernet MAC address The gateway’s unique ID /name The MAC address with “WGRF_” as its prefix Name of the gateway (for information purposes only) /enable_local_config false, true Activation/deactivation of the local configuration not implemented /com/modem/pin/mode off, manual, automatic SIM card PIN code management mode (see section Erreur ! Source u renvoi introuvable.) automatic not implemented /com/modem/pin/code 0000 SIM card PIN code /com/modem/call_number *99***1# GPRS connection call number /com/modem/apn APN /com/modem/login APN login /com/modem/password APN password /com/modem/mode ondemand, alwayson, alwaysoff, off See the description of the modes section Erreur ! Source du renvoi introuvable.). always on, not implemented /com/modem/delay 60 Timeframes in seconds before disconnection in the ondemand connection mode not implemented /com/modem/whitelist/caller_id Whitelist of numbers of authorized callers for receiving command SMSs. If empty, there is no verification /com/ethernet/use_dhcp false, true Activation/deactivation of the DHCP client /com/ethernet/ip 192.168.1.12 IP address of the WebdynRF /com/ethernet/netmask 255.255.255.0 IP network mask /com/ethernet/gateway Network gateway IP address /com/ethernet/dns/server IP address of the DNS server /com/keepalive/method icmp, tcp, off /com/keepalive/address /com/keepalive/port WebdynRF – Operating Manual - Version 2.0 Keepalive method (not implemented) Not implemented 5000 Not implemented 21 OPERATING MANUAL – WebdynRF /com/keepalive/period 600 Not implemented /com/keepalive/timeout 30 Not implemented /com/request/upload false, true Connection to the remote server by pressing the Request button /com/request/include_status false, true Uploading of the gateway’s status onto the remote server by pressing the Request button /com/request/sms_status_recipient Recipient of the status SMS sent by pressing the Request button /com/time/ntp/server Address of the NTP server /com/time/timezone Local time zone (uses the standard zoneinfo name, such as "Europe/Paris") /com/time/alarm_threshold 0 Desynchronization alarm threshold in seconds (0=off). /com/ftp/address Address of the FTP server /com/ftp/login FTP ID /com/ftp/password FTP password /com/ftp/mode passive, active FTP mode /com/ftp/secured false, true Activation/Deactivation of the secure FTP protocol FTPS not implemented /com/ftp/root_path / Root directory on the FTP server /com/ftp/ws_notification none, put, get, both File FTP download WS notification mode /com/ws/address WS address ws not implemented /com/ws/login IWS ID ws not implemented /com/ws/password WS password ws not implemented /com/ws/secured false, true SSL/TLS (HTTPS) activation/deactivation for WS. ws not implemented /upload/config/method ftp|ws|none Method used for downloading the configuration ws not implemented /upload/alarm/method ftp|ws Method used for uploading alarms ws not implemented /upload/supervision/method ftp|ws Method used for uploading supervision data ws not implemented /upload/data/method ftp|ws Method used for uploading data /upload/data/format xml|csv Format used for uploaded data /upload/data/schedule WebdynRF – Operating Manual - Version 2.0 ID of the schedule used for uploading data 22 OPERATING MANUAL – WebdynRF /alarm/* Configuration of the alarm engine (see section Erreur ! Source du renvoi introuvable.). /scheduler/* Configuration of the schedules (see section Erreur ! Source du renvoi introuvable.). /wavenis/* Wavenis configuration (see section Erreur ! Source du renvoi ntrouvable.). /metering/* Metering configuration. /rfid/* Active RFID configuration (see section Erreur ! Source du renvoi ntrouvable.). /system/log/level 7 Log level (see section 14). /system/password/admin high /system/password/install medium Passwords for access to the local HTTP and FTP services. /system/password/data low /system/ports/* See section Erreur ! Source du envoi introuvable. The configuration may be modified locally or remotely. Any modification triggers uploading of the new configuration onto the server. Specific details concerning telephone numbers: /com/modem/whitelist If the list is empty, all the numbers are considered valid. /com/modem/whitelist/caller_id /com/request/sms_status_recipient The telephone numbers must be written in international format. They must start with + and the country code. 5.2 Configuration via SMS Initial configuration of the gateway can be done via SMS. In particular, the connection parameters may be sent via SMS. Once this initial configuration is completed, the remote server may complete the gateway’s configuration. The first line of the SMS must contain the command “CMD=config”. The following lines must have the format “SHORTNAME=VALUE”. The SHORTNAME consists of the first letters of each element comprising the name of the parameter: For example, the SHORTNAME for “com/modem/login” is LMC. The SMS content is subject to the following rules:   The end-of-line space characters are ignored. The SHORTNAMES are not case-sensitive. WebdynRF – Operating Manual - Version 2.0 23 OPERATING MANUAL – WebdynRF    The Boolean values (true and false) can be replaced respectively by 0 and 1. The carriage return can be replaced with a semi-colon, but you cannot mix both in the same SMS. In the case of using the ’;’ character as a variables separator, it is not possible to use this character in the variables values. The length of an SMS is limited to 160 characters. Only the main parameters and communication parameters may be modified via SMS:  /uid  /name  /enable_local_config  /com/ Example: To carry out the initial configuration of a gateway with the following context:   “m2minternet” APN not requiring an ID/password. Communication with the FTP remote server (168.112.23.123) in passive mode. You can send the following SMS: CMD=config CMA=m2minternet CFA=168.112.23.123 CFL=login CFP=password Remark: All the parameters using their default value were omitted. Upon receiving this SMS, the gateway applies the parameters and connects to the remote server in order to lodge the resulting configuration file. Based on that, the gateway may be configured remotely, as described below. In order to put together a list (for example/com/modem/whitelist/caller_id), the variable concerned must be repeated in the SMS. If the variable appears at least once, the current list is replaced. If it only appears once and has no value, the current list is deleted. Examples: CMD=config CTNS=1.2.3.4 After processing this SMS, the gateway will use DNS server 1.2.3.4. CMD=config CTNS=1.2.3.4 CTNS=1.2.3.5 After processing this SMS, the gateway will use 2 DNS servers: 1.2.3.4 and 1.2.3.5. CMD=config WebdynRF – Operating Manual - Version 2.0 24 OPERATING MANUAL – WebdynRF CTNS= After processing this SMS, the gateway will not use any DNS server. WebdynRF – Operating Manual - Version 2.0 25 OPERATING MANUAL – WebdynRF 5.3 Local configuration The gateway may be configured locally via a Web interface. Using the Web interface is described in the installation manual for the WebdynRF gateway (MI-WebdynRF.pdf). 5.4 Remote configuration The remote server may modify the configuration by placing an XML configuration file in the INBOX directory on the FTP server or by providing notification via the Web service. XML format is used in both cases. WS not implemented The XML file is treated as a new configuration if the factory XML attribute is present and equals the true value. The partial attribute is always supported but is obsolete. The factory attribute equals true and is equivalent to the partial attribute which equals false. start deprecated false @partial absent or true @factory absent or false true Flush configuration Load default settings Load custom settings Merge new configuration OK WebdynRF – Operating Manual - Version 2.0 26 OPERATING MANUAL – WebdynRF When factory is either not present or equals false, only the values of the configuration parameters in the new configuration file are updated. When a list is in the new configuration file, the entire list is replaced. This is particularly the case for the list of the Wavenis modules and the schedules. For example, if /config/Wavenis/modules is in the configuration file, its content will replace the list of modules previously configured. 5.5 Local access control Access to the local FTP and HTTP services is protected by a login/password. Any attempt to use these services is recorded. Three access levels are defined: “admin”, “install” and “data”. The administrator (admin) has read/write access rights for all the configuration parameters, and read access rights for gateway status information and may trigger various actions. The installer (install) has read/write access rights to the configuration parameters for the final modules, and particularly activation/deactivation of the Wavenis bridge mode, as well as read access rights for gateway status information and may trigger various actions. The data user (data) only has read access rights to the gateway status information. Gateway Gateway configuration status LAN Actions configuration R/W R R/W Yes install R R/W Yes data R admin No The passwords associated with the access levels are configured in /system/password. They may be modified only via a configuration file from the remote server, or locally by the administrator. It is highly recommended that these passwords be modified prior to deployment. Restriction placed on passwords: They must not contain the characters ", &, ', <, >, ?, or `. When a configuration file is uploaded onto the local FTP by the installer (install), it will be rejected if it contains parameters which do not belong to the LAN configuration. The TCP Wavenis bridge port is not password-protected. On the other hand, it must be activated by the installer for a maximum period of one hour. During this period, the installer may initiate connections to the bridge. Upon this deadline elapsing, it will no longer be possible to initiate new connections. However, if a connection is active, it will remain so. WebdynRF – Operating Manual - Version 2.0 27 OPERATING MANUAL – WebdynRF 5.6 Configuration of the ports The following parameters in /config/system/ports are used to configure the ports operating mode: Name Value Description rs232/mode off, mbus RS232 mode rs485/mode off RS485 mode (see below) input_1/mode d_input, pulse Digital input mode input_2/mode d_input, pulse Digital input mode input_3/mode d_input, pulse Digital input mode The parameters of the RS485 port, in /config/system/ports/rs485/, are: Name Value Mode off, modbus baudrate 4800, 9600, 19200, 38400, 57600, 115200 Data 8 parity odd, even, none stop_bit 1, 2 Remark: The Modbus specification specifies whether no parity bit is used; 2 stop bits must be used. 6 Wavenis 6.1 Transparent mode The gateway has a TCP/Wavenis transparent mode. This mode enables the user to use the gateway as a virtual Waveport locally on a PC connected to the gateway via Ethernet. This mode is not intended for remote use. This mode may be deactivated using the parameter’s false value: /wavenis/bridge/enabled When this mode is activated, as soon as the TCP connection is established on the dedicated TCP port (/wavenis/bridge/port), the gateway stops using the Wavecard for data collection purposes and redirects all the communications between the Wavecard and the TCP connection. Software for Microsoft Windows is supplied (Toolbox). This software is going to establish the TCP connection with the gateway and will create a virtual serial port. It is then possible to use the gateway as a virtual Waveport with standard Wavenis tools. WebdynRF – Operating Manual - Version 2.0 28 OPERATING MANUAL – WebdynRF When the transparent mode is in use, all the Wavenis data received will be transmitted to the TCP client, including the alarms emitted from a Wavenis module. Use of the transparent Wavenis mode and of the Toolbox is described in the installation manual for the WebdynRF gateway (MI-WebdynRF.pdf). 6.2 Wavenis modules supported The gateway supports the following Wavenis modules:      Waveflow (1, 2 and 4 inputs) Dallas Wavetherm (1 and 2 inputs), PT100 (1 input) and PT1000 (1 input) Wavesense 4-20mA (1 input) and 0-5V (1 input) Wavelog (2 and 4 inputs) Wavetic (1 and 2 inputs) The gateway does not manage the configuration of these modules. 6.3 Wavenis configuration Name Value Description /wavenis/bridge/enabled false, true Activation/deactivation of the Wavenis transparent mode /wavenis/bridge/port 4000 TCP port used by the Wavenis transparent mode /wavenis/time/mode utc, local, nodst Time management mode (see section Erreur ! Source du renvoi ntrouvable.) /wavenis/alarm/mode basic, extended Wavenis alarms management mode Extended not implemented /wavenis/alarm/sources/unknown on, off, delayed Activation/deactivation of alarms emitted when data are received from an unknown module /wavenis/alarm/sources/route on, off, delayed Activation/deactivation of the alarms emitted when data are received from a known module, but do not follow the correct path /wavenis/modules/* WebdynRF – Operating Manual - Version 2.0 Ordered list of the Wavenis modules 29 OPERATING MANUAL – WebdynRF Each module is configured as follows: Name Description module/address Wavenis address module/label Name of the module (for information purposes only) module/type Type of Module module/repeaters List of repeaters module/mode Data mode (immediate, datalog) module/nbinput Module’s number of inputs module/schedule ID of the schedule used for data acquisition Any Wavenis address may be given in its hexadecimal form (12 digits) or in its decimal form (15 digits, with an optional hyphen after the 5th and 7th figures). The repeaters must be given from the gateway to the module. Data are requested from all the modules associated with a schedule given in the order configured. A request for a given module is repeated up to three times if necessary. 6.4 Wavenis alarms When the gateway receives a Wavenis alarm message, it acknowledges it (to the module that transmitted it). If the alarm is triggered from a known module, the gateway processes it and then initiates a connection to the remote server in order to lodge it. If the alarm comes from an unknown module, a Wavenis_unknown alarm is triggered. This alarm will only be sent once per module and may be sent immediately (on) or upon the next connection (delayed). If the alarm is triggered from a known module but followed a radio path that is different from the one configured, an Incorrect route alarm is triggered. This alarm will only be sent once per module and may be sent immediately (on) or upon the next connection (delayed). The original Wavenis alarm will always be acknowledged. The gateway does not filter Wavenis alarms (or in other words, there are no parameters enabling the alarms from a given module to be selected). They may nevertheless be activated and/or deactivated during the configuration of the module itself. The alarms processing mode available is the basic mode. In this mode, the information sent to the server is only the information contained in the alarm template. The extended mode is not implemented. The alarm is uploaded to the remote server in XML, as specified by the XML alarm diagram (see section Erreur ! Source du renvoi introuvable.). WebdynRF – Operating Manual - Version 2.0 30 OPERATING MANUAL – WebdynRF 6.5 Wavenis time management The gateway is configured with a given time zone, which may include DST (Daylight Saving Time) (typically, 1 additional hour’s difference from GMT/UTC during summer). All the data handled by the gateway is time-stamped with the local time. Time stamping of the data from the Wavenis modules uses its own RTC clock. Since Wavenis modules do not manage daylight saving, you need to indicate to the gateway how to handle their RTC clocks. The /wavenis/time/mode parameter may assume the following values:    utc: The RTC clock for the Wavenis modules is placed on UTC/GMT (Coordinated Universal Time, Greenwich Mean Time). local: The RTC clock for the Wavenis modules is set to the same time zone as the gateway, taking daylight saving into account. nodst: The RTC clock for the Wavenis modules is set to the same time zone as the gateway, without taking daylight saving into account. This is the default value. The local mode implies that the RTC clocks for the Wavenis modules must be adjusted after each daylight saving time change (generally, twice a year). This can be carried out using the timesync command. This is the mode to be used if the Wavenis modules schedule must be executed according to the local time. Note that in this mode, there will be a time difference error in the data generated in-between a daylight saving time change and the call relating to the timesync. In all cases, the gateway converts all the time stamping contained in the Wavenis data to its local time (time stamps for logs, for alarms, RTC readings). The gateway also takes into account the time mode when setting the RTC clock for a Wavenis module is carried out. To illustrate this, let’s take a case where the mode is set to utc: Wavenis module Mode: utc RTC: 3:10 Dataflow (data, alarm) Scan RTC TimeSync Gateway Timezone: Europe/Paris (GMT+1) Date: 3/4/2012 (DST=+1) Local time: 5:10 (GMT: 3:10) Remote server Data@3:10 Data@5:10 RTC=3:10 RTC=5:10 RTC=3:10 cmd=timesync WebdynRF – Operating Manual - Version 2.0 31 OPERATING MANUAL – WebdynRF 6.6 WaveTIC modules support The configuration of a WaveTIC module requires the same parameters as for the other Wavenis modules. Nevertheless, unlike the latter, the gateway is based on additional parameters obtained directly from the module. Moreover, unlike the other types, in datalog mode, only new inputs will be retrieved from the module. The gateway ensures monitoring of the latest one retrieved from the module. When a new module is configured, the gateway queries the module in order to obtain this information. This is accompanied by triggering a “scan mode=tic” command (see section Erreur ! Source du renvoi introuvable.). The result of this command is sent to the remote server. The “scan mode=tic” command enables the following information to be retrieved:  The TIC profile selected  The details of its personalized profile selected  The value of the static TIC labels, as well as the ADCO (the meter’s serial number) This command also reinitializes the datalog’s start point. If the TIC profile for a module configured is subsequently modified, it is necessary to use the “scan mode=tic” command. Until the end of this command, the gateway will detect the inconsistency and return an “err_config" error (see the next section). 6.7 Wavenis communication errors During the data gathering process, if a module does not respond, the XML data file will contain an input with an “err_status" element indicating the source of the error, which may be: Name Description none No error (omitted) no_response The module did not reply err_repeater_ 1 The first repeater did not reply err_repeater_ 2 The second repeater did not reply err_repeater_ 3 The third repeater did not reply err_config The response is not consistent (WaveTIC) Moreover, if at least one attempt was necessary, the input contains a "retry_count” element containing the number of new attempts. 7 Pulses Numerical inputs may be configured selectively as pulse meters (see section Erreur ! Source du renvoi introuvable.). WebdynRF – Operating Manual - Version 2.0 32 OPERATING MANUAL – WebdynRF In pulse meter mode, an associated counter will increase incrementally following each pulse lasting longer than 10ms. The current value will be saved for each occurrence of the schedule specified. The following parameters are configured in /config/metering/pulse: Name Description Schedule ID schedule acquisition pulses input_1/label Name of the input (for information purposes only) input_1/unit Pulse unit (and weight) (for information purposes only) input_2/label Name of the input (for information purposes only) input_2/unit Pulse unit (and weight) (for information purposes only) input_3/label Name of the input (for information purposes only) input_3/unit Pulse unit (and weight) (for information purposes only) The “label” and “unit” parameters are adjusted in the data saved with the index value. 8 Wired M-Bus Data may be gathered from an M-Bus. To do this, an M-Bus transceiver must be connected to the RS232 port and this port must be configured in M-Bus mode (see section Erreur ! Source du renvoi introuvable.). M-Bus equipment items must be configured with a unique address on the bus. A scan of the bus must be initiated from the Web interface (see the installation manual). The M-Bus equipment items discovered during this scan will be queried upon each occurrence of the associated scheduler. If hardware is removed from the bus or added to it, a new scan must be initiated so that the gateway will take the modification into account. The following parameters are configured in /config/metering/mbus: 9 Name Description schedule Schedule ID for M-Bus data collection Wireless M-Bus The Wireless M-Bus radio card version of the WebdynRF gateway may receive data from known M-Bus Wireless modules in S1 or T1 mode. The following parameters are configured in /config/metering/wmbus: Name Value Description mode S1, T1 Wireless M-Bus mode WebdynRF – Operating Manual - Version 2.0 33 OPERATING MANUAL – WebdynRF long_preamble true, false modules/* Radio preamble length (ignored in T mode) List of the Wireless M-Bus modules If OMS encryption is activated, the number of modules is limited to 64. Those modules without encryption keys will be ignored. Each module is configured as follows: Name Description module/address Wireless M-Bus address module/label Name of the module (for information purposes only) module/key Encryption key for the module 10 Active RFID tags The RFIC radio card version of the gateway can:   Monitor the presence of active RFID tags within its coverage area. Gather data from active RFID tags. The receiver is compatible with ELA Innovation active tags. http://www.ela.fr The tags must be configured in 24-bit mode with a radio checksum of 16 bits. The gateway receives period transmissions of all the active RFID tags. An optional CRC offset may be configured for filtering all the tags which are not configured with the same offset. All the IDs received with an RSSI above the configured threshold are ignored. This threshold enables the coverage area to be reduced. Remark: The RSSI range is 110 to 200. If this threshold is set to a value less than 110, no data will be received. If the threshold is set to a value higher than 200, all the data received are processed. If the tag is an ID tag (the ID’s most significant bit equals 0), the following 3 bits are treated as alarm indicators and therefore are not considered to form part of the ID. If the tag is an ID+Data tag (the ID’s most significant bit equals 1), then the first 12 bits are used as the ID and the following 12 bits are considered to be data. The gateway manages a list of tags within its coverage area. A tag will enter this list only if its ID was received regularly during the “entering” detection timeframe. A label will be removed from this list whenever its ID has not be received during the “leaving” detection timeframe. When an ID+Data tag is considered to be in the coverage area, its data shall be saved and uploaded onto the remote server. WebdynRF – Operating Manual - Version 2.0 34 OPERATING MANUAL – WebdynRF The alarms may be sent immediately or during the next connection for the following events: input of a tag, output of a tag; an indicator is defined in an ID tag’s ID. Every time the gateway connects to the remote server, it sends:    All the data gathered from the ID+Data tags. A list of all the tags within the coverage area. All the delayed alarms. The following parameters are available in /config/rfid: Name Value Description rssi_threshold 0-255 Tags filtering RSSI level Crc 0 Optional CRC offset detection_delay/entering 600 Delay before a tag is considered to be within the area detection_delay/leaving 500 Delay before a tag is considered to be outside the area alarm/sources/entering on, off, delayed Alarm when a tag enters the area alarm/sources/leaving on, off, delayed Alarm when a tag leaves the area alarm/sources/id_flags on, off, delayed Alarm when an ID tag presents an indicator is defined Remark: The data received from ID+Data tags are saved as raw data. They are not converted into temperature, humidity or movement readings because the gateway is not up to speed with this type of information. Furthermore, the specific values such as "end of battery life" are not recognized (as this value depends on its type, 0x7FF for the T/HR and 0xFFF tags for MOV tags). 11 Modbus The gateway can function as a Modbus master device. This functionality enables reading/writing in the registers on slave TCP and RTU Modbus modules. The gateway’s Modbus configuration consists of a list of datasets and a list of modules. A dataset is a list of registers for a given type of Modbus slave hardware. The modules list associates a Modbus slave module with a dataset and a scheduler. In polling mode, the values of all the variables are continually updated. These values may be monitored in order to detect changes or to compare them with thresholds. The current values will be saved when:   The value of a piece of data monitored either changes or crosses a certain threshold, The associated schedule occurs. In instantaneous mode (i.e. not in polling mode), the values of all the variables are updated and saved when (and only when) the associated schedule occurs. WebdynRF – Operating Manual - Version 2.0 35 OPERATING MANUAL – WebdynRF Regardless of the Modbus data gathering process, it is possible to write in the registers of certain slave modules using the Modbus command (see section Erreur ! Source du renvoi introuvable.). 11.1 Configuration The Modbus configuration in /config/modbus contains the following parameters: Name Value Description tcp/timeout 1000 Modbus/TCP response timeout in ms rtu/timeout 1000 Modbus/RTU response timeout in ms rtu/turnaround 100 Modbus/RTU turnaround delay in ms datasets/* Datasets list modules/* Modules list As a supplement to these parameters, the /config/system/ports/rs485/ parameters must be correctly configured (see section Erreur ! Source du renvoi introuvable.). In particular, the /config/system/ports/rs485/mode parameter must be configured so it equals “modbus”. 11.2 Modbus datasets The configuration of a dataset (/config/modbus/datasets/dataset) consists of configuring the following parameters: Name Description id Unique ID for the Modbus dataset label Name of the dataset (for information purposes only) vars/* List of variables boundaries/* List of the boundary registers polling Continuous polling (true or false) 11.2.1 Variables Each variable is defined in /config/modbus/datasets/dataset/vars/var by the following parameters: Name Description name Name of the variable (for information purposes only) type Type of variable (S0, S1, S3, S4) address 16-bit extended register address size Size in bits for discrete input and coil, and in bytes for the registers format See the list below flags List of flags separated by commas (see the flag WebdynRF – Operating Manual - Version 2.0 36 OPERATING MANUAL – WebdynRF definition below) threshold/low Low threshold level (see below) threshold/high High threshold level (see below) threshold/hysteresis Hysteresis applied to both thresholds “Type” parameter A variable’s type is one of the four types of Modbus registers. Type Description Read (multiple) Write (single) Write (multiple) S1 Discrete input 0x02 - - S0 Coil 0x01 0x05 0x0F S3 Input register 0x04 - - S4 Holding register 0x03 0x06 0x10 In the table below, the read/write function codes are given as an indication. Modbus requests do not form part of the configuration, but will be deducted. In particular, several Read function codes will be used whenever that reduces communication costs. “Address” parameter This document always refers to register Modbus addresses (starting with 0) and never to the Modbus register number (starting with 1). “Format” parameter Format Description Coil  Register  raw The data will be represented in the form of a binary chain for discrete inputs and coils, and in the form of a hexadecimal chain for registers boolean True or false integer 16 or 32-bit whole, unsigned  float 16 or 32 bit floating comma (IEEE 754)  ascii ASCII characters chain   “Flag” parameter Format Description cmd_only The variable will not be read from the Modbus module, but can be written little_endian Interprets the two 16-bit registers with a 32-bit value in little-endian format no_opt A dedicated Modbus request will be used to read this variable. is_status In polling mode, any change in this variable will trigger reading of the dataset. is_alarm Like is_status, but also triggers a connection request. “Alarm” parameter WebdynRF – Operating Manual - Version 2.0 37 OPERATING MANUAL – WebdynRF For floating and whole variables, two thresholds may be defined (alarm/low and alarm/high) using a hysteresis value. Each time the variable is updated, its value is compared to this level in order to determine an associated status (low, normal, high), as indicated below: Value threshold_high threshold_high - hysteresis threshold_low + hysteresis threshold_low Time NORMAL LOW NORMAL HIGH NORM. When at least one threshold level is defined, the is_status and is_alarm flags are applied to the status resulting from it. For example, if is_alarm is defined as true, the connection will be triggered only when the status of the variable changes and not each time its value changes. Additional data in polling mode: In polling mode, additional data shall be maintained for whole and floating values: the minimum, maximum and mean values, and the number of samples since the last data backup. 11.2.2 Boundaries Not implemented en V2.x. 11.3 Modbus slaves A module is an instance of a dataset for a given Modbus address. The configuration of a Modbus module (/config/modbus/modules/module) includes the following parameters: Name label dataset address ip schedule WebdynRF – Operating Manual - Version 2.0 Description Name for information purposes only Dataset ID Modbus address (1-247) IP address (blank for RTU equipment) Schedule ID 38 OPERATING MANUAL – WebdynRF Remark: The Modbus/TCP equipment must be configured in order to listen to the TCP Modbus port by default (502). 11.4 Variables addresses The Modbus command uses formatted addresses, as explained below: Modbus/RTU  /@ Example: Input register at address 0x0056 on Modbus 45 hardware. => 45/S3@0x0056 Modbus/TCP  :/@ Example: Input register at address 0x0F0C on Modbus 223 hardware at IP address 192.168.0.17. => 192.168.0.17:223/S3@0x0F56 Remark: The modbus_address and the register_address may be either in decimal or hexadecimal form. The latter must be preceded by "0x". 12 Scheduler The scheduler is in charge of all the periodic tasks. The configuration of the scheduler consists of a list of schedules. Each of these schedules has a unique ID (positive whole number) which is used to link a task to a specific schedule. The schedules may be used independently in order to trigger data gathering and to download the data gathered. Name Description /scheduler/schedules/schedule The configuration of each schedule (see below) will be saved under this item. WebdynRF – Operating Manual - Version 2.0 39 OPERATING MANUAL – WebdynRF Each schedule is configured as follows: Name Description schedule/id The schedule’s unique ID (Whole) schedule/label Name of the schedule for information purposes only schedule/type Daily, Weekly, Monthly, Yearly or Follower: see the description below schedule/parent Reference to the parent schedule for a Follower schedule. schedule/start/time Time of the first occurrence (not used for Yearly schedules) schedule/start/datetime Date and time of the first occurrence in a given period (used only for Yearly schedules). schedule/start/dayofweek The number of the day in the week of the first occurrence (1 = Monday, 7 = Sunday) (used only for Weekly schedules). schedule/start/dayofmonth The number of the day in the month of the first occurrence (used only for Monthly schedules). schedule/interval Interval between the occurrences (in seconds) schedule/count Number of occurrences Configuration of the various types of schedules: Daily schedule: Every day, the first occurrence T0 is provided by the time filled in under time. The format of the time variable is as follows: HH:MM:SS For example 09:30:00 The next occurrences will occur at time Ti: 𝑇𝑖 = 𝑇0 + 𝑖 × ∆𝑡 { 𝑖 < 𝑐𝑜𝑢𝑛𝑡 ∀𝑖 𝑗𝑜𝑢𝑟(𝑇𝑖 ) = 𝑗𝑜𝑢𝑟(𝑇0 ) jour = day ∆t is the value in seconds filled in under interval. Weekly schedule: Every week, the first occurrence T0 is provided by the day of the week filled in under dayofweek and the time, filled in under time. The format of the time variable is as follows: HH:MM:SS For example 09:30:00 The dayofweek variable is a whole number from 1 to 7 (1 = Monday and 7 = Sunday) The next occurrences will occur at time Ti: WebdynRF – Operating Manual - Version 2.0 40 OPERATING MANUAL – WebdynRF 𝑇𝑖 = 𝑇0 + 𝑖 × ∆𝑡 { 𝑖 < 𝑐𝑜𝑢𝑛𝑡 ∀𝑖 𝑠𝑒𝑚𝑎𝑖𝑛𝑒(𝑇𝑖 ) = 𝑠𝑒𝑚𝑎𝑖𝑛𝑒(𝑇0 ) semaine = week ∆t is the value in seconds filled in under interval. Monthly schedule: Every month, the first occurrence T0 is provided by the number of the day of the month, filled in under dayofmonth, and the time, filled in under time. The format of the time variable is as follows: HH:MM:SS For example 09:30:00 The next occurrences will occur at time Ti: 𝑇𝑖 = 𝑇0 + 𝑖 × ∆𝑡 { 𝑖 < 𝑐𝑜𝑢𝑛𝑡 ∀𝑖 𝑚𝑜𝑖𝑠(𝑇𝑖 ) = 𝑚𝑜𝑖𝑠(𝑇0 ) mois = month ∆t is the value in seconds filled in under interval. Yearly schedule: Every year, the first occurrence T0 is provided by the date filled in under datetime. The format of the datetime variable is as follows: YYYY-MM-DDTHH:MM:SS For example, for a first occurrence on 11 February 2012 at 13H00: datetime = 2012-02-11T13:00:00. The next occurrences will occur at time Ti: 𝑇𝑖 = 𝑇0 + 𝑖 × ∆𝑡 { 𝑖 < 𝑐𝑜𝑢𝑛𝑡 ∀𝑖 𝑎𝑛𝑛é𝑒(𝑇𝑖 ) = 𝑎𝑛𝑛é𝑒(𝑇0 ) année = year ∆t is the value in seconds filled in under interval. Follower schedule: A “Follower” schedule will be produced after the end of each occurrence of the reference schedule. The parent schedule cannot be a "Follower" schedule. This type, for example, enables uploading of data to be triggered after completion of a data gathering operation envisaged. Example: You want to gather data from all the Wavenis modules once a day at midnight and upload the data just after that. You can configure a “Daily” schedule for the data gathering and a “Follower” schedule for the first schedule for uploading data. WebdynRF – Operating Manual - Version 2.0 41 OPERATING MANUAL – WebdynRF 1 day 2 follow 1 Examples: Need type time Day of week Every Tuesday at 15:00:00 week 15:00:00 2 Every 2nd day of the month at 00:00:00 month 00:00:00 Every day at 14:00:00 day 14:00:00 Every hour from 8H00 to 18H00 every Tuesday week 08:00:00 Every 2 hours from 8H00 to 20H00 on 31 December year Day of month Date time 2 2 2012-1231T08:00:00 interval count 0 1 0 1 0 1 3600 11 7200 7 13 Alarm engine The alarm engine generates alarms based on internal events. Each alarm source may be activated individually and will be uploaded immediately to the remote server (on) or upon the next connection (delayed). WebdynRF – Operating Manual - Version 2.0 42 OPERATING MANUAL – WebdynRF Name Values Description sources/power on, off, delayed Change in status of the main power supply sources/modem_ip on, off, delayed Change of IP address sources/msisdn on, off, delayed MSISDN change sources/sw_version on, off, delayed Change in the software version sources/defaults/ignored List of the default codes ignored by the gateway (separated by commas) sources/defaults/delayed List of the default codes transferred upon the next connection (separated by commas) sources/d_inputs/* Change in status of the on-off inputs (see below). sources/d_output Change in status of the on-off outputs (see below). The gateway also generates alarms concerning faults, the codes of which are provided below: Code Description D_MODEM Modem fault D_MODEM_PUK SIM card blocked D_ETHERNET Ethernet interface fault D_WAVENIS Wavenis radio fault D_RFID RFID receiver fault D_INTERNAL_BAT Internal battery fault When the "power" alarm is activated, the alarm engine will send an alarm concerning the loss and recovery of its power supply. When the "modem_ip" alarm is activated, the alarm engine will send an alarm containing the gateway’s IP address each time it changes. When the "msisdn" alarm is activated, the alarm engine will send an alarm when the SIM card is changed. When the "sw_version" alarm is activated, the alarm engine will send an alarm containing the gateway’s software version, following an update. WebdynRF – Operating Manual - Version 2.0 43 OPERATING MANUAL – WebdynRF Multiple alarms may be configured for digital inputs. An alarm for a digital input may be configured as follows: Name Value Description d_input/index Digital input index d_input/label Name of the alarm (for information purposes only) d_input/mode on, off, delayed On: Immediate transmission Off: Transmission deactivated Delayed: Transmission when the next connection is made d_input/type none, rising, falling, both None: Detection deactivated Rising: Rising edge detection Falling: Falling edge detection Both: Rising & Falling An alarm may be configured for the digital output as follows: Name Value d_output/label Description Name of the alarm (for information purposes only) d_output/mode on, off, delayed On: Immediate transmission Off: Transmission deactivated Delayed: Transmission when the next connection is made d_output/type none, rising, falling, both None: Detection deactivated Rising: Rising edge detection Falling: Falling edge detection Both: Rising & Falling The rising edge relates to the closing of the gateway’s dry contact. The alarm is uploaded to the remote server in XML, as specified by the XML alarm diagram (see section 20). 14 Log files The gateway saves the main events in log files. The size of each log file is limited to 200 kbytes. On request, the preceding and current log files are concatenated and uploaded to the remote server as supervision data. The log file is a text file with one log entry per line. WebdynRF – Operating Manual - Version 2.0 44 OPERATING MANUAL – WebdynRF Each line is formatted as follows: [TIMESTAMP][LEVEL][SOURCE] EVENT The timestamping used is a Unix timestamp (the time that has elapsed since the EPOC) in seconds followed by a decimal point and the microseconds. The following events are saved: Events Formats Schedules Schedule X occurred Faults Fault X detected Fault X cleared PPP PPP connecting PPP connected IP=X PPP connection failure PPP disconnect FTP FTP connecting FTP connected FTP connection failure FTP get X FTP put X FTP disconnect SMS SMS received from X Commands Processing command X Clock Clock synchronization delta=X NTP connection failure Internal Reboot Reboot modem This list is not exhaustive and each line may contain additional information following the info specified above. For example, when a schedule occurs, the log file may contain “Schedule X occurred, next is Y at Z”. The level of detail in the logs can be configured according to the parameter/system/log/level. The value must be from 8 (log step) to 1 (more detailed): WebdynRF – Operating Manual - Version 2.0 45 OPERATING MANUAL – WebdynRF Level Name Description 8 None Nothing is logged 7 Critical Critical info only 6 Error 5 App 4 Warning 3 Notice 2 Info 1 Debug Default level The most detailed logs The log level parameter is also defined by source, in which case the format is: default_level,source:level,source:level,… For example, in order to use level 5 for all sources except for the Coronis source with level 1: /system/log/level=”2,Coronis:1” 15 Synchronization of the internal clock The gateway synchronizes the system clock using the NTP protocol. It keeps the time in UTC (Universal Time, also known as GMT) and calculates a local time based on the time zone configured. It manages DST (Daylight Saving Time). When the connection uses the modem, synchronization is carried out at the start of each connection to the server, but no more than once a day. An alarm is triggered when the difference between the two clocks is greater than a configurable value. When the connection uses Ethernet, an NTP client is activated on the gateway. This client will set the speed of the system clock in order to keep it synchronized with the NTP server’s clock. 16 Updating the gateway’s firmware An update may be carried out remotely. The new firmware must be made available on the FTP server in the dedicated BIN directory (see section Erreur ! Source du renvoi introuvable.). An update command must then be sent to the gateway. Example: Update command for the gateway’s firmware with the firmware wrf_wavenis_v101.bin in the BIN directory. WebdynRF – Operating Manual - Version 2.0 46 OPERATING MANUAL – WebdynRF XML: wrf_wavenis_v101.bin c1fb7d81f3d53a8b7bf94098115249d3 SMS: cmd=update cid=C_1237 firmware=wrf_wavenis_v101.bin checksum=c1fb7d81f3d53a8b7bf94098115249d3 The checksum relates to checksum md5 in the file. 17 Support Should you experience technical issues relating to our products, please contact Webdyn’s support service: Webdyn SA 26 Rue des Gaudines 78100 Saint-Germain-en-Laye FRANCE Tel.: +33 1 39 04 29 40 Fax.: +33 1 39 04 29 41 E-mail: [email protected] http://www.webdyn.com We will need the following details:  The gateway’s serial number.  The gateway’s hardware and software versions. WebdynRF – Operating Manual - Version 2.0 47 OPERATING MANUAL – WebdynRF 18 APPENDIX A: XSD Diagram – Configuration WebdynRF – Operating Manual - Version 2.0 48 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 49 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 50 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 51 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 52 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 53 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 54 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 55 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 56 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 57 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 58 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 59 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 60 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 61 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 62 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 65 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 66 OPERATING MANUAL – WebdynRF --> WebdynRF – Operating Manual - Version 2.0 67 OPERATING MANUAL – WebdynRF (0x3E), ? (0x3F), ` (0x60) --> WebdynRF – Operating Manual - Version 2.0 68 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 69 OPERATING MANUAL – WebdynRF 19 APPENDIX B: XML Example – Configuration config.xml 07F38D WGRF_07F38D true manual 1234 *99***1# m2minternet login password ondemand +33123242526 +33123242527 false 192.168.10.10 255.255.255.0 192.168.10.254 192.168.10.254 8.8.8.8 8.8.4.4 tcp
12.13.14.15
8003 1800 10 WebdynRF – Operating Manual - Version 2.0 70 OPERATING MANUAL – WebdynRF
true true
12.13.14.16
login password passive false / none
12.13.14.16
login password false
ftp ftp ws ftp csv 1 WebdynRF – Operating Manual - Version 2.0 71 OPERATING MANUAL – WebdynRF 0 both 1 week 7 1 1 2 day 43200 2 true 4000
011A1030A5D4
waveflow WebdynRF – Operating Manual - Version 2.0 72 OPERATING MANUAL – WebdynRF 011A1030A7D3 datalog 4 2
T1 false
012345678901
00112233445566778899
255 0 600 500 WebdynRF – Operating Manual - Version 2.0 73 OPERATING MANUAL – WebdynRF on on on 500 20 1 var1 S4
0x1234
2 integer is_alarm
var1 S4
0x1234
2 integer
var1 S4
0x1234
2 integer is_alarm,is_status
var2 S0
1234
1 boolean is_status WebdynRF – Operating Manual - Version 2.0 74 OPERATING MANUAL – WebdynRF 20 40 2
S0
1234
true
1
26
1
WebdynRF – Operating Manual - Version 2.0 75 OPERATING MANUAL – WebdynRF 20 APPENDIX C: XSD Diagram – Alarms alarm.xsd WebdynRF – Operating Manual - Version 2.0 76 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 77 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 78 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 79 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 81 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 82 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 83 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 84 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 85 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 87 OPERATING MANUAL – WebdynRF 21 APPENDIX D: XML Example – Alarms alarm.xml 07F38D 2011-05-26T07:59:10 2011-05-26T07:52:00 2011-05-26T07:59:00 2011-05-26T10:00:00 0 set 2011-05-26T10:10:00 0 reset 2011-05-26T10:20:00 set 2011-05-26T10:30:00 off 2011-05-26T10:30:00 WebdynRF – Operating Manual - Version 2.0 88 OPERATING MANUAL – WebdynRF 90.84.146.195 2011-05-26T10:40:00 v1.01 2.6.35.6 2011-05-26T10:50:00 D_ETHERNET set 2011-05-26T10:55:00 D_ETHERNET reset 2011-05-26T11:00:00
011A1030A5D4
basic A true false 246 false false false false
2011-05-27T13:00:00
00278-03-03146635
set high A 456 2011-05-27T12:58:00 WebdynRF – Operating Manual - Version 2.0 89 OPERATING MANUAL – WebdynRF
2011-05-27T13:10:00
011A1030A5D4
reset high A 2011-05-27T13:09:00
2011-05-27T14:00:00
011A1030A5D4
set A 345 2011-05-27T13:59:00
2011-05-27T14:10:00
011A1030A5D4
reset A 500 2011-05-27T13:59:00 2011-05-27T14:09:00
2011-05-27T15:00:00
011A1030A5D4
set A WebdynRF – Operating Manual - Version 2.0 90 OPERATING MANUAL – WebdynRF 323 3
2011-05-27T15:10:00
011A1030A5D4
reset A 356 13 2011-05-27T15:10:00
2011-05-27T16:00:00
011A1030A5D4
set B
2011-05-27T16:10:00
011A1030A5D4
reset B
2011-05-27T17:00:00
011A1030A5D4
set A
WebdynRF – Operating Manual - Version 2.0 91 OPERATING MANUAL – WebdynRF 2011-05-27T17:10:00
011A1030A5D4
reset A
2011-05-27T18:00:00
011A1030A5D4
set 2011-05-27T17:59:00 4000
2011-05-27T19:00:00 C_1239 ftp moduflow-open
011A0A30AAA0
ok
2011-05-27T20:00:00 C_1240 ftp raw
011A0A30AAA0
ok 10012001 9001200106
2011-05-27T21:00:00 C_1240 ftp write ok 2011-05-27T22:00:00 WebdynRF – Operating Manual - Version 2.0 92 OPERATING MANUAL – WebdynRF
1
192.168.1.2
var1
2
S4
5 low
WebdynRF – Operating Manual - Version 2.0 93 OPERATING MANUAL – WebdynRF 22 APPENDIX E: XSD Diagram – Supervision supervision.xsd WebdynRF – Operating Manual - Version 2.0 94 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 95 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 96 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 97 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 98 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 99 OPERATING MANUAL – WebdynRF 23 APPENDIX F: XML Example – Supervision supervision.xml 07F38D 0.2 2.6.35.6 true 33 days Cinterion BGS2-W 11.246 AA-BBBBBB-CCCCCC 380561234567 1 3 10.0.1.23 192.168.0.10 2011-05-26T10:30:00 2011-05-27T10:30:00
011A1030A6E3
2011-05-26T13:00:00 58 WebdynRF – Operating Manual - Version 2.0 100 OPERATING MANUAL – WebdynRF
2011-05-26T12:55:00 2011-05-21T12:05:00 8 2 23F005 23F006
2011-05-26T13:18:10
011A1030A5D4
21 5389 2011-05-26T13:18:11 2011-05-26T13:18:14 2011-05-26T13:13:25
58 WebdynRF – Operating Manual - Version 2.0 101 OPERATING MANUAL – WebdynRF
WebdynRF – Operating Manual - Version 2.0 102 OPERATING MANUAL – WebdynRF 24 APPENDIX G: XSD Diagram – Data data.xsd WebdynRF – Operating Manual - Version 2.0 104 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 106 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 107 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 108 OPERATING MANUAL – WebdynRF WebdynRF – Operating Manual - Version 2.0 109 OPERATING MANUAL – WebdynRF 25 APPENDIX H: CSV Format – Data CSV (Comma Separated Values) format is a format that has no formal definition. Nevertheless, it does follow these rules:      One line contains a single record. Each record takes up a single line. Each line ends with a line break. Each line contains the same number of fields. Each field is separated by a comma. Each line is formatted as follows: ,,
,,,