Watmonitor - JSON endpoint integration
Watmonitor is a web interface for a water level meter (PHP application) that allows you to collect data from a sensor node. which performs measurements in a dug, drilled well, or retention tank, cesspool. This universal web interface is also suitable for measuring and visualizing the height of bulk materials. It can be used with any DIY sensor or industrial solution with a suitably set callback. It has basic visualization, but can be expanded with integrations into other platforms, which allows you to add actions, advanced visualization, notifications, automation.
API Endpoint - JSON
Watmonitor has endpoints (json_output.php and json_output2.php). The first one mentioned returns the last measured data, namely the level height, volume, time, web interface name (some people also use it for the name of the sensor node) in JSON format, which is a standard for data exchange (API). This endpoint can be used to periodically retrieve data via HTTPS GET request from Watmonitor and integrate it into 3rd party services, where it can be visualized by other means, or even used for automation in the form of smart home, actions...

Sample JSON data of Watmonitor (json_output.php):
{
"name": "Studňa Poprad - záhrada",
"value": 265,
"volume": 1332.04,
"time": "16. Sep 20:25"
}
This endpoint is also used directly by AR visualization, or QR scanner, which is a standard part of Watmonitor. AR visualization is exclusively custom and is not included in the base. The second json_output2.php allows you to return all measured data, which is suitable for timeseries visualizations, for example in Grafana, or JSON can also return only data for a predefined time period in the form of from - to by specifying GET parameters (or even all from, or all to with only one argument being called). With this endpoint, it is necessary to ensure that the data is encapsulated in an array, so the index of the data is not [0], but for example [0][0]. Example usage: json_output2.php?from=2025-08-01&to=2025-09-20.

