3

我按照这些步骤在 Weave 上注册了Host Light示例设备并在 Raspberry Pi 3 上运行。我可以使用 Home 和 Weave 控制台来控制它。

现在我正在尝试对主机 Hvac设备执行相同的操作(我查看了 MW302 的 Hvac 示例作为参考),但我无法使用./out/host/examples/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设备?

4

2 回答 2

0

无法使用 ./out/host/examples/hvac/hvac -r xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 注册设备。

它卡在以下位置,没有明显的错误:

我认为您在 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,

};
于 2017-01-21T15:46:40.570 回答
0

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 
于 2017-02-03T22:51:16.497 回答