I wrote a couple of generic design patterns for this:
The tl;dr is create a hashMap keyed on the Item name of Timers. The timer gets scheduled when the door opens. If it closes before the time goes off the timer is canceled. If the timer goes off it sends an alert then recreates itself to go off in another hour.
An alternative way is to create a rule that triggers with a cron trigger periodically (every five minutes maybe). Then, using persistence loop through the Items and send an alert for those that are OPEN and have a lastupdate of over an hour ago. Then take a timestamp put into a hashMap. For any Items open for over an hour check the timestamp in the map and when that gets over an hour old send the message again and save a new timestamp.
In all of these cases, you use the Item.name as the key so you can still use your forEach loops and do not have to create a separate variable for each Item