profile
viewpoint
Yazhong Liu yorkie @Rokid Learning & exploring

push eventRokid/docs

Deployment Bot (from Travis CI)

commit sha de3d421e555641a61c8a855817813fa68b66a0fb

Deploy Rokid/docs to github.com/Rokid/docs.git:gh-pages

view details

push time in 15 hours

Pull request review commentyodaos-project/yodart

ota-deletation: test on raw shell command delegation

 module.exports = function (api) {   var app = Application({     url: function url (url) {       switch (url.pathname) {-        case '/check_sys_upgrade':-          checkUpdateAvailability()-          break-        case '/check_sys_version':-          whatsCurrentVersion()-          break

Do we need to remove the above url supports?

legendecas

comment created time in 19 hours

Pull request review commentyodaos-project/yodart

ota-deletation: test on raw shell command delegation

+# OTA++## Downloading OTA System Image++It is a elaborated job to download system images and keep image integrity correct. To ease the process of OTA, yodart provides an plug-able OTA image downloader.++### `node /usr/yoda/services/otad/index.js`++`/usr/yoda/services/otad/index.js` takes following arguments:++#### --require++Execute `fetcher-command` and `integrity-command` as JavaScript programs.++#### --fetcher <fetcher-command>++`fetcher-command` would be executed with one argument of `system version`.++`fetcher-command` should output JSON-stringified OTA info to stdout and exit with code 0.++Example OTA info:+```json+{+  "imageUrl": "https://example.com",+  "version": "2.3.3",+  "integrity": "foobar"+}+```++#### --integrity <integrity-command>++`integrity-command` would be executed with two arguments of `image path`, `expected integrity`.++`integrity-command` should exit with code 0 on successful integrity check.++### Examples++#### Start download with info-json and md5sum++```bash+node /usr/yoda/services/otad/index.js --fetcher 'echo "{\"imageUrl\":\"https://example.com\",\"version\":\"2.3.3\",\"integrity\":\"09b9c392dc1f6e914cea287cb6be34b0\"}" #' --integrity "bash -c 'printf \"\$1  \$0\" | md5sum -c'"+```++### Get Download Result++`/usr/yoda/services/otad/index.js` would post flora message `yodaos.otad.event` with `['prepared', <ota-info-json>]` on successful download of image.++```typescript+interface OtaInfo {+  imageUrl: string+  version: string+  integrity: string+  imagePath: string+  status: 'downloading' | 'downloaded' | 'error'+}

It's better to describe the above fields more.

legendecas

comment created time in 19 hours

Pull request review commentyodaos-project/yodart

ota-deletation: test on raw shell command delegation

+# OTA++## Downloading OTA System Image++It is a elaborated job to download system images and keep image integrity correct. To ease the process of OTA, yodart provides an plug-able OTA image downloader.++### `node /usr/yoda/services/otad/index.js`++`/usr/yoda/services/otad/index.js` takes following arguments:++#### --require++Execute `fetcher-command` and `integrity-command` as JavaScript programs.++#### --fetcher <fetcher-command>++`fetcher-command` would be executed with one argument of `system version`.++`fetcher-command` should output JSON-stringified OTA info to stdout and exit with code 0.++Example OTA info:+```json+{+  "imageUrl": "https://example.com",+  "version": "2.3.3",+  "integrity": "foobar"+}+```++#### --integrity <integrity-command>++`integrity-command` would be executed with two arguments of `image path`, `expected integrity`.++`integrity-command` should exit with code 0 on successful integrity check.++### Examples++#### Start download with info-json and md5sum++```bash+iotjs /usr/yoda/services/otad/index.js --fetcher 'echo "{\"imageUrl\":\"https://example.com\",\"version\":\"2.3.3\",\"integrity\":\"09b9c392dc1f6e914cea287cb6be34b0\"}" #' --integrity "bash -c 'printf \"\$1  \$0\" | md5sum -c'"
node /usr/yoda/services/otad/index.js --fetcher 'echo "{\"imageUrl\":\"https://example.com\",\"version\":\"2.3.3\",\"integrity\":\"09b9c392dc1f6e914cea287cb6be34b0\"}" #' --integrity "bash -c 'printf \"\$1  \$0\" | md5sum -c'"
legendecas

comment created time in 19 hours

Pull request review commentyodaos-project/yodart

ota-deletation: test on raw shell command delegation

+# OTA++## Downloading OTA System Image++It is a elaborated job to download system images and keep image integrity correct. To ease the process of OTA, yodart provides an plug-able OTA image downloader.++### `iotjs /usr/yoda/services/otad/index.js`

Change to node?

legendecas

comment created time in 20 hours

push eventRokid/docs

Deployment Bot (from Travis CI)

commit sha a5ca326a24d53c46b5ef399c04a82e631f06b607

Deploy Rokid/docs to github.com/Rokid/docs.git:gh-pages

view details

push time in 2 days

startednumba/llvm-mirror

started time in 2 days

PullRequestEvent

pull request commentyodaos-project/ShadowNode

docs: Build contributing docs

@yorkie I don't consider this as a contributing document. It does contain guidance to build the ShadowNode from source. Would be great to have the BUILDING.md in ShadowNode.

This SGTM, and we could reference that at https://github.com/yodaos-project/ShadowNode#build.

Txiaozhe

comment created time in 2 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.reconnect = function() {   } }; +function _getLastPacketId() {+  return this._packetId;+};+ /**+ * @method getLastPacketId+ */+MqttClient.prototype.getLastPacketId = _getLastPacketId;++/**+ * for Backward-compatibility  * @method getLastMessageId

add @deprecated is good.

Txiaozhe

comment created time in 2 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.reconnect = function() {   } }; +function _getLastPacketId() {+  return this._packetId;+};+ /**+ * @method getLastPacketId+ */+MqttClient.prototype.getLastPacketId = _getLastPacketId;++/**+ * for Backward-compatibility  * @method getLastMessageId  */-MqttClient.prototype.getLastMessageId = function() {-  return this._msgId;-};+MqttClient.prototype.getLastMessageId = util.deprecate(_getLastPacketId, +  'getLastMessageId is deprecated, please remove this call.');
  'getLastMessageId is deprecated, please use `getLastPacketId` instead.');
Txiaozhe

comment created time in 2 days

pull request commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

@Txiaozhe You should add your tests to https://github.com/yodaos-project/ShadowNode/blob/master/test/testsets.json.

Txiaozhe

comment created time in 2 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.reconnect = function() { };  /**- * @method getLastMessageId+ * @method getLastPacketId  */-MqttClient.prototype.getLastMessageId = function() {-  return this._msgId;+MqttClient.prototype.getLastPacketId = function() {

Backward-compatibility is required.

Txiaozhe

comment created time in 2 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.disconnect = function(err) {  */ MqttClient.prototype.publish = function(topic, payload, options, callback) {   callback = callback || noop;+   if (!Buffer.isBuffer(payload)) {     payload = new Buffer(payload);   }+  var qos = this._getQoS(options && options.qos);   try {     var buf = this._handle._getPublish(topic, {-      id: this._msgId++,-      qos: (options && options.qos) || 0,+      id: qos === 0 ? 0 : this._getNewPacketId(),

At MQTT spec, the behavior needs to be unset if QoS is zero.

Txiaozhe

comment created time in 2 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.reconnect = function() {  * @method getLastMessageId  */ MqttClient.prototype.getLastMessageId = function() {

Change to getLastPacketId, and deprecates getLastMessageId?

Txiaozhe

comment created time in 2 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

+'use strict';++var mqtt = require('mqtt');+var assert = require('assert');+var bridge = 'mqtt://localhost:9080';++var opts = {+  reconnectPeriod: -1,+};++function connect(endpoint, opts) {+  return new Promise(function(resolve, reject) {+    var client = mqtt.connect(endpoint, opts);+    client.once('connect', function() {+      resolve(client);+    });+  });+}++connect(bridge, opts).then((babeee) => {+  babeee.subscribe('u/love1', (err) => {+    assert.strictEqual(babeee._getQoS(0), 0);+  });++  babeee.subscribe('u/love2', {+    qos: 1+  }, (err) => {+    assert.strictEqual(babeee._getQoS(1), 1);+  });++  babeee.subscribe('u/love3', {+    qos: 5+  }, (err) => {+    assert.strictEqual(babeee._getQoS(0), 0);+  });+});

Should assert on packetId, too.

Txiaozhe

comment created time in 2 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.disconnect = function(err) {  */ MqttClient.prototype.publish = function(topic, payload, options, callback) {   callback = callback || noop;+   if (!Buffer.isBuffer(payload)) {     payload = new Buffer(payload);   }+  var qos = this._getQoS(options && options.qos);   try {     var buf = this._handle._getPublish(topic, {-      id: this._msgId++,-      qos: (options && options.qos) || 0,+      id: qos === 0 ? 0 : this._getNewPacketId(),
      id: qos === 0 ? undefined : this._getNewPacketId(),
Txiaozhe

comment created time in 2 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.disconnect = function(err) {   this._socket.end(); }; +MqttClient.prototype._getQoS = function(qos) {
MqttClient.prototype._getQoS = function getQoS(val) {
Txiaozhe

comment created time in 2 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 var MQTT_PINGRESP = 13; var MQTT_DISCONNECT = 14; /* eslint-enable */ +var MAX_MSG_ID = 0xffff;
var MAX_PACKET_ID = 0xffff;
Txiaozhe

comment created time in 2 days

PR closed yodaos-project/ShadowNode

Reviewers
mqtt: fix mqtt error mqtt

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks. -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] npm test passes
  • [x] tests and/or benchmarks are included
  • [ ] documentation is changed or added
+60 -7

1 comment

2 changed files

Txiaozhe

pr closed time in 2 days

pull request commentyodaos-project/ShadowNode

mqtt: fix mqtt error

Closed because #533 is still working in progress.

Txiaozhe

comment created time in 2 days

PR closed yodaos-project/ShadowNode

docs: Build contributing docs meta

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks. -->

I have wrote a Contributing guide. And I want to make more supports for Contributors next.

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [ ] npm test passes
  • [ ] tests and/or benchmarks are included
  • [x] documentation is changed or added
+28 -0

1 comment

1 changed file

Txiaozhe

pr closed time in 2 days

pull request commentyodaos-project/ShadowNode

docs: Build contributing docs

As I mentioned above, this is a guide for building, not the contributing documentation like https://github.com/nodejs/node/blob/master/CONTRIBUTING.md, just closing this.

Txiaozhe

comment created time in 2 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.disconnect = function(err) {   this._socket.end(); }; +function getQoS(qos) {+  return Number.isNaN(qos) ? 0 : (qos >= 0 && qos <= 2 ? qos : 0);+}++MqttClient.prototype._nextMsgId = function() {+  if (this._msgId > MAX_MSG_ID) {+    this._msgId = 1;

Ok, seems good to me now.

Txiaozhe

comment created time in 3 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.disconnect = function(err) {  */ MqttClient.prototype.publish = function(topic, payload, options, callback) {   callback = callback || noop;+   if (!Buffer.isBuffer(payload)) {     payload = new Buffer(payload);   }+  var qos = getQoS(options && options.qos);   try {     var buf = this._handle._getPublish(topic, {-      id: this._msgId++,-      qos: (options && options.qos) || 0,+      id: qos === 0 ? 0 : this._nextMsgId(),

The id should be undefined(unset) if QoS is zero.

Txiaozhe

comment created time in 3 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.subscribe = function(topic, options, callback) {     callback = callback || noop;   }   try {+    var qos = getQoS(options && options.qos);     var buf = this._handle._getSubscribe(topic, {-      id: this._msgId++,-      qos: (options && options.qos) || 0,+      id: qos === 0 ? 0 : this._nextMsgId(),

Subscribe seems no need to check qos.

Txiaozhe

comment created time in 3 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.disconnect = function(err) {   this._socket.end(); }; +function getQoS(qos) {+  return Number.isNaN(qos) ? 0 : (qos >= 0 && qos <= 2 ? qos : 0);+}++MqttClient.prototype._nextMsgId = function() {

Suggestion: getNewPacketId()

Txiaozhe

comment created time in 3 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.disconnect = function(err) {   this._socket.end(); }; +function getQoS(qos) {+  return Number.isNaN(qos) ? 0 : (qos >= 0 && qos <= 2 ? qos : 0);+}++MqttClient.prototype._nextMsgId = function() {+  if (this._msgId > MAX_MSG_ID) {

How about renaming as _packetId?

Txiaozhe

comment created time in 3 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.disconnect = function(err) {   this._socket.end(); }; +function getQoS(qos) {+  return Number.isNaN(qos) ? 0 : (qos >= 0 && qos <= 2 ? qos : 0);+}++MqttClient.prototype._nextMsgId = function() {+  if (this._msgId > MAX_MSG_ID) {+    this._msgId = 1;

The spec shows the packet id won't be used, that implies us to store the range of identifiers used?

Txiaozhe

comment created time in 3 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 var MQTT_PINGRESP = 13; var MQTT_DISCONNECT = 14; /* eslint-enable */ +var MAX_MSG_ID = 65535;
var MAX_MSG_ID = 0xffff;
Txiaozhe

comment created time in 3 days

pull request commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

@Txiaozhe What you want to fix is documented here: https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901026.

These MQTT Control Packets are PUBLISH (where QoS > 0), PUBACK, PUBREC, PUBREL, PUBCOMP, SUBSCRIBE, SUBACK, UNSUBSCRIBE, UNSUBACK.

As the above description, I think we only check QoS at the .publish().

Each time a Client sends a new SUBSCRIBE, UNSUBSCRIBE,or PUBLISH (where QoS > 0) MQTT Control Packet it MUST assign it a non-zero Packet Identifier that is currently unused

Firstly we should make the packet id namely msgId to be a non-zero Two Byte Integer, and is currently unused. Otherwise we only need do SUBSCRIBE, UNSUBSCRIBE,or PUBLISH (where QoS > 0) MQTT.

Txiaozhe

comment created time in 3 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.subscribe = function(topic, options, callback) {   }   try {     var buf = this._handle._getSubscribe(topic, {-      id: this._msgId++,+      id: qosEqual0(options.qos) ? 0 : this._msgId++,       qos: (options && options.qos) || 0,

Subscribe's qos could be removed from this option, see https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901023, only the publish's qos is used at MQTT v5.0-spec.

Txiaozhe

comment created time in 3 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.unsubscribe = function(topic, callback) {   // TODO don't use try catch   try {     buf = this._handle._getUnsubscribe(topic, {-      id: this._msgId++,+      id: ++this._msgId,

There is not options argument here.

What I mean is that if the unsubscribe need qos option?

Txiaozhe

comment created time in 3 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.disconnect = function(err) {   this._socket.end(); }; +function qosEqual0(qos) {+  if (!qos || Number.isNaN(qos)) return false;

undefined has been covered at !qos

Txiaozhe

comment created time in 3 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.disconnect = function(err) {  */ MqttClient.prototype.publish = function(topic, payload, options, callback) {   callback = callback || noop;+  if (typeof options === 'function') {+    callback = options;+  }+   if (!Buffer.isBuffer(payload)) {     payload = new Buffer(payload);   }   try {     var buf = this._handle._getPublish(topic, {-      id: this._msgId++,+      id: qosEqual0(options && options.qos) ? 0 : ++this._msgId,

++ is not good way to represent, the root reason is that the msgId is starting from zero, could that start from 1 to fix this problem?

Txiaozhe

comment created time in 3 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.disconnect = function(err) {  */ MqttClient.prototype.publish = function(topic, payload, options, callback) {   callback = callback || noop;+  if (typeof options === 'function') {+    callback = options;+  }

This is unrelated, and it changes the API, revert this, please.

Txiaozhe

comment created time in 3 days

pull request commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

Note that adding a related label is also required if the PR is opened by collaborators.

Txiaozhe

comment created time in 3 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 Promise.all([   babeee.subscribe('u/love', common.mustCall(function() {     console.log('babeee subscribed u/love');     setTimeout(function() {-      yorkie.publish('u/love', 'endless');+      yorkie.publish('u/love', 'endless', common.mustCall(function() {+        console.log('yorkie published u/love');+      }));

What do you wanna test by this change?

Txiaozhe

comment created time in 3 days

pull request commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

Done, could please review it?

Where is the official spec to describe this? If those are protocol-specified feature, it's better to change at MQTTPacket.

Txiaozhe

comment created time in 3 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.unsubscribe = function(topic, callback) {   // TODO don't use try catch   try {     buf = this._handle._getUnsubscribe(topic, {-      id: this._msgId++,+      id: ++this._msgId,

QoS is missing here?

Txiaozhe

comment created time in 3 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.disconnect = function(err) {   this._socket.end(); }; +function qosEqual0(qos) {+  if (!qos || Number.isNaN(qos)) return false;+  return qos === 0;+}

And I'd like to add a normalizeOpts() function to replace this, we should use (options && options.qos) || 0.

Txiaozhe

comment created time in 3 days

Pull request review commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

 MqttClient.prototype.disconnect = function(err) {   this._socket.end(); }; +function qosEqual0(qos) {+  if (!qos || Number.isNaN(qos)) return false;

What the case that qos is NaN?

Txiaozhe

comment created time in 3 days

pull request commentyodaos-project/ShadowNode

mqtt: fix mqtt msgid err

The control packet of SUBSCRIBE, UNSUBSCRIBE and PUBLISH(QoS>0) must contains a nonzero packet identifier(look at doc 2.3.1) our code(e.e.: subscribe ):

var buf = this._handle._getSubscribe(topic, {
      id:  this._msgId++,
      qos: (options && options.qos) || 0,
});

The value of this._msgId will be 0 if we use this._msgId++ to generate the packet identifier and ++this._msgId is needed.

Could you please reference the official documentation?

Txiaozhe

comment created time in 3 days

push eventRokid/docs

Deployment Bot (from Travis CI)

commit sha 64e824af2699828a46273e31473bf90f8311463d

Deploy Rokid/docs to github.com/Rokid/docs.git:gh-pages

view details

push time in 4 days

pull request commentyodaos-project/yodart

fauna: application protocol

We should think about sharing client-side code between the C/C++ and JavaScript applications.

legendecas

comment created time in 4 days

delete branch yodaos-project/ShadowNode

delete branch : dependabot/npm_and_yarn/js-yaml-3.13.1

delete time in 5 days

push eventyodaos-project/ShadowNode

dependabot[bot]

commit sha 112b5452ae0c76ae325430fa5fc43f74211891af

build(deps): bump js-yaml from 3.12.0 to 3.13.1 (#532) Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.12.0 to 3.13.1. - [Release notes](https://github.com/nodeca/js-yaml/releases) - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/compare/3.12.0...3.13.1) Signed-off-by: dependabot[bot] <support@github.com>

view details

push time in 5 days

PR merged yodaos-project/ShadowNode

build(deps): bump js-yaml from 3.12.0 to 3.13.1 dependencies

Bumps js-yaml from 3.12.0 to 3.13.1. <details> <summary>Changelog</summary>

Sourced from js-yaml's changelog.

3.13.1 / 2019-04-05

  • Fix possible code execution in (already unsafe) .load(), #480.

3.13.0 / 2019-03-20

  • Security fix: safeLoad() can hang when arrays with nested refs used as key. Now throws exception for nested arrays. #475.

3.12.2 / 2019-02-26

  • Fix noArrayIndent option for root level, #468.

3.12.1 / 2019-01-05

  • Added noArrayIndent option, #432. </details> <details> <summary>Commits</summary>

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

</details>

+2 -2

0 comment

1 changed file

dependabot[bot]

pr closed time in 5 days

push eventRokid/docs

Deployment Bot (from Travis CI)

commit sha 313f8b9fac96bc1280ed10b3da3b1539f6a56f3a

Deploy Rokid/docs to github.com/Rokid/docs.git:gh-pages

view details

push time in 6 days

push eventRokid/docs

Deployment Bot (from Travis CI)

commit sha ff3cad29ca8003bf2f48745dfb040060efd46a37

Deploy Rokid/docs to github.com/Rokid/docs.git:gh-pages

view details

push time in 7 days

push eventRokid/docs

Deployment Bot (from Travis CI)

commit sha e9e54e81fb75db5fd4db0e3d8d876b2696da3594

Deploy Rokid/docs to github.com/Rokid/docs.git:gh-pages

view details

push time in 9 days

push eventRokid/docs

Deployment Bot (from Travis CI)

commit sha 448c892596c5299b55660ba17fede50f695819cf

Deploy Rokid/docs to github.com/Rokid/docs.git:gh-pages

view details

push time in 10 days

push eventRokid/docs

Deployment Bot (from Travis CI)

commit sha 334d3c5c4636dd7aecb58f162842fcf038950766

Deploy Rokid/docs to github.com/Rokid/docs.git:gh-pages

view details

push time in 11 days

push eventRokid/docs

Deployment Bot (from Travis CI)

commit sha f0ccdf488b3d6065905c37cb5823a26757c61721

Deploy Rokid/docs to github.com/Rokid/docs.git:gh-pages

view details

push time in 13 days

Pull request review commentyodaos-project/yodart

cloud-player: add playback control support

 var Application = require('@yodaos/application').Application-var AudioFocus = require('@yodaos/application').AudioFocus-var speechSynthesis = require('@yodaos/speech-synthesis').speechSynthesis-var MediaPlayer = require('@yoda/multimedia').MediaPlayer var flora = require('@yoda/flora') var _ = require('@yoda/util')._ var logger = require('logger')('cloud-player') -var FloraUri = 'unix:/var/run/flora.sock#cloud-player'-var GetStreamChannel = 'yodaos.apps.cloud-player.get-stream-channel'-var MultimediaStatusChannel = 'yodaos.apps.multimedia.playback-status'-var TtsStatusChannel = 'yodaos.apps.cloud-player.tts.status'--var StatusCode = {-  start: 0,-  end: 1,-  cancel: 2,-  error: 3-}+var constant = require('./constant')+var FloraUri = constant.FloraUri  var app = Application({   created: function created () {+    this.voices = []     this.agent = new flora.Agent(FloraUri)     this.agent.start()   },   url: function url (urlObj) {     logger.info('received url', require('url').format(urlObj))

But the url.format() takes a little bit performance hurt, why not only printing this object?

legendecas

comment created time in 13 days

Pull request review commentyodaos-project/ShadowNode

Build contributing docs

+# Contributing to ShadowNode++## Overview+ShadowNode is one of the Node.js runtimes in shadow, support for most [Node.js API](https://nodejs.org/en/docs/) such as `Event`, `Module` and `N-API`. We plan to support the most of packages in NPM for Node.js in the future. If you are interested in joining it, we will welcome it very much.++## Getting and Building+Firstly, you can only build it in Linux and MacOS now.+1. Install the following prerequisites, as necessary:+  - The tools needed to build ShadowNode from scratch:+    - Standard C development headers+    - Git 1.9++    - CMake 3.1++    - Node.js and NPM+    - DBus(Ubuntu is Builted-in)++Note that at least 4GB of RAM is required to build from source and run tests.++2. Get the ShadowNode code:+```shell+$ git clone https://github.com/yodaos-project/ShadowNode.git+```++3. Run Build+You can have a look at the `package.json` file and get the build script.+```shell+$ npm run build # tools/build.py+```++And if you are in MacOS and install the `DBus` yourself, you need appoint the include-dir of `DBus` by the `--external-include-dir` flag:

MacOS -> macOS

Txiaozhe

comment created time in 13 days

Pull request review commentyodaos-project/ShadowNode

Build contributing docs

+# Contributing to ShadowNode++## Overview+ShadowNode is one of the Node.js runtimes in shadow, support for most [Node.js API](https://nodejs.org/en/docs/) such as `Event`, `Module` and `N-API`. We plan to support the most of packages in NPM for Node.js in the future. If you are interested in joining it, we will welcome it very much.++## Getting and Building+Firstly, you can only build it in Linux and MacOS now.+1. Install the following prerequisites, as necessary:+  - The tools needed to build ShadowNode from scratch:+    - Standard C development headers+    - Git 1.9++    - CMake 3.1++    - Node.js and NPM+    - DBus(Ubuntu is Builted-in)++Note that at least 4GB of RAM is required to build from source and run tests.++2. Get the ShadowNode code:+```shell+$ git clone https://github.com/yodaos-project/ShadowNode.git+```++3. Run Build+You can have a look at the `package.json` file and get the build script.+```shell+$ npm run build # tools/build.py

No need to comment it's alias command

Txiaozhe

comment created time in 13 days

Pull request review commentyodaos-project/ShadowNode

Build contributing docs

+# Contributing to ShadowNode++## Overview+ShadowNode is one of the Node.js runtimes in shadow, support for most [Node.js API](https://nodejs.org/en/docs/) such as `Event`, `Module` and `N-API`. We plan to support the most of packages in NPM for Node.js in the future. If you are interested in joining it, we will welcome it very much.++## Getting and Building+Firstly, you can only build it in Linux and MacOS now.+1. Install the following prerequisites, as necessary:+  - The tools needed to build ShadowNode from scratch:+    - Standard C development headers+    - Git 1.9++    - CMake 3.1++    - Node.js and NPM+    - DBus(Ubuntu is Builted-in)++Note that at least 4GB of RAM is required to build from source and run tests.

Why does the 4GB is required?

Txiaozhe

comment created time in 13 days

Pull request review commentyodaos-project/ShadowNode

Build contributing docs

+# Contributing to ShadowNode++## Overview+ShadowNode is one of the Node.js runtimes in shadow, support for most [Node.js API](https://nodejs.org/en/docs/) such as `Event`, `Module` and `N-API`. We plan to support the most of packages in NPM for Node.js in the future. If you are interested in joining it, we will welcome it very much.

ShadowNode is one of the Node.js runtimes in shadow

Change the "in shadow" to "for edge device".

Txiaozhe

comment created time in 13 days

MemberEvent

push eventRokid/docs

Deployment Bot (from Travis CI)

commit sha 4fac535f091057af130ac81c65c41361b1c07181

Deploy Rokid/docs to github.com/Rokid/docs.git:gh-pages

view details

push time in 14 days

Pull request review commentyodaos-project/yodart

cloud-player: add playback control support

 var Application = require('@yodaos/application').Application-var AudioFocus = require('@yodaos/application').AudioFocus-var speechSynthesis = require('@yodaos/speech-synthesis').speechSynthesis-var MediaPlayer = require('@yoda/multimedia').MediaPlayer var flora = require('@yoda/flora') var _ = require('@yoda/util')._ var logger = require('logger')('cloud-player') -var FloraUri = 'unix:/var/run/flora.sock#cloud-player'-var GetStreamChannel = 'yodaos.apps.cloud-player.get-stream-channel'-var MultimediaStatusChannel = 'yodaos.apps.multimedia.playback-status'-var TtsStatusChannel = 'yodaos.apps.cloud-player.tts.status'--var StatusCode = {-  start: 0,-  end: 1,-  cancel: 2,-  error: 3-}+var constant = require('./constant')+var FloraUri = constant.FloraUri  var app = Application({   created: function created () {+    this.voices = []     this.agent = new flora.Agent(FloraUri)     this.agent.start()   },   url: function url (urlObj) {     logger.info('received url', require('url').format(urlObj))
    logger.info('received url', url.href)

Does this work?

legendecas

comment created time in 15 days

Pull request review commentyodaos-project/yodart

cloud-player: add playback control support

 var Application = require('@yodaos/application').Application-var AudioFocus = require('@yodaos/application').AudioFocus-var speechSynthesis = require('@yodaos/speech-synthesis').speechSynthesis-var MediaPlayer = require('@yoda/multimedia').MediaPlayer var flora = require('@yoda/flora') var _ = require('@yoda/util')._ var logger = require('logger')('cloud-player') -var FloraUri = 'unix:/var/run/flora.sock#cloud-player'-var GetStreamChannel = 'yodaos.apps.cloud-player.get-stream-channel'-var MultimediaStatusChannel = 'yodaos.apps.multimedia.playback-status'-var TtsStatusChannel = 'yodaos.apps.cloud-player.tts.status'--var StatusCode = {-  start: 0,-  end: 1,-  cancel: 2,-  error: 3-}+var constant = require('./constant')+var FloraUri = constant.FloraUri  var app = Application({   created: function created () {+    this.voices = []

Could this be as a map? It simplifies the getVoice()?

legendecas

comment created time in 15 days

push eventRokid/docs

Deployment Bot (from Travis CI)

commit sha 12b3b0ef1af43d190d4a110b931e03ecef93b23c

Deploy Rokid/docs to github.com/Rokid/docs.git:gh-pages

view details

push time in 16 days

startedlandley/toybox

started time in 16 days

pull request commentyodaos-project/ShadowNode

build(deps): bump fstream from 1.0.11 to 1.0.12

Seems there is an error:

AssertionError: {"actual":1,"expected":0,"operator":"==="}
    at AssertionError (/Users/travis/build/yodaos-project/ShadowNode/src/js/assert.js.wrapped:42:1)
    at fail (/Users/travis/build/yodaos-project/ShadowNode/src/js/assert.js.wrapped:69:1)
    at strictEqual (/Users/travis/build/yodaos-project/ShadowNode/src/js/assert.js.wrapped:95:1)
    at undefined (/Users/travis/build/yodaos-project/ShadowNode/test/run_pass/test_dgram_multicast_set_multicast_loop.js:44:20)
    at undefined (/Users/travis/build/yodaos-project/ShadowNode/src/js/events.js.wrapped:57:31)
    at undefined (/Users/travis/build/yodaos-project/ShadowNode/src/js/iotjs.js.wrapped:446:22)
    at undefined (/Users/travis/build/yodaos-project/ShadowNode/src/js/iotjs.js.wrapped:491:18)
    at _onUncaughtException (/Users/travis/build/yodaos-project/ShadowNode/src/js/iotjs.js.wrapped:68:3)
dependabot[bot]

comment created time in 16 days

pull request commentyodaos-project/yodart

test: update test-local

@fanchengwen Great, may I ask you to document at https://github.com/yodaos-project/yodart/tree/master/test, too?

fanchengwen

comment created time in 17 days

Pull request review commentyodaos-project/ShadowNode

tuv: make loops and watchers usable after fork()

 int uv__platform_loop_init(uv_loop_t* loop) { }  +int uv__io_fork(uv_loop_t* loop) {+  int err;+  void* old_watchers;++  old_watchers = loop->inotify_watchers;++  uv__close(loop->backend_fd);+  loop->backend_fd = -1;+  uv__platform_loop_delete(loop);++  err = uv__platform_loop_init(loop);+  if (err)+    return err;++  return 0;+  // TODO: inotify not enabled+  // return uv__inotify_fork(loop, old_watchers);

Is this comment from libuv?

legendecas

comment created time in 17 days

Pull request review commentyodaos-project/ShadowNode

tuv: make loops and watchers usable after fork()

 CMAKE_DEFINES   := \ 	-DCMAKE_BUILD_TYPE=$(TUV_BUILD_TYPE) \ 	-DTARGET_PLATFORM=$(TUV_PLATFORM) \ 	-DBUILDTESTER=${TUV_BUILDTESTER} \-	-DBUILD_HOST_HELPER=${TUV_BUILDHOSTHELPER}+	-DBUILD_HOST_HELPER=${TUV_BUILDHOSTHELPER} \+	-DTUV_FEATURE_PROCESS=ON

Where is the define used?

legendecas

comment created time in 17 days

push eventRokid/docs

Deployment Bot (from Travis CI)

commit sha 9092218bd60b516ad21e3f40028a3d6e2b5e08e3

Deploy Rokid/docs to github.com/Rokid/docs.git:gh-pages

view details

push time in 17 days

startedmanuel-serrano/hop

started time in 18 days

startedinnative-sdk/innative

started time in 18 days

delete branch yodaos-project/ShadowNode

delete branch : build

delete time in 18 days

push eventyodaos-project/yodart

legendecas

commit sha b3736a8fd29a6a231bff273256e2a4f9a4f7e6ef

audio-focus: broadcast focus shifts (#746)

view details

push time in 18 days

PR merged yodaos-project/yodart

audio-focus: broadcast focus shifts audio

Expose audio focus shifting broadcast to apps so that apps like launcher could automatically close wake-up engine on TRANSIENT_EXCLUSIVE focus got granted.

Related: https://github.com/yodaos-project/yoda-book/pull/8

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] npm test passes
  • [x] tests and/or benchmarks are included
  • [ ] documentation is changed or added
+219 -13

1 comment

3 changed files

legendecas

pr closed time in 18 days

push eventRokid/docs

Deployment Bot (from Travis CI)

commit sha 0a4c457589654d6a922f39fad3a129e6b83a0111

Deploy Rokid/docs to github.com/Rokid/docs.git:gh-pages

view details

push time in 19 days

delete branch yodaos-project/ShadowNode

delete branch : get_properties

delete time in 19 days

push eventyodaos-project/website

yorkie

commit sha f4f8ce35c8dcc046c250103ec17f82fed33429af

use different hostname

view details

push time in 20 days

push eventyodaos-project/website

yorkie

commit sha d48f5d547a52d6b4a6cb78f6f8cb98d1b9df5fea

nginx: bypass the pathname

view details

push time in 20 days

push eventyodaos-project/website

yorkie

commit sha a2070f5af11898c4f8c35eba15cf7d92529e5b72

nginx: tweak the turns

view details

push time in 20 days

push eventyodaos-project/website

yorkie

commit sha 96874007cfa7085099c625b92d47284ca5e1a893

add /sourcecode location

view details

push time in 20 days

push eventyodaos-project/yodaos

circle ci

commit sha c18dc8f76ec07b53cfa0a002cea786a85cf1943d

specify the ssh identify file when checking

view details

push time in 20 days

push eventyodaos-project/yodaos

circle ci

commit sha ea4df5592f7d23dc79483d2d8eec1c1b1767a0fe

remove chown commands

view details

push time in 20 days

push eventyodaos-project/yodaos

circle ci

commit sha 79bb6f287bc6a8e304ead1ff53f867fd2788b613

add HOST_UID to permission setup

view details

push time in 20 days

push eventyodaos-project/yodaos

circle ci

commit sha 4e18a8f17bfc13825850743c96fb9651142315e8

add Dockerfile for downloading source

view details

push time in 20 days

pull request commentyodaos-project/ShadowNode

build(deps): bump tar from 2.2.1 to 2.2.2 in /test/deps

There are some problems about 'tar' with compiling in yodaos, it is the same one? @yorkie

Nope, this is only related to JavaScript land, what you were met is for the ubuntu tar package.

dependabot[bot]

comment created time in 20 days

push eventRokid/docs

Deployment Bot (from Travis CI)

commit sha 103f329010b903c9aab470b6839a3970d414934a

Deploy Rokid/docs to github.com/Rokid/docs.git:gh-pages

view details

push time in 21 days

push eventRokid/docs

Deployment Bot (from Travis CI)

commit sha de7eb00c35be7ff0cae208e4ef8ded8b6eb9d99d

Deploy Rokid/docs to github.com/Rokid/docs.git:gh-pages

view details

push time in 22 days

issue closedyodaos-project/yodart

product: the key to resume/pause media

At alexa's Functional Requirements for voice-first device, it says:

Your product SHALL allow customers to resume paused media using a voice request or a physical control.

It seems that we don't have this yet, @stan24 @Amber-Rokid how do you think about figuring out some way to control the media by default? As to me, that's meaningful when the voice occurs wrong :)

closed time in 22 days

yorkie

issue commentyodaos-project/yodart

product: the key to resume/pause media

This has been implemented at #728 and will land on v7.27.x :p

yorkie

comment created time in 22 days

issue closedyodaos-project/yodart

network: config ssid/psk unexpected wrong key

<!-- Thank you for reporting a possible bug in YodaRT.

Please fill in as much of the template below as you can.

Version: output of getprop | grep ro.rokid.build.yodaos | awk '{ print $2 }' Platform: output of uname -a Subsystem: if known, please specify the affected core module name

If possible, please provide code that demonstrates the problem, keeping it as simple and free of external dependencies as you can. -->

  • Version: 7.31.0
  • Platform: a113
  • Subsystem: network

<!-- Please provide more details below this comment. -->

closed time in 22 days

yorkie

issue closedyodaos-project/yodart

build: request to integrate the build check on CI

Currently we don't have checks on build C/C++ source code.

closed time in 22 days

yorkie

issue closedyodaos-project/yodart

manifest: skillId shall be optional in hosts declarations

Is your feature request related to a problem? Please describe. In simple native apps with no NLP declaration, url is the only entry of the app. Currently skillId is required in hosts declaration, which is redundant to these apps.

Describe the solution you'd like SkillId shall be optional to these apps. If no skillId is given in host declaration, the url shall be forced to be non-preemptive on openUrl.

closed time in 22 days

legendecas

issue commentyodaos-project/yodart

manifest: skillId shall be optional in hosts declarations

Staled, skill has been removed from v8.0 :)

legendecas

comment created time in 22 days

issue closedyodaos-project/yodart

website: correct the source link to github

See https://github.com/Rokid/YodaRT/blob/master/website/index.html.

Reported by @algebrait

closed time in 22 days

yorkie

issue commentyodaos-project/yodart

n-api: track modules which are not in N-API

Leaves the Input module only.

yorkie

comment created time in 22 days

issue closedyodaos-project/yodart

feature request: standby light

Is your feature request related to a problem? Please describe. A light effect that indicates YodaOS devices are powered on and alive could be available through configuration.

closed time in 22 days

legendecas
more