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

Deta Grid Connect Smart Fan Controller CFR225HA #369

Open
RayNixon665 opened this issue Jun 17, 2022 · 3 comments
Open

Deta Grid Connect Smart Fan Controller CFR225HA #369

RayNixon665 opened this issue Jun 17, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@RayNixon665
Copy link

Checklist

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

Describe the bug

        "name": "My Fan",
        "type": "FanLight",
        "id": "xxx,
        "key": "xxx,
        "manufacturer": "Arlec",
        "model": "Arlec Grid",
        "maxSpeed": 3,
        "dpRotationSpeed": "3",
        "useBrightness": "False",
        "dpLightOn": "15"

Fan on works.
Fan off works.
Fan will not change speed.

I'm using a stand alone, off the shelf smart controller. Its a Deta Grid Connect unit, designed to convert a standard fan to Grid Connect.

I believe the fan speed update function not working because the command that is sent to the fan, is being sent as a string, rather than an integer.

for example.

[Tuya] Sending My Fan {"1":true}
[Tuya] Sending My Fan {"3":"1"} // looks like a string is being sent.
but
[Tuya] SimpleFanLight changed: {"1":true,"3":1,"15":false,"22":"cancel"} // looks like the returned value is an integer?

When the following commands are sent, looks like error is returned? and no physical state change of the fan
[Tuya] Sending My Fan {"1":true}
[Tuya] Sending My Fan {"3":"2"}
[Tuya] Heard back from My Fan with command 8

To Reproduce
iphone, home kit, turn fan on, and flick though the 3 available speeds.
same issue occurs when chageing speed under the homebridge ui

Expected behavior
fan speed should change

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: homebridge Ubuntu Focal Fossa (20.04.4 LTS) - VM
  • iOS version:15.5
  • Homehubs:
  • Node Version: v16.15.0
  • Plugin Version: 2.01
  • Accessory Type - fanlight - Deta Grid Connect Smart Fan Controller CFR225HA

Additional context
Light works. data points are correct as per tuya web api.
device has no dimmer. device functions, fan (3 speed). (fan timer) and light on off. everything great but fan speed.

@RayNixon665 RayNixon665 added the bug Something isn't working label Jun 17, 2022
@RayNixon665
Copy link
Author

Im new to GitHub, but, i did manage to fork my own version of this add in. make the change and got this accessory working.

i changed SimpleFanLightAccessory.js
from
return this.setState(this.dpRotationSpeed, value.toString(), callback);
to
return this.setState(this.dpRotationSpeed, value, callback);

of course this might break other devices. and not sure how to implement correctly.

but my theory has been proven in my case for this particular device.

@Madz75
Copy link

Madz75 commented Jul 12, 2022

Have you had any more luck with your settings? Are you able to control brightness? It's possible you're creating a string because you have quotation marks around your rotation speed setting. Try removing those.

@05TEVE
Copy link
Collaborator

05TEVE commented Feb 9, 2023

Hi, I have raised #403 to fix this bug.
The issue is being caused by the setActive and setSpeed being called at the same time. Once i made this change the fans have behaved much more consistently.

My Fan settings are as follows.

"name": "Fan Name",
"type": "FanLight",
"manufacturer": "Deta",
"model": "3 Speed Fan Controller",
"id": "XXXX",
"key": "XXXXX",
"maxSpeed": 3,
"useBrightness": false,

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

4 participants