Skip to content

Krong1997/tb-mqtt-virtual-device

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use

  1. install package

    npm i
    
  2. create .env file as follow

    HOST=${HOST}
    PORT=${PORT}
    PUBLISH_FREQUENCY=${SECONDS}
    TEST_TIME={TEST_TIME}
    
  3. There are two ways as follow:

    method A

    Create deviceList.json file in device folder.

    Add your device array as follow.

    [
      {
        "name": "name",
        "token": "token"
      },
      {
        "name": "name2",
        "token": "token2"
      }
    ]
    
    module.exports = deviceList;

    method B

    Use https://github.com/Krong1997/Set-device-to-TB to generate device list json file, and copy that to device folder.

  4. run test

    node index.js
    

About

virtual device can post data to thingsboard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published