Get all devices offering a certain service?

Hi,

how can I make my plugin find all other installed devices (device ids) which offer a certain type of service? For example all ids of devices that offer the service urn:upnp-org:serviceId:TemperatureSensor1.
I need the ids so I later can call luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", 5).
Thanks!

[tt]http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_devices_by_service[/tt] (does it work?)

[tt]http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_device_supports_service[/tt] (doesn’t work reliably)