xled-docs icon indicating copy to clipboard operation
xled-docs copied to clipboard

Query strings for gestalt

Open scrool opened this issue 4 years ago • 4 comments

In 2.8.3 (maybe earlier?) app sends requests like: /xled/v1/gestalt?filter=prod_infos&filter2=group and a device responds with

{
"product_name": "Twinkly",
"hardware_version": "100",
"bytes_per_led": 3,
"hw_id": "1cc190",
"flash_size": 64,
"led_type": 14,
"product_code": "TWS250STP",
"fw_family": "F",
"device_name": "Twinkly_1CC190",
"uptime": "1499371",
"mac": "98:f4:ab:1c:c1:90",
"uuid": "E103C5A3-3398-4B77-AE1A-9D8998A5EB62",
"max_supported_led": 510,
"number_of_led": 250,
"led_profile": "RGB",
"frame_rate": 24,
"measured_frame_rate": 25,
"movie_capacity": 5397,
"serial": "000000",
"production_date": 1586909241,
"production_site": 4,
"group": {
"mode": "none",
"compat_mode": 0
},
"copyright": "LEDWORKS 2021",
"code": 1000
}

where uuid, mac, device_name, hw_id were redacted by me. Also serial (which seems to be new) - I kept length.

Copyright seems to be bumped to this year.

scrool avatar Nov 24 '21 02:11 scrool

If you have a group, the group info will appear in here as well. However it's not super-useful because gen 1 doesn't support it.

JLOrwell avatar Sep 26 '22 20:09 JLOrwell

I had a look into this for my own project.

mode seems to have 3 values:

  • none = no group
  • master = main light to control
  • slave = all other lights in group

If you have an active group then size will be added. This is the total size of all the lights combined. Additionally offset is added when mode=slave

patrickbs96 avatar Nov 27 '22 18:11 patrickbs96

that's how they keep track which light is which in the layout. Twinkly internally is creating a device for the group with a master layout of all of them. The only way to get the layout for the nested devices is to read a section from the master layout with that offset as your start.

On Sun, Nov 27, 2022 at 12:51 PM Patrick @.***> wrote:

I had a look into this for my own project.

mode seems to have 3 values:

  • none = no group
  • master = main light to control
  • slave = all other lights in group

If you have an active group then size will be added. This is the total size of all the lights combined. Additionally offset is added when mode=slave

— Reply to this email directly, view it on GitHub https://github.com/xled/xled-docs/issues/23#issuecomment-1328315914, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADB6POOUL56GASMQDFLXORDWKOUR3ANCNFSM5IU5Y3SQ . You are receiving this because you commented.Message ID: @.***>

JLOrwell avatar Nov 28 '22 03:11 JLOrwell

I had a look into this for my own project.

mode seems to have 3 values:

  • none = no group
  • master = main light to control
  • slave = all other lights in group

If you have an active group then size will be added. This is the total size of all the lights combined. Additionally offset is added when mode=slave

I only see this in the v2 api (meaning pro devices). I am unable to reproduce this on wifi consumer devices.

JLOrwell avatar Apr 04 '23 01:04 JLOrwell