Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Color temperature doesn't work for Lumiman bulb #27

Open
DeltaWhy opened this issue May 25, 2018 · 12 comments
Open

Color temperature doesn't work for Lumiman bulb #27

DeltaWhy opened this issue May 25, 2018 · 12 comments

Comments

@DeltaWhy
Copy link

DeltaWhy commented May 25, 2018

My bulb is white spectrum only, no color support. d.status() returns this: {'devId': '<redacted>', 'dps': {'3': 25, '1': True, '2': 255}}. Poking around with generate_payload and send_receive shows that 1 == state, 2 == brightness, and 3 == color temp, which doesn't match up with your set_white function.

@DeltaWhy DeltaWhy changed the title Color temperature is broken Color temperature doesn't work for Lumiman bulb May 25, 2018
@clach04
Copy link
Owner

clach04 commented May 25, 2018

@DeltaWhy interesting find, annoying if the keys are different :(

Can you dump the schema for the bulb? See https://github.com/clach04/python-tuya/wiki/DeviceSchemas

I'm going to guess we need another model/class in the module to handle this case. I don't have any bulbs myself (only switches) so we're relying on a collaborative effort on this one.

CC @samuscherer on this as they may be interested.

@samuscherer
Copy link
Collaborator

samuscherer commented May 25, 2018

Very interesting, but it shouldn't be a problem at all to implement another class/model for your kind of bulb.

@clach04 You can assign this issue to me and I'll take a look at it asap.

@DeltaWhy
Copy link
Author

Here's the schema (this was under .productBeen[0].schemaInfo.schema as an escaped string, I did my best to un-mangle it):

[
  {
    "mode": "rw",
    "code": "led_switch",
    "name": "\u00e5\u00bc\u20ac\u00e5\u2026\u00b3",
    "property": {
      "type": "bool"
    },
    "id": 1,
    "type": "obj",
    "desc": ""
  },
  {
    "mode": "rw",
    "code": "bright_value",
    "name": "\u00e5\u00bc\u20ac\u00e5\u2026\u00b3",
    "property": {
      "unit": "",
      "min": 25,
      "max": 255,
      "scale": 0,
      "step": 1,
      "type": "value"
    },
    "iconname": "icon-dp_sun",
    "id": 2,
    "type": "obj",
    "desc": ""
  },
  {
    "mode": "rw",
    "code": "temp_value",
    "name": "\u00e5\u00bc\u20ac\u00e5\u2026\u00b3",
    "property": {
      "unit": "",
      "min": 0,
      "max": 255,
      "scale": 0,
      "step": 1,
      "type": "value"
    },
    "iconname": "icon-dp_light",
    "id": 3,
    "type": "obj",
    "desc": ""
  }
]

And here's the Amazon item: https://www.amazon.com/gp/product/B075GGXNZ1/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1

I dumped the schema by registering the bulb with the 'Smart Life' app on a rooted phone, but strangely enough the API doesn't seem to work with that app (I did update the localKey). I re-registered through the 'TuyaSmart' app and now it works again. Guessing there's different servers for the different branded apps?

@clach04
Copy link
Owner

clach04 commented May 26, 2018

@samuscherer for some reason I can only assign @DeltaWhy or myself, not sure why.

@DeltaWhy thanks for the information! I can confirm from discussions on the javascript project that kick started this python project that the backend servers are completely separate (it also matches my experiments too), I tend to only use the smart life app to dump the schema.

@BillSobel
Copy link

The back end servers are the same. The only difference is the keys used to make the requests. Each key set is a unique silo on the back end, but running in same AWS servers.

@BillSobel
Copy link

Can I sugggest that specific hardware should not be modeled but rather that the different data point types should be modeled. There is no reason one could not ship a powerstup with 5 outlets and an rgb indicator. Modeling DPs supports any device generically.

@samuscherer
Copy link
Collaborator

Sorry that you guys haven't heard anything from me - I'm currently pretty busy and will be for a few more days but I haven't forgotten this issue and will definitely be looking into it.

@ch491
Copy link

ch491 commented Jun 20, 2018

I am a NOOB to Nodeservers and Polyglot. @DeltaWhy What node server are you using to control the Lumiman bulbs? I have one to test before I purchase many more. I am using ISY994IZW and want to control either the Lumiman or TP-Link Tunable White LED bulbs. Any pointers for a Noob would be welcome. TY in advance.

@clach04
Copy link
Owner

clach04 commented Jun 21, 2018

@ch491 this is a Python based library, not Node. From what I can gather the ISY994IZW is a Z-Wave based device, this library is only for WiFi based devices.

@BillSobel
Copy link

BillSobel commented Jun 21, 2018 via email

@clach04
Copy link
Owner

clach04 commented Jun 21, 2018

Cool, thanks Bill. In that case @ch491 you probably want to take a look at https://github.com/codetheweb/tuyapi instead which is Node.js based rather than a Python one.

@ch491
Copy link

ch491 commented Jun 21, 2018

Thank you both, I was going off of @DeltaWhy 's post as it sounded like he was using the python GitHub project Ployglot (a nodeserver) that is the "shim" between the ISY home automation controller (zwave,Inston,and some IP control) to control Wifi Bulbs like LiFX etc using the MQTT protocol. Looking to see is a shim (python) has been created for the Lumiman (Wifi/MQTT) LED bulbs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants