[{"id":"34992e80.e15b32","type":"link in","z":"4b80f8af.2d7c68","name":"Magic Cube","links":["5087f1d6.e2cb1"],"x":35,"y":440,"wires":[["13ae9cac.e1b5bb"]]},{"id":"cf48217.004dce","type":"debug","z":"4b80f 8af.2d7c68","name":"","active":true,"tosidebar":tr ue,"console":false,"tostatus":false,"complete":"fa lse","x":330,"y":560,"wires":[]},{"id":"13ae9cac.e1b5bb","type":"switch","z":"4b8 0f8af.2d7c68","name":"Gesture","property":"payload .event.gesture","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","v t":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"eq", "v":"3","vt":"num"},{"t":"eq","v":"4","vt":"num"}, {"t":"eq","v":"5","vt":"num"},{"t":"eq","v":"6","v t":"num"},{"t":"eq","v":"7","vt":"num"},{"t":"eq", "v":"8","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":10,"x" :160,"y":440,"wires":[[],[],[],["437025eb.84361c"],["437025eb.84361c"],["437025eb.84361c"],["437025eb.84361c"],["5576646a.817fbc"],["5576646a.817fbc"],[]],"outputLabels":["Wake","Shake","Fall","Flip 90","Flip 180","Slide","Dble Tap","Rotate CW","Rotate CCW",""]},{"id":"437025eb.84361c","type":"change","z":"4b8 0f8af.2d7c68","name":"Set side properties","rules":[{"t":"set","p":"payload.side","pt":"msg","to":"$nu mber(\t $substring(\t $string(msg.payload.event.event),\t 0,\t 1\t\t )\t)","tot":"jsonata"},{"t":"set","p":"payload.fro m","pt":"msg","to":"$number(\t $substring(\t $string(msg.payload.event.event),\t -1,\t 1\t )\t)","tot":"jsonata"},{"t":"set","p":"lastside"," pt":"flow","to":"$number(\t $substring(\t $string(msg.payload.event.event),\t 0,\t 1\t\t )\t)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg" :false,"x":350,"y":440,"wires":[["fe3ebbef.d27d2"]]},{"id":"5576646a.817fbc","type":"change","z":"4b8 0f8af.2d7c68","name":"Get side","rules":[{"t":"set","p":"payload.side","pt":"msg","to":"las tside","tot":"flow"}],"action":"","property":"","from":"","to":"","reg" :false,"x":340,"y":480,"wires":[["fe3ebbef.d27d2"]]},{"id":"6c46fbec.35c814","type":"switch","z":"4b8 0f8af.2d7c68","name":"Side action","property":"payload.event.gesture","proper tyType":"msg","rules":[{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"5","v t":"num"},{"t":"eq","v":"6","vt":"num"},{"t":"eq", "v":"7","vt":"num"},{"t":"eq","v":"8","vt":"nu m"}],"checkall":"true","repair":false,"outputs":5,"x": 710,"y":140,"wires":[[],[],["71f6dfce.1109d8"],["c5c14a7f.d1f478"],["ce578088.b850f"]],"outputLabels":["Flip","Slide","Dbl tap","Rotate CW","Rotate CCW"]},{"id":"fe3ebbef.d27d2","type":"switch","z":"4b80 f8af.2d7c68","name":"Face Up","property":"payload.side","propertyType":"msg" ,"rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","v t":"num"},{"t":"eq","v":"3","vt":"num"},{"t":"eq", "v":"4","vt":"num"},{"t":"eq","v":"5","vt":"num"}, {"t":"eq","v":"6","vt":"num"}],"checkall":"true","repair":false,"outputs":6,"x": 520,"y":460,"wires":[["6c46fbec.35c814"],["a0b99964.8c8f88"],["13ee0ebf.adcaa1"],["a209ce15.1b00e8"],["eb0d1085.223ac8"],["457c9f7e.a9387","cf48217.004dce"]]},{"id":"a0b99964.8c8f88","type":"switch","z":"4b8 0f8af.2d7c68","name":"Side action","property":"payload.event.gesture","proper tyType":"msg","rules":[{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"5","v t":"num"},{"t":"eq","v":"6","vt":"num"},{"t":"eq", "v":"7","vt":"num"},{"t":"eq","v":"8","vt":"nu m"}],"checkall":"true","repair":false,"outputs":5,"x": 710,"y":320,"wires":[[],[],["6221237b.54773c"],["e8267e56.1921d8"],["4c9ed910.05c428"]],"outputLabels":["Flip","Slide","Dbl tap","Rotate CW","Rotate CCW"]},{"id":"13ee0ebf.adcaa1","type":"switch","z":"4b8 0f8af.2d7c68","name":"Side action","property":"payload.event.gesture","proper tyType":"msg","rules":[{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"5","v t":"num"},{"t":"eq","v":"6","vt":"num"},{"t":"eq", "v":"7","vt":"num"},{"t":"eq","v":"8","vt":"nu m"}],"checkall":"true","repair":false,"outputs":5,"x": 710,"y":460,"wires":[[],[],["28e89628.b2b7ca"],["41fe9b6f.931aa4"],["c3e71901.2c4f18"]],"outputLabels":["Flip","Slide","Dbl tap","Rotate CW","Rotate CCW"]},{"id":"a209ce15.1b00e8","type":"switch","z":"4b8 0f8af.2d7c68","name":"Side action","property":"payload.event.gesture","proper tyType":"msg","rules":[{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"5","v t":"num"},{"t":"eq","v":"6","vt":"num"},{"t":"eq", "v":"7","vt":"num"},{"t":"eq","v":"8","vt":"nu m"}],"checkall":"true","repair":false,"outputs":5,"x": 710,"y":600,"wires":[[],[],["71a3e060.04936"],[],[]],"outputLabels":["Flip","Slide","Dbl tap","Rotate CW","Rotate CCW"]},{"id":"eb0d1085.223ac8","type":"switch","z":"4b8 0f8af.2d7c68","name":"Side action","property":"payload.event.gesture","proper tyType":"msg","rules":[{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"5","v t":"num"},{"t":"eq","v":"6","vt":"num"},{"t":"eq", "v":"7","vt":"num"},{"t":"eq","v":"8","vt":"nu m"}],"checkall":"true","repair":false,"outputs":5,"x": 710,"y":700,"wires":[[],[],["585f1fff.91129"],["f974d529.9d1508"],["ce8f1969.e89fe8"]],"outputLabels":["Flip","Slide","Dbl tap","Rotate CW","Rotate CCW"]},{"id":"457c9f7e.a9387","type":"switch","z":"4b80 f8af.2d7c68","name":"Side action","property":"payload.event.gesture","proper tyType":"msg","rules":[{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"5","v t":"num"},{"t":"eq","v":"6","vt":"num"},{"t":"eq", "v":"7","vt":"num"},{"t":"eq","v":"8","vt":"nu m"}],"checkall":"true","repair":false,"outputs":5,"x": 710,"y":800,"wires":[[],[],["adee37c5.9b874"],[],[]],"outputLabels":["Flip","Slide","Dbl tap","Rotate CW","Rotate CCW"]}]