TSinclair Posted May 5, 2023 Share Posted May 5, 2023 I've been using HA for about a month now, so to say I'm still learning is an understatement. I am currently using the IoX integration, which is fantastic...I've been astounded by the near instant response time between IoX and HA. At issue is when using a particular IoX variable in HA that is either 0(off) or 1(on) it presents in HA as both at the same time! (screen print attached). If I change the variable in IoX manually everything works as expected, so I assume the issue is with my program. The program uses a couple of temp sensors, so anytime the temp changes the program reevaluates. Somewhat oddly, even if the reevaluation doesn't cause the variable to change, the "Last Changed" time in the state variable updates. Again, the variable is either a 0 or 1, so I can't figure out why HA shows both changing at the same time. Initially I was using "then" to set the variable to 1 and "else" to set the variable to 0; as part of my troubleshooting I divided into two programs, but the result was the same. Any guidance would be much appreciated. Desired Fan State Down on - [ID 0254][Parent 0071] If ( $sHVAC_Downstairs_Automation_Override is 0 And $sHVAC_Downstairs_Automation_Fan_Mode is 0 And $sHVAC_Downstairs_Heat_or_Cool < 0 ) And ( $sHVAC_Downstairs_Kitchen_Differential >= 1.5 Or $sHVAC_Downstairs_Study_Differential >= 1.5 ) Then $sHVAC_Downstairs_Automation_Fan_Mode = 1 Else - No Actions - (To add one, press 'Action') This is used to set a variable based on temp difference between set temp and actual temp (in study or kitchen)that will command the blower state of the downstairs HVAC. Desired Fan State Down off - [ID 0255][Parent 0071] If ( $sHVAC_Downstairs_Automation_Override is 0 And $sHVAC_Downstairs_Automation_Fan_Mode is 1 ) And ( $sHVAC_Downstairs_Kitchen_Differential < 1.5 And $sHVAC_Downstairs_Study_Differential < 1.5 ) Then $sHVAC_Downstairs_Automation_Fan_Mode = 0 Else - No Actions - (To add one, press 'Action') This is used to set a variable based on temp difference between set temp and actual temp (in study or kitchen)that will command the blower state of the downstairs HVAC. Link to comment
shbatm Posted May 6, 2023 Share Posted May 6, 2023 If I had to guess based on how often it's firing, your '_differential' variables may be floating right at 1.5 because there's no room for float and it may be short cycling the two programs. Can you enable debug logging and see if the ISY is actually sending two updates? That will narrow it down to a HA issue or ISY issue. Under Devices & Services in HA, click the menu next to IoX and select enable debug logging. You can then watch the logs either by opening the /config/home-assistant.log file or in Home Assistant navigate to Logs in settings, (hit 'c' and then type Logs), then View Full Log at the bottom. Link to comment
TSinclair Posted May 7, 2023 Author Share Posted May 7, 2023 Thank you so much for giving me a path to investigate and test. By putting a wait statement in the two "then" statements I pasted above, everything is now working great. I turned on the log you suggested in HA, but it only showed that the variable changed, it did not show what it changed to. But by looking at the IoX event viewer (pasted below; Variable 140 and 138 are the culprits), I could clearly see the multiple events. Again, the wait statements solved this. Thank You! Link to comment
shbatm Posted May 7, 2023 Share Posted May 7, 2023 Glad you found the issue. I'll tweak the PyISY logs for future to show the values for better debugging. 1 1 Link to comment
Recommended Posts