Page 1 sur 1

[SOLVED] Issue with trigger using a logical expression

Publié : 23 mars 2018, 12:00
par andG2B
Hello,

I am using the following:
  • default / core : jeedom 3.1.7
  • market / plugin : weather 2018-01-30
I have set up a triggered scenario that works if I run it manually. However, my trigger does not work. It is currently set up as this:

Code : Tout sélectionner

#[Abitazione][Meteo][Sunset]# >= date('Hi')
The weather plug-in provides the sunset time as an integer, and so does the date function with that format. Moreover, PHP weak typing should be enough to convince Jeedom that the inequality is true. In fact the expression tester agrees:

Code : Tout sélectionner

Je vais évaluer : 1829 >= 1155
Résultat : true
Nevertheless my scenario is not triggered. I would expect it to trigger every minute until sunset, but it doesn't work. I have also tried to set "==" instead of ">=" and wait until sunset, but it also doesn't work.

How can I debug and fix this issue?

Thank you!

Re: Issue with trigger using a logical expression

Publié : 23 mars 2018, 13:29
par cadavor
Hi,

The trigger of your scenario is tested only on the update of element of the trigger.
For the Meteo plugin, it's once a day (the night around 4am).

If you want to trigger action at Sunset for your exemple, you must create a scenario with Sunset as trigger and on action use an "A" (at) block with the trigger in parameter.

This is the documentation of Heliotrope plugin which present an exemple of utilization of this kind of value : https://jeedom.github.io/documentation/ ... index.html

Re: Issue with trigger using a logical expression

Publié : 23 mars 2018, 14:24
par andG2B
Thank you very much for your answer! I will try it today.

If I may add a little thing, the dropdown in the English version says "To" instead of "At". It is not very intuitive and in my opinion it might be changed to something clearer.

Re: Issue with trigger using a logical expression

Publié : 10 avr. 2018, 12:00
par andG2B
Apologies for the late reply. I have tried what you suggested and I got it working. However, I had to keep the ACTION block (I did not use an AT block).

My working configuration is:
Image

Image