Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
geir-eilertsen committed Dec 23, 2024
2 parents da6d6e2 + 57a5294 commit 3e31b81
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
9 changes: 9 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# How to contribute #
Thank you for investing your time in contributing to our project!

* Fork the repo
* Let Marvin check out your house
* Fix something in the code
* Create a pull request (PR)
* The PR is approved
* Congratulations, you contributed


20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Welcome to Marvin, the smart house robot

Marvin is a robot that can connect to an OpenHAB server, read item states and send commands via
the REST API.
Marvin is a RAG AI agent that can connect to a house control server, read sensor states and send commands via
the REST API. At the moment, OpenHAB is supported, but Marvin can in the future be extended to other systems.

It's brain is implemented in Spring AI.
It's brain is implemented with an interface to AI and conneccts to AI using the Spring AI framework.

You can talk to Marvin in natural language and ask him questions about your house. He will talk back to you.

Expand All @@ -12,14 +12,14 @@ You can talk to Marvin in natural language and ask him questions about your hous
* Put a text file called marvin-environment in your home directory.
* There are example files in the descriptions folder

* Marvin will read item descriptions from OpenHAB and learn about them. To enable items, add the tag Marvin to the item in OpenHAB.
* Marvin will receive events from OpenHAB. To enable events, add the tag Events to the item in OpenHAB.
* Marvin can read OpenHAB rules. To enable rules, add the tag Marvin to the rule in OpenHAB.
* Marvin will read descriptions from the connected control server and add them to a vector store for use in prompts.
* For OpenHAB items, add the tag Marvin to the item in OpenHAB.
* Marvin will receive events from the control server and use them for prompts. To enable events, add the tag Events to the item.
* Marvin can read control server rules. To enable specific rules, add the tag Marvin to the rule.
* Marvin can also update rules.

## How to run Marvin


To use Marvin, you need to have a running OpenHAB server.

Add the following environment variables
Expand Down Expand Up @@ -49,15 +49,17 @@ You can do this by running the following command:
CREATE KEYSPACE springframework WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
```

When the application has started, open localhost:9090 in your browser. You will be redirected to the OAuth2 login page, currently at github.
When the application has started, open http://localhost:9090 in your browser. You will be redirected to the OAuth2 login page, currently at github.

A person record is then added in the personentry table with relation STRANGER. Change this to FRIEND and refresh the page.

There is a swagger ui included on http://localhost:9090/swagger-ui/index.html To initialise Marvin, use the POST /initialise endpoint.
There is a swagger ui included on http://localhost:9090/swagger-ui/index.html To initialise Marvin, use the POST /initialise endpoint. That will clear it's memory and populate the vector store.


## Cool things to try
* Change the rule for the lights in the living room to turn on at sunset
* Notify me about dinner in 5 minutes
* Turn on the lights in the living room
* What is the temperature in the living room?
* Increase the lights in the corridor to 100 in steps of 10 with 2 seconds interval and down again to 0
* I want to watch TV with the lights at 50

0 comments on commit 3e31b81

Please sign in to comment.