Giter Site home page Giter Site logo

kalliope_neuron_magic_mirror's Introduction

Magic Mirror

Synopsis

Neuron to bind Kalliope with your Magic Mirror.

This neuron allow you to:

  • show what Kalliope say on the screen
  • control your Magic Mirror by sending notification to other active modules

Note: The MMM-kalliope module need to be installed on your Magic Mirror

Demo

Video demo with sound here

Installation

kalliope install --git-url https://github.com/kalliope-project/kalliope_neuron_magic_mirror.git

Options

parameter required type default choices comment
mm_url YES string URL of your magic mirror. E.g: http://127.0.0.1:8080/kalliope
notification YES string Notification string that will be recognized by Magic Mirror modules. Use "KALLIOPE" to target the MMM-kalliope module and print the payload on the screen
payload YES dict Dict of parameters to send to the Magic Mirror module

Return Values

Name Description Type sample
status_code Numeric, HTTP status code that signifies success of the request. int 200
content The body content of the server answer. May be JSON serialized and usable in a template string {"title": "foo", "body": "bar", "userId": 1}
response_header Response header from the server. dict {'Date': 'Sat, 19 Nov 2016 11:17:56 GMT', 'Content-Length': '192', 'Content-Type': 'text/html'}

Synapses example

Send an hard coded message that will be printed on the screen by the MMM-kalliope module

  - name: "mm-send-message"
    signals:
      - order: "send a message to my magic mirror"
    neurons:
      - magic_mirror:
          mm_url: "http://127.0.0.1:8080/kalliope"
          notification: "KALLIOPE"
          payload: "this message will be printed on the screen"

Send a notification to the alert module.

  - name: "mm-alert"
    signals:
      - order: "send an alert to magic mirror"
    neurons:
      - magic_mirror:
          mm_url: "http://127.0.0.1:8080/kalliope"
          notification: "SHOW_ALERT"
          payload:
            title: "my alert title"
            message: "the message"
            timer: 5000

From Kalliope v0.5.1, you can send each spoken message to the mirror by using the Kalliope memory.

First, create a hook in your settings.

hooks:
  on_start_speaking: "mm-say"

Create a synapse in your brain that is linked to the hook to send each message

  - name: "mm-say"
    signals: []
    neurons:
      - magic_mirror:
          mm_url: "http://127.0.0.1:8080/kalliope"
          notification: "KALLIOPE"
          payload: "{{ kalliope_memory['kalliope_last_tts_message'] }}"

Notes

Note: The MMM-kalliope module need to be installed on your Magic Mirror

Note: kalliope_last_tts_message parameter is only available since Kalliope v0.5.1.

kalliope_neuron_magic_mirror's People

Contributors

sispheor 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.