Skip to content

IoTtalk/os-ScratchTalk

Repository files navigation

ScratchTalk

Required Systems


  1. os-IoTtalk
  2. os-AutoGen
  3. os-ScratchTalk

Prerequirements

  1. Configure https on your server
  2. Create the device model Scratch3 on your IoTtalk, containing idfs: Microphone-I (1-dim), Orientation-I (3-dim) and odfs: Horizontal-O (1-dim), Vertical-O (1-dim), Volume-O (1-dim).

Installation

  1. Download
$ git clone https://github.com/IoTtalk/os-ScratchTalk.git
$ cd os-cratchTalk
$ git submodule init
$ git submodule update --recursive
  1. Configurations In scratch-gui/src/components/library/library.jsx,line 21 set URL.
const serverName = "<ScratchTalk Address>"

In scratch-gui/config.js line 1, 2 set URLs.

exports.iottalkCSM = "<IoTtalk Address>";
exports.serverName = "<ScratchTalk Address>";

In scratch-vm/src/extensions/scratch3_iottalk/iottalk/config.js,line 1, 2 set URLs.

exports.iottalkCSM = "<IoTtalk Address>";
exports.serverName = "<ScratchTalk Address>";

In ScratchTalk-Subsystem/config.js, set URLs.

exports.serverName = "<ScratchTalk Server Domain Name>";
exports.serverPort = "<ScratchTalk Server Port>";
exports.autogenURL = "<AutoGen Address>/autogen/ccm_api";

exports.authIssuer = "<OAuth server URL>";
exports.authClientID = "<clientID>";
exports.authClientSecret = "<clientSecret>";
exports.authURI = "<OAuth Auth URI>";
exports.authCallbackURI = "<OAuth callback URI>";
exports.authTokenURI = "<URI for exchange token>";

In ScratchTalk-Subsystem/rc/js/main.js, line 2 set URL.

const csmURL = "https://<iottalk address>";

In ScratchTalk-Subsystem/rc/js/csmapi.js, line 2 set URL.

var ENDPOINT = "https://<iottalk address>";
  1. Run Scratch GUI (frontend)
$ cd ./scratch-vm && npm install && npm link

# Link the scratch-vm to GUI
$ cd ../scratch-gui && npm install && npm link scratch-vm
$ npm start
  1. Run ScratchTalk-Subsystem (backend)
$ cd ScratchTalkSubsystem
$ npm install
$ npm start
  1. DB setting (using sqlite as DB) In ScratchTalk-Subsystem/db/db.js
uncomment line 21 to 33 and comment line 7 to 18 and 44 to 50
  1. DB setting (using mysql as DB) In ScratchTalk-Subsystem/config.js
exports.dbHost = "<your_db_host>"; // eg: "localhost";
exports.dbUser = "<your_db_user>"; // eg: "root";
exports.dbPassword = "<your_db_passwd>"; // eg: "root";
exports.db = "<your_db_pawwsd>"; // eg:"scratchtalk";
  1. Setting IoTtalk user and password In ScratchTalk-Subsystem/config.js
exports.iottalkUser = "<your_iottalk_useer>" //eg: "scratchtalk"; 
exports.iottalkPassword = "<your_iottalkpasswd>" // eg: "scratchtalk"; 

TLS settings

In scratch-gui/webpack.config.js, add public in the devServer section.

devServer: {
    public: '<scratch GUI domain name>' // That solved it
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •