Hologram Python SDK --host field

Working with a Nova on Raspberry PI, I use the following command to send to my server: The message gets sent to cloudsocket.hologram.io instead of my server. How do I make it go to my server? I did find if I modified HologramCloud.py to replace the line with the correct server.

HOLOGRAM_HOST_SEND = ‘…’

It works, but that is not a clean workaround.

sudo hologram send --host xxx.xxx.xxx.xxx -v 1 “a test”
INFO: Detected modem Nova_U201
INFO: found working port at ttyACM0
INFO: chatscript file: /usr/local/lib/python2.7/dist-packages/Hologram/Network/Modem/chatscripts/default-script
INFO: Instantiated a Nova_U201 interface with device name of /dev/ttyACM0
INFO: Connecting to: cloudsocket.hologram.io
INFO: Port: 9999
INFO: Connect socket is successful
INFO: Sending message with body of length 88
INFO: Sent.
INFO: Failed to close socket
INFO: Socket closed.
RESPONSE MESSAGE: Message sent successfully

Hello @acheesehead,

The send command on the python SDK was designed around our embedded api for the purposes of sending messages to the Hologram Dashboard. If you want to route messages to other places you could use the connect command to connect your Pi to the internet and then use regular HTTP calls. Otherwise you could do exactly what you describe above, however to keep things tidier you might want to branch off the Nova’s Python SDK and add your own functions that mimic the send function while using your server’s information. A third option would be to use the regular send command and then a route off your dashboard to forward the information to your own server.

Best,
Maiky

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.