Reading values sent to Tasmota via MQTT

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
ulfh2018
Posts: 65
Joined: Sunday 11 November 2018 9:01
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Oslo
Contact:

Reading values sent to Tasmota via MQTT

Post 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.
User avatar
waltervl
Posts: 5729
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Reading values sent to Tasmota via MQTT

Post 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/
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
ulfh2018
Posts: 65
Joined: Sunday 11 November 2018 9:01
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Oslo
Contact:

Re: Reading values sent to Tasmota via MQTT

Post 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
User avatar
waltervl
Posts: 5729
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Reading values sent to Tasmota via MQTT

Post by waltervl »

You can use custom sensor for this, can have anything
https://www.domoticz.com/wiki/Dummy_for ... tom_Sensor
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
FireWizard
Posts: 1863
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Reading values sent to Tasmota via MQTT

Post 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
Last edited by FireWizard on Monday 06 March 2023 9:08, edited 1 time in total.
User avatar
waltervl
Posts: 5729
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Reading values sent to Tasmota via MQTT

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest