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

Created configuration for Orison Chanfok Neo #2129

Merged
merged 3 commits into from
Aug 23, 2024
Merged

Conversation

lucacri
Copy link
Contributor

@lucacri lucacri commented Jul 18, 2024

I created the config for this "fandelier", which is also found on some shops sold as "Orison Ceiling Fan with Lights- 23 in Smart Ceiling Fans with Alexa/Google Assistant/App Control Color Changing LED-RGB Back Ambient Light for Living Room Bedroom".

Everything works perfectly!

I created the config for this "fandelier", which is also found on some shops sold as "Orison Ceiling Fan with Lights- 23 in Smart Ceiling Fans with Alexa/Google Assistant/App Control Color Changing LED-RGB Back Ambient Light for Living Room Bedroom".

Everything works perfectly!
@RobDehnert
Copy link

I believe that I have this same Orison Chanfok Neo ceiling fan light. Mine is Product ID: zfwgeelmqcypcdgh.

Does your fan have two LEDs? RGB facing the ceiling and white facing down???

I've been working on some additional DPs...

36 = mix_light_scene (I've got this one setting both the upper RGB LEDs and the lower white LED ring)
51 = mix_rgbcw
53 = switch_night_light

name: Smart Fan and Light
products:
  - id: zfwgeelmqcypcdgh
    name: Orison Chanfok Neo RGB ambient light bladeless ceiling fan
primary_entity:
  entity: fan
  dps:
    - id: 107
      type: boolean
      name: switch
    - id: 106
      name: preset_mode
      type: string
      mapping:
        - dps_val: fresh
          value: fresh
        - dps_val: nature
          value: nature
    - id: 105
      type: integer
      name: speed
      optional: true
      range:
        min: 1
        max: 6
    - id: 104
      type: string
      name: direction
      mapping:
        - dps_val: forward
          value: forward
        - dps_val: reverse
          value: reverse
secondary_entities:
  - entity: light
    dps:
      - id: 20
        type: boolean
        name: switch
      - id: 21
        type: string
        name: color_mode
        mapping:
          - dps_val: white
            value: color_temp
          - dps_val: colour
            value: hs
          - dps_val: scene
            value: scene
          - dps_val: music
            value: music
      - id: 22
        type: integer
        name: brightness
        optional: true
        range:
          min: 10
          max: 1000
      - id: 23
        type: integer
        name: color_temp
        optional: true
        range:
          min: 0
          max: 1000
        mapping:
          - step: 500
            target_range:
              min: 2700
              max: 6500
      - id: 24
        type: hex
        name: rgbhsv
        optional: true
        format:
          - name: h
            bytes: 2
            range:
              min: 0
              max: 360
          - name: s
            bytes: 2
            range:
              min: 0
              max: 1000
          - name: v
            bytes: 2
            range:
              min: 0
              max: 1000
  - entity: number
    name: Light timer
    translation_key: timer
    category: config
    dps:
      - id: 26
        type: integer
        name: value
        range:
          min: 0
          max: 86400
        mapping:
          - scale: 60
            step: 60
        unit: min
  - entity: number
    name: Fan timer
    translation_key: timer
    category: config
    dps:
      - id: 103
        type: integer
        name: value
        range:
          min: 0
          max: 540
        unit: min
  - entity: switch
    name: Fan Beep
    icon: "mdi:bell"
    category: config
    dps:
      - id: 101
        type: boolean
        name: switch
  - entity: switch
    name: Night Light
    icon: "mdi:lightbulb"
    category: config
    dps:
      - id: 53
        type: boolean
        name: switch
  - entity: select
    name: Work Mode
    icon: "mdi:lightbulb"
    category: config
    dps:
      - id: 21
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: "colour"
            value: Color
          - dps_val: "white"
            value: White
          - dps_val: "scene"
            value: Scene
  - entity: select
    name: Light Mix
    icon: "mdi:palette"
    category: config
    dps:
      - id: 51
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: "AAcAAAPoA+gD6APo"
            value: Red/6500K 100%
          - dps_val: "AAcAeAPoA+gD6APo"
            value: Green/6500K 100%
          - dps_val: "AAcA8APoA+gD6APo"
            value: Blue/6500K 100%
          - dps_val: "AAcAAAPoA+gB9APo"
            value: Red/6500K 50%
          - dps_val: "AAcAeAPoA+gB9APo"
            value: Green/6500K 50%
          - dps_val: "AAcA8APoA+gB9APo"
            value: Blue/6500K 50%
          - dps_val: "AAcAAAPoA+gA+gPo"
            value: Red/6500K 25%
          - dps_val: "AAcAeAPoA+gA+gPo"
            value: Green/6500K 25%
          - dps_val: "AAcA8APoA+gA+gPo"
            value: Blue/6500K 25%
          - dps_val: "AAcAAAPoA+gAZAPo"
            value: Red/6500K 10%
          - dps_val: "AAcAeAPoA+gAZAPo"
            value: Green/6500K 10%
          - dps_val: "AAcA8APoA+gAZAPo"
            value: Blue/6500K 10%
  - entity: select
    name: Scene
    icon: "mdi:palette"
    category: config
    dps:
      - id: 36
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: "AAABAQIODQAAyAAAAAA="
            value: Night
          - dps_val: "AAEBAQIODQAD6AH0AAA="
            value: Reading
          - dps_val: "AAIBAQIODQAD6APoAAA="
            value: Work
          - dps_val: "AAMBAQIODQAB9AH0AAA="
            value: Casual
          - dps_val: "AAQAAAECA0ZGAgB4A+gD6EZGAgB4A+gACg=="
            value: Prairie
          - dps_val: "AAUAAAEGA0ZGAQAAA+gD6EZGAQB4A+gD6EZGAQDwA+gD6EZGAQA9A+gD6EZGAQCuA+gD6EZGAQETA+gD6A=="
            value: Fun
          - dps_val: "AAYAAAEDA0ZGAQAAA+gD6EZGAQB4A+gD6EZGAQDwA+gD6A=="
            value: Dazzle
          - dps_val: "AAcAAAEGA0ZGAgAAA+gD6EZGAgB4A+gD6EZGAgDwA+gD6EZGAgA9A+gD6EZGAgCuA+gD6EZGAgETA+gD6A=="
            value: Colorful
          - dps_val: "ABQAAAEDA0ZGAgCuA+gD6EZGAgC0ASwD6EZGAgC0ADID6A=="
            value: Blue Sky
          - dps_val: "AB0AAAEEA2RkAQAAA+gD6GRkAQDwA+gD6GRkAgB4A+gD6GRkAgA9A+gD6A=="
            value: Mediterranean
          - dps_val: "ACAAAAEGA2RkAQA9A+gD6GRkAQB4A+gD6FpaAQETA+gD6FpaAQCuA+gD6GRkAQAyAfQD6GRkAQAAA+gD6A=="
            value: Birthday
          - dps_val: "ACIAAAEGA1paAQDwA+gD6FpaAQA9A+gD6EZGAQAAA+gD6FpaAQCuA+gD6FpaAQETA+gD6EZGAQB4A+gD6A=="
            value: Christmas
          - dps_val: "ADIBAQIODQAAyAAAAQYDRkYCAAAD6APoRkYCAHgD6APoRkYCAPAD6APoRkYCAD0D6APoRkYCAK4D6APoRkYCARMD6APo"
            value: Streamer
          - dps_val: "ADMBAQIODQAB9AH0AQYDRkYBAAAD6APoRkYBAHgD6APoRkYBAPAD6APoRkYBAD0D6APoRkYBAK4D6APoRkYBARMD6APo"
            value: Entertainment
  - entity: sensor
    name: Current Work Mode
    icon: "mdi:lightbulb"
    category: diagnostic
    dps:
      - id: 21
        type: string
        name: sensor
        optional: true
  - entity: sensor
    name: Current Mix Light Scene
    icon: "mdi:lightbulb"
    category: diagnostic
    dps:
      - id: 36
        type: string
        name: sensor
        optional: true
  - entity: sensor
    name: Current Mix RGBCW
    icon: "mdi:lightbulb"
    category: diagnostic
    dps:
      - id: 51
        type: string
        name: sensor
        optional: true

@@ -0,0 +1,102 @@
name: Orison Chanfok Neo
products:
- id: eba992532f93bb1c009bjw
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a device id rather than a product id. Is the product id perhaps zfwgeelmqcypcdgh as per the previous comment?

@@ -0,0 +1,102 @@
name: Orison Chanfok Neo
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name should be generic, such as Ceiling fan with light

type: string
name: direction
- id: 103
type: integer
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be a sensor of class duration if you know the units (min or s).
Based on the name, it should probably be coupled with a method of setting the timer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does your fan have two LEDs? RGB facing the ceiling and white facing down???

Yes, and with this config I can control only the main light. This config is not fully implemented but at least the big things work (fan and main light)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reply does not seem to match with the comment. I think you are actually replying to another comment on the main PR by another user.

@RobDehnert
Copy link

RobDehnert commented Jul 20, 2024

Here's how I made the "mix_rgbcw" (DP 51) work to set both the upper RGB LED and the lower white LED...

For a red upper light and white (6500K) lower light, both at 100% brightness, send AAcAAAPoA+gD6APo to DP51. This is the BASE64 encoding of 0007000003e803e803e803e8.

The hex bits encoding is as follows...

00-01: Mode (4 = off, 5 = white only, 6 = colour only, 7 = both)
02-03: Hue in degrees (0 = red)
04-05: Saturation (0-1000)
06-07: Brightness of colour bulb (0-1000)
08-09: Brightness of white bulb (0-1000)
10-11: Colour temperature of bulb (0=2700K, 1000=6500K)

BIT:	00 01    02 03    04 05    06 07    08 09    10 11
HEX:	00 07    00 00    03 e8    03 e8    03 e8    03 e8
DEC:	    7        0     1000     1000     1000     1000

This works to pre-define some color combinations similar to a scene. However, I would like to utilize the color and temp pickers in HA to build this combination string on-the-fly. #struggling

Changes from review.
Incorporated some changes from @RobDehnert
mix_rgbcw left for now, as there is another issue for this type of dp on another device where I hope to make a better decoding of the values.

PR make-all#2129
@make-all make-all merged commit 4c107fd into make-all:main Aug 23, 2024
4 checks passed
make-all added a commit that referenced this pull request Aug 23, 2024
Changes from review.
Incorporated some changes from @RobDehnert
mix_rgbcw left for now, as there is another issue for this type of dp on another device where I hope to make a better decoding of the values.

PR #2129
make-all added a commit that referenced this pull request Aug 23, 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

Successfully merging this pull request may close these issues.

3 participants