aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2016-11-30 09:16:58 +0000
committerRomain Forlot <romain.forlot@iot.bzh>2016-11-30 09:16:58 +0000
commit7868113f24c78acfdb07120a72fc046effef6044 (patch)
treee5c8dbdd3d01ea1a406cca8b0815bb488c5f1bc5
parent78f856596ddd97870c979b7aa0c28db911d520f5 (diff)
Updated README with new set method
Change-Id: Ie0923ca6cf02115073052736de1bb980b5987f85 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--README.md20
-rw-r--r--qml/ClimateButton.qml2
-rw-r--r--qml/hvac-hybrid-qml-app.qml2
3 files changed, 15 insertions, 9 deletions
diff --git a/README.md b/README.md
index 64198b6..99f4915 100644
--- a/README.md
+++ b/README.md
@@ -74,18 +74,24 @@ Then test following verbs using api ***hvac***:
- ping : Ping the binder
- get_temp_left_zone : Get the left zone temperature
- get_temp_right_zone : Get the right zone temperature
- - set_temp_left_zone : Set the left zone temperature
- - set_temp_right_zone : Set the right zone temperature
- - set_fanspeed : Set fanspeed
- get_fanspeed : Read fan speed
- get_all : Read all values
+ - set : Set value(s)
```C
# afb-client-demo ws://localhost:<chosen_port>/api?token=<chosen_token>
-auth connect
-ON-REPLY 1:auth/connect: {"response":{"token":"A New Token and Session Context Was Created"},"jtype":"afb-reply","request":{"status":"success","token":"4dc950c6-856d-4cff-81e7-f914b4319008","uuid":"7a687f25-90db-4d4f-8881-2e505c151176"}}
hvac get_all
-ON-REPLY 2:hvac/get_all: {"response":{"LeftTemperature":21,"RightTemperature":21,"FanSpeed":0},"jtype":"afb-reply","request":{"status":"success"}}
-
+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_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}
+ON-REPLY 3:hvac/set: {"response":{"FanSpeed":23,"RightTemperature":55,"LeftTemperature":54},"jtype":"afb-reply","request":{"status":"success","info":"HVAC settings updated"}}
+hvac get_all
+ON-REPLY 4:hvac/get_all: {"response":{"LeftTemperature":54,"RightTemperature":55,"FanSpeed":23},"jtype":"afb-reply","request":{"status":"success"}}
+hvac set {"FanSpeed":23}
+ON-REPLY 5:hvac/set: {"response":{"FanSpeed":23},"jtype":"afb-reply","request":{"status":"success","info":"HVAC settings updated"}}
+hvac get_all
+ON-REPLY 6:hvac/get_all: {"response":{"LeftTemperature":54,"RightTemperature":55,"FanSpeed":23},"jtype":"afb-reply","request":{"status":"success"}}
```
+
TODO: QML files aren't modified to fit with bindings for now. They have to be modified to make hybrid application works.
diff --git a/qml/ClimateButton.qml b/qml/ClimateButton.qml
index 24802c7..b960361 100644
--- a/qml/ClimateButton.qml
+++ b/qml/ClimateButton.qml
@@ -26,5 +26,5 @@ Rectangle {
MouseArea {
anchors.fill: parent
onClicked: HVACModel[target] = !HVACModel[target]
- }
+ }
}
diff --git a/qml/hvac-hybrid-qml-app.qml b/qml/hvac-hybrid-qml-app.qml
index eded2d0..4472803 100644
--- a/qml/hvac-hybrid-qml-app.qml
+++ b/qml/hvac-hybrid-qml-app.qml
@@ -69,7 +69,7 @@ Window {
Button {
text: "Ping!"
onClicked: {
- request_str = '[' + msgid_enu.call + ',"99999","xxxxxx/ping", null ]';
+ request_str = '[' + msgid_enu.call + ',"99999","hvac/ping", null ]';
websocket.sendTextMessage (request_str)
}
anchors.horizontalCenter: parent.horizontalCenter