IoTホームキットの"距離センサーを使う"でセンサーの前を素早く通過させるとObnizが再起動する



  • https://obniz.com/ja/doc/guides/iot-home-kit/distance
    こちらのドキュメント通りブロックを組み立て、距離センサーの前に素早く物を通過させると、Obnizが再起動する事象が発生したので共有します。
    https://photos.app.goo.gl/ctGobGNXZcW8ef6v6

    ループにwaitを1秒ほど入れると問題なく動くようになりましたので、プログラム側で回避が可能でした。

    Obniz ID:3584-4045
    OS:obnizb1 3.4.5
    発生時刻:2021/05/29 16:05頃
    コンソールエラー:

    obniz.js:15406 Uncaught (in promise) Error: pwm1 is not started
        at PeripheralPWM.pulse (VM9824 obniz.js:15406)
        at ServoMotor.angle (VM9824 obniz.js:48525)
        at IoTHomeKit.flag (VM9814 index.js:126)
        at eval (eval at <anonymous> (run?obniz_id=3584-4045:21), <anonymous>:13:18)
    pulse @ obniz.js:15406
    angle @ obniz.js:48525
    flag @ index.js:126
    eval @ VM14747:13
    async function (async)
    eval @ VM14747:6
    eval @ VM14747:17
    (anonymous) @ run?obniz_id=3584-4045:115
    Promise.then (async)
    (anonymous) @ run?obniz_id=3584-4045:106
    obniz.js:18472 WebSocket connection to 'wss://obniz.io/obniz/3584-4045/ws/1?obnizjs=3.15.1&accept_binary=true' failed: 
    CompatibleWebSocket @ obniz.js:18472
    _createCloudSocket @ obniz.js:2897
    (anonymous) @ obniz.js:2893
    _connectCloudWait @ obniz.js:2863
    tryWsConnectOnceWait @ obniz.js:2819
    tryWsConnectOnceWait @ obniz.js:4315
    (anonymous) @ obniz.js:3241
    obniz.js:18472 WebSocket connection to 'wss://obniz.io/obniz/3584-4045/ws/1?obnizjs=3.15.1&accept_binary=true' failed: 
    CompatibleWebSocket @ obniz.js:18472
    _createCloudSocket @ obniz.js:2897
    (anonymous) @ obniz.js:2893
    _connectCloudWait @ obniz.js:2863
    tryWsConnectOnceWait @ obniz.js:2819
    tryWsConnectOnceWait @ obniz.js:4315
    (anonymous) @ obniz.js:3241
    obniz.js:18472 WebSocket connection to 'wss://obniz.io/obniz/3584-4045/ws/1?obnizjs=3.15.1&accept_binary=true' failed: 
    CompatibleWebSocket @ obniz.js:18472
    _createCloudSocket @ obniz.js:2897
    (anonymous) @ obniz.js:2893
    _connectCloudWait @ obniz.js:2863
    tryWsConnectOnceWait @ obniz.js:2819
    tryWsConnectOnceWait @ obniz.js:4315
    (anonymous) @ obniz.js:3241
    obniz.js:18472 WebSocket connection to 'wss://obniz.io/obniz/3584-4045/ws/1?obnizjs=3.15.1&accept_binary=true' failed: 
    


  • 情報共有ありがとうございます。
    原因確認します。


Log in to reply
 

SUGGESTED TOPICS

  • 1
  • 1
  • 4
  • 1
  • 3
  • 3