I got a new Chinese smart life plug (with no name) and added it to the “smart life app” and is full controllable (according to manual: a smart life device).
I added it to HA (updated it yesterday to v0.103) but it doesn’t show up in devices ! …? Should it show up in devices ? (I expected it to show up and lost a few hours on it)
I found it however as an entity and I can control it with developer tools (switch.turn_off/on)
I also have a Chinese door sensor (Shenzen Neo Coolcam, wifi version) which is also visible in the “smart life app” and it gives alert when the sensor is opened or closed.
However this one does not show up in HA at all.
To complicate things I also have in my HA configuration a zWave Shenzen NEO coolcam door sensor which is working fine in HA.
Furthermore I have another app (HiHome) with a few smart plugs. But HiHome does not seem to play with HA tuya integration (I got username/pw errors when choosing one of the platforms and none of these smartplugs show up in HA.
Any help with getting the smart life (unknown brand) door sensor to work in HA (without flashing the firmware) would be appreciated. (there are no errors in the logs except a few errors at night regarding new connection failure to px1.tuyaeu.com and a few zwave errors).
The tuya component does not support sensors at this moment. I also have a few of thes cheap sensors, i have used a workaround, which perhaps could be used by you. I made an input_boolean and a binary_sensor (based on the value of my input). I “export” my input_boolean entitys to the emulated hue.
Alexa sees these AND using the tuya/smartlife/… skill it also sees the real sensors.
Using this method I create two “Routinen” to switch on/ off the input_boolean. This way HA gets the close/open Event and i even can ask “Alexa is the door closed”.
I think this could be adapted to Google Home also. It is not ideal, but neither zigbee nor RF were able to penetrate my walls. I tried several types of sensors, but i could not use other types of sensors on three of my windows in a reliable way.
Thanks Harald, a bit of a bugger that the tuya integration doesn’t support sensors yet.
I have to study (and find time) how I can adapt your workaround.
In the Smart life app, I created a “tap to run” rule/scene and also an “automation” scene/rule.
Strangely they are being picked up in HA as an Entity (Integration tuya)… it gives me new hope
edit: and these “rules” are also listed under HA scenes and I can execute them.
I am finally able to use my z-wave door sensor to switch on my tuya / smartlife / hihome smart plugs using the tuya (smartlife) app.
Firstly, I created an automation in the tuya/smartlife app. (Task switch on socket, delay 2 min, switch off socket)
In home-assistance I looked for my zwave doorsensor in configuration/devices scrolled to automations.
Clicked the line for “what to do when …door sensor turned on” which has become the trigger in the new automation. I will add a condition like “Between sunset and sunrise” if possible (when i find some time again).
In action I selected “activate scene” and chose the scene created in the tuya/smartlife app.
(goal: when I come home at night, The light switches on automatically for 2 min. I know there are other/easier ways to do this but this is a first with the devices I had available)
You need to create an input_boolean for each of your sensors.
put theses in your emulated_hue: section in your configuration giving them a name of your choice.
After creating the inputs search in the Alexa-App for new devices. You will see your created devices.
You need to activate the tuya or smartlife skill inside alexa to see your real sensors.
When you see Both the real sensor coming from the tuya skill and your input_boolean you create a rule for the sensors to switch the input off whenever the real sensor is switched of. An a second rule to switch the input on when your sensor has turned on.
Using this workaround your input boolean will react with a short delay to changes to your sensor.
Now you are able to create triggers, conditions … using your input_boolean.
Ok, trying to pick this up also but I can not get google home to see the status of the Tuya door sensor, it just shows up as a ‘shield’ without status. Those two virtual sensors appear correctly in google home.
In the tuya app I do see the motion correctly notified and also trying another app (Brilliant) wit the sensor does get the motion, but also this app shows no actions in google home. What am I doing wrong?
The sensors are actually LSC, might that be the problem?