Comments (6)
When using the app or cloud the devices switches to broadcasting it's state in an encrypted mode and there is nill support for local mode if you have the app open or I suspect Alexa running over the cloud. But getting the state via cloud mode should work fine.
from njstuya.
I mean, if I turn the outlet on via Alexa or manually by pushing the power button on the device, how can I detect that in a rule?
from njstuya.
You need to run a rule to check or get the status every x seconds or get the status before running an action. There is no "push" functionality for local or cloud. So if I have a function that gets the status every 5 seconds. So if if I push the power button on the switch it should update via openhab within 5 seconds.
from njstuya.
This problem can be avoided if only local control is used?
from njstuya.
@TRSx80 Local control won't help, you have to get/check the status to see if it has changed or been updated by another source. The only way I can think of to see if a device state may have changed is to have a wifi card in promiscuous mode and get the state if any packets are sent to the tuya device. But like I said previously it would be more reliable and much simplier to just run the script to get the state every second or so.
from njstuya.
Thanks for clarification!
In my case, for actuators anyway, the commands would always be coming from the HA controller, so I guess that means I would be OK (at least for time being). Something to keep in mind though, in case that changes later. 🤔
Also, I made a post over on your thread at OpenHAB as I been researching current state of Tuya stuff on OpenHAB. You seem quite knowledgeable on the topic since you seem to be using it for a while already, so I sought your feedback. Not sure if you check in much over there any more these days...
from njstuya.
Related Issues (20)
- get/set command format issue with openhab
- is there a way to set set multiple dps options in one command? HOT 1
- Multi-outlet Devices HOT 4
- Error in openHAB HOT 5
- Trying to understand local and cloud mode HOT 5
- Does this also work with the Woox products? HOT 5
- Cannot read schema from device. HOT 1
- Problem with Emylo SS-8839-03 and njstuya local
- "Error: find() timed out." when running "sudo node node_modules/njstuya" HOT 1
- Problem with connection to device after firmware upgrade HOT 5
- Tuya Curtain switch HOT 1
- Plug Compatibility Question - HOT 13
- Gusund Wall Switch does not respond to njstuya commands HOT 1
- debug error on run HOT 1
- Can't read the schema HOT 2
- Please add device - wattmeter. HOT 1
- Commands not send anymore HOT 2
- After upgrading my pi and then rebooting ... HOT 1
- Unable to authenticate after upgrade HOT 1
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 njstuya.