Is there an API for goodcloud?

Is there any type of API for goodcloud? I would like my routers to be able to query their “Description” in goodcloud for other monitoring purposes. It would also be nice if I could push information into the “TIMELINE” area of goodcloud. Is this possible?

Thank you!

We don’t expose the API.

You can search the Description on Device List of GoodCloud.

You can push information to the Timeline of GoodCloud, even AWS IoT, this is the guide https://github.com/gl-inet/ble2mqtt

Thank you for this! I have tried the “ubus call” command from your link and that does work, although I note that on the MT300N it appears that in the log all messages in the log are prepended with “devicesList.” in the log. Is there a way to get around this? I have also not figured out how to put multiple lines yet.

image

The “deviceList.”, looks like it is a frontend bug, I will fix it.

what do you mean “multiple lines”? I think the “ubus call” just send a string to Timeline, if you want to send multiple lines, just send multiple times. Is this OK?

Ah ok thank you for looking into that!

It is true I could send multiple messages. I was hoping to have multiple lines for a single entry, but I can do as you say. When I tried to send carriage returns in the string they appear to be stripped out.

Could you show me your code? Is it like below?

ubus call mqtt pub '{"api":"/user/data", "data":"Fremont ,\n California, \n"}'

This is the code, called from a shell script:

ubus call mqtt pub ‘{“api”:"/user/data", “data”:"’"$message"’"}’

$message is a multiline shell string collected from a few prior commands. The same string is similarly put into a JSON that gets posted to slack and does come through as multiline. I haven’t poked into it too much to see if I can get it to do the multiline with different formatting.

this bug fixed. please force fresh the page.

Great! Confirm that it was fixed. Thank you for looking into this!

1 Like