npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

kit-iot-4g

v2.8.0

Published

Kit Desenvolvimento IoT V2 - Telefonica Vivo

Downloads

26

Readme

Kit Desenvolvimento IoT 4G

NPM

Esse Kit foi desenvolvido pela Telefonica VIVO para estimular desenvolvedores a entrar no mundo do "Internet of Things".

Documentação

Como rodar o script

Temos algumas opções:

Para configurar as credencias (username, password, apikey e service)

$ kit-iot-4g --setup --username="your-user-name" --password="your-pass" --apikey="your-api-key" --service="your-service-name"

Para rodar sem mostrar log na linha de comando

$ kit-iot-4g

Para rodar mostrando as informações dos sensores na linha de comando

$ kit-iot-4g --show-log

Para rodar e abrir no navegador

$ kit-iot-4g --web

Para rodar e mostrar as credenciais que estão configuradas (username, password, apikey e service)

$ kit-iot-4g --show-credentials

Pins utilizados

Pins utilizados

  • Push Button - Digital 5
  • Capacitor - Digital 2 e 4
  • Luminosidade - Analógico A1
  • Temperatura - Analógico A0

API Rest

Para acessar as informações do seu Kit utilize a API Rest da nossa cloud. Lembre-se de substituir {token} pelo token enviado ao seu email no início do Hackathon.

GET: services/{token}/

Informações detalhadas do serviço.

URL: http://dca.telefonicabeta.com/m2m/v2/services/{token}/

Exemplo JSON de retorno:

{
  "data": {
    "GENERATED_UNIQUE_IDENTIFIER": "mz35b7lee217",
    "acl": {
      "user": "ApplicationManager",
      "description": "Deny All",
      "export": false,
      "subscription": false,
      "command": false,
      "query": false,
      "whiteList": [ ],
      "blackList": [ ],
      "waitingList": [ ],
      "creationTime": "2014-01-24T08:21:25Z"
    },
    "actions": [ ],
    "config": {
      "defaultStats": false,
      "normalizedParams": true,
      "notification": true,
      "qualityOfService": 1,
      "ruleEngine": "",
      "storage": {
        "expiryTime": 1000,
        "measures": true,
        "xml": false
      },
      "status": 1,
      "activate": "1",
      "rushIntervals": [
        3000,
        8000,
        15000
      ],
      "accumulateBy": [ ]
    },
    "creationTime": "2014-01-24T08:21:25Z",
    "description": "mz35b7lee217",
    "legacy": {
      "groupByUC": false
    },
    "name": "mz35b7lee216",
    "organizationId": "mz35b7lee217",
    "updateTime": "2014-01-24T08:21:25Z",
    "stats": {
      "devicesRegistered": 1,
      "trafficMessages": 84037,
      "storageSpaceMB": 11.14
    },
    "appId": 5161
  }
}

###GET: services/{token}/assets/{token}/ Retorna informações de um determinado asset de um determinado serviço.

URL: http://dca.telefonicabeta.com/m2m/v2/services/{token}/assets/{token}/

Exemplo JSON de retorno:

{
  "data": {
    "DeviceProps": {
    "commandURL": "http://localhost/",
    "manufacturer": "",
    "model": "",
    "serialNumber": "",
    "version": "",
    "lastIP": "200.158.222.39",
    "commands": true
  },
  "asset": {
    "name": "mz35b7lee217",
    "UserProps": [{
        "name": "nome",
        "value": "Vitor"
      }, {
        "name": "email",
        "value": "[email protected]"
      }, {
        "name": "tel",
        "value": "11942178564"
    }],
    "location": {
      "altitude": "",
      "latitude": "",
      "longitude": ""
    }
  },
  "creationTime": "2014-01-24T08:21:25Z",
  "isConcentrator": false,
  "model": "KITiot",
  "name": "mz35b7lee217",
  "registrationTime": "2014-01-24T08:21:25Z",
  "status": "Active",
  "sensorData": [{
      "st": "2014-09-26T17:23:46Z",
      "ms": {
        "v": 877,
        "p": "sound",
        "u": "cubicMeter"
      }
    }, {
      "ms": {
        "v": 27,
        "p": "temperature",
        "u": "kelvin"
      },
      "st": "2014-09-26T17:23:46Z"
    }, {
      "st": "2014-09-26T17:23:46Z",
      "ms": {
        "v": 36,
        "p": "relativeHumidity",
        "u": "dimensionless"
      }
    }, {
      "st": "2014-09-26T17:23:46Z",
      "ms": {
        "v": 0,
        "p": "amount",
        "u": "unit"
      }
    }, {
      "st": "2014-09-26T17:23:46Z",
      "ms": {
        "v": 679,
        "p": "luminousIntensity",
        "u": "candela"
      }
    }]
  }
}

GET: services/{token}/assets/{token}/data/

Retorna o histórico de dados recebidos de um determinado asset de um determinado serviço.

URL: http://dca.telefonicabeta.com/m2m/v2/services/{token}/assets/{token}/data/ parametros

  • limit *opcional
    • Total de registros para retornar por página. Caso não seja especificado, a API retornará todos os dados recebidos
  • sortBy *opcional
    • Ordena os dados (ascendente ou descendente) utilizando o campo informado. Os campos disponíveis são: assetName, assetType, ou registrationTime.
      • Exemplos:
        • sortBy=registrationTime
        • sortBy=!registrationTime

Exemplo JSON de retorno:

{
  "data": [{
    "st": "2014-03-13T18:30:04Z",
    "ms": {
      "v": 695,
      "p": "luminousIntensity",
      "u": "candela"
    },
    "pms": [{
      "v": "1",
      "p": "QoS",
      "u": ""
    }]
  }],
  "asset": "mz35b7lee217",
  "count": 84037
}