Don’t have all the answers, but maybe the following thoughts help:
- you may want to have a naming scheme that identifies the alternative item through an appendix; something like
myItemName
andmyItemName_alternative
; you can then use string operations to put together Item names - maybe persisting all items (everyChange strategy) and checking the timestamps of the last persisted datapoint will help identifying those that have not posted in 24h; if you group your devices in those that send battery info and others, you can decide simply by group membership whether to look for an alternative item of call it dead (you could also check whether the alternative item is not NULL; if it is there is no alternative device and the thing is dead, if there is you can pull battery tests)
- you may want to consider to have a group of all those with alternative devices, iterate over both the item and alternative item and take the latest timestamp of the persisted data
most of these ideas came from here: Design Pattern: Working with Groups in Rules and related posts on using groups in rules.
Sorry for not being able to offer more, but maybe this helps you solve your problem