简体   繁体   English

从Nest API获取数据不再起作用

[英]Getting data from nest api not working anymore

I am working with firebase to get data from the nest api. 我正在使用Firebase从Nest API获取数据。 I had a working test setup where I was able to receive data, and set values. 我有一个有效的测试设置,可以接收数据并设置值。 Now I am working in python to get a little server running that automatic updates my database. 现在,我正在python中工作,以运行一个小的服务器,该服务器会自动更新我的数据库。 I had data a few days back. 我几天前有数据。 But today I wanted to work on it, and i didn't receive any data anymore. 但是今天我想继续努力,但现在再也没有收到任何数据。 So I checked my test setup. 所以我检查了我的测试设置。 And that one is neither getting any data, But I am still able to send data. 那既没有获取任何数据,但是我仍然能够发送数据。

This is the javascript I use for my test setup. 这是我用于测试设置的javascript。

var dataRef = new Firebase('wss://developer-api.nest.com/');
dataRef.authWithCustomToken("{{user.token}}", function(error, authData) {
    if (error) {
        console.log("Login Failed!", error);
    } else {
        console.log("Login Succeeded!", authData);
    }
});

dataRef.on('value', function(snapshot){
    console.log(snapshot.val());
});

It should work. 它应该工作。 But can it be that something broke with the update? 但是更新是否可能会导致某些问题?

I also created an new client but that did not work either. 我还创建了一个新客户端,但是也没有用。

An other python application that i am running with nest is using the websocket-client an that one still works. 我与nest一起运行的另一个python应用程序正在使用websocket-client,它仍然可以工作。 But for the application i am now working on i need to get data from different accounts. 但是对于我正在处理的应用程序,我需要从不同的帐户获取数据。 If i use the websocket-client it wil use to much resources. 如果我使用websocket-client,它将消耗大量资源。 so that is not an option. 所以这不是一个选择。

Hope someone can help me. 希望可以有人帮帮我。

Firebase upgraded their client recently. Firebase最近升级了他们的客户端。 Since Nest runs its own instance of Firebase, make sure that you are using one of the supported Firebase versions available here and not that latest version. 由于Nest运行其自己的Firebase实例,因此请确保您使用的是此处提供的受支持的Firebase版本之一,而不是该最新版本。

https://developer.nest.com/documentation/cloud/firebase-client-libraries https://developer.nest.com/documentation/cloud/firebase-client-libraries

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM