According to your event screenshot, here is what I think happen: when you start the EasyTrigger plugin if none of the 4 device values change during the next 2 minutes, then your event will be triggered 4 times (once for each device in the group), since this is happening almost at the same time and in parallel, the global variables are updated 4 times too, so an email action triggered by one device may use the global variables set to another device.
This is only a real problem at startup because after that there is little chance that 2 of your devices in the group trigger the event at the same time.
Announcement
Collapse
No announcement yet.
Help with global variable ETDeviceName not being updated
Collapse
X
-
Originally posted by sparkman View PostMaybe add a few second Wait before the send email action.
So as I understand the issue as it stands (with beta version 3.0.0.70): When the global variables etdevicename, etdeviceref, etdevicestatus, etdevicevalue, etdevicelocation1, etdevicelocation2 have not been previously set to any value, which would happen after a HS3 restart, an event that sets those variables and then sends an email that uses those variables may be grabbing those values before they have been properly set. Adding a short delay before creating the email resolves this. Any additional status changes that run the event again do not seem to have any issues and there is not need for any delay.
Thanks Spud for all your work! Love the EasyTrigger plugin.
Leave a comment:
-
Update - the information is wrong for just the first time the event runs. I ran it 3-4 more times and it worked fine.
I then disabled the plugin, deleted the global variables, enabled the plug in and ran it again. The first email had the wrong information (still the bathroom light) but the next 3-4 times were correct.
- Likes 1
Leave a comment:
-
Thanks for the new version but I think there is still a problem (different one):
The device that triggered the event was the "Stove Light"
The global variables tab shows the stove light:
But the email says bathroom light:
Device Name:
Light
Floor:
Bathroom
Room:
1st Floor
Ref Number:
337
Last Reported Value:
0
Last Reported Status:
Off
The bathroom light happens to be the first device in the 1stFloorLights group
Thoughts?
Leave a comment:
-
Thanks for the quick reply! I'll wait for the update and try again.
Leave a comment:
-
It's a bug, I forgot to set the variables for this specific trigger. I will fix it ASAP.
Leave a comment:
-
Help with global variable ETDeviceName not being updated
I am trying to send an email when any device in a group has not changed for a set period of time (battery status not updated in a week). I updated to EasyTrigger beta 3.0.0.69 and everything looks great and the trigger works except the email does not replace the global variables with the current values. (This is the first time I have tried to include EasyTrigger global variables in an email)
Here is the test event:
The email I get has the following body (no replacements):
Device Name:
$$GLOBALVAR:ETDeviceName:
Floor:
$$GLOBALVAR:ETDeviceLocation1:
Room:
$$GLOBALVAR:ETDeviceLocation2:
Ref Number:
$$GLOBALVAR:ETDeviceRef:
Last Reported Value:
$$GLOBALVAR:ETDeviceValue:
Last Reported Status:
$$GLOBALVAR:ETDeviceStatus:
So I looked at the Tools>Global variables tab and saw this:
OK - so I disabled the ET plugin, then deleted the variables and restarted the plugin and they were recreated again as shown above.
Then I deleted the variables again and manually created them with dummy data (using the add new variable at the bottom of the page. it then looked like this:
and the next time the email sent it had a body like this:
Device Name:
name test
Floor:
location 1 test
Room:
location 2 test
Ref Number:
1
Last Reported Value:
100
Last Reported Status:
status test
So the global variables are now replaced in the email but the values are not updated when the event runs. I set EasyTrigger to debug and saw no errors when the event triggered (after I set the variables to the test values).
So what am I missing? Any thoughts of what I should try next?
ThanksTags: None
Leave a comment: