Error handling on temperature sensor
Every 4th measurement fails is a pretty high error rate. The preferred course of action would be to root cause the error and fix it. Meanwhile, since the error seems to be transient, you may want to read the sensor again, and again, until it reads cleanly. Another strategy is to read more often, and maintain the running average (discarding the failures).
For a proper review, DRY. The GPIO setup shall be lifted out of the if/else:
while True:
    GPIO.setmode(GPIO.BCM)
    RELAIS_1_GPIO = 17
    GPIO.setup(RELAIS_1_GPIO, GPIO.OUT)
    if  measure_temp() &lt; 8:
        GPIO.output(RELAIS_1_GPIO, GPIO.HIGH)
        print('{:%d.%m.%Y %H:%M:%S}'.format(datetime.datetime.now()))
        print('Heating on')
        print()
    else:
        GPIO.output(RELAIS_1_GPIO, GPIO.LOW)
        print('{:%d.%m.%Y %H:%M:%S}'.format(datetime.datetime.now()))
        print('Heating off')
    time.sleep(900)
    GPIO.cleanup()

I also recommend to factor the printing out to the function, e.g.
def log_heating_status(status):
    print('{:%d.%m.%Y %H:%M:%S}'.format(datetime.datetime.now()))
    print('Heating {%s}'.format(status))

to be called as log_heating_status('on') and log_heating_status('off').
It is also very unclear why do you setup/cleanup GPIO on every iteration. I'd expect it to be done once, outside the loop.