Announcement

Collapse
No announcement yet.

Double Event Trigger for HS Device Set or Change

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • kenm
    replied
    It's in the HomeSeer UI that I'm seeing the Dim % instead of the device value. I configured one of the sensor virtual devices as in your example and it showed an integer value. Looking at the Advanced section of the Status/Graphics it was still displaying the device status and not the device value and the device status was set to a rounded device value.

    For now, I've reverted back to setting both value and status from Node-RED and then I changed the trigger events to not re-run within 5 seconds. That's more of a mask than a fix, but it's good enough until I get a chance to work on it further.

    Leave a comment:


  • ksum
    replied
    Originally posted by kenm View Post
    ksum It's only the UI display that I need to figure out now.
    The HomeSeer UI, Node-RED, or elsewhere? If HomeSeer, I believe you need to set the Controls and Status/Graphics. Below is a Low Temperature Set Point virtual device I have as an example.
    Click image for larger version

Name:	HS1.png
Views:	100
Size:	76.5 KB
ID:	1536456

    Leave a comment:


  • kenm
    replied
    ksum Sorry for the late reply. Not long after I saw your reply we got hit with an unexpected power outage. Turns out a tree had fallen across a main power feed to our neighborhood and took us out for almost 16 hours. Anyway, No, the scripts do not modify any of the trigger devices so I don't think that's causing the problem. I did as you suggested and changed the flow to only set the device value but not the status. I'm not seeing the double trigger any longer, but now the UI is showing 'Dim 65.27%' when I set the device value to 65.27. It appears that the UI can only show the status for a device, but not its actual value. The good news is that the triggers and script calculations are working since they use device value. It's only the UI display that I need to figure out now.

    Leave a comment:


  • ksum
    replied
    Does the script change any of the devices which may then cause the Event to be triggered a second time? You might try setting Node-RED to only change the Status OR the Value of the HS Devices, provided your virtual devices are set up so the two work together.

    Leave a comment:


  • kenm
    replied
    The flow is here: https://forums.homeseer.com/forum/ho...-device-values

    Note that the flow updates both value and status each time. I did not have Last Change Time Updates on Status Change Only but I just enabled that.

    Here is a sample event for the front porch sensor:
    Click image for larger version

Name:	Screen Shot 2022-04-11 at 11.15.47 AM.png
Views:	122
Size:	68.7 KB
ID:	1536330
    Click image for larger version

Name:	Screen Shot 2022-04-11 at 11.16.06 AM.png
Views:	111
Size:	36.2 KB
ID:	1536331
    Click image for larger version

Name:	Screen Shot 2022-04-11 at 11.16.33 AM.png
Views:	109
Size:	44.5 KB
ID:	1536332

    Leave a comment:


  • ksum
    replied
    Can you share your flow? Does it do something which sets the initial HomeSeer device's value/status? Check the Last Change Time Updates on Status Change Only option in HomeSeer on the device. This will keep it from initiating any flows in Node-RED unless the status actually changes to something different. Without seeing the flows and events, this would be the first thing I would try.

    Leave a comment:


  • kenm
    started a topic Double Event Trigger for HS Device Set or Change

    Double Event Trigger for HS Device Set or Change

    I have a number of events that are triggered when a device's value is set or changed. The events run scripts that make some quick calculations and save the results to other HS devices. It's important that only one copy of each script runs at a time. Up until now, I've been using a serial script to set the trigger device values every 5 minutes and I've never had a problem. A few days ago I switched over to using the HS Device node in a Node-RED flow to set the trigger device values. I'm now getting random warnings in the HS log that a script was not run because it was already running and only one instance was allowed, which is true. I had "Do Not Log" set for the trigger events so I went in and unchecked that for several of the events. Sure enough, I'm randomly seeing a double event trigger in the log just before the warning.

    Any ideas?
Working...
X