Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Smart home control panel #19

Open
ChopsKingsland opened this issue Apr 3, 2020 · 3 comments
Open

Question: Smart home control panel #19

ChopsKingsland opened this issue Apr 3, 2020 · 3 comments

Comments

@ChopsKingsland
Copy link

I want to make a smart home control panel after I got my python program with the SinricPro library working. I want to do this with either a web server or PyGame. There is just 1 issue. Telling the Alexa service the current state of the device. When I push a button to turn on my lights using SinricPro, is there anyway to feed back to Alexa to show up on the app saying the current state? E.g. If I turned on my light from the control panel, I want the Alexa app to show that state change.

@thegoliathgeek
Copy link
Contributor

@ChopsKingsland

There is an option for this also. You can use events that are in the example codes.
You can try this simple example

@ChopsKingsland
Copy link
Author

i've just tried using this, but I can't seem to integrate it into pygame. I put the python for pygame into the app.py, but it either runs pygame, and then when I close it, it runs SinricPro, or it runs none at all.

@thegoliathgeek
Copy link
Contributor

It's because sinricpro lib uses asyncio. Which runs on the single-event loop. So running pygame and sinricpro on main thread is not a good idea. You need to run them on separate threads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants