def parse_expinfo(filename):
    """Read Hive and RPi number from filename.

    Filename e.g.:
    bgx_hive1_rpi1_190727-140003-utc.jpg
    """
    hive = int(filename.split("hive")[-1][0])
    rpi = int(filename.split("rpi")[-1][0])

    return hive, rpi