Applies To: All EMS Software Events2HVAC interfaces using the EMS Web API v18.104.22.168 or earlier.
In late December 2016, we re-discovered a problem in the logic in the EMS web API function GetBookings(). This was originally identified back in March 2013 before Events2HVAC released the version that allowed EMS connections via the API. We assumed that Dean Evans EMS had fixed this issue in their API releases going forward.
When we call this function and enter a start and end time for a query, Events2HVAC expects to get back all event schedules where the reservation start time is between the start and end times AND any in-progress events (events that have started, but the reservation end time has not ended within the query start and end times).
Instead, the query only returns events where the reservation start time is between midnight of the start time of the query and the end time of the query.
As a result, Events2HVAC can incorrectly set the state for in-progress events to UNOCCUPIED since these events would be missing. This most likely affects any schedules that span across midnight and multi-day schedules.
EMS Software has been notified of this issue and are looking into a solution.
There are two workarounds:
- (Recommended) Change the EMS connection from web API to SQL direct. This is the recommended connection for EMS since it is faster and we control the query logic.
See SQL Server Connection
- For sites that can't or don't want to connect via SQL, a workaround has been added to v1.4.5 to allow the user to enter an offset time adjustment to be applied to all queries from Events2HVAC to the EMS API so that the start time of a booking can be captured for in-progress events.
The recommended offset is -1440 minutes (1 day). This should capture all single day event schedules that might also span midnight. If you have multi-day events, you should change this value appropriately.
Keep in mind the more offset you put into this value, the more events will get returned for each api call and more performance impact you will see for each poll to EMS.
This DOES NOT affect clients that are connecting to EMS via SQL server direction connection, but only a small percentage of EMS clients that are using the EMS web services API.