Node.js API Client Module

Hi @mark,

Thanks! I’m loving my Tidbyt, you all far exceeded my expectations with the device!

Integrating with the API was quite straightforward and the base functionality is great. Some things that I’ve been thinking about since using it:

1. Ability to set Brightness to 0 or disable the screen

This would be very handy in the Homebridge plugin as it would allow Homekit automations to turn off the device’s screen. I would love this for my “Good night” scene.

2. Background push for applets with installations IDs

Right now all pushes interrupt the current rotation. I think this is a perfectly acceptable default, but it would be nice to have more granular control.

For example, I have an integration that pulls some metrics from our e-commerce website and shows them every 15 minutes. These metrics aren’t updated in real-time so I rather the refreshed data simply appear during the applet’s regular place in the rotation.

3. Previews for custom installations

Fetching a preview for installations added through the API does not seem to work for me. The following response is returned from the endpoint:

{
    "code": 2,
    "message": "getting existing device from Firestore: rpc error: code = InvalidArgument desc = Document name \"projects/tidbyt/databases/(default)/documents/Apps/\" has invalid trailing \"/\".",
    "details": []
}

4. Rotation Configuration

I’ve noticed that it is possible to configure the order of applets in the rotation using the mobile app. I’d love to have that control in the API. It would allow adding new installations in a specific spot or altering the “priority” of existing installations as they are updated with newer data.

5. Ability to create new installations from available apps

This would be useful to allow scripts to leverage the awesome built-in apps. For example, dynamically creating a new Time Until applet on my Tidbyt when someone creates a new scheduled Maintenance in PagerDuty or adding stock applets dynamically based on news events.

The ability to create these built-in applets, coupled with the existing ability to remove them allows for better control over the rotation externally as well.