rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
3k stars 565 forks source link

Galaxy Lamp #1244

Open custa1200 opened 1 year ago

custa1200 commented 1 year ago

The problem

I have a Galaxy Lamp that has both the clouds and stars function (https://au.galaxylamps.co). The plugin recognises some of the features of the device, including the brightness of the lamp and color of the galaxy projection. It also exposes the scenes.

The issue is that there is no way to control the stars laser turning on and off or the intensity, or the rotation of the Galaxy clouds and stars gobo. There is no ability in HA to control any countdown timer or schedules. These features are exposed through the Smart Life app

Some of these features were also available with HOOBS plugin (https://github.com/seydx/homebridge-star-projector) that I am currently using (currently in testing HA to replace HOOBS)

Environment

Currently just running HA from a VM on a local computer. Lamp is set up correctly in Tuya, is accessible via the Smart Life app and HOOBS

Steps to reproduce

  1. Add integration via HACS
  2. Set up Device
  3. only get a subset of features

DP dump

Provide Home Assistant traceback/logs

put your log output between these markers

Additional information

The Cloud tuya says the device is not supported when trying to set it up via there, but I don't see a similar thing with the local version

addellll commented 1 year ago

Not the prettiest or the easiest, but it is possible to set DP (desired functions) by automations in HA or in Node Red. For example I think this Galaxy lamp only look good with laser brightness 15-20%. So I use in Node Red "localtuya.set_dp" 22 to value 180, triggered if the light would turn on. It is possible to do so by all DP. Play around the the Tuna Developer account and you can learn more about each DP and then you can set them from Home Assistant as you wish. At least for my experience all none standard/regular Tuya items would not integrate in an easy way no matter what integration except for the official Tuya/SmartLife App.

custa1200 commented 1 year ago

The DPs are as follow...

Galaxy Projector DPS "code":"20” -> On/Off "code":"21" -> Mode "code":"22" -> Brightness "code":"24" -> Color "code":"25" - > Scene "code":"101" -> Motor Speed "code":"102" -> Laser Switch "code":"103" -> RGB Switch

I tried putting those DP's into the setup UI and tried to set them in coffin like the following:

CleanShot 2023-02-21 at 20 23 55@2x CleanShot 2023-02-21 at 20 14 37@2x

I am unfamiliar with node red, how do I go about using that?

flewis88 commented 10 months ago

With alot of tinkering, I've got the galaxy lamp working, but the colour selection still is challenging me. I pulled the current state colour (001c00c40320) as a starting point, and I've worked out c00c40 seems to be the HEX for the colour, but unsure about the prefixed 001 or the 320. I assume these might be Saturation, vibrance or Brightness in HEX? When adding to LocalTuya, it seems my only option is to configure colour as "select" and hardcode the options. Is there a better way? I can't find the config file to write it manually, so just going thru the GUI.