Sample Watmonitor JSON data (json_output2.php):
[
{ "value": 95,
"volume": 477.52,
"time": "2025-09-01 18:49:49"
},
{ "value": 123,
"volume": 618.27,
"time": "2025-09-01 18:57:29"},
{ "value": 133,
"volume": 668.53,
"time": "2025-09-01 19:02:31"
}
]
Google Sheets / Google Apps Script
You can also load JSON directly into Google Sheets, but Google Sheets itself does not parse it, for that you need Apps Script, where you can create a function for parsing and then just call the function in Google Sheets. Thanks to this, you can have the data divided into the appropriate cells (2D array). Through Apps Script, you could also write data to individual columns and use Google Sheets as a database for subsequent visualization. Periodic JSON API calls can be made through Triggers in Apps Script, where you can also set the interval, or Apps Script can also run Watmonitor directly with a separate CURL call, either via cron, or directly from a PHP file, with which the sensor node writes data to the database.
Node-RED
With Node-RED, you use a node called HTTP request node, where you define the GET method and set a specific URL. The parsing itself can be achieved via a Function node. Periodic calls are ensured by setting the Repeat function in the Inject node with a time setting. Node-RED can also be used to evaluate the obtained value and possibly call webhooks, which are at the end of the article.
Home Assistant
If you use Home Assistant, the JSON from Watmonitor can be integrated through the configuration.yaml file, where you define the REST sensor and get the main data, in this case the level value, and through the template we also get other separate values, which we can use further in the visualization.
The configuration.yaml file might look like this (mainly for json_output.php):
sensor:
- platform: rest
resource: https://www.tvoj-server.sk/api/studna.php
name: Studna API
scan_interval: 300 # every 5 minutes
json_attributes:
- name
- value
- volume
- time
value_template: "{{ value_json.value }}"
unit_of_measurement: "cm"
- platform: template
sensors:
studna_name:
value_template: "{{ state_attr('sensor.studna_api', 'name') }}"
studna_volume:
value_template: "{{ state_attr('sensor.studna_api', 'volume') }}"
unit_of_measurement: "l"
studna_time:
value_template: "{{ state_attr('sensor.studna_api', 'time') }}"
Loxone
When using smart home systems, such as Loxone, you can set the Watmonitor endpoint in Virtual Inputs and then you can map (enter the path to the values) JSON.
Power BI
Many companies use Power BI for data visualization as part of the Office 365 E5 package, or they subscribe to it separately for lower packages E3, etc. It exists in Desktop, as well as cloud version, which has more options and tools. To integrate Watmonitor and its JSON endpoints into Power BI, you must proceed as follows: In the program, go to Get Data → Web, enter the URL to the endpoint with Watmonitor's JSON data. This will obtain the data, but for parsing we must go to Power Query, where we select individual attributes to obtain separate attribute columns with which we can work further.
Under the Transform tab, we can also work with the time format, which can be converted to a more readable / standardized, Watmonitor in JSON data format d. M H:i, which is also commonly used to visualize time stamps in the Watmonitor web application. In the SQL database table, the time format is YYYY-MM-DD HH:MM:SS, which is the standard SQL DATETIME format, not the ISO format. In the Home tab and the Scheduled Refresh selection, you can set a time routine that will retrieve this data from Watmonitor at regular intervals. Since the sensor node writes data by default once every 5 minutes, you should use at least this time limit, or larger. Within Power BI, you can also visualize the obtained data either in the form of KPIs or other graphs.
SAP / ABAP
Create an HTTP Receiver Adapter or REST API Consumer in SAP CPI/PI. Enter the URL to the Watmonitor JSON endpoint with the GET method selected and Content-Type: application/json. Map the obtained JSON data to SAP structures using mapping (e.g. value → level, volume → volume, time → time). Send the data to the target module (e.g. Z-table, PM module, or Custom table). Add a Timer Start Event (Trigger) in iFlow. Set the interval, e.g.: Repeat every: 5 minutes
Another way to receive data from SAP is to create an ABAP program that calls the JSON API via HTTP request with subsequent automatic execution via SAP Job Scheduling (SM36). You can do the visualization itself in SAP Fiori / SAP GUI and you can create automations in the PM module.
Grafana
A very popular tool for visualizing IoT data is Grafana. It is mainly used for timeseries data and is also suitable for rapidly changing telemetry and uses the InfluxDB database for this purpose by default. However, it has functions suitable for Watmonitor integration. Via Configuration → Data Sources → Add data source, select the JSON API, but you need to install the marcusolsson-json-datasource plugin.
In the dashboard, you select, for example, Panel visualization and select a specific datasource. Then, you can also set the time when Grafana will make a new request. This type of visualization is suitable for current (latest) data. It is also possible to integrate the second mentioned endpoint, but it is a bit more complicated. It will be necessary to use JSONPath or Field mapping to maintain the relationship in the graph for the X and Y axes, with one axis containing time data and the other containing value data that corresponds to a given time.
SCADA / MES
Watmonitor can also be integrated into SCADA or MES systems through its JSON endpoints. SCADA systems such as Ignition, Wonderware, WinCC allow data to be read from REST APIs via scripts or built-in connectors. Data can be mapped to internal variables (tags) or database historical records. It is also possible to use a middleware solution, where the SCADA / MES system can read data directly from a SQL database. Scripting solutions are most often built on Python, which is a breeze to integrate within a few minutes.
Webhooks
Webhooks allow applications to immediately send data to each other upon a certain event and can be very beneficial for automating processes. In Node-RED, you can evaluate the received data and trigger further actions by calling webhooks. For example, when the level drops to a dangerous level, you can trigger services such as IFTTT or Zapier via webhook, which will then allow you to: Send a notification to Slack, email or SMS. Trigger secondary actions on other APIs, such as remotely turning off a device or getting data from another device for verification.
Zapier supports integration with over 7000 applications, which makes it easy to connect the Watmonitor system with various services and provides timely notifications. However, these applications cannot obtain data from Watmonitor by themselves, they must deploy, for example, Node-RED, or execute a request from Watmonitor directly, for example, using cron (crontab), or CURL calls that are triggered when a php file is called by a sensor node that writes data to Watmonitor. However, Watmonitor must itself evaluate what we want to do, for example, send a notification, perform an action. Zapier / IFTTT itself will not do the verification and evaluation, it only triggers a specific predefined action with a sequence of tasks.
You can try Watmonitor for free with your hardware, or find more interesting information about it at:
https://your-iot.github.io/Watmonitor/
JSON API endpoints to try:
Latest known data - https://hladinomer.eu/json_output.php
Data for the entire time period - https://hladinomer.eu/json_output2.php, or with time-limited results: https://hladinomer.eu/json_output2.php?from=2025-08-01&to=2025-09-20
