Comments (15)
This error occurs when the deviceId pattern is wrong.
Can you share the code snippet by hiding your
- appKey
- secretKey
from python-sdk.
I’ve got it working now by changing the device type to light. How do I make it do something when it turns on/off?
from python-sdk.
def onPowerState(did, state):
# Alexa, turn ON/OFF Device
if did == "<your deviceId>" and state=="ON":
# Do something
elif did == "<your deviceId>" and state=="OFF":
# Do something
return True, state
You can define logic like this.
from python-sdk.
I did that, and I now get an error about indentation. I've tried every single combination of indentations and it still doesn't work >:(
elif did == lightId and state=="OFF":
^
IndentationError: expected an indented block```
from python-sdk.
Which editor do you use?
from python-sdk.
Thonny on RPi
from python-sdk.
Don't copy the code. Try typing it from scratch.
from python-sdk.
it doesnt show an error anymore, but when i turn it on/off, nothing happens. How can I make it work?
from python-sdk.
Just put a print statement and check what data you are getting.
from python-sdk.
only on and off as i should be. i tried it printing 1 & 2 but nothing happened
from python-sdk.
Did you try with web console?
from python-sdk.
Or mail me your code at [email protected] . I'll check whats wrong
from python-sdk.
from python-sdk.
Code is fine
Just change "ON" --> "On" and "OFF"-->"Off"
from python-sdk.
THANKS! 😁 it works!
from python-sdk.
Related Issues (20)
- CPU 100% busy on Raspberry HOT 11
- Example Read Temperature
- Error runing with websocket client HOT 3
- Cant get the sdk to run HOT 5
- Multiple range instances HOT 3
- Error on RaiseEvent setBrightness HOT 1
- immediately disconnects on enigma2 HOT 12
- ImportError: no module named 'SinricPro' HOT 1
- Connection to server lost HOT 2
- Python example HOT 2
- Websocket asyncio blocked on recv()
- Connect to sockets using env
- Actions as class methods HOT 4
- Typo in _sinricpro_constants.py HOT 1
- Energy Monitoring Sensor Python Example HOT 2
- Python example using websocket HOT 5
- Connection with Server Closed HOT 1
- New release? HOT 2
- Porting to Micropython HOT 9
- Missing dependency on setuptools HOT 2
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-sdk.