Moderators: grovkillen, Stuntteam, TD-er
-
ronilee
- New user
- Posts: 5
- Joined: 22 Jan 2020, 13:11
#1
Post
by ronilee » 06 Mar 2020, 17:18
Hello!
I have a new UV Sensor VEML6070.
I use EasyESP to send the data to domoticz. (HTTP)
My problem:
This sensor has three values, UV-Raw / UV-Risk / UV-Power
I have created a virtual custom sensor, but the only shown me the first value UV-Raw.
Do you have an idea how i can display the 2 and 3 value?
Thanks a lot

-
TD-er
- Core team member
- Posts: 9903
- Joined: 01 Sep 2017, 22:13
- Location: the Netherlands
#2
Post
by TD-er » 06 Mar 2020, 17:47
The custom sensor in Domoticz only supports a single value and the rest will be ignored.
For this you can send the other two by generating the HTTP URL for sending it to Domoticz and send it from the rules using sendtohttp. (or via publish by sending it to MQTT broker)
As trigger you can use the name of the task, so those other values will be sent right after the first value is sent via the controller.
-
ronilee
- New user
- Posts: 5
- Joined: 22 Jan 2020, 13:11
#3
Post
by ronilee » 06 Mar 2020, 18:26
Thanks a lot for the fast answer.
What reassures me is that there is a solution.
But i don´t understand your solution.
Can you a bit more precise?
What i make in ESPeasy and what i must make in domoticz.
-
TD-er
- Core team member
- Posts: 9903
- Joined: 01 Sep 2017, 22:13
- Location: the Netherlands
#4
Post
by TD-er » 06 Mar 2020, 20:14
See the (old) documentation on the wiki:
https://www.letscontrolit.com/wiki/inde ... rial_Rules
Almost at the bottom of that page is described how to send data from the rules to Domoticz.
What you need is the IDX value of the charts in Domoticz and the taskname#varname where your values are at.
So for example if you have a task called "BME280" (values named: temp/hum/baro) and you would refer to the second value, you refer to it as [BME280#hum]
For an introduction to rules, see:
https://espeasy.readthedocs.io/en/lates ... Rules.html
-
ronilee
- New user
- Posts: 5
- Joined: 22 Jan 2020, 13:11
#5
Post
by ronilee » 07 Mar 2020, 08:23
That's what i was looking for.
It works

Fine
Thank you very much
Greetings from Austria
-
pe1fam
- New user
- Posts: 4
- Joined: 19 Jan 2019, 21:42
#6
Post
by pe1fam » 25 Oct 2020, 13:41
It should be somthing like this I guess:
on [VEML6070#UV-Risk] do
Publish domoticz/in,{"idx":438,"nvalue":0,"svalue":"[VEML6070#UV-Risk]"} //Own made up IDX 438
endon
on [VEML6070#UV-Power] do
Publish domoticz/in,{"idx":439,"nvalue":0,"svalue":"[VEML6070#UV-Power]"} //Own made up IDX 439
endon
However this does not work (included TESTING, UV - too), probably I made a stupid mistake, do have a suggestion?
-
Ath
- Normal user
- Posts: 4334
- Joined: 10 Jun 2018, 12:06
- Location: NL
#7
Post
by Ath » 25 Oct 2020, 14:03
Try this version of your script:
pe1fam wrote: ↑25 Oct 2020, 13:41
on VEML6070#UV-Risk do
Publish domoticz/in,{"idx":438,"nvalue":0,"svalue":"[VEML6070#UV-Risk]"} //Own made up IDX 438
endon
on VEML6070#UV-Power do
Publish domoticz/in,{"idx":439,"nvalue":0,"svalue":"[VEML6070#UV-Power]"} //Own made up IDX 439
endon
The `on x do` statements shouldn't use the square braces, as the rules engine will then replace that with the value of the sensor. The name of the event is actually 'VEML6070#UV-Risk' etc., so that is what should be in the statement.
-
TD-er
- Core team member
- Posts: 9903
- Joined: 01 Sep 2017, 22:13
- Location: the Netherlands
#8
Post
by TD-er » 25 Oct 2020, 14:45
Also make sure not to use a minus character in the task name and/or taskvalue name.
-
pe1fam
- New user
- Posts: 4
- Joined: 19 Jan 2019, 21:42
#9
Post
by pe1fam » 25 Oct 2020, 15:06
It was that easy, this works..
on VEML6070#UV-Raw do
Publish domoticz/in,'{"idx":438,"nvalue":0,"svalue":"[VEML6070#UV-Risk]"}'
endon
on VEML6070#UV-Power do
Publish domoticz/in,'{"idx":439,"nvalue":0,"svalue":"[VEML6070#UV-Power]"}'
endon
The '{ bla }' part needed single quotes, maybe documentation need an update.
The log option did tell me that the publish rule was not correct.
And indeed the on [ ] hooks needed to be removed (that was my in my first script to, so the main problem was the quotes)
Maybe this has to do with the testing version (VEML6070 was in that version)?
Thanks all
-
Ath
- Normal user
- Posts: 4334
- Joined: 10 Jun 2018, 12:06
- Location: NL
#10
Post
by Ath » 25 Oct 2020, 15:43
TD-er wrote: ↑25 Oct 2020, 14:45
Also make sure not to use a minus character in the task name and/or taskvalue name.
@TD-er: Maybe this validation should be (re-)enabled in the test builds as well? Despite the slightly larger bin files, this does seem more and more important...
-
TD-er
- Core team member
- Posts: 9903
- Joined: 01 Sep 2017, 22:13
- Location: the Netherlands
#11
Post
by TD-er » 25 Oct 2020, 15:45
Yep we really need to re-evaluate what should be included in what build as it is becoming quite confusing right now.
Who is online
Users browsing this forum: Ahrefs [Bot], Anthropic Claude Bot [bot] and 20 guests