Custom Sensor: Leaf Wetness and MQTT

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
acaonweb
Posts: 47
Joined: Thursday 23 March 2017 15:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Custom Sensor: Leaf Wetness and MQTT

Post by acaonweb » Friday 14 September 2018 15:46

Domoticz Version 4.9700
Raspberry PI 3 Raspbian Jessie
Hardware: Xiaomi Gateway + Xiaomi Button + Sono Basic Tasmota firmware

Hi, i need to understand this behavior.
I've have created two custom sensors (Dummy): the first is a Temperature sensor (IDX:140) and the second is a Leaf Wetness sensor (IDX:141)

now if in the terminal I type

Code: Select all

mosquitto_pub -h localhost -m '{ "idx" : 140, "nvalue" : 0, "svalue" : "25.0" }' -t 'domoticz/in'
i can see the new value in the sensor Temperature
but if i type

Code: Select all

mosquitto_pub -h localhost -m '{ "idx" : 141, "nvalue" : 0, "svalue" : "25.0" }' -t 'domoticz/in'
nothing happens.
I've tried a General Custom Sensor, a pressure sensors and everything works fine...

I think it's a bug...
Any suggestion?

tun0
Posts: 11
Joined: Saturday 28 July 2018 9:30
Target OS: -
Domoticz version:
Contact:

Re: Custom Sensor: Leaf Wetness and MQTT

Post by tun0 » Friday 14 September 2018 21:19

Try passing the value through nvalue (25) instead of svalue ("25.0")?

acaonweb
Posts: 47
Joined: Thursday 23 March 2017 15:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Custom Sensor: Leaf Wetness and MQTT

Post by acaonweb » Friday 14 September 2018 22:05

The format is the same sent by easyesp firmware on Wemos D1, so I think it have to be the right syntax...
Every other Custom Dummy Sensor works fine.

tun0
Posts: 11
Joined: Saturday 28 July 2018 9:30
Target OS: -
Domoticz version:
Contact:

Re: Custom Sensor: Leaf Wetness and MQTT

Post by tun0 » Friday 14 September 2018 22:29

No errors in the domoticz log either?

acaonweb
Posts: 47
Joined: Thursday 23 March 2017 15:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Custom Sensor: Leaf Wetness and MQTT

Post by acaonweb » Saturday 15 September 2018 19:54

tun0 wrote:
Friday 14 September 2018 22:29
No errors in the domoticz log either?
no error, in the log mitt is sent correctly

chaimeichini
Posts: 38
Joined: Tuesday 02 October 2018 16:40
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Custom Sensor: Leaf Wetness and MQTT

Post by chaimeichini » Wednesday 07 November 2018 12:20

The wireless leaf wetness sensor detects the presence and quantity of water on its surface through the measurement of constant dialettrica, that in the case of water has a significantly higher value than to that of air, and the variation between two electrodes present in the sensor .
There are also sensors that according to the level of wetness, detect a change in the electrical resistance between the elements of a grid that make up the sensor itself.inro.in/showbox inro.in/mobdro inro.in/tutuapp/
Domoticz Version: V4.9700
Platform: RaspberryPi 3

oxedgar
Posts: 7
Joined: Sunday 10 April 2016 11:59
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Custom Sensor: Leaf Wetness and MQTT

Post by oxedgar » Wednesday 07 November 2018 22:30

acaonweb wrote:
Friday 14 September 2018 15:46
Domoticz Version 4.9700
Raspberry PI 3 Raspbian Jessie
Hardware: Xiaomi Gateway + Xiaomi Button + Sono Basic Tasmota firmware

Hi, i need to understand this behavior.
I've have created two custom sensors (Dummy): the first is a Temperature sensor (IDX:140) and the second is a Leaf Wetness sensor (IDX:141)

now if in the terminal I type

Code: Select all

mosquitto_pub -h localhost -m '{ "idx" : 140, "nvalue" : 0, "svalue" : "25.0" }' -t 'domoticz/in'
i can see the new value in the sensor Temperature
but if i type

Code: Select all

mosquitto_pub -h localhost -m '{ "idx" : 141, "nvalue" : 0, "svalue" : "25.0" }' -t 'domoticz/in'
nothing happens.
I've tried a General Custom Sensor, a pressure sensors and everything works fine...

I think it's a bug...
Any suggestion?

Hello, i think u need to send mqtt frame with the value on the nvalue and not in the svalue like this:

Code: Select all

mosquitto_pub -h localhost -m '{ "idx" : 141, "nvalue" : 25.00, "svalue" : "0" }' -t 'domoticz/in'
in my case, i use this to send values with battery level and radio level :

Code: Select all

  String rqt = "{ \"idx\":" + String(idx) + ",\"nvalue\":" + String(value) + ",\"svalue\":\"0\" "+ ",\"RSSI\":" + String(RssIdomo) + ",\"Battery\":" + String(Batlevel) + "}";
in my case this working fine...

have a nice day...

acaonweb
Posts: 47
Joined: Thursday 23 March 2017 15:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Custom Sensor: Leaf Wetness and MQTT

Post by acaonweb » Friday 16 November 2018 20:25

but with leaf sensor?

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests