Identical devices, different behaviors
See original GitHub issueI have 2 bulbs that are identical to each other (same manufacturer, model, came in a pack together).
These two bulbs load, along with all of my devices in the API response. However the Creating New Accessory has different results for these two identical bulbs.
These two identical bulbs show up with different functions in HomeKit. One bulb loads as it should with control for Power, Brightness, and Color Temperature.
[03/06/2021, 10:09:31] [TuyaPlatform] Adding: GN-BW231-999 2 (dj / ebfc757038252d0e55kbth)
[03/06/2021, 10:09:31] [TuyaPlatform] Creating New Accessory ebfc757038252d0e55kbth
LightAccessory statusArr. [
{ code: 'switch_led', value: true },
{ code: 'bright_value', value: 202 },
{ code: 'temp_value', value: 102 }
]
LightAccessory functionArr. [
{
code: 'switch_led',
desc: 'switch led',
name: 'switch led',
type: 'Boolean',
values: '{}'
},
{
code: 'bright_value',
desc: 'bright value',
name: 'bright value',
type: 'Integer',
values: '{"min":25,"scale":0,"unit":"","max":255,"step":1}'
},
{
code: 'temp_value',
desc: 'temp value',
name: 'temp value',
type: 'Integer',
values: '{"min":0,"scale":0,"unit":"","max":255,"step":1}\t'
}
]
The 2nd only loads with Power (On/Off capability). As you can see in the logs below, this one throws a warning LightAccessory functionArr. undefined and results in an unhandled exception.
[03/06/2021, 10:09:31] [TuyaPlatform] Adding: GN-BW231-999 3 (dj / eb40e5c0e95fc073cadhpm)
[03/06/2021, 10:09:31] [TuyaPlatform] Creating New Accessory eb40e5c0e95fc073cadhpm
LightAccessory statusArr. [
{ code: 'switch_led', value: true },
{ code: 'bright_value', value: 43 },
{ code: 'temp_value', value: 56 }
]
LightAccessory functionArr. undefined
(node:5018) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'find' of undefined
at LightAccessory.getFunction (/usr/local/lib/node_modules/homebridge-tuya-platform/lib/light_accessory.js:212:36)
at LightAccessory.refreshAccessoryServiceIfNeed (/usr/local/lib/node_modules/homebridge-tuya-platform/lib/light_accessory.js:53:29)
at new LightAccessory (/usr/local/lib/node_modules/homebridge-tuya-platform/lib/light_accessory.js:30:10)
at TuyaPlatform.addAccessory (/usr/local/lib/node_modules/homebridge-tuya-platform/index.js:125:27)
at TuyaPlatform.initTuyaSDK (/usr/local/lib/node_modules/homebridge-tuya-platform/index.js:84:12)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:5018) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 10)
(node:5018) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Identical feature on two devices but different behaviors ...
Since my behaviors are different and my users are different for the mobile and desktop app I decided to separate my scenario and...
Read more >Device Behavior - an overview | ScienceDirect Topics
Device behavior for each type of memory is different, as shown in Fig. 5.21. DRAM and SRAM differ in the retention time of...
Read more >Lies are more common on laptops than on phones - Phys.org
People appear to be more willing to lie for personal gain when they use a laptop versus a smartphone, our new research in...
Read more >displayState == undefined, similar items, same brand of devices ...
Here I am using the same syntax on identical products from the same brand. Different behaviour as result. Any idea ? Pascal.
Read more >Behavioral Aspects of Mobile vs. Desktop Search | NetElixir Blog
Different Devices are Used Depending on the Stage of the Shopping Process. In addition to choosing a device based on researching and purchasing, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

No, did not work. In fact, now none of my devices are added.I had to reset everything, but it did work. Steps were unpair the plugin (child bridge), remove devices from Homebridge cache, restart, re-pair.
I don’t exactly agree. The child bridge should only need a restart. There may be some odd caching behavior occurring in the plugin. I’ll close this one out though since it is solved.