add test scripts and fix some mistakes

pull/1/head
Michael Zanetti 2013-12-31 02:33:14 +01:00
parent 2f75cdd3ad
commit efcecb0dd1
4 changed files with 11 additions and 0 deletions

View File

@ -120,6 +120,7 @@ QVariantMap JsonRPCServer::packDevice(Device *device)
triggers.append(trigger.id());
}
variant.insert("triggers", triggers);
variant.insert("params", device->params());
return variant;
}

4
tests/addconfigureddevice.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
# Creates a Mumbi remote
(echo '{"id":1, "method":"Devices.AddConfiguredDevice", "params":{"deviceClass": "{d85c1ef4-197c-4053-8e40-707aa671d302}", "deviceParams": {"channel1":"true", "channel2":"false", "channel3":"false", "channel4": "false", "channel5":"false" }}}'; sleep 1) | nc localhost 1234

3
tests/getconfigureddevices.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
(echo '{"id":1, "method":"Devices.GetConfiguredDevices"}'; sleep 1) | nc localhost 1234

3
tests/getsupporteddevices.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
(echo '{"id":1, "method":"Devices.GetSupportedDevices"}'; sleep 1) | nc localhost 1234