Google 编织 (libiota) 主机 Hvac

Google Weave (libiota) Host Hvac

我按照 these steps 获得了在 Weave 上注册的 Host Light 示例设备和 Raspberry Pi 上的 运行 3. 我是能够使用 Home 和 Weave 控制台控制它。

现在我正在尝试对 Host Hvac 设备执行相同的操作(我查看了 Hvac example for the MW302 作为参考),但我做不到使用 ./out/host/examples/hvac/hvac -r xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

注册设备

它卡在以下位置,没有可见错误:

[(4068588.179)I daemon.c:146] Heap state at daemon_connected: free=0, iota_allocated=15721, iota_max_allocated=15754
[(4068588.180)I daemon.c:152] Daemon connected.

使用 Host Light 示例,我确实看到设备正在注册并且工作正常:

[(4069131.290)I daemon.c:268] Waiting for registration message to be sent.
[(4069131.290)I daemon.c:146] Heap state at daemon_connected: free=0, iota_allocated=15234, iota_max_allocated=15268
[(4069131.290)I daemon.c:152] Daemon connected.
[(4069131.290)I daemon.c:137] Registering with ticket xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
[(4069131.290)I weave_http.c:98] Sending PATCH Request https://www.googleapis.com/weave/v1/registrationTickets/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[(4069133.198)I weave_register.c:205] Sending Registration Finalize Request
[(4069133.198)I weave_http.c:98] Sending POST Request https://www.googleapis.com/weave/v1/registrationTickets/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/finalize?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[(4069135.880)I settings.c:71] Device id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
[(4069135.880)I weave_register.c:233] Sending Registration OAuth Request
[(4069135.880)I weave_http.c:98] Sending POST Request https://accounts.google.com/o/oauth2/token
[(4069135.196)I weave_register.c:270] Registration Complete
[(4069135.196)I dev_framework.c:295] Heap state at daemon_registered: free=0, iota_allocated=23704, iota_max_allocated=35344
[(4069135.196)I dev_framework.c:296] Registration Succeeded.

> [(4069135.197)I weave.c:550] Fetching Command Queue

有没有人设法成功创建 Host Hvac 设备?

not able to register the device with ./out/host/examples/hvac/hvac -r xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

It gets stuck at the following, with no visible errors:

我认为您在 main() 和 HostIotaFrameworkConfig 配置中添加了 argc、argv

例如:

int main(int argc, char** argv)

HostIotaFrameworkConfig config = (HostIotaFrameworkConfig) {

  .base =
      (IotaFrameworkConfig){
          .cli_commands = NULL,
          .num_commands = 0,
          .builder = create_daemon_,
      },
  .argc = argc,
  .argv = argv,
  .user_data = NULL,

};

Libiota 存储库中现在有一个 Hvac 主机示例:https://weave.googlesource.com/weave/libiota/+/master/examples/host/hvac_controller/

对于 运行 Raspberry Pi 上任何主机示例设备的工作人员,请注意您可能需要以下依赖项:

sudo apt-get install libssl-dev libldap2-dev libidn11-dev libssh2-1-dev libkrb5-dev librtmp-dev

另外 weave_client(用于注册设备)需要在您的 Linux 机器上使用 Pycurl。从 pycurl.io 下载源代码并使用 python setup.py install 安装。您可能还需要安装这些依赖项:

sudo apt-get install libcurl4-gnutls-dev python-dev