LSC Smart Connect/Tuya binding

In The Netherlands recently devices of LSC Smart connect are sold at very low prices. These includes color lamps, white ambiance lamps, smart power plugs, etc. There are solutions to use the local API of these devices (see e.g.https://github.com/codetheweb/tuyapi), but no native openhab2 binding yet.

I started developing one. If anyone is interested please check it out at https://github.com/wvissers/openhab2-addons-tuya and let me know.

5 Likes

Lots of people will be interested, these devices are generally quite cheap and reliable.
Post away

Thanks!

PS, I changed the category to Development/Add Ons

Ok, thanks. I will continue to share this and have a look on how to contribute.

It’s a nice idea, Tuya-mqtt by tsightler work nice also

Hi,

I’m interested to try this. Which devices are currently supported?

Kind Regards
Tim

Hello,

First thank you for this binding. Just got 2 filament bulbs to play with.
It take some time to get the right codes, but got them.

Below some things that I noticed. So maybe helpful ?

The first time I made a fault entering the codes, and I had to remove the Thing and make a new one the get the bulb Online. It seems that after entering the code wrong the Thing never go online even when the Dev and Key are the correct one. It keep saying
“tuya:filamentled:ebb9fb28’ changed from OFFLINE (COMMUNICATION_ERROR): java.net.SocketException to OFFLINE (CONFIGURATION_PENDING)”

It’s is not the big problem but maybe worth to mention.

There is a bit of a response delay. I assume it’s the bulb and not Openhab / binding.
The original app isn’t any faster.

The brightness control seems to be +/- to current state ? As I need to add for example -20 to get 20% off and +20 to get 20% more brightness form the current state. But the Item shows as name “Helderheid (0%…100%).” That assumed you can change value from 0% ( min ) to 100% ( max ).

Thanks again for the great work to make this cheap bulbs working. I think it can make a lot of people happy. I think the filament bulbs are really nice.

Best Regards,
Olaf

Thanks for the trick, delete the Thing and add again work perfectly,
Actually I use LED Strip Color from tuya, and le color item seem to won’t work, also the brightness item is a Number… Whe can’t adjust with slider in sitemap?
The on off switch react very quickly on me side

Thanks for the help

Hi, Thanks for the binding! I will give it a try with some Filament Leds!

I tried to add it, but I still receive the error: UNINITIALIZED - HANDLER_INITIALIZING_ERROR Device ID already assigned to a Tuya thing. After removal and adding it again. Any suggestions?

Restarting Openhab did the trick… :slight_smile: Continuing fiddling around.

I currently use it with LSC Smart Connect Power Plug, LSC Smart Connect Smart LED (color) and LSC Smart Connect Smart Filament LED. LSC Smart Siren is also implemented, but not entirely tested yet. Please note that this binding is still under development. All devices are updated to the latest firmware.

Some people reported stability issues, and these are under investigation right now.

Thanks for the comments Olaf. I will have a look at it. It may take some time to fine tune the binding.

I did some testing as well. I have 3 filament leds connected to one switch and an old fashion physical switch as a backup for my wife :blush:. When I switch the lights on with the wall switch, it takes a long time before they or one of them responds. When they respond, it varies in only a few or all. Then it falls back in communication error. When trying the native app, it instantly communicates. It seems that initialization or keep alive polling is being used?

Nonetheless, I really like your efforts and hopefully you can nail it :+1:

@wvissers . Your binding work only with LCS devices, or you think to extend at all tuya/smartlife devices ?

Because DPS are same for others devices. I haven’t tested your binding because I use MQTT (for ON , OFF, color, Dimmer… etc) for all my smartife devices.

it would be interesting to have a complet binding for smartlife devices , no ?

@Fiftiz
I don’t own other devices besides the LCS ones, so I cannot test it. I suppose on/off devices will work. The other devices like lights may also work, unless they have different proprties mappings.
Since the complete source code is available through Github, someone may want to add other devices to the binding.

Hi Wim,

Looking forward to try the next ‘beta’ version.
Thanks for all the effort for making this binding.

Olaf.

I changed the brighness and color temperature channels to be of type ‘Dimmer’ and not ‘Number’. Indeed, that is a better choice. It might require to delete and recreate things that were created with the previous version of the binding to reflect these changes. Anyway, it should now properly behave as 0…100% channels.

Nice,

Will give it a try this weekend.

You think it’s possible to add a thing on this binding where you can add manually several DPS value for ON or OFF ? This could open the perspective

for exemple for others device with 2 ways :
On = { “dps”: 1, “set”: true }
Off = { “dps”: 1, “set”: false }

And

On = { “dps”: 2, “set”: true }
Off = { “dps”: 2, “set”: false }

Hello,

Just tried the new version. And it’s a lot better controlling the brightness in this way !.
2 Things I noticed is that there can be a number rounding issue. I had a dimming value of 12.15686274509803900%

One thing that I found that is great for me, you can dim lower than with the original app. So you can make the filament bulbs more useful for ‘design / ambiance’ light.

An other thing I found is when you change te name of the thing when making it the Thing goes offline. I get a CONFIGURATION_PENDING message in the log, and the following message in the log.

2019-10-06 10:36:47.444 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 

java.lang.NullPointerException: null

	at org.openhab.binding.tuya.internal.net.TuyaClient.send(TuyaClient.java:170) ~[?:?]
	at org.openhab.binding.tuya.internal.net.TuyaClient$1.run(TuyaClient.java:110) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

It will me a bit unhandy if all Items have the same same name.

Thanks !!
Olaf