-
Notifications
You must be signed in to change notification settings - Fork 4
custom device 'flow meter': case study
Marco Sillano edited this page Aug 30, 2023
·
5 revisions
To improve the watering_sys I looked for a flow meter to get a real measure of the water used and not just an estimate. To my surprise, I have not found any suitable Tuya device!
I will make it. First I buy a Water Hall Flow sensor, very simple:
|
For the electronic, we have many options. This will not be a 'native Tuya device' of course, but it must be a device easily integrable in tuyaDAEMON.
- A natural option is an MQTT device, taking as a model some tuya meters: e.g. the ACmeter. This allows the use as a UI of standard MQTT dashboard apps, like IoT MQTT Panel. The DP definition is here.
- As a processor, my choice falls on a Sonoff-basic + esp-MQTT. Here is required: Wifi, only one digital input, and a little code. The Sonoff, with Wifi, case, and AC power supply, offers all required HW features at a very cheap cost. And esp-MQTT (max. user code 4000 bytes) is a very good choice for small MQTT and data processing applications.
See as reference this good article
** work in progress **
This interface is built as a direct replacement of a tuya-smart-device
node, as done in Ozone_PDMtimer, but with a big advantage: in this case, the MQTT commands are chosen more standard, so the interface is now a 'generic MQTT' node, reusable with many devices.