Has anyone used the Micro:bit devices to Cayenne? I’m just starting with Cayenne and haven’t figured out how to add new devices.
Hi @rjydev, welcome to the Cayenne Community.
In general, to connect an unsupported device to Cayenne you would choose the ‘Bring Your Own Thing’ option when adding a new device in our UI, and then run an MQTT client on the device with the credentials provided to facilitate communication with Cayenne.
Just poking around the Micro:bit website I can see it supports Python code, but I don’t think it will be able to use our Python client since it doesn’t have an OS (does it? does it have a filesystem you could clone our library to?)
If the device supports Arduino sketch code, it would likely work with our Arduino client, though it may need a new sketch to facilitate internet connectivity.
If nothing else, I’ll add it to our roadmap for future support from our end.
No, it doesn’t have an OS. Basically uses external compilers and re-flashes whenever you drop a hex file on its file system.
It does have BLE so I was hoping there was an existing MQTT client that would run on it and support its devices. It is nice in that it is compact and has an accelerometer, compass, LED array and a couple of buttons.
Do you support BLE or would it have to communicate via USB serial?
I found a link to a project that uses the BLE uart and MQTT-SN but I haven’t gotten it to work yet. Unfortunately, it requires a device to receive the BLE transmission and software to bridge MQTT-SN to MQTT but I could do that with an RPi3 that handles some of my other home automation. If I can get the example to work then I can try it with Cayenne. I’m having issues with getting everything to compile on Windows (trying with WSL also). I actually got all of it to compile with WSL but it is not functioning. The example was done with OSX. When I get home in a few days I can try it on OSX and Linux (RPi).
Here is the link: Using MQTT-SN over BLE with the BBC micro:bit - Benjamin Cabé
We don’t have any explicit Bluetooth connectivity support in Cayenne, but really if you can get this MQTT client running and the device connected to the internet, I don’t see why that should matter. The beauty of MQTT is that’s a fairly simple publish/subscribe protocol, so as long as you’re able to do that, you should be able to interact with our MQTT broker.
There’s a project here that uses bluetooth, might help?
Did you get anywhere with this?
Perhaps via its Radio ability and another as a receiver, you could setup a swarm of them.
till now we have no support for micro:bit, you can try with our arduino MQTT if it working.
I think I need to use MQTT-SN (MQTT for sensor readings if I have that correct, )can the server accept that or will I need a go between?
you can use the python library GitHub - myDevicesIoT/Cayenne-MQTT-Python: Python Library for Cayenne MQTT API