Local Tuya - Control Tuya devices locally (Fork from localtuya)

Hey Guys,

My tuya integration stopped working, so I gave this a try and pretty much got all devices working exept one occupancy sensor, which for some reason as a short local key from the smartlife app.

When I try to add it to the HA, I get this error “An unknown error occurred. Invalid key size (32) for AES…”

am I missing something stupid ? The sensor works in the app and worked previously with Tuya cloud official integration.

Thnx you, things are going in the right direction. I now have all the entities, but I’m missing an entity that allows you to create the humidifier card, so I think missing the entity humidifier.dehumidifier look at the Tuya standard integration

Master Brance:

binary_sensor.luchtontvochtiger_fault
fan.luchtontvochtiger_fan
sensor.luchtontvochtiger
select.luchtontvochtiger_countdown
select.luchtontvochtiger_target_humidity

Tuya standard integration:

fan.luchtontvochtiger
`humidifier.dehumidifier`
select.luchtontvochtiger_aftellen
select.luchtontvochtiger_doelluchtvochtigheid

I’m missing an entity that allows you to create the humidifier card

Not sure what happen in your case however, download entry diagnostics and inside of the txt file you should find your sensor data under “cloud_devices” object maybe it will give you a hint of the issue. Tuya cloud doesn’t interact with devices directly so the localkey doesn’t matter there as it does in local tuya.

That’s because the fact that you have 2 entities fan and humidifier is wrong both of them are doing the same function for you, your device is dehumidifier so you shouldn’t have fan entity here unless there is a fan feature in the device which it doesn’t from device diagnostics you posted.
I just noticed that and I removed the fan entity for humidifier devices in master and next releases.

Hi @umu_ugg will this feature/option be added back in the future? thanks again, have a great day!

which one do you mean? if it the fan entity like I mentioned it not usable for humidifier because both of them share the same ID and function turning on/off the fan will also toggle humidifier with it.
of course I’m talking about Auto Configure Entities it still fine customize it if manually configure.

I just downloaded the latest release 3.2.4.1, and everything works fine now. I did “Reconfigure existing device” myself because the timer and target humidity had more options in the dropdown menu than I could use. Another question, how do I get the target humidity and visual color like the example below in my huminidy card. Do I have to customize that myself or is that an entity that I don’t have?

Thnx you for your help

My humidifier
modus

Other humidifier

ah sorry, there is no fan control on our dehumidifier, and I have manually configured it

Trying to add a fingerbot with BLE Gateway but when I try to add the BLE gateway, it say device not found. On Tuya IOT and the app everything works. Tuya local is also able to detect the gateway as well.

How can I troubleshoot this?

reset the device, and make sure it’s not added in either native-tuya, or Tuya Local

it say device not found. when does it say that when you try to auto configure entities?

The gateways are not supposed needed to add unless they have more features other than being hub. for auto configure feature I haven’t included any gateway configuration because I haven’t seen gateway being useful to add you can directly add your device if it’s supported and controllable. If you want to check your gateway exposed DPS download your entry diagnostics you should found your gateway data under “cloud_devices” object you can search for you gateway by it’s name then check “dps_data” object.

If the device aren’t connectable and the error says something like “no dps found” then check boheme61 reply.

When adding the BLE gateway it say device not found. Since the fingerbot does not have an IP address, how would I go about manually adding it to Tuya local?

In IoT cloud the BLE gateway does not show any dp_id.

Have you tried this integration, for your Tuya BLE-Devices ?

PS: I only use Local Tuya for Wifi Device

1 Like

After failing with the original one, this is the one I’m using.

? with “this is the one i’m using” are you referring to the link i suggested you… or this Integration !, where you post/ask advice ?

Have you tried above Integration, For your BLE-Devices ?

That’s what I mean, I’m currently using the above integration.

ok , well im still puzzled, if it works there, then why bother about this integration ?

This Integration:
GitHub - xZetsubou/hass-localtuya: 🔹 A Home Assistant integration to handle Tuya devices locally "fork from localtuya".

Above Integration:

Notice the difference !

I doubt there is any support for Bluetooth device in this integration, maybe you are in the wrong Topic, or should search this forum for your device , there might be a Topic for your device :wink:
No offense, but if i have a device, i try to find the best suited-able integration for it.
And not wondering to much about why others dont support my device.

The BLE and ZigBee devices should automatically discovered if the cloud is set-up and the devices is connected to your HUB and online and connectable. because after connecting them to the gateway they will be assigned with “node id” and if you want to connect to the device you will need to connect to the gateway IP but change the node id field to your BLE device or the any targeted sub-device, you can find you node id in the entry diagnostics.

But like I said the device should’ve been automatically discovered if nothing goes wrong and will be shows in discovered devices as (sub device)

I’ve recently integrated my Atomi Smart Portable Heater, but I am confused about the DPid ‘8’ which is called “Shake”. Is that the Swing mode? It is a boolean value. Where do I add this config in LocalTuya? I am currently trying to input all these DPids inside a Climate entity.

Also, for DPid ‘4’, which is “mode”, the only value I see is ‘Auto’

add more entities to the device then add a switch entity for DPID 8.

Thank you!