6brain
6brain is the core of the 6element sensors. It is responsible for data collection and transmission. It depense on [6sense](https://github.com/anthill/6sense) for data collection and [quipu](https://github.com/anthill/quipu) for transmission through sms.
Last updated 5 years ago by ants .
MIT · Original npm · Tarball · package.json
$ cnpm install 6brain 
SYNC missed versions from official npm registry.

6brain

6brain is the core of the 6element sensors. It is responsible for data collection and transmission. It depense on 6sense for data collection and quipu for transmission through sms.

Juste use node index.js to start everything. You should create a file called PRIVATE.json with this pattern:

{
    "connectInfo":
    {
        "host":"127.0.0.1",
        "port":1111,
        "name":"+33600000000",
        "smsServer":"+33611111111",
        "authorizedNumbers":["+33611111111", "+33622222222"],
        "smsMonitoring":false
    },
    "PIN":0000
}


  • connectInfo :

    • host : the tcp server which you want to connect to

    • port : the port of the tcp server

    • name : name of the sensor (phone number in the case of 6element)

    • smsServer : the phone number you want to send data to when smsMonitoring is true

    • authorizedNumbers : phone numbers which can send command to the sensor

    • smsMonitoring : true = send data by TCP + SMS, false = only TCP

  • PIN :

    The PIN number of the SIM card.

Commands

6brain not only pushed the data, it can respond to sms stimuli:

  • status send back a message with the current status
  • ip sends back the ip
  • openTunnel:2222:9632:kerrigan opens a reverse ssh tunnel toward kerrigan (must be set in ~/.ssh/config) and send a message once the tunnel is up.

Dockerizing

You can run everything in a container if you like. Careful the image is build for arm7 devices.

docker build -t=ants/6brain:v1 .
docker run -d --restart=always --privileged --net=host -v /dev:/dev ants/6brain:v1

Current Tags

  • 0.0.2                                ...           latest (5 years ago)

2 Versions

  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 7
Last Day 0
Last Week 3
Last Month 5
Dependencies (7)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |