Comme annoncé, ce forum est passé en lecture seule au 1er janvier 2020. Désormais nous vous invitons à vous rendre sur notre nouvelle page communauté :
Image

A très bientôt !

[SOLVED] Issue with trigger using a logical expression

Let's talk about plugins, widgets, scripts, and development with JEEDOM
andG2B
Timide
Messages : 3
Inscription : 23 mars 2018, 11:51

[SOLVED] Issue with trigger using a logical expression

Message par andG2B » 23 mars 2018, 12:00

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!
Dernière édition par andG2B le 10 avr. 2018, 12:01, édité 1 fois.

Avatar de l’utilisateur
cadavor
Actif
Messages : 1284
Inscription : 21 juin 2015, 22:00
Localisation : 34

Re: Issue with trigger using a logical expression

Message par cadavor » 23 mars 2018, 13:29

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
Jeedom Stable 3.3
NUC Z83 + Aeotec Z-Stick Gen5
Z-Wave FGR + FGMS + FGDS + FGFS + FGK + FGWPE + ZW062 + ZW080
GH Mini + Orvibo AllOne + Playbulb + Miband2

andG2B
Timide
Messages : 3
Inscription : 23 mars 2018, 11:51

Re: Issue with trigger using a logical expression

Message par andG2B » 23 mars 2018, 14:24

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.

andG2B
Timide
Messages : 3
Inscription : 23 mars 2018, 11:51

Re: Issue with trigger using a logical expression

Message par andG2B » 10 avr. 2018, 12:00

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

Répondre

Revenir vers « Software & Plugins »

Qui est en ligne ?

Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 10 invités