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

Request support for Princess Smart DC Fan #2141

Closed
drcjb opened this issue Jul 21, 2024 · 18 comments
Closed

Request support for Princess Smart DC Fan #2141

drcjb opened this issue Jul 21, 2024 · 18 comments

Comments

@drcjb
Copy link

drcjb commented Jul 21, 2024

Log message

Error during integration of Princess Smart DC Pedestal Fan


This error originated from a custom integration.

Logger: custom_components.tuya_local.config_flow
Source: custom_components/tuya_local/config_flow.py:483
integration: Tuya Local (documentation, issues)
First occurred: 18:44:54 (1 occurrences)
Last logged: 18:44:54

Device matches peteme_smart_recessed_lighting with quality of 57%. DPS: {"updated_at": 1721407489.7067287, "1": true, "2": "nature", "3": "9", "6": "0", "9": false, "23": 0, "101": true}

Just to note that DPIP 3 is the fan speed and the error log show speed was 9 during integration attempt and this was indeed the fan speed!

DPS information

Device Data Points for Princess  from Tuya IoT site.


{
  "result": {
    "properties": [
      {
        "code": "switch",
        "custom_name": "",
        "dp_id": 1,
        "time": 1721322452748,
        "type": "bool",
        "value": false
      },
      {
        "code": "mode",
        "custom_name": "",
        "dp_id": 2,
        "time": 1720536054220,
        "type": "enum",
        "value": "nature"
      },
      {
        "code": "fan_speed",
        "custom_name": "",
        "dp_id": 3,
        "time": 1721257178071,
        "type": "enum",
        "value": "9"
      },
      {
        "code": "countdown",
        "custom_name": "",
        "dp_id": 6,
        "time": 1720536054282,
        "type": "enum",
        "value": "0"
      },
      {
        "code": "light",
        "custom_name": "",
        "dp_id": 9,
        "name": "Light",
        "time": 1721322452748,
        "type": "bool",
        "value": false
      },
      {
        "code": "countdown_left",
        "custom_name": "",
        "dp_id": 23,
        "time": 1720536054326,
        "type": "value",
        "value": 0
      },
      {
        "code": "OSC",
        "custom_name": "",
        "dp_id": 101,
        "time": 1720894766184,
        "type": "bool",
        "value": true
      }
    ]
  },
  "success": true,
  "t": 1721323532071,
  "tid": "bc33c527452a11ef982bea89d218984e"
}

Product ID

glhx4aeaqmzmp3sb

Product Name

Princess Bluetooth (which is odd as it is wifi connected)

Information about how the device functions

This is a smart fan that supports on/off, 24 different speeds, oscillation, 4 modes and a light (on/off). I can control all these from the Tuya Smart app. I installed Tuya and can only control the fan on/off and the light on/off. I have spent days trying to configure a YAML file but it never showed up in the similar file list. I'm not very good with YAML and can't understand how to handle the enum type that the fan uses for fan speed and other functions. I have one question as I have kept the Home Assistant Tuya integration to control the fan and light on/off functions, would that interfere with the Tuya-local integration of the same device as I understand HA has to have a unique code for each device? Any help gratefully received to get this fan under complete local control. If I have missed anything out please do not hesitate to contact me.

I also have a Wood's smart clim, so if I can understand what you do for the fan I might be able to create the YAML file for the clim and share it with the community.

Best regards, Colin

@drcjb drcjb added the new device Unsupported device label Jul 21, 2024
@make-all make-all added the log provided Log of dps has been provided, though it is short of full info, so some guessing is needed label Jul 21, 2024
@make-all
Copy link
Owner

There is no range information for the dps. If you have access to the iot.tuya.com site, please paste the result for the QueryThingsDataModel cloud API specifically, as that is the only one that has all the information for the device, even though the format is not really made for human readability.

@drcjb
Copy link
Author

drcjb commented Jul 21, 2024 via email

@drcjb
Copy link
Author

drcjb commented Jul 23, 2024

Copy from my mail yesterday.

Is this the list you mean Jason?

Best regards, Colin

Tuya IoT device spec.txt

switch Boolean

"{true,false}"

mode Enum

{
"range": [
"nature",
"sleep",
"fresh",
"smart"
]
}

fan_speed Enum

{
"range": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24"
]
}

countdown Enum

{
"range": [
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24"
]
}

light Boolean

"{true,false}"

OSC Boolean

"{true,false}"

@make-all make-all added full_info All info needed was provided and removed log provided Log of dps has been provided, though it is short of full info, so some guessing is needed labels Jul 23, 2024
@make-all
Copy link
Owner

Thank you

@drcjb
Copy link
Author

drcjb commented Aug 31, 2024

Sorry to bother you but any news about my request, I see other requests after mine have already been processed? I need this for my handicaped wife, so she can control the fan easily with a large remote control. Any help greatfully received.

make-all added a commit that referenced this issue Sep 1, 2024
@make-all make-all added awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release and removed full_info All info needed was provided labels Sep 1, 2024
@drcjb
Copy link
Author

drcjb commented Sep 1, 2024

Hi Jason,

Thanks for the rapid response, much appreciated. I will test the config tomorrow and get back to you.

Best regards, Colin

@drcjb
Copy link
Author

drcjb commented Sep 2, 2024

Dear Jason,

I have just done the integration and the YAML file is correctly identified. However I only see 4 entities defined under the device. I called the device Fan Princess during the installation and the entities I see are:

1: light.fan_princess (this controls the light in the fan's base and works correctly)

2: fan.fan_princess_none (this is the fan on/off switch and works correctly)

3: sensor.fan_princess_time_remaining (which show a downcount in minutes for the delayed starting timer and this works correctly)

4: select.fan_princess_timer (which is a sort of combobox allowing me to choose the delay before the fan starts and this works correctly)

What I can not see or control is the fan's speed or the fan's oscillation mode (on/off).

In the system log I get the following error message during the integration:

This error originated from a custom integration.

Logger: custom_components.tuya_local.config_flow
Source: custom_components/tuya_local/config_flow.py:483
integration: Tuya Local (documentation, issues)
First occurred: 19:43:13 (1 occurrences)
Last logged: 19:43:13

Device matches Princess 358450 DC pedestal fan with quality of 100%. DPS: {"updated_at": 1725298988.285963, "1": false, "2": "nature", "3": "3", "6": "0", "9": false, "23": 0, "101": true}

Please let me know if you need any other information, I really hope this can be made to work?

Best regards, Colin

@make-all
Copy link
Owner

make-all commented Sep 2, 2024

The fan entity contains the speed and oscillation controls. It seems you have added it using a card that only shows the on/off control. Try using a tile card, which should allow adding other attributes to the card.

@drcjb
Copy link
Author

drcjb commented Sep 2, 2024 via email

@drcjb
Copy link
Author

drcjb commented Sep 3, 2024

Dear Jason,

Overnight I realised that I had not updated the fan.py file only the yaml file, so I just copied the fan.py from git hub and deleted the Princess integration and reinstalled it. The resut is odd as now I only have 3 entities, the light, the timer and the time remaining, the fan on/off has disappeared. I will now deleted Tuya-local and reinstall it.....

Best regards, Colin

@drcjb
Copy link
Author

drcjb commented Sep 3, 2024

Hi again Jason.

Did a complete delete Tuya-local and reinstall from repository and I am back to the same 4 entities, as decribed above.

Hope you can solve this mystery?

Many thanks - Colin

@make-all
Copy link
Owner

make-all commented Sep 3, 2024

The updates to fan.py in this release cycle are not relevant to supporting this fan. They are only to silence some deprecation warnings in HA 2024.8 and later. The device yaml file by itself should be all that is needed.
4 entities is as expected.

@drcjb
Copy link
Author

drcjb commented Sep 3, 2024

Ok Jason, it was just a thought. Ah you say 4 entities as expected, but I was expecting to see speed.fan_princess and oscillate.fan_princess as well. Are you saying I can't control the speed and oscillation or am I looking in the wrong place for them because they are not entities? Sorry but I am still a nooby to HA.

Best regards, Colin

@make-all
Copy link
Owner

make-all commented Sep 3, 2024

speed and oscillate are part of the fan entity

@drcjb
Copy link
Author

drcjb commented Sep 3, 2024 via email

@drcjb
Copy link
Author

drcjb commented Sep 3, 2024 via email

@drcjb
Copy link
Author

drcjb commented Sep 4, 2024 via email

@make-all make-all removed the awaiting confirmation Wating for confirmation the issue is solved label Sep 4, 2024
@drcjb
Copy link
Author

drcjb commented Sep 4, 2024

Dear Jason,

I am pleased to confirm the config file is working perfectly. Many many thanks for your time and patience.

Best regards, Colin

@make-all make-all removed new device Unsupported device unreleased Will be in next release labels Sep 8, 2024
@make-all make-all closed this as completed Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants