Commit b12d6e51 authored by Daniel Kolibár's avatar Daniel Kolibár
Browse files

Update camera.py

parent 80f3f03b
......@@ -30,7 +30,8 @@ def on_message(client, userdata, msg):
print('took photo!')
base64_bytes = base64.b64encode(photo.getvalue())
base64_message = base64_bytes.decode('ascii')
client.publish('birdie/rxtx/from/raspberry', payload=base64_message, qos=0, retain=False)
x = {'houseId':jsoned_message["houseId"], 'data': 'base64_message'}
client.publish('birdie/rxtx/from/raspberry', payload=json.dumps(x), qos=0, retain=False)
def on_publish(client,userdata,result):
print("published", result)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment