In trying to troubleshoot an issue where the HVAC plugin does not maintain the SwitchPower1 service’s Status variable state properly, I wanted to override the Status variable definition to include yes.
I modified the S_SwitchPower1.xml and uploaded it to the Vera however I now have two versions named the same and if I view them via the WebUI, they are identical.
Not knowing the filesystem layout, I want to use the Sep 5 version. I logged into the Vera, decompressed the Sep-5 file into /tmp and confirmed it has the changes I would like.
Though you can find them in several service descriptor files, both the sendEventsAttribute tag and the sendEvents attribute are ignored.
In /etc/cmh-lu/ are the core files, and in the /etc/cmh-ludl/ are all the user-uploaded and plugin files. And while the script to display the Luup file has been updated to display all the files in both /etch/cmh-lu/ and /etc/cmh-ludl/ (before, if a file existed in both folders, only the one in /etc/cmh-ludl/ was displayed), the script to view files has not, so you always see the file in /etc/cmh-lu/. We’re working on fixing this.
What would you like the sendEventsAttribute for? Maybe we can help you do this without this tag.
The issue I am experiencing is that HCVA Plugin “Energy Mode or Normal Mode Changes” EVENT will not trigger if the user changes the ESM Mode using the physical buttons on the Thermostat and I need that to activate a scene. The event will trigger if I set the SwitchPower1 NewTarget to Normal (1) or Energy (0) using luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”, {newTargetValue=“0”}, lul_device) but I need to know if it is changed on the physical device.
I found that the hot and cold SetPoint variable changes are detected every time the user changes the Thermostat from Normal to Energy and vice versa so I decided to work around the issue by writing a luup.watch_variable handler to watch the Cool SetPoint variable that is called every time the Cool SetPoint changes and then query the ESM mode (SwitchPower1 Status) to see if the Thermostat is in ESM or Normal Mode. However that didn’t work because the SwitchPower1 Status variable is not updated if the user changes between modes using the Physical Thermostat.
I believe that is the core problem - the HVAC Plugin is not detecting changes to the SwitchPower1 Status variable if it is set using the Thermostat buttons and therefore, the “Energy or Normal Mode Changes” event is not triggered either.
You can confirm this behavior with a simple test using the MIOS Developer panel. Run the following code before and after setting the mode using the Thermostat’s physical buttons.
You will see that the SwitchPower1 Status value never changes from what the Plugin thinks it is. And if you run the code snippet above to programmatically set the mode using the earlier code snippet, the variable will reflect the state.
I thought the cause might be that the sendEventsAttribute for Status variable was set to “no” so I wanted to try changing it but it sounds from your post that can’t be the cause.
I never heard back so I just filed a formal bug [url=http://bugs.micasaverde.com/view.php?id=1816]http://bugs.micasaverde.com/view.php?id=1816[/url] with all the detailed steps to reproduce in hopes that my filing this bug will help resolve this issue. I am convinced this is a bug because the SwitchPower1:Status service state variable changes are detected for all other devices, just not Thermostats. Please feel free to reach out to me for additional details or point me to beta plugins/firmware for testing.
Thanks,
Bruce
Best Home Automation shopping experience. Shop at Ezlo!