Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: this._isBelleLife is not a function #444

Closed
2 tasks done
pespinel opened this issue Feb 5, 2024 · 14 comments
Closed
2 tasks done

TypeError: this._isBelleLife is not a function #444

pespinel opened this issue Feb 5, 2024 · 14 comments
Assignees
Labels
bug Something isn't working

Comments

@pespinel
Copy link

pespinel commented Feb 5, 2024

Checklist

  • I have read the common issues wiki page
  • I have checked to make sure the plugin is up to date

Describe the bug

/var/lib/homebridge/node_modules/homebridge-tuya/lib/SimpleBlindsAccessory.js:49
        else if (this._isBelleLife()) {
                      ^
TypeError: this._isBelleLife is not a function
    at SimpleBlindsAccessory._registerCharacteristics (/var/lib/homebridge/node_modules/homebridge-tuya/lib/SimpleBlindsAccessory.js:49:23)
    at TuyaAccessory.<anonymous> (/var/lib/homebridge/node_modules/homebridge-tuya/lib/BaseAccessory.js:22:18)
    at Object.onceWrapper (node:events:633:26)
    at TuyaAccessory.emit (node:events:518:28)
    at TuyaAccessory._change (/var/lib/homebridge/node_modules/homebridge-tuya/lib/TuyaAccessory.js:409:18)
    at TuyaAccessory._msgHandler_3_3 (/var/lib/homebridge/node_modules/homebridge-tuya/lib/TuyaAccessory.js:335:30)
    at /var/lib/homebridge/node_modules/homebridge-tuya/node_modules/async/dist/async.js:4018:13
    at Object.process (/var/lib/homebridge/node_modules/homebridge-tuya/node_modules/async/dist/async.js:1681:21)
    at /var/lib/homebridge/node_modules/homebridge-tuya/node_modules/async/dist/async.js:1533:23
    at /var/lib/homebridge/node_modules/homebridge-tuya/node_modules/async/dist/async.js:74:45
[05/02/2024, 15:59:23] [homebridge-tuya] Child bridge process ended

To Reproduce
Steps to reproduce the behavior: Update to the version 3.1.0 and start the child bridge.

Expected behavior
The child bridge should start without errors

Screenshots
N/A

Environment (please complete the following information):

  • OS: raspbian
  • iOS version: N/A
  • Homehubs: N/A
  • Node Version: 20.11.0
  • Plugin Version: 3.1.0
  • Accessory Type: SimpleBlinds

Additional context
Add any other context about the problem here.

@pespinel pespinel added the bug Something isn't working label Feb 5, 2024
@pespinel
Copy link
Author

pespinel commented Feb 5, 2024

else if (this._isBelleLife()) {

I think that this should be:

else if (this._isType2()) {

@pespinel
Copy link
Author

pespinel commented Feb 5, 2024

The issue was introduced in this PR: #264. I don't have permission to propose a fix in a PR.

@05TEVE
Copy link
Collaborator

05TEVE commented Feb 5, 2024

@pespinel ,you should be able to raise a fork on your own account and create a PR with the changes.
Unfortunately, due to the amount of the time between updates and the huge number of changes introduced between the two versions this was included. Hopefully future updates shouldn't have this sort of issue.

05TEVE pushed a commit that referenced this issue Feb 6, 2024
@pespinel
Copy link
Author

pespinel commented Feb 6, 2024

@05TEVE I've tried the fix with the 3.1.1 beta 1 and now the process ends for another reason:

/var/lib/homebridge/node_modules/homebridge-tuya/lib/SimpleBlindsAccessory.js:85
        this.cmdOpen = _cmdOpen;
                       ^
ReferenceError: _cmdOpen is not defined
    at SimpleBlindsAccessory._registerCharacteristics (/var/lib/homebridge/node_modules/homebridge-tuya/lib/SimpleBlindsAccessory.js:85:24)
    at TuyaAccessory.<anonymous> (/var/lib/homebridge/node_modules/homebridge-tuya/lib/BaseAccessory.js:22:18)
    at Object.onceWrapper (node:events:633:26)
    at TuyaAccessory.emit (node:events:518:28)
    at TuyaAccessory._change (/var/lib/homebridge/node_modules/homebridge-tuya/lib/TuyaAccessory.js:409:18)
    at TuyaAccessory._msgHandler_3_3 (/var/lib/homebridge/node_modules/homebridge-tuya/lib/TuyaAccessory.js:335:30)
    at /var/lib/homebridge/node_modules/homebridge-tuya/node_modules/async/dist/async.js:4018:13
    at Object.process (/var/lib/homebridge/node_modules/homebridge-tuya/node_modules/async/dist/async.js:1681:21)
    at /var/lib/homebridge/node_modules/homebridge-tuya/node_modules/async/dist/async.js:1533:23
    at /var/lib/homebridge/node_modules/homebridge-tuya/node_modules/async/dist/async.js:74:45

@05TEVE
Copy link
Collaborator

05TEVE commented Feb 6, 2024

@pespinel, i pushed a change that at least gets the plugin running 3.1.1-beta.2. Looks like a heap of changes where merged in for the blinds modules for the unreleased 2.1.0 version. I am not sure what testing was done on the changes unfortunately.

@pespinel
Copy link
Author

pespinel commented Feb 6, 2024

@05TEVE After upgrading to the 3.1.1.-beta.2 the process is starting without issues but unfortunately, the actions are not working anymore even the logs shows that the blinds are "opening" and "closing" without errors. Do you want to treat this in another issue and close this one?

Thanks

@05TEVE
Copy link
Collaborator

05TEVE commented Feb 6, 2024

Let's leave this one open so everything is in one place. 🙂 I guess we can either revert back the previous version or fix this one? I think the changes were made by @ElphaX but never made a release so I am not sure whether the changes were fully tested.

@05TEVE
Copy link
Collaborator

05TEVE commented Feb 7, 2024

@pespinel I have tried reverting back the changes made in #264. This should put everything back to how it was in 2.0.1. Can you test 3.1.1-beta.4 and let me know how you go?

@pespinel
Copy link
Author

pespinel commented Feb 7, 2024

@05TEVE I've been testing this version during this morning and it seems to be working pretty fine. Thanks

@05TEVE
Copy link
Collaborator

05TEVE commented Feb 12, 2024

Hi @pespinel , based on the feedback from #451 I have updated the files again. Are you able to confirm whether it is still working on the new version?

@pespinel
Copy link
Author

Hi @pespinel , based on the feedback from #451 I have updated the files again. Are you able to confirm whether it is still working on the new version?

With version 3.1.1-beta.5 it's not working again.

The child bridge starts with no problem but the commands don't do anything.

@05TEVE
Copy link
Collaborator

05TEVE commented Feb 18, 2024

HI @pespinel,

Can you try 3.1.1-beta.9 with an extra variable in the config.
"dpBlindType": 3

It seems like there are multiple different types of blind config that can be used. This should hopefully allow that to be configured correctly. Apologies for the inconvenience here. Unfortunately I don't have any of the blind devices so it is a bit hard to test fully.

@pespinel
Copy link
Author

Hi @05TEVE

Sorry for the delay, I've been busy these days. I tested it by adding the configuration you mentioned and it seems to be working fine:

{
    "_bridge": {
        "name": "tuya-bridge",
        "username": "XXYY",
        "port": 58632
    },
    "platform": "TuyaLan"
    "devices": [
        {
            "type": "SimpleBlinds",
            "name": "Persiana dormitorio",
            "id": "XXYY",
            "key": "XXYY",
            "manufacturer": "Loratap",
            "model": "SC500W",
            "timeToOpen": 13,
            "timeToTighten": 2,
            "dpBlindType": 3
        },
        ...
    ]
}

@05TEVE
Copy link
Collaborator

05TEVE commented Mar 15, 2024

Awesome. That is great news! I'll add the change into the upcoming 3.1.1 release.

@pespinel pespinel closed this as completed May 2, 2024
05TEVE added a commit that referenced this issue May 3, 2024
* Adding in fix for Issue #444.

* Reverting the SimpleBlindsAccessory back to the version suggested in #451

* Updating to try cater for multiple types of blinds in the same file.



* 3.4 Protocol succesfull connection
* restore other protocols compatibility

* Revert "Changes from @fate8383. #433 (comment)"

This reverts commit d85caa5.

* Add support for Proscenic air purifier (tested against Proscenic A8) addresses #363 and #195 (#364)

* Add support for Proscenic air purifier (tested against Proscenic A8)

* Additional fix for "Turning off..." state as getCurrentAirPurifierState always returned 2 (PURIFYING_AIR)

* Fix for setting rotation speed and active status

* Add initial support for Virone VDP-65 doorbell.
Notifies on ring with a snapshot.
Notifies when a user presses the lock or gate buttons on another device.
Does not provide video or audio.
Does not allow the user to control the lock or gate.

* Add Siguro support from @fate8383.

* Revert "Add initial support for Virone VDP-65 doorbell."

This reverts commit 7db7a1f.

---------

Co-authored-by: Andrew <bitbucket@a.k6i.uk>
Co-authored-by: Andrew Kurowski <ak6i@github.com>

* Adding Air purifier config map so that changes can be made from the ui.

* Bumping package version. Removing a rogue ,

* Dropping the Beta Version in preparation of a release.

---------

Co-authored-by: 05TEVE <>
Co-authored-by: scooterpsu <3433982+scooterpsu@users.noreply.github.com>
Co-authored-by: tomash1 <tomdomaracki@gmail.com>
Co-authored-by: ak6i <62596884+ak6i@users.noreply.github.com>
Co-authored-by: Andrew <bitbucket@a.k6i.uk>
Co-authored-by: Andrew Kurowski <ak6i@github.com>
ThisIsQasim pushed a commit to ThisIsQasim/homebridge-tuya that referenced this issue May 3, 2024
* Adding in fix for Issue iRayanKhan#444.

* Reverting the SimpleBlindsAccessory back to the version suggested in iRayanKhan#451

* Updating to try cater for multiple types of blinds in the same file.



* 3.4 Protocol succesfull connection
* restore other protocols compatibility

* Revert "Changes from @fate8383. iRayanKhan#433 (comment)"

This reverts commit d85caa5.

* Add support for Proscenic air purifier (tested against Proscenic A8) addresses iRayanKhan#363 and iRayanKhan#195 (iRayanKhan#364)

* Add support for Proscenic air purifier (tested against Proscenic A8)

* Additional fix for "Turning off..." state as getCurrentAirPurifierState always returned 2 (PURIFYING_AIR)

* Fix for setting rotation speed and active status

* Add initial support for Virone VDP-65 doorbell.
Notifies on ring with a snapshot.
Notifies when a user presses the lock or gate buttons on another device.
Does not provide video or audio.
Does not allow the user to control the lock or gate.

* Add Siguro support from @fate8383.

* Revert "Add initial support for Virone VDP-65 doorbell."

This reverts commit 7db7a1f.

---------

Co-authored-by: Andrew <bitbucket@a.k6i.uk>
Co-authored-by: Andrew Kurowski <ak6i@github.com>

* Adding Air purifier config map so that changes can be made from the ui.

* Bumping package version. Removing a rogue ,

* Dropping the Beta Version in preparation of a release.

---------

Co-authored-by: 05TEVE <>
Co-authored-by: scooterpsu <3433982+scooterpsu@users.noreply.github.com>
Co-authored-by: tomash1 <tomdomaracki@gmail.com>
Co-authored-by: ak6i <62596884+ak6i@users.noreply.github.com>
Co-authored-by: Andrew <bitbucket@a.k6i.uk>
Co-authored-by: Andrew Kurowski <ak6i@github.com>
ThisIsQasim pushed a commit to ThisIsQasim/homebridge-tuya that referenced this issue May 3, 2024
* Adding in fix for Issue iRayanKhan#444.

* Reverting the SimpleBlindsAccessory back to the version suggested in iRayanKhan#451

* Updating to try cater for multiple types of blinds in the same file.



* 3.4 Protocol succesfull connection
* restore other protocols compatibility

* Revert "Changes from @fate8383. iRayanKhan#433 (comment)"

This reverts commit d85caa5.

* Add support for Proscenic air purifier (tested against Proscenic A8) addresses iRayanKhan#363 and iRayanKhan#195 (iRayanKhan#364)

* Add support for Proscenic air purifier (tested against Proscenic A8)

* Additional fix for "Turning off..." state as getCurrentAirPurifierState always returned 2 (PURIFYING_AIR)

* Fix for setting rotation speed and active status

* Add initial support for Virone VDP-65 doorbell.
Notifies on ring with a snapshot.
Notifies when a user presses the lock or gate buttons on another device.
Does not provide video or audio.
Does not allow the user to control the lock or gate.

* Add Siguro support from @fate8383.

* Revert "Add initial support for Virone VDP-65 doorbell."

This reverts commit 7db7a1f.

---------

Co-authored-by: Andrew <bitbucket@a.k6i.uk>
Co-authored-by: Andrew Kurowski <ak6i@github.com>

* Adding Air purifier config map so that changes can be made from the ui.

* Bumping package version. Removing a rogue ,

* Dropping the Beta Version in preparation of a release.

---------

Co-authored-by: 05TEVE <>
Co-authored-by: scooterpsu <3433982+scooterpsu@users.noreply.github.com>
Co-authored-by: tomash1 <tomdomaracki@gmail.com>
Co-authored-by: ak6i <62596884+ak6i@users.noreply.github.com>
Co-authored-by: Andrew <bitbucket@a.k6i.uk>
Co-authored-by: Andrew Kurowski <ak6i@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants