The Smart-Pipe-Clipis a compact, clip-like clamp that can be easily attached to any water pipe with a diameter between 15 and 32 mm. The device offers three functions:
The device is powered by two AAA batteries and transmits the collected data and any alarms via Wi-Fi to the preferred app or smart home platform. Alternatively, it can be operated with an external 3V power supply.
In addition to Wi-Fi, the claw can also communicate via LoRa or LoRaWAN. Normally, communication with the user takes place via Wi-Fi. In case of an alarm, a previously paired Aqua-Scope shut-off motor (for ball valves or angle seat valves) can be directly controlled by the device via LoRa. This allows a response to water leaks even if the communication network is unavailable. Since the monitoring of the water pipe, as well as the pairing and control of the motor, occurs without the need for a wireless connection, such a system can also function completely offline without an internet connection.
With a special button sequence, the sensor can be switched to LoRaWAN mode, allowing it to transmit data over the standardized LoRaWAN wide-area network as a Class A device. This mode requires LoRaWAN network coverage at the installation site.
By default, the devices communicate directly with the Aqua-Scope Cloud via an IP connection. The data is encoded as a JSON object and then encrypted using the XXTEA encryption algorithm with a private key stored in the device. The encrypted data is transmitted as ASCII hexadecimal values in the POST field of an HTTP request. In the data field of the HTTP request, the downlink data is also sent as a JSON object and encrypted using XXTEA.
The very same JSON encoding is used for the MQTT and the JSON Webservice interface. The following downlink commands are understood by the devices as JSON objects:
Changing configuration parameter 'a' resp. 'c' to the value of 'b' resp 'd'. A maximum of 32 parameters can be changed simultaneously. The parameters are modified in the order they are specified. For the explanation of the parameters and its values please refer to the section 'Configuration parameters' in this manual.
System commands are:
Execute a command on the serial shell. The commands are described in the BLE interface. Note that if a command requires a space, use the underscore character ('_').
Firmware Update Over the Air. XXX represents a transaction number used to request the required firmware from the OTA server.
The 'webs' object configures the use of a JSON Web Service. When enabled (enable = 1), all JSON reports are encoded and transmitted in the POST field of an HTTP request. Optionally, a private token can be provided, which is appended to the URL as a GET parameter. With 'raw' set to 1, detailed raw data is also sent to this service when the device collects such data. The 'xxtea' switch allows the JSON object to be encrypted with the device's private key. More information on this is available in the JSON Web Services section of this manual.
Clears an alarm of type X in the device. Using X = 0 will clear all alarms in the device. The alarm will also be reset even if the cause of the alarm, such as a temperature drop, has not been resolved. When an alarm is cleared with this command, the alarm will not be triggered again until the next reboot (via command or power-on).
Configures the use of an MQTT service. When enabled (enable=1), all reports and alarms from the device are sent to the MQTT service specified as 'server' in parallel with other communication channels, using the IP port 'port'. Depending on the configuration of the MQTT service, an optional user login and password may need to be provided. The values can be subscribed to on the MQTT broker via the string '/AQS-XXXXXX', where XXXXXX is the 6-digit ID of the device.
Transmits all configuration parameters of the device as an array.
This command sends a ASCI-encoded command right to the MSP coprocessor. For details on the MSP coprocessors ASCII UART interface please contact support.
Sets a motor registered with the Aqua-Scope Monitor to the value X, which can be either 0 (closed) or > 0 (open). If more than one motor (device types 1 or 3) is registered, these motors are closed or opened together. If this is not desired, the type of a motor can be changed to a value other than 1 or 3. This motor must then be controlled directly using the 'svalve' command.
Sends a command to open or close a motor with a value Y to a sub-device in communication channel X, regardless of its device type. This command is needed when a motor is separated from the common control of all motors with the command 3. If the device in communication channel X is battery-operated and in deep sleep, this command will be executed when the device wakes up next. Pressing a button on the sub-device will wake it up.
Sets a configuration parameter 'Y' of a sub-device in communication channel 'X' to the value 'Z'. If the device in communication channel X is battery-operated and in deep sleep, this command will be executed when the device wakes up next. Pressing a button on the sub-device will wake it up.
The status report of a device is typically sent every 15 minutes and contains the names and current values of device-specific sensors. A status report is also sent for battery-operated devices. The interval (time between two reports) is defined in configuration parameter 29 (default 900 seconds). This does not apply to Aqua-Scope devices with a water pressure sensor (AQS*, PRE*, AQE*, ...) where the status is sent along with the raw data depending on the chosen sampling interval. The sensor types are provided in the device manual.
This configures sub-devices of an Aqua-Scope Monitor, whose functionality can only be used through the Aqua-Scope Monitor. Communication between these sub-devices and the Aqua-Scope main device occurs through a specially secured private LoRa Point-2-Point connection. Various commands are supported and are processed in the order they are specified in the JSON object. The command number X is not considered, but it's used to separate different commands.
Sends an array with all configuration parameters of a device in response to the downlink command 'list'.
This is raw data from a sub-device in channel 'X'. Decoding the raw data can be done on the server. The encoding corresponds to the LoRaWAN communication channel encoding. The main device will also decode the received payload to execute commands intended for the main device (e.g., alarms that lead to motor shutdown).
This is a notification for the start and end of detected water consumption. 'event' = '1' indicates the start of a water consumption event with information about the reason for the event, and 'event' = '2' marks the end. It includes the event duration ('t'), the amount of water consumed ('l'), and, for debugging purposes, a possible reason for the termination of water flow. The duration is in seconds, and the amount is in milliliters.
This alarm object notifies active (state=1) or completed (status=0) alarm states. 'type' specifies the alarm type, and depending on the alarm type, an additional value may be provided if applicable (e.g., the current temperature value for a temperature alarm). The complete alarm vector 'map' can also be transmitted, where each bit corresponds to an alarm type.
The heartbeat of a device transmits the uptime in seconds plus a device-specific status. If a meaningful status cannot be transmitted for a device, this object is omitted. A heartbeat is only sent for devices that are not battery-operated. The interval (time between two heartbeats) is defined in configuration parameter 30 (default 20 seconds).
If available on the device, this object transmits the raw data from the main sensor as a continuous string of hexadecimal characters of length 4. For example, "arr": "035403560350..." for 0x0354 = 852, 0x0356 = 854, 0x30350 = 848.
The local web server of Aqua-Scope WLAN devices is active by default on Port 80 (HTTP service) and can be used for the initial configuration of WLAN, among other functions. Once the WLAN interface is successfully configured, the web server is deactivated. However, it can be reactivated from any communication channel. The web server allows for enabling and disabling, as well as configuring other communication channels like MQTT or JSON web service. It also provides easy access to the current sensor values of the device. Accessing the web server when the device is in sleep mode is challenging as there is a very limited time available for querying or setting values.
The web server interface is self-explanatory.
To use this communication channel, you need an HTTP server with a communication endpoint to which the device can send its data in JSON format via the POST field. The communication options are defined in the Aqua-Scope Cloud Interface description.
If encryption via XXTEA (https://en.wikipedia.org/wiki/XXTEA) is chosen, you must have a device-specific 128-bit encryption key. This key is securely embedded in the device and cannot be extracted or read. You can obtain this key directly from Aqua-Scope upon request, providing the 8-byte ID. The 8 bytes of the ID follow the format specified by Aqua-Scope.
AA BB BB BB CC CC CC CC
When no encryption is selected, data transmission occurs as an HTML POST with a content type of 'application/json.' With encryption, 'application/raw' is used, and the JSON object is encrypted with XXTEA and then encoded as HEX ASCII.
The transmitted JSON object corresponds to the Aqua-Scope Cloud Interface description. As a response or command to the device, a downlink object can be sent in the HTTP text, the format of which also complies with the Aqua-Scope Cloud Interface.
The transmission of sensor raw data (using the 'arr' object) must be explicitly enabled, for example, in the app. This data is generally not encrypted.
The following small example demonstrates the reception of a JSON object from the Aqua-Scope device, exemplified as PHP code.
If you have any further questions or need assistance with anything specific, feel free to ask.
require_once __DIR__ . 'xxtea-php.php'; // from https://github.com/xxtea/xxtea-php #define EID 060000001 #define KEY 06000000123456780600000012345678 error_reporting(0); $json = json_decode(file_get_contents('php://input'), true); if(!$json) { $key = hex2bin(KEY); $jd = xxtea_decrypt(base64_decode(file_get_contents('php://input')),$key); $json = json_decode(jd, true); if(!$json) die(âwrong key or wrong idâ); } var_dump($json);
All data (except for the raw data from the main sensor) can be sent in parallel to both the JSON web service and the Aqua-Scope Cloud to an MQTT broker. To do this, the server, port, and optionally an access login and password are provided. To retrieve data, you must subscribe to:
With '12345678' as the 8-digit device ID. It is also possible to send downlink commands as JSON objects via the MQTT service. The notation of these commands is identical to those of the Aqua-Scope Cloud.
The Bluetooth interface of Aqua-Scope WLAN devices is active by default and is used for the initial configuration of WLAN through the Aqua-Scope app. Once the WLAN interface is successfully configured, the Bluetooth interface is deactivated. However, it can be reactivated from any communication channel. Please note that reactivating the Bluetooth interface on battery-operated devices will block their sleep mode and quickly deplete the battery.
The Bluetooth interface implements the UART profile in BLE 5. It can be used with all serial Bluetooth applications. It's even more convenient when using a PC or an Android mobile phone with Bluetooth capabilities. You can open the Chrome browser, navigate to the website 'https://ble.aqua-scope.com,' and connect to the Bluetooth device 'AQS-XXXXXX' (where XX is the device's ID).
Once the Bluetooth connection is established, you have direct access to the internal serial console of the device. You can view all debug messages and execute commands, seeing their results on the console. The following commands are supported:
Alarm messages send wirelessly consist of three values:
Description: The alarm is triggered if the water temperature drops below a allowable threshold specified in configuration parameter 9. The factory setting is 5 degrees Celsius.
Optional Alarm Value: Current Temperature in 1/10 degree celsius
Description: The water flows for a very long time. The threshold is set at 15 minutes from the factory and can be adjusted in the app under 'Configuration'. The alarm is automatically cleared when the water usage stops.
Optional Alarm Value: Seconds of Water Flow
Description: This alarm indicates that the device is moving. The alarm will be sent out only if (1) the motion/vibration detection function is active and (2) after 1 hour after inserting the battery to avoid alarms when installing.
Optional Alarm Value: no value given
Description: The alarm is triggered if the water temperature raises above a allowable threshold specified in configuration parameter 8. The factory setting is 5 degrees Celsius.
Optional Alarm Value: Current Temperature in 1/10 degree celsius
Description: Any water usage above the measurement inaccuracy and below normal water usage is recognized as a dripping faucet. If the water flows minimally over a period of at least one hour, an alarm is triggered. The cause of such an alarm can also be a small leak in a water pipe (micro-leakage). Therefore, the matter should be investigated and the cause rectified.
Optional Alarm Value: debug value provided
Description: The battery is running low and needs to be replaced.
Optional Alarm Value: Battery voltage in mV
This list of configuration parameters is supported by this device. All configuration parameters are 32 bit values but - with the exception of Parameter 3 only the lower 16 bits are used
The bitmap defines the general behavior of the device. Dont change the setting unless you know what you do.
This interval decided if the LoRaWAN communication shall be confirmed or unconfirmed.
This interval defines the seconds between measurement sequences. Lowering the value will make the measurements more accurate but increases the power consumption.
This parameter enables the fine calibration of the temperature sensor. The default value is an arbitrary 1000. Lowering the value will increase the shown temperature value, Rising the temperature value will decrease the shown value.
This value contains a parameter for the flow detection algorithm. Don't change unless you know what you are doing.
This threshold defines the maximum time of water flow before a 'Long water flow alarm' is issued. The default value is 900 seconds. Please be aware, that the threshold only gives an estimate of the time only.
In case the temperature rises above this value a "High Temperature Alarm" is issued. The alarm value is defined as 1/10 degree Celsius (150 equals 15.0 degrees Celsius). The default value is 400 = 40 degree Celsius.
In case the temperature drops below this value a "Low Temperature Alarm" is issued. The alarm value is defined as 1/10 degree Celsius (150 equals 15.0 degrees Celsius). The default value is 10 = 1 degree Celsius.
A Water Flow longer than this value will cause a Usage Alarm The value needs to be defined in 0,43 * seconds. This means a desired cut-off of 15 minutes results in a value of 2093.
This value defines the threshold of detected vibration/movement to cause a vibration alarm. The parameter does not have any scale factor. Lowering the parameter makes the device more sensitive but the same time increases power consumption.
This value contains a parameter for the flow detection algorithm. Don't change unless you know what you are doing.
This value contains a parameter for the flow detection algorithm. Don't change unless you know what you are doing.
This value contains the initial (factory) calibration result. Don't change unless you know what you do.
This value is needed to detect leaks in water. Don't change unless you know what you do.