使用Raspberry Pi和Bluemix的IoT Python应用程序:无法打开/关闭灯光

时间:2016-03-13 10:45:47

标签: python raspberry-pi ibm-cloud iot

我按照教程使用IoT Foundation将我的Raspberry Pi连接到Bluemix上的应用程序:

https://developer.ibm.com/bluemix/2015/04/02/tutorial-using-a-raspberry-pi-python-iot-twilio-bluemix/

问题是Web应用程序的“打开/关闭”按钮没有发生任何事情。

如果我使用“./cf logs myappname -recent”检查python应用程序的日志,我会得到以下输出

2016-03-13T15:00:01.37+0530 [RTR/1]      OUT souvikiot.mybluemix.net - [13/03/20
16:09:30:01 +0000] "GET / HTTP/1.1" 200 0 751 "http://souvikiot.mybluemix.net/"
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chro
me/48.0.2564.116 Safari/537.36" 192.155.237.117:40463 x_forwarded_for:"49.207.13
6.134" x_forwarded_proto:"http" vcap_request_id:9f2af0b2-d1c5-4391-55e8-afb19759
68f9 response_time:0.005322145 app_id:4499b999-047b-4eb9-be09-7e76f164a5c0 x_glo
bal_transaction_id:"808477683"
2016-03-13T15:00:05.66+0530 [App/0]      OUT off
2016-03-13T15:00:05.67+0530 [App/0]      ERR 198.11.228.42 - - [13/Mar/2016 09:3
0:05] "POST /light/off HTTP/1.1" 302 -
2016-03-13T15:00:05.96+0530 [App/0]      ERR 169.54.180.77 - - [13/Mar/2016 09:3
0:05] "GET / HTTP/1.1" 200 -
2016-03-13T15:00:41.66+0530 [App/0]      OUT off
2016-03-13T15:00:41.66+0530 [App/0]      ERR 75.126.37.74 - - [13/Mar/2016 09:30
:41] "POST /light/off HTTP/1.1" 302 -
2016-03-13T15:00:41.93+0530 [App/0]      ERR 169.54.180.77 - - [13/Mar/2016 09:3
0:41] "GET / HTTP/1.1" 200 -
2016-03-13T15:00:42.90+0530 [App/0]      OUT off
2016-03-13T15:00:42.91+0530 [App/0]      ERR 75.126.52.20 - - [13/Mar/2016 09:30
:42] "POST /light/off HTTP/1.1" 302 -
2016-03-13T15:00:43.16+0530 [App/0]      ERR 169.54.180.77 - - [13/Mar/2016 09:3
0:43] "GET / HTTP/1.1" 200 -
2016-03-13T15:05:57.10+0530 [App/0]      OUT off
2016-03-13T15:05:57.11+0530 [App/0]      ERR 169.55.202.148 - - [13/Mar/2016 09:
35:57] "POST /light/off HTTP/1.1" 302 -
2016-03-13T15:05:57.38+0530 [App/0]      ERR 169.55.202.148 - - [13/Mar/2016 09:
35:57] "GET / HTTP/1.1" 200 -
2016-03-13T15:06:02.35+0530 [App/0]      OUT on
2016-03-13T15:06:02.35+0530 [App/0]      ERR 169.55.202.148 - - [13/Mar/2016 09:
36:02] "POST /light/on HTTP/1.1" 302 -
2016-03-13T15:06:02.62+0530 [App/0]      ERR 169.45.162.88 - - [13/Mar/2016 09:3
6:02] "GET / HTTP/1.1" 200 -
2016-03-13T15:06:09.20+0530 [App/0]      OUT on
2016-03-13T15:06:09.20+0530 [App/0]      ERR 169.55.202.148 - - [13/Mar/2016 09:
36:09] "POST /light/on HTTP/1.1" 302 -
2016-03-13T15:06:09.47+0530 [App/0]      ERR 169.45.162.88 - - [13/Mar/2016 09:3
6:09] "GET / HTTP/1.1" 200 -
2016-03-13T15:06:12.03+0530 [App/0]      OUT off
2016-03-13T15:06:12.03+0530 [App/0]      ERR 169.45.162.88 - - [13/Mar/2016 09:3
6:12] "POST /light/off HTTP/1.1" 302 -
2016-03-13T15:06:12.31+0530

[App / 0] ERR 75.126.52.20 - - [13 / Mar / 2016 09:36 :12]“GET / HTTP / 1.1”200 -

0 个答案:

没有答案