Comments (9)
from python-tuya.
The device is in an ON state before the script is executed.
I don't know how to answer your question because I don't know what a timer DP is. Please elaborate.
As far as I know, no other device affecting processes are running and nobody else touches the device except me.
from python-tuya.
from python-tuya.
Thanks for the explanation.
I used Alexa to turn on the light by saying "Alexa, turn on Desk Lamp" in the first place. Alexa would not set a countdown DP value.
from python-tuya.
@law1964 as @BillSobel said this sounds more like a timer (or another device). Like you I'm using Alex (with a skill using the cloud API, I'm not using a HA skill) and I'm not seeing this, I just tried you test code and I'm not seeing this.
Thoughts;
- how many iterations/secs does it take for this to happen for you?
- can you dump data['dps'] in your script before the if? If a timer is set, element 2 will be non-zero - this number does NOT change until the timer expires - or at least that's what I see with my devices ;-) - this would at least help prove/disprove the timer theory
from python-tuya.
I see that you changed the Alexa to the masculine form. I hope the operation went smoothly. :)
The following is the relevant portions of the data dump:
*** Polling started Fri, 29 Jun 2018 07:55:03 2 True
{u'1': True}
{u'1': True}
{u'1': True}
{u'1': True}
.
.
{u'1': True}
{u'1': True}
{u'1': True}
{u'1': True}
{u'1': False}
Fri, 29 Jun 2018 07:59:18 State has changed to 2 False
counter = 456
{u'1': False}
{u'1': False}
It took 456 iterations this time, but it varies. The print data['dps'] right before the if statement in the script shows that there is only one element.
It just twigged that dps could stand for "double pole switch". I was wondering what the acronym stood for...
I'm also wondering whether something is making the device reset. That would explain why it changes to False (OFF) and never to True (ON) while the program is running. I have also noticed that there is a small delay (a few seconds) before I get the message that the state has changed. Is there any way that I can test this?
from python-tuya.
I ran the test program a second time. It took longer the time for the light to turn off, about 27 minutes and 2963 iterations. There is definitely a delay between when the light turns off and when the program detects the change (see sample points in bold). At most, the delay should only be a second.
*** Polling started Fri, 29 Jun 2018 08:27:50 2 True
Fri, 29 Jun 2018 08:27:50
{u'1': True}
Fri, 29 Jun 2018 08:27:51
{u'1': True}
.
.
Fri, 29 Jun 2018 08:54:43
{u'1': True}
Fri, 29 Jun 2018 08:54:43
{u'1': True}
Fri, 29 Jun 2018 08:54:44
{u'1': True}
Fri, 29 Jun 2018 08:54:52
{u'1': False}
Fri, 29 Jun 2018 08:54:52 State has changed to 2 False
counter = 2963
from python-tuya.
I have two plugs impacted by this issue. They blink on and off by themselves several times an hour. I use pytuya via tuya-homeassistant. The impacted plugs are https://www.amazon.com/EPICKA-WiFi-Smart-Plug-2-Pack/dp/B076HKHSSX/ "EPICKA WiFi Smart Plug Mini (2-Pack) - Wireless Smart Plug Socket Outlet, Compatible with Amazon Alexa and Google Assistant, No Hub Required, Remote Control Your Devices from Anywhere". These are marked with model WP1000 model: SM-PW702 FCCID:2AJ5F. I have many other tuya plugs with different brands that work just fine, it's just that one model having the issue for me. I started using https://github.com/tixi/python-tuya-experimental earlier this week and have had issues since. Seems that persistent connections makes the issue go away.
from python-tuya.
Issue still persists it appears but only for some devices. Perhaps this is a firmware bug in particular Tuya devices/versions?
from python-tuya.
Related Issues (20)
- Logo Design Offer as Open Source Contribution HOT 1
- Logging is blocked when pytuya is imported HOT 1
- Web version
- BHT-6000 Thermostat (Decrypt) HOT 3
- dps status
- Vaccum Cleaner HOT 1
- ImportError: No module named 'pytuya' HOT 4
- Tuya 3.3 version support HOT 9
- Cannot use module, OutletDevice method does not exist HOT 2
- Support for curtain switch HOT 2
- Smart Life / Jinvoo request latest release installed HOT 1
- Error when changing color on the light
- Tuya App 2.8 No Longer Valid
- 7.0.4 release on PyPI HOT 2
- new switches different port HOT 3
- PIR & Door/Window Sensor Support? HOT 4
- d.status timeout with a just bought device HOT 8
- Get Device Local Key HOT 1
- 7.0.6 release HOT 2
- socket.timeout: timed out
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-tuya.