我跟着these steps获取在Weave上注册并在Raspberry Pi 3上运行的 Host Light 示例设备。我可以使用Home和Weave Console控制它
现在我尝试为 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 设备?
答案 0 :(得分: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,
};
答案 1 :(得分: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