New Amazon DynamoDB persistence addon (alpha/experimental!)

Hi,

I just developed a very alpha level dynamodb persistence for my needs. I thought I would share it here if someone else is interested and in general I’m happy hear feedback regarding this.

For now only storing of values work, not sure if I have the time to develop the query part as far as I can see it should be quite straightforward.

README:

Preview version of DynamoDB persistence addon for openhab. Currently supports only storing value (no querying).

Disclaimer: Please note that the Amazon services might cost you something. I take no responsibility what happens to your amazon account with this addon, please use with your own risk!

  1. Sign up for Amazon AWS

  2. Create user for openhab with IAM
    2.a Services -> IAM -> Users -> Create new Users -> (User names: openhab, keep Generate an access key for each user checked) -> Create
    2.b. Show User Security Credentials and store record the keys

  3. Configure user policy to have access for dynamodb
    3.a. Open Services -> IAM -> Policies
    3.b. Check AmazonDynamoDBFullAccess and click Policy actions -> Attach
    3.c. Check the user created in step 2 and click Attach policy

  4. configure openhab using openhab.cfg:

dynamodb:accessKey=foo
dynamodb:secretKey=bar
dynamodb:region=eu-west-1

Finally, configure addon as other persistence addons using dynamodb.persist file.

The read & write capacity default to 1 for minimum costs. You can override them with readCapacityUnits and writeCapacityUnits configuration parameters.

The persistence plugin creates all the necessary dynamodb tables to store the items. Currently we have several tables, one for each item type (string, integer, date, and bigdecimal)

Download: https://github.com/ssalonen/openhab/releases/tag/v0.1

Pull request submitted with read/write functionality: https://github.com/openhab/openhab/pull/4542

1 Like

Will there be a binding for oh2? :upside_down_face:

1 Like

Good news – there is already!

See this post for more information:

You can refer to official docs at docs.openhab.org: https://docs.openhab.org/addons/persistence/dynamodb/readme.html

I’m also working with core developers to get it part of the openHAB2 distribution, in PR #5334. Unfortunately with very slow progress, they must be quite flooded with all sorts of requests…

1 Like

Update : The dynamodb now has the changes needed for openHAB2 inclusion (1). After next release there should be no need to install the addon manually.

(1) https://github.com/openhab/openhab1-addons/pull/5635