Multiple select for multiple groups

We have a set of devices that belong to different groups. Each device generates multiple time-series data streams that can be visualised. All devices in the same group have same data streams.

For example:
Group 1:
    Devices:
        Device 1
        Device 2
        Device 3
    Streams
        Stream 1
        Stream 2
        Stream 3
Group 2:
    Devices:
        Device 1
        Device 2
    Streams
        Stream 1
        Stream 2

A user can select devices from each group with their streams. What would be the best way to let a user navigate through such selection?

Presently, we're thinking for two dropdowns for each category, one for devices and the other for streams.