Search in sources :

Example 1 with BinRpcRequest

use of org.openhab.binding.homematic.internal.binrpc.BinRpcRequest in project openhab1-addons by openhab.

the class BinRpcClient method getAllValues.

/**
     * {@inheritDoc}
     */
@Override
public Object[] getAllValues(HmInterface hmInterface) throws HomematicClientException {
    BinRpcRequest request = new BinRpcRequest("getAllValues");
    request.addArg(Boolean.TRUE);
    return (Object[]) sendMessage(hmInterface, request)[0];
}
Also used : BinRpcRequest(org.openhab.binding.homematic.internal.binrpc.BinRpcRequest)

Example 2 with BinRpcRequest

use of org.openhab.binding.homematic.internal.binrpc.BinRpcRequest in project openhab1-addons by openhab.

the class BinRpcClient method getDeviceDescription.

/**
     * {@inheritDoc}
     */
@SuppressWarnings("unchecked")
@Override
public Map<String, String> getDeviceDescription(HmInterface hmInterface, String address) throws HomematicClientException {
    BinRpcRequest request = new BinRpcRequest("getDeviceDescription");
    request.addArg(address);
    Object[] result = sendMessage(hmInterface, request);
    if (result != null && result.length > 0 && result[0] instanceof Map) {
        return (Map<String, String>) result[0];
    }
    return null;
}
Also used : BinRpcRequest(org.openhab.binding.homematic.internal.binrpc.BinRpcRequest) HashMap(java.util.HashMap) Map(java.util.Map)

Example 3 with BinRpcRequest

use of org.openhab.binding.homematic.internal.binrpc.BinRpcRequest in project openhab1-addons by openhab.

the class BinRpcClient method setSystemVariable.

/**
     * {@inheritDoc}
     */
@Override
public void setSystemVariable(HmInterface hmInterface, String name, Object value) throws HomematicClientException {
    BinRpcRequest request = new BinRpcRequest("setSystemVariable");
    request.addArg(name);
    request.addArg(value);
    sendMessage(hmInterface, request);
}
Also used : BinRpcRequest(org.openhab.binding.homematic.internal.binrpc.BinRpcRequest)

Example 4 with BinRpcRequest

use of org.openhab.binding.homematic.internal.binrpc.BinRpcRequest in project openhab1-addons by openhab.

the class BinRpcClient method init.

/**
     * {@inheritDoc}
     */
@Override
public void init(HmInterface hmInterface) throws HomematicClientException {
    BinRpcRequest request = new BinRpcRequest("init");
    request.addArg(context.getConfig().getBinRpcCallbackUrl());
    request.addArg(hmInterface.toString());
    sendMessage(hmInterface, request);
}
Also used : BinRpcRequest(org.openhab.binding.homematic.internal.binrpc.BinRpcRequest)

Example 5 with BinRpcRequest

use of org.openhab.binding.homematic.internal.binrpc.BinRpcRequest in project openhab1-addons by openhab.

the class BinRpcClient method setDatapointValue.

/**
     * {@inheritDoc}
     */
@Override
public void setDatapointValue(HmInterface hmInterface, String address, String datapointName, Object value) throws HomematicClientException {
    BinRpcRequest request = new BinRpcRequest("setValue");
    request.addArg(address);
    request.addArg(datapointName);
    request.addArg(value);
    sendMessage(hmInterface, request);
}
Also used : BinRpcRequest(org.openhab.binding.homematic.internal.binrpc.BinRpcRequest)

Aggregations

BinRpcRequest (org.openhab.binding.homematic.internal.binrpc.BinRpcRequest)8 HashMap (java.util.HashMap)2 Map (java.util.Map)2 HmRssiInfo (org.openhab.binding.homematic.internal.model.HmRssiInfo)1