![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
HomeMatic xmlrpc_bin:// protocol server and client
For use with CCU1/2 (rfd, hs485d, Rega), Homegear and CUxD
Implements the same interface as homematic-xmlrpc, these 2 libs should be a 1:1 drop-in-replacement for each other.
Breaking Change in v3.0.0: To be consistent with homematic-xmlrpc the RPC client isn't an event emitter anymore. All errors have to be handled through the methodCall callback.
Change in v2.1.0 To be consistent with homematic-xmlrpc you don't have to wait for the client connect event before using methodCall.
Breaking change in v2.0.0: system.multicall
isn't resolved in single calls anymore. This should be
done by the application itself and was removed to be consistent with
homematic-xmlrpc.
Switch on the Channel LEQ0134153:1
var rpc = require('binrpc');
var rpcClient = rpc.createClient({host: '192.168.1.100', port: '2001'});
rpcClient.methodCall('setValue', ['LEQ0134153:1', 'STATE', true], function (err, res) {
console.log('response', err, JSON.stringify(res));
});
For a full example on how to subscribe to CCU events see example.js
Client
RPC client factory
Kind: static method of binrpc
Param | Type | Default | Description |
---|---|---|---|
options | object | ||
options.host | string | the hostname or ip address to connect to | |
options.port | number | the port to connect to | |
[options.reconnectTimeout] | number | 2500 | wait milliseconds until trying to reconnect after the socket was closed |
[options.responseTimeout] | number | 5000 | wait milliseconds for method call response |
[options.queueMaxLength] | number | 15 | maximum number of methodCalls that are allowed in the queue |
Server
RPC server factory
Kind: static method of binrpc
Param | Type | Description |
---|---|---|
options | object | |
options.host | string | ip address on which the server should listen |
options.port | number | port on which the server should listen |
onListening | function | function to be invoked in the server's listening callback |
Array
number
number
boolean
number
Array
The request queue. Array elements must be objects with the properties buffer and callback
Kind: instance property of client
number
Maximum queue length. If queue length is greater than this a methodCall will return error 'You are sending too fast'
Kind: instance property of client
number
Time in milliseconds. How long to wait for retry if a request is pending
Kind: instance property of client
boolean
Indicates if there is a request waiting for its response
Kind: instance property of client
number
Time in milliseconds. How long to wait for a method call response
Kind: instance property of client
connect
Kind: instance method of client
Push request to the queue
Kind: instance method of client
Param | Type |
---|---|
buf | buffer |
cb | function |
Shift request from the queue and write it to the socket.
Kind: instance method of client
methodCall
Kind: instance method of client
Param | Type | Description |
---|---|---|
method | string | |
params | Array | |
callback | function | optional - if omitted an empty string will be send as response |
Buffer
Buffer
Buffer
Buffer
Buffer
Buffer
Buffer
Buffer
Buffer
Buffer
object
object
object
object
object
object
*
*
Array
*
Buffer
encode requests
Kind: static method of protocol
Param | Type | Description |
---|---|---|
method | string | throws error if not type string or if string is empty |
data | * | optional - defaults to an empty array |
Buffer
encode response
Kind: static method of protocol
Param | Type | Description |
---|---|---|
data | * | optional - defaults to empty string |
Buffer
encode data
Kind: static method of protocol
Param | Type | Description |
---|---|---|
obj | * | throws TypeError if obj is undefined or null |
Buffer
encode struct
Kind: static method of protocol
Param | Type | Description |
---|---|---|
obj | object | throws error if not of type object |
Buffer
encode struct key
Kind: static method of protocol
Param | Type | Description |
---|---|---|
str | string | throws error if not of type string |
Buffer
encode array
Kind: static method of protocol
Param | Type | Description |
---|---|---|
arr | array | throws error if not instance of Array |
Buffer
encode string
Kind: static method of protocol
Param | Type | Description |
---|---|---|
str | string | throws error if not of type string |
Buffer
encode bool
Kind: static method of protocol
Param | Type | Description |
---|---|---|
b | * | any type |
Buffer
encode integer
Kind: static method of protocol
Param | Type | Description |
---|---|---|
i | number | throws error if not a number or if out of range (min=-2147483648 max=2147483647) |
Buffer
encode double
Kind: static method of protocol
Param | Type | Description |
---|---|---|
d | number | throws error if not a number |
object
decode double
Kind: static method of protocol
Returns: object
- properties content and rest
Param | Type | Description |
---|---|---|
elem | Buffer | throws error if not an instance of Buffer or if length <8 |
object
decode string
Kind: static method of protocol
Returns: object
- properties content and rest
Param | Type | Description |
---|---|---|
elem | Buffer | throws error if not an instance of Buffer or if length <4 |
object
decode double
Kind: static method of protocol
Returns: object
- properties content and rest
Param | Type | Description |
---|---|---|
elem | Buffer | throws error if not an instance of Buffer or if length <8 |
object
decode integer
Kind: static method of protocol
Returns: object
- properties content and rest
Param | Type | Description |
---|---|---|
elem | Buffer | throws error if not an instance of Buffer or if length <4 |
object
decode array
Kind: static method of protocol
Returns: object
- properties content and rest
Param | Type | Description |
---|---|---|
elem | Buffer | throws error if not an instance of Buffer or if length <4 |
object
decode struct
Kind: static method of protocol
Returns: object
- properties content and rest
Param | Type | Description |
---|---|---|
elem | Buffer | throws error if not an instance of Buffer or if length <4 |
*
decodes binary data
Kind: static method of protocol
Param | Type |
---|---|
data | Buffer |
*
decode response
Kind: static method of protocol
Param | Type | Description |
---|---|---|
data | Buffer | throws TypeError if data is no instance of Buffer |
Array
decode "strange" request
Kind: static method of protocol
Param | Type | Description |
---|---|---|
data | Buffer | throws TypeError if data is no instance of Buffer |
*
decode request
Kind: static method of protocol
Param | Type | Description |
---|---|---|
data | Buffer | throws TypeError if not instance of Buffer |
Param | Type | Default | Description |
---|---|---|---|
options | object | ||
options.host | string | the hostname or ip address to connect to | |
options.port | number | the port to connect to | |
[options.reconnectTimeout] | number | 2500 | wait milliseconds until trying to reconnect after the socket was closed |
[options.responseTimeout] | number | 5000 | wait milliseconds for method call response |
[options.queueMaxLength] | number | 15 | maximum number of methodCalls that are allowed in the queue |
Kind: global class
Param | Type | Description |
---|---|---|
options | object | |
options.host | string | ip address on which the server should listen |
options.port | number | port on which the server should listen |
onListening | function | function to be invoked in the server's listening callback |
Fires when RPC method call is received
Kind: event emitted by Server
Param | Type | Description |
---|---|---|
error | * | |
params | array | |
callback | function | callback awaits params err and response |
Fires if a RPC method call has no event handler. RPC response is always an empty string.
Kind: event emitted by Server
Param | Type |
---|---|
method | string |
params | array |
The MIT License (MIT)
Copyright (c) 2014-2018 Sebastian 'hobbyquaker' Raff and Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
HomeMatic binary RPC protocol - xmlrpc_bin://
The npm package binrpc receives a total of 912 weekly downloads. As such, binrpc popularity was classified as not popular.
We found that binrpc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.