Open shanemcw opened 1 year ago
In the Home app, switch_inching
is being expressed as a switch (i.e. boolean
). In the device information JSON, switch_inching
is a string
with its current value of "AADy"
switch_inching
: https://github.com/0x5e/homebridge-tuya-platform/blob/develop_1.7.0/ADVANCED_OPTIONS.md#configurationThanks for the thoughts! Am I correct there's a bug in the plugin that the string object "switch_inching" with string value "AADy" (see the device JSON) is incorrectly being interpreted and exposed as a boolean switch device?
The following does not hide this extra switch. Any detail I am missing? Thanks for any thoughts!
{
"name": "Tuya",
"options": {
"projectType": "2",
"accessId": "***",
"accessKey": "***",
"countryCode": 1,
"username": "***",
"password": "***",
"appSchema": "smartlife",
"deviceOverrides": [
{
"id": "global",
"schema": [
{
"code": "switch_inching",
"hidden": true
}
]
}
]
},
"platform": "TuyaPlatform"
}
Thanks for the thoughts! Am I correct there's a bug in the plugin that the string object "switch_inching" with string value "AADy" (see the device JSON) is incorrectly being interpreted and exposed as a boolean switch device?
Yes, it's a base64 string, decode to 3 bytes, first byte means on/off, 2-3 means the timer seconds. https://github.com/0x5e/homebridge-tuya-platform/issues/78#issuecomment-1540115378
Have you clear accessory cache after config?
Thanks—that did it.
Re #78 the "broken" behavior I see may be Switch Inching turning on via HomeKit but the seconds may be zero from Smart Life. The UI in Smart Life for the Inching setting on this device looks buggy, e.g. setting the seconds is enabled when Inching is off but disabled when Inching is on (you would think the other way around) and when the time is set by the user in the UI, the time changes back to what it was (the UI for changing the time seems to not work yet).
Thanks again!
Careful not to use “global” in the Device ID as it can affect other outlets/sockets that didn’t have this switch_inching feature. By adding device-specific ID instead works for me.
This was an interesting surprise today after upgrading. I was glad to find this thread. Thank you everyone.
This was an interesting surprise today after upgrading. I was glad to find this thread. Thank you everyone.
I am new to home bridge. Can you help summarize what is the fix? Will there be an updated plugin which solve this issue (remove the switch_inching)? Thank you for your advice.
This was an interesting surprise today after upgrading. I was glad to find this thread. Thank you everyone.
I am new to home bridge. Can you help summarize what is the fix? Will there be an updated plugin which solve this issue (remove the switch_inching)? Thank you for your advice.
Thanks, @veerachen for the question, and welcome to Homebridge and the Tuya plugin support!
To summarize this thread, switch_inching
is a new feature of IoT devices—a little buggy in its early life—but a valid feature.
For devices where this is an issue, the correct fix (at this time until this feature gets more mature) is to hide it via the plugin's settings, e.g.
{
"name": "Tuya",
"options": {
"projectType": "2",
"accessId": "(your data)",
"accessKey": "(your data)",
"countryCode": (your data),
"username": "(your data)",
"password": "(your data)",
"appSchema": "smartlife",
"deviceOverrides": [
{
"id": "(your device ID 1)",
"schema": [
{
"code": "switch_inching",
"hidden": true
}
]
},
{
"id": "(your device ID 2)",
"schema": [
{
"code": "switch_inching",
"hidden": true
}
]
}
]
},
"platform": "TuyaPlatform"
}
Thanks again!
"deviceOverrides": [ { "id": "global", "schema": [ { "code": "switch_inching", "hidden": true } ] } ]
Hello,
I have tried both id = global and id = specific ID. The switch_inching are still showing in both homebridge and homekit. I have also remove the accessory cache and restart. Does not seems to work.
Any further hints and tips will be appreciated. Thanks.
I took the device-specific approach, repeating the code below for each of my devices (screenshot included below for others coming to this thread and new to Homebridge).
{
"id": "(your device ID 1)",
"schema": [
{
"code": "switch_inching",
"hidden": true
}
]
},
I had to clear my accessory cache in order to get them to go away. That meant having to redo my settings in my Apple Home, but that's okay. It didn't take that long.
I can see why some people would want this feature. For instance, someone might want to be sure the iron shuts off after 20 minutes in the morning.
@githubnavigator May I check my understanding on the device ID? Shall I use the serial number?
@veerachen Thanks for the question!
The "device ID" can be found at https://iot.tuya.com/cloud/ under your project, then Devices. Your devices will be listed with the device ID.
The device ID is also under the "Device Information" of that device in your Smart Life app.
it seems like adding that option affects new devices added to the tuya account, but not previously existing ones... I guess there's some sort of cache file somewhere... how can I clean it up?
uninstall/install the plugin again did not work
Homebridge Settings > Manage Cached Accessories > Remove All Cached Accessories
To work this feature. Is it not enough to remove single cached accessory?
To work this feature. Is it not enough to remove single cached accessory?
Yes, removing a single accessory from the cache removes the second 'inching' switch for that accessory, when the steps above are also carried out for the accessory.
Prerequisite
Cache
Version
v1.7.0-beta.45
Device Infomation JSON File
Device Control Mode
Standard Instruction
Logs
No response
Other Infomations
As of a recent version of this plugin, there is now a second, new switch showing up in the Home app paired with this model's switch, named "switch_inching" that was not present in the Home app before, under a previous version with this same device model.
This new virtual "swiitch_inching" switch appearing in the Home app tends to be set to "on." When it is set to "on," the function of the "real" switch is "broken"—when the "real" switch is turned on it flashes on for less than second and turns itself back off. When the virtual paired switch named "switch_inching" is turned off, the "real" switch functions correctly. However turning switch_inching off is not a longer term solution, as it tends to turn itself back on somehow.
Other similar smart outlet switches controlled by the same plugin but different models/ manufacturers do not now show this new "switch_inching."