diff options
author | Builder <devel@6b3797ab1e90> | 2016-12-02 14:00:05 +0000 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2016-12-02 14:05:35 +0000 |
commit | 0f2bcc5727f1873f0ff127cd92cfa4db40b74ec5 (patch) | |
tree | 9a87ce6bfa7b1dc8cf4663a9ea94842812b0a087 | |
parent | 738545a8ce8737fd919aeff4a7b1daec28aaada2 (diff) |
Fix README.md instructions
Change-Id: I7fdc01c247e319bbfb04ca6fdea2d7dfef2bb08f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r-- | README.md | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -24,7 +24,7 @@ Get into build directory under hvacplugin repo and build the widget: - cmake .. && make It will build the binding with QML Frontend and package all that into a wgt file -named : hvac-hybrid-qml.wgt +named : hvac-demo.wgt Install and test the widget -------------------------- @@ -34,35 +34,35 @@ Install and test the widget Transfer the wgt file on your platform with scp : ```C - $ scp hvac-hybrid-qml.wgt root@<your_porter_board>:/tmp + $ scp hvac-demo.wgt root@<your_porter_board>:/tmp ``` than install it using afm-util: ```C - # afm-util install /tmp/hvac-hybrid-qml.wgt - { "added": "hvac-hybrid-qml@0.1" } + # afm-util install /tmp/hvac-demo.wgt + { "added": "hvac-demo@0.1" } ``` ### Test -You can launch bindings using the afb-daemoni, starting them manually like this, +You can launch bindings using the afb-daemon, starting them manually like this, don't forget to change <chosen_port> and <chosen_token> by your choice using an unused port and a random number for the security token: ```C -# /usr/bin/afb-daemon --ldpaths=/usr/lib/afb:/usr/share/afm/applications/hvac-hybrid-qml/0.1/lib --mode=local --readyfd=8 --alias=/icons:/usr/share/afm/icons --port=<chosen_port> --rootdir=/usr/share/afm/applications/hvac-hybrid-qml/0.1 --roothttp=htdocs --token=<chosen_token> --sessiondir=/home/root/app-data/hvac-hybrid-qml/.afb-daemon & +# /usr/bin/afb-daemon --ldpaths=/usr/lib/afb:/usr/share/afm/applications/hvac-demo/0.1/lib --mode=local --alias=/icons:/usr/share/afm/icons --port=<chosen_port> --rootdir=/usr/share/afm/applications/hvac-demo/0.1 --roothttp=htdocs --token=<chosen_token> --sessiondir=/home/root/app-data/hvac-demo/.afb-daemon & NOTICE: binding [/usr/lib/afb/afb-dbus-binding.so] calling registering function afbBindingV1Register NOTICE: binding /usr/lib/afb/afb-dbus-binding.so loaded with API prefix dbus NOTICE: binding [/usr/lib/afb/authLogin.so] calling registering function afbBindingV1Register NOTICE: binding /usr/lib/afb/authLogin.so loaded with API prefix auth -NOTICE: binding [/usr/share/afm/applications/hvac-hybrid-qml/0.1/lib/hvac-hybrid-qml.so] calling registering function afbBindingV1Register -NOTICE: binding /usr/share/afm/applications/hvac-hybrid-qml/0.1/lib/hvac-hybrid-qml.so loaded with API prefix hvac -NOTICE: Waiting port=12357 rootdir=/usr/share/afm/applications/hvac-hybrid-qml/0.1 +NOTICE: binding [/usr/share/afm/applications/hvac-demo/0.1/lib/hvac-demo.so] calling registering function afbBindingV1Register +NOTICE: binding /usr/share/afm/applications/hvac-demo/0.1/lib/hvac-demo.so loaded with API prefix hvac +NOTICE: Waiting port=12357 rootdir=/usr/share/afm/applications/hvac-demo/0.1 NOTICE: Browser URL= http:/*localhost:12357 ``` -With bindings launched you can now test them using afm-demo-client as you have +With bindings launched you can now test them using afb-client-demo as you have to communicate with bindings using WebSocket protocol. When connection established you can dialog with binding using api/verbs from application framework and running bindings. At first, try to authenticate with ```auth @@ -75,13 +75,13 @@ Then test following verbs using api ***hvac***: - get_temp_left_zone : Get the left zone temperature - get_temp_right_zone : Get the right zone temperature - get_fanspeed : Read fan speed - - get_all : Read all values + - get : Read all values - set : Set value(s) ```C # afb-client-demo ws://localhost:<chosen_port>/api?token=<chosen_token> -hvac get_all -ON-REPLY 1:hvac/get_all: {"response":{"LeftTemperature":21,"RightTemperature":21,"FanSpeed":0},"jtype":"afb-reply","request":{"status":"success","uuid":"f6175a3f-f57a-49ae-80f5-d215abd6e24c"}} +hvac get +ON-REPLY 1:hvac/get: {"response":{"LeftTemperature":21,"RightTemperature":21,"FanSpeed":0},"jtype":"afb-reply","request":{"status":"success","uuid":"f6175a3f-f57a-49ae-80f5-d215abd6e24c"}} hvac get_temp_left_zone ON-REPLY 2:hvac/get_temp_left_zone: {"response":{"LeftTemperature":21},"jtype":"afb-reply","request":{"status":"success","info":"Left zone Temperature is:21 query=\"null\""}} hvac set {"FanSpeed":23, "RightTemperature": 55, "LeftTemperature": 54} |