0.0.1 • Published 9 months ago

loop-adam-6000 v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

LOOP ADAM 6000

For ADAM relay control library

support device

  • ADAM 6060

2023.8.1

prepare install

  • nodejs >= 18
  • yarn

install

npm

$ npm install loop-adam-6000

yarn

$ yarn add loop-adam-6000

list

  • host: target host
  • port: target port
  • username: http auth username
  • password: http auth password
  • timeout: miliseconds

example

import { AdamOptions, useApi } from 'loop-adam-6000'

const options: AdamOptions = {
	host: 'localhost',
	port: 4000,
	username: 'admin',
	password: '12345678',
	timeout: 3000, // miliseconds
}
const { getData, setData } = useApi()

const rs = await getData(options)
console.log(rs) // [true, false, false, true, false, false, false, true]

const rs = await setData(options, [
	true,
	true,
	false,
	true,
	false,
	false,
	false,
	true,
])
console.log(rs) // OK
0.0.1

9 months ago