> For the complete documentation index, see [llms.txt](https://docs.smart-stuff.nl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.smart-stuff.nl/dsmr-api/koppelingen/domoticz-and-watersensor.md).

# Domoticz & Watersensor

1. Open een nieuwe gateway, ik heb hem “Smart Gateways Watermeter Gateway” genoemd
2. Selecteer HTTP/HTTPS poller
3. Method: GET
4. Content: application/json
5. URL: kies de locatie van de watermeter, bijvoorbeeld <http://192.168.2.220/api/v2/sm/info>
6. Kies de naam van de file voor de commando’s
7. Press add

<figure><img src="/files/0z7hKzAr8FmHgigp34Me" alt=""><figcaption></figcaption></figure>

8. Kies nu een virtual sensor type counter (click binnen het vak die je aangemaakt hebt) noem deze “Water”

<figure><img src="/files/BFG7X6aSZVi9j5EjKBy3" alt=""><figcaption></figcaption></figure>

9. Maak nu een file aan in \~/domoticz/scripts/Lua\_parser
10. touch “watermeter.lua”
11. nano watermeter.lua
12. 1. \-- Smart Gateways Watermeter Script
    2. s = request\['content'];
    3. local idWater = 1209 -- check de waarde van de aangemaakte virtuele sensor
    4. local a = domoticz\_applyJsonPath(s,".water.value")\*100 -- deel factor voor de sensor
    5. print('value read from poller: ' .. a) -- zorgt dat de waarde geprint wordt
    6. domoticz\_updateDevice(idWater,'',a)

<figure><img src="/files/d0jpsRtK6fhNHHtukzwz" alt=""><figcaption></figcaption></figure>

Afsluiten en je hebt een sensor in Domoticz die water aangeeft! Stell de waarde (deel factor enz)<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.smart-stuff.nl/dsmr-api/koppelingen/domoticz-and-watersensor.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
