Converting code from ST

Thanks for the response.
I've read the threads you submitted and tried this many times

but in my device list is no thermostats
This is in my log

app:1422021-03-25 09:13:25.217 errorjava.lang.NullPointerException: Cannot get property 'userId' on null object on line 684 (updated)

app:1422021-03-25 09:13:25.197 infoEvohome (Connect): getEvohomeConfig(): Getting configuration for all locations.

app:1422021-03-25 09:13:25.170 debugEvohome (Connect): manageSchedules(): Re-scheduling poll()

app:1422021-03-25 09:13:25.114 debugEvohome (Connect): manageSchedules(): Re-scheduling manageAuth()

app:1422021-03-25 09:13:25.111 debugEvohome (Connect): manageSchedules()

app:1422021-03-25 09:13:25.089 debugEvohome (Connect): manageSubscriptions()

app:1422021-03-25 09:13:25.077 errorEvohome (Connect): getEvohomeUserAccount(): Error: e.statusCode 400

app:1422021-03-25 09:13:24.259 infoEvohome (Connect): getEvohomeUserAccount(): Getting user account information

Am I doing something wrong?