Page 1 of 1

Reading values sent to Tasmota via MQTT

Posted: Saturday 04 March 2023 17:06
by ulfh2018
I am working on a project where I use an ESP 12-F chip running Tasmota, to read analog values from a capasitive moisture sensor. These values are sent to a MQTT server, and I pull the information into Node Red, which seems to work as expected. I have used Domoticz before on another project, but then I was using virtual switches, and as far as I understand, this is not possible in this case.

The values I get from MQTT are numbers, but are sent in the following format:

tele/Vann1/SENSOR = {"Time":"2023-03-04T17:03:23","ANALOG":{"Range":85}}

and I need the value of Range to calculate the humidity in the soil.

How can this be done in Domoticz and how can I display the information?

Best regards

Ulf H.

Re: Reading values sent to Tasmota via MQTT

Posted: Saturday 04 March 2023 17:22
by waltervl
There is a special Node Red sub-forum viewforum.php?f=81

Or check the tasmota docs on domoticz integration https://tasmota.github.io/docs/Domoticz/

Re: Reading values sent to Tasmota via MQTT

Posted: Sunday 05 March 2023 18:02
by ulfh2018
Node-Red is not a problem. That works as a dream, but I cannot find a way to get the analog values from my sensor to Domoticz. As far as I can see, there are no virtual sensors I can use to pull this kind of info, so maybe I'll stick to Node-Red and se if I can find a way to make a nive display

Re: Reading values sent to Tasmota via MQTT

Posted: Sunday 05 March 2023 19:40
by waltervl
You can use custom sensor for this, can have anything
https://www.domoticz.com/wiki/Dummy_for ... tom_Sensor

Re: Reading values sent to Tasmota via MQTT

Posted: Sunday 05 March 2023 23:33
by FireWizard
Hi @ulfh2018,

As I read your first post I understand that you want to send the value of a moisture sensor to Domoticz.

You can use a virtual sensor and configure it as a moisture sensor (value expressed in cb, centiBar).

You receive the input as a JSON object and that can be converted to Domoticz format.
This is not too difficult.

I would also do the calculation in Node Red.

Regards

Re: Reading values sent to Tasmota via MQTT

Posted: Sunday 05 March 2023 23:44
by waltervl
And if it is moisture you can use soil moisture or humidity virtual device. With humidity device you have to add a humidity scale. See the wiki.