BLE Gateway V4 MQTT and problems getting information msgpack.unpackb

Hi Joernt,

please make a new topic to keep the original topic clear.

Please also try with tool such as MQTTBox to subscribe the message first.

Hi,

I tried MQTTBox and I could verify, that the BLE Gateways are working properly. My problem is, that I can’t reproduce your parsing result (from Nov. 2018).

It seems, that the “for-loop” is not to be run through. I am using Python 3.6 - is this maybe the reason? Thank you very much for your assistance.

Best Joern

Yes. I can reproduce the issue with Python 3.8. But python 2.7 works fine

Hi, I am trying to run the code example but keep on get the following error.
File “ble_mqtt_1.py”, line 12, in on_message
for d in msgpack.unpackb(msg.payload)[b’devices’]:
KeyError: b’devices’

I managed to fix the issue, I was using Python 3 and the code only works with Python 2

please check the python3 example instead

1 Like