Código para Latch físico: Latch_checkstatus.py

502 views
407 views

Published on

Código en Python para el hack de controlar un cerrojo con un Latch y una conexión en Raspbery Pi. Más información aquí: http://blogthinkbig.com/latch-cerrojo/

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
502
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Código para Latch físico: Latch_checkstatus.py

  1. 1. #!/usr/bin/env python import latch AppID="xRXXXXXXXXXXXXXXXXmC" AppSecret="ZjqbesFXXXXXXXXXXXXXXXXXXXXXXXX8fZdBaqyb" AccountiD="3d86b22XXXXXXXXXXXXXXXXXXXXXXXX467b49d432975ea8c6602a65dea" api = latch.Latch(AppID,AppSecret) response = api.status(AccountiD) responseData = response.get_data() #responseError = response.get_error() try: status = responseData['operations'][AppID]['status'] except: status = "unknow" print status

×