Giter VIP home page Giter VIP logo

rhino's Introduction

RHASSPY INTENT HANDLER FOR OPENHAB (RHINO)

Introduction

RHINO (RHASSPY INTENT HANDLER FOR OPENHAB) is a simple intent handler for rhasspy with a connection to openHAB. Some skills are built-in and is also possible to write own skills (folder "ext_modules"). Available skills:

  • Switch on/off lights
  • Tell a joke
  • Activate gaming mode
  • Play "Tagesschau in 100 s" (german only, sorry)
  • Get outside temperature
  • Get weather
  • Get time/day
  • Roll a dice
  • Say hello, good morning, good night, thanks
  • Start a timer

Installation & Configuration

Installation

Clone this reporsitory:

git clone https://github.com/vanseforge/rhino

Navigate to the cloned reporsitory where the dockerfile is.

Docker command line:

docker image build -t rhino .
docker run -d -v your_folder/settings.yml:/usr/app/rhino/rhino/settings.yml,your_folder/ext_modules:/usr/app/rhino/rhino/ext_modules --name rhino rhino

The settings.yml should point to your own settings file. The ext_modules folder should point to a folder with your own skills (optional).

In rhasspy you need to write your sentences for the used intents. An example is in the folder rhasspy_sentences. The translation from the light names to the openhab items needs to be done in the sentence file in rhasspy.

Configuration

Adjust the settings in settings.yml file

Example of settings.yml:

general:
  timezone: 'Europe/Berlin'
  locale: 'de_DE.UTF-8'
  language: 'de'
  alarm_sound: 'alarm.wav'
openHAB:
  http_url: 'http://10.0.0.3:8080'
  items:
    outside_temperature: 'HeatPump_Temperature_1'
    weather_condition: 'Weather_OWM_Condition'
    gaming: 'Gaming'
rhasspy:
  http_url: 'http://10.0.0.2:12101'
  websocket_url: 'ws://10.0.0.2:12101'

How to write an own skill

You just need to create a function which is namend like your intent and has two parameter (data from rhasspy and the site id). The data from rhasspy is the JSON string from rhasspy and the site id is id from the rhasspy satellite. Example

def Test(data, siteId):
    text = "I am a test function for a user module"
    print("TEST!")
    speak(text, siteId)

Donate

If you would like to support the developer with a cup of coffee you can do that via Buy Me A Coffee.

Todo

  • Function to stop the timer

Contributing

Community contributions are welcomed!

rhino's People

Contributors

vanseforge avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.