So, the python library seems to do a good job of sending a message to the Hologram cloud.
Though in order to make it work, I must FIRST connect, then send the message like so:
from Hologram.HologramCloud import HologramCloud
hologram = HologramCloud(dict(), network=‘cellular’)
hologram.network.connect()
hologram.sendMessage(msg, topics=[topic])
hologram.network.disconnect()
Its not at all clear in the documentation that one must first run hologram.network.connect() BEFORE sendMessage. But, then again, perhaps something just isn’t working right my set up. Hopefully some one can clarify whether the expected behavior is to run connect first, or if it shouldnt be required.
But, the main problem I’m coming across is that the CLI is not usable for me. If I do this:
sudo hologram send --cloud --devicekey ‘-----’ ‘msg’ --topic ‘topic’
It hangs.
If I run sudo hologram network connect.
It connects successfully. But then I try to send a message AFTER connecting. But then of course I get the: ERROR: Unable to detect a usable serial port, because the port is already occupied by the connect.
It seems the CLI is stuck. Whats the method to actually send a message using the CLI?