You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-16Lines changed: 18 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -572,13 +572,13 @@ The `turnOn()` method sends a turn-on command to the Bot. This method returns a
572
572
573
573
If no connection is established with the device, this method automatically establishes a connection with the device, then finally closes the connection. You don't have to call the [`connect()`](#SwitchbotDevice-connect-method) method in advance.
574
574
575
-
When the Bot receives this command, the Bot's arm will be put down (stretched) or put up (retracted) depending on the settings.
575
+
When the Bot receives this command, the Bot's arm will be put down (stretched) or put up (retracted) depending on the mode setting.
576
576
577
-
Light switch Add-on | Inverse the on/off direction | Physical position of the arm
577
+
Mode | Inverse the on/off direction | Physical position of the arm
@@ -596,13 +596,13 @@ The `turnOff()` method sends a turn-off command to the Bot. This method returns
596
596
597
597
If no connection is established with the device, this method automatically establishes a connection with the device, then finally closes the connection. You don't have to call the [`connect()`](#SwitchbotDevice-connect-method) method in advance.
598
598
599
-
When the Bot receives this command, the Bot's arm will be put down (stretched) or put up (retracted) depending on the settings.
599
+
When the Bot receives this command, the Bot's arm will be put down (stretched) or put up (retracted) depending on the mode setting.
600
600
601
-
Light switch Add-on | Inverse the on/off direction | Physical position of the arm
601
+
Mode | Inverse the on/off direction | Physical position of the arm
@@ -620,7 +620,7 @@ The `down()` method sends a down command to the Bot. This method returns a `Prom
620
620
621
621
If no connection is established with the device, this method automatically establishes a connection with the device, then finally closes the connection. You don't have to call the [`connect()`](#SwitchbotDevice-connect-method) method in advance.
622
622
623
-
When the Bot receives this command, the Bot's arm will be put down (stretched) regardless of the settings.
623
+
When the Bot receives this command, the Bot's arm will be put down (stretched) regardless of the mode setting.
@@ -638,7 +638,7 @@ The `up()` method sends an up command to the Bot. This method returns a `Promise
638
638
639
639
If no connection is established with the device, this method automatically establishes a connection with the device, then finally closes the connection. You don't have to call the [`connect()`](#SwitchbotDevice-connect-method) method in advance.
640
640
641
-
When the Bot receives this command, the Bot's arm will be put up (retracted) regardless of the settings.
641
+
When the Bot receives this command, the Bot's arm will be put up (retracted) regardless of the mode setting.
@@ -689,13 +689,13 @@ Property | Type | Description
689
689
:-----------|:--------|:-----------
690
690
`model` | String | This value is always `"H"`, which means "Bot (WoHand)".
691
691
`modelName` | String | This value is always `"WoHand"`, which means "Bot".
692
-
`mode` | Boolean | This indicates whether the light switch Add-on is used (`true`) or not (`false`)
692
+
`mode` | Boolean | This indicates the mode setting. When the mode is "Switch mode", this value is `true`. When the mode is "Press mode", this value is `false`.
693
693
`state` | Boolean | This value indicates whether the switch status is ON or OFF.
694
694
`battery` | Integer | (**experimental**) This value indicates the battery level (`%`).
695
695
696
696
The `mode` can be changed only using the official smartphone app. The node-switchbot does not support changing the mode because the BLE protocol is non-public.
697
697
698
-
If the `mode` is `false`, which means the light switch Add-on is not used, the `state` is always `false`. If the `mode` is `true`, which means the light switch Add-on is used, the `state` represents the logical state (ON or OFF). Note that it does *not* mean the physical arm position. The physical arm position depends on the setting "Inverse the on/off direction" on the official smartphone app.
698
+
If the `mode` is `false`, which means the "Press mode" is selected, the `state` is always `false`. If the `mode` is `true`, which means the "Switch mode" is selected, the `state` represents the logical state (ON or OFF). Note that it does *not* mean the physical arm position. The physical arm position depends on the setting "Inverse the on/off direction" on the official smartphone app.
699
699
700
700
"Inverse the on/off direction" | Value of the `state` | Logical state | Physical arm position
@@ -750,9 +750,11 @@ The `battery` is *experimental* for now. I'm not sure whether the value is corre
750
750
---------------------------------------
751
751
## <aid="Release-Note">Release Note</a>
752
752
753
+
* v0.0.4 (2020-02-11)
754
+
* Fixed the bug that temperature value lower than 0 degC could not be handled. (Thanks to [@musimasami](https://github.com/futomi/node-switchbot/issues/2))
753
755
* v0.0.3 (2020-02-10)
754
-
* Now the characteristic UUID `0x2a00` (Device Name) is not mandatory. Some models of Bot don't seem to support the characteristic.
755
-
* Fixed the bug that the `turnOn()` method returns an error if the "Light switch Add-on" is set to "Disabled" on the Bot.
756
+
* Now the characteristic UUID `0x2a00` (Device Name) is not mandatory. Some models of Bot don't seem to support the characteristic. (Thanks to [@dnicolson](https://github.com/futomi/node-switchbot/issues/1))
757
+
* Fixed the bug that the `turnOn()` method returns an error if the "Press mode" is selected on the Bot.
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "node-switchbot",
3
-
"version": "0.0.3",
3
+
"version": "0.0.4",
4
4
"description": "The node-switchbot is a Node.js module which allows you to move your Switchbot (Bot)'s arm and to monitor the temperature/humidity from SwitchBot Thermometer & Hygrometer (Meter).",
0 commit comments