That’s interesting. I’ve also got a repeater on my network (and a few pairs of powerline adapters too, to get my more bandwidth hungry devices off the WiFi), maybe that was my issue with TuyaLocal too. Having said that, I probably wouldn’t stick with TL anyway because it doesn’t let you add sensors, so I would have had to connect all my temp and humidity sensors through another integration, be it Tuya or the always annoying on any platform, SmartThings lol.
Thanks for the feedback!!
I reviewed the device list and found that the infibrite lights that I have are not supported hence my problem. I tried a carro fan/light is it loaded right up along with some other devices, no problem!
Is there a solution for the tuya devices that are not listed? How do I request a device to be added?
Thanks!
update…i changed the protocol version and the infibrite light are now being recognized
Well done!!
I’m glad you followed my instructions.
I assume that all your devices are now in and working.
If not or later you have a device that is definitely not supported yet or there is no other device that is similar, then request support, to add a device to “Make-all”, just raise an issues request at,
GitHub - make-all/tuya-local: Local support for Tuya devices in Home Assistant.
Note, you must be logged-in to Github to raise a issues request.
Once you select “issues”, you will see lots of other requests from others, both current and closed.
I suggest you look at some of these as examples as to what information is required to raise a new request.
Then select “new issue” green button, then “New Device” then “get started”.
Then follow the long list of instructions.
But to simplify, just provide the Device Product Id (not the Device Id), found with same method as Local key.
Again back at the TUYA IOT web site,
1. open/select the project you created on the right hand side,
2. then select the device tab,
3. copy the device id that you want all the DPid details for,
4. Again hover over cloud label on the left and select API Explorer,
5. select on the left menu “Device Control” on left, then select the sub menu “Query Things Data Model”,
6. Paste the device id in the box provided and click :Submit Request" button,
7. Copy all contents from response and add to the Github new device request form.
I hope this helps.
Just to be clear this content that you just copied has a lot of required information, but it seems not quite easily readable. So I would post process it a little to make it more readable.
Firstly, do a google translate of all the contents to convert any Chinese words to English.
I then replace all commas, with a CR(carriage return) character, notepad++, can do this easily.
replace “,” with “\r”, then delete all “” , it is now a lot more readable.
So now this can be pasted in the new device request, since all required information is available here to create a new device YAML file, thus supported, note it may need some testing and debugging initially, but this is normal and depends on the complexity of the device.
At least this is the process that I have used.
(maybe someone can write a simple script to do the content massage for this information)
Good luck!!
David,
I do not quite understand your comment the “TL does not let you add sensors”.
Do you mean a new device that has sensors?
Because obviously, all the devices that are currently supported have been added over time.
So a new device that is not currently supported may be requested to be added, by providing relevant device information. (see instruction that I provided to Anj-0110)
On the other hand, if you wish to create your own device file yourself and you fully understand the YAML configuration rules and device dpid, etc, then you can create your own files and take full control, but then it’s yours and no one else can then benefit from this new device file.
I have to say that I was a bit lost with sending messages to these forums. epajfl00, you have been most helpful and really the only one that has provided real context to get me past the issue. It might be easy for some understand HA and code but I’m learning.
One last question for now, I switched for LT to TL because the lights were turning on and off randomly and thought switching would eliminate the issue. This is happening in the system somehow, (imo) and through the logs I can’t tell what is causing random on or off commands. After switching devices over to TL, this morning all the lights were on. I don’t have any automations or triggers to run. Is this behavior a TL issue, a internet losing connection issue, alexa, smartlife? I have looked for a power on behavior or something of the sorts but I don’t know how to dig into this further?? Can you provide some feedback?
Thanks a ton!!
Thanks for your comments, I try to provide steps by step instructions that I would want from others to provide, if I can.
What I can say from my own experience, TL is super reliable, stable and effective.
So, I don’t believe your issues are TL related.
In my case, I don’t have WIFI repeaters, mains power is stable, and WIFI is stable.
So your case could be related to having WIFI repeaters as indicated by “Zagal” a couple of days ago.
What you could do is firstly look at the history of that entity.
This is an example of mine.
See what time it dropped out and then see what may have happened at that time, also try to turn off any repeaters (to make sure that is not the issue).
BTW, is the issue happening with both infibrite lights and carro fan/light, if not, then that should be investigated too, eg. the distance from your router to the device.
Start with this.
I am having random light on calls for most all the devices not just infibrite. I only have the modem/router that my rpi4 is connected via ethernet cable, I don’t have any repeaters. I tested this morning, I turned off the modem, waited and turned back on. Upon network reconnect no lights came on. however, when I restart HA i can duplicate the random “on” call. I just don’t know what is telling them to turn on. Also, when they turn on, the ones that do turn on all come on always at 56% brightness. I don’t know how to further troubleshoot this?? In the logbook, when I cycle a command it puts my username in the log and when these other light-on call happen there is nothing in the log that shows what turned it on.
That is interesting and most annoying.
Again in my case I can restart HA as many times as I want with absolutely no effect on any devices.
Obviously, there is something else going on with yours, since restarting HA causes the issue, but you have also previously indicated that in the morning you have found the lights on, meaning no manual restart was initiated. (noting, if a HA update was available and if you have auto update set, then a restart could occur overnight automatically) . If this is not the case, then at what time do the lights go on overnight, without a restart being initiated, is it always at the exact same time or totally random?
I don’t believe this is your case, but if the device lost power it would then reboot/restart, and depending on how it is set to handle power on state (ie, on, off, or last state) could be an issue.
Do you know if “power on state” is an available setting for your devices?
Some of my devices do have this setting and I always set to last state.
Do you have your lights set as groups?
What makes no sense to me is HA restart replicates the problem.
Are you sure you don’t have any other blueprints or other integrations that could be interfering with your config.? If you do, try disabling them, and then restart HA, to rule them out.
I’m running out of options here.
Let see here…
Random lights are coming on at random times, not just overnight. To my knowledge I do not have any auto updates or restarts set. All the lights are wired into a dumb outlet or wall switch for power. For the “power on state”, I can only see the “power on behavior” in the SmartLife app, I’m unaware of where to find this in HA. And for the power on state, I have set a custom color for the power on behavior so I know if this a power issue, however the lights turn on at 56% and not the custom setting.
I do have lights set up in groups. For the blueprints integrations, I don’t know which one could be interfering? I’ll look into this more. However, I thought the log would tell me what is turning on the device so I can troubleshoot.
Also, I looked in the system log, below, i’m getting a lot of errors.
This error originated from a custom integration.
Logger: custom_components.tuya_local.device
Source: custom_components/tuya_local/device.py:545
Integration: Tuya Local (documentation, issues)
First occurred: October 16, 2023 at 11:46:27 (18395 occurrences)
Last logged: 14:19:03
Failed to fetch device status for Galley 01
Failed to fetch device status for Living room 1
Failed to fetch device status for String TV
Failed to fetch device status for UCL 3
Failed to fetch device status for Living room 7
Also, when i look at the log within the device info window the device is unavailable or unknown for some reason then something turns it on. This is where I am in deeper than what I understand. Is the log telling me the service “Light: Turn on” is doing this? If so, how do I dig into this further?
I suggest that you raise a bug issue on TL, since the log is referring to;
Source: custom_components/tuya_local/device.py:545
This line in the code for device.py is;
entity.async_schedule_update_ha_state()
What I don’t understand is does this only happen with TL, what about TUYA (cloud based) on HA?
Also the groups I would try disabling, especially since scene is becoming unknown.
I was having the same issue with LT and thought that moving over to TL would fix the issue. I only used TUYA for a short time and do not recall issues but I switched to LT to get away from the cloud.
Curious, how is myTL code any different from everyone elses that uses TL? I haven’t gone into file editor to change anything?
I tend to agree with you, so it can’t be TL or SL or even Tuya, there must be something with your setup, again try disabling other integration, groups, any schedules, etc…
Is it still happening at random times or is there a pattern/time on a regular basis?
Hi,
Yes, the GitHub page for LocalTuya says that standalone sensors are not currently supported and (as far as I can remember) the sensors.py file isn’t part of the custom component download file. Yes, I could add the relevant code to either in the HA Config files or via downloading the Tuya SDK and adding the sensors.py file to LocalTuya file, or contact the developer and ask them to add each of the different devices. However, given that the Tuya integration automatically adds everything from your Tuya/Smart Life app, including all standalone sensors (such as my temp and humidity sensors), without any setup work or hassle, means that all of the above seems like LocalTuya is more hassle than it’s worth to have things run locally, for me at least.
**Update - The Tuya developers (at Tuya itself) are currently beta testing a new Smart Life integration that works exactly like the current Tuya integration (as in adds every device and scene automatically) but DOESN’T require a Tuya IoT account and the 6 monthly requests for IoT Core access. You only need to enter your User Code (from your Tuya/Smart Life app security settings page) and all devices in the app get added to HA. While it is still in Beta testing you can download it as a custom repository from…
https://github.com/tuya/tuya-smart-life?search=1#smart-life-beta-home-assistant-integration
…I’ve already installed it and it works perfectly.
You can easily get device id’s and local keys with only your account credentials using this python script
LOL…Easy for you…? Are there any instructions on how to use tuya-uncover from a Homeassistant instalation? Yes it would be very helpful to use with Tuya-Local.
You run it from any computer that has python and the instructions are in the readme file
Hello,
It’s been awhile…
So far, the conclusion to my issue has been to turn off the SMARTLIFE app running in the background in the permissions on my phone.
FINGERS CROSSED!!
Still don’t understand why TinyTuya isn’t just built into this integration somehow. Make it prompt for the one key from the Tuya cloud API, have it do all the scanning and fetching of local keys…etc.
I don’t get any "dp_id"
keys returned in the json when I make this call. I do get a key with chinese text which google translate confirms it matches the name of the action - eg “docking”. Is there something else I need to do? This is on a Lubluelu sl60d.