Code Monkey home page Code Monkey logo

communications-skill's Introduction

Communications

An intercom, messaging, and (video) calling skill for Mycroft!

About

Use this skill to broadcast messages across your home. When this skill is installed on two or more of your devices, the devices will automatically find and connect to each other.

After they connect, you can say something like "Announce dinner's ready" and all your devices will say that message. If you want to send a message to a specific device, all you need to say is "Ask the kitchen when dinner is ready."

If you want to reply to an announcement all you need to say is "Reply to the message"

The names of the devices, along with the placements, (the kitchen, Chris' room, etc...) can be named on Mycroft Home. The names and placements are used to identify the device to send the message when you send a message.

Setup On certain devices (most likely the Mark I), you will have to allow incoming connections through the firewall. Run the following commands on your device:

sudo ufw allow from any to any port 4445 proto tcp

sudo ufw allow from any to any port 4446 proto tcp

If the skill does not work, make sure you've entered those commands, and restarted your device

Security The skill does try to do some basic security implementations, however you MUST run this on a WPA2 secured wifi network, if you use wifi.

Roadmap This is only the beginning of this skill! The future includes:

  • Not having to allow ports in (this will be done automatically)
  • Calling and video calling!

Examples

  • "Announce that "Dinner is ready""
  • "Announce "the cat is outside""
  • "Announce "(anything you want)""
  • "Message the kitchen when will dinner be ready?"
  • "Send a message to the living room."
  • "Tell everyome that the dinner is ready!"
  • "Reply to the message"

Credits

Linus S (@LinusS1)

Category

Daily Entertainment Information IoT Media Productivity

Tags

#intercom #intercoms #communication #communications #broadcast #broadcasting #connect #devices #video #calling #call

communications-skill's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

communications-skill's Issues

Collaboration for 2 way intercom

Hi,

We are exploring the possibility of using Mycroft for a skill that falls back to connecting a user to an operator. The operator will be on a mobile app.

Question: I've only looked through the code briefly. It looks like you are using text to speech currently to communicate the messages, or are you sending the actual audio recording? Do you think it is likely we could collaborate to extend this skill to enable 2 way communication to and from a mobile app?

Thanks.

Use SSL

I should be encrypting the messages just because. The docs make it seem easy to do this. Now I just need to get around to implementing it and overcoming any bugs with the library.

Message intent not picking up everything

The message intent right now only works if you say send a message. Then it asked for all the information... (the information is the device and message)
The intent should be able to ask for entities it needs, and does not ask for ones it already has. Instead, padatuous screws this up, and the device it has is not connected.

The intent examples need to be modified to support this.

Todo:

  • Ask for all the info
  • Send a message with all the info
  • Ask for the message (already has the device)
  • Ask for the device (already has the message)

Pluginable modules for other services

More people will need 3rd party services to work with this skill. With this, developers would need to add more intents entities etc.. to the skill, which is not maintainable.

An idea is to have base class that all 3rd party services inherit which will allow the skill to grow, without making more complex.

High CPU usage

Hello,

As explained on #6, this skill devours CPU cycles. I did a (quite boring) video where I show how one CPU rises from 8% to almost 100% for the process python3 -m mycroft.skills jus by downloading the skill and being recognized.
https://cloud.docampo.net/index.php/s/fxXMQXQoiwFbpYB

What I saw so far:

  • The video shows a i7 7700 CPU, and the fan starts to make some noise
  • I did it also on a i7 2600 CPU and well, that CPU instead of 100%, went to 80%, but the CPU fan starts to make an unbearable noise
  • On a RPi, one CPU also goes to 100%, no fans means no noise, but I notices some "slowness" of the device.
  • I think mycroft.skills process is mono-thread, if that's true, carrying its CPU at 100% will concur on global bad performance

To be honest, I had to remove the skill because the fan noises, they are quite annoying.

Just a question on code

I am reading through your code, and noticed in your shippingandhandling.py file, there is a section of code I do not understand.

`>>>>>>> HEAD

lots of code

=======`

I have never seen this before and was wondering if you could explain it's use for me.

Thank you

Allow getting the sender

The sender should be collected and sent along to Mycroft via the messagebus. The sender id would need to be stored in a database which would correspond with a friendlier name (like kitchen, or Chris).

A hurdle to go through would be that the sender id (I think) automatically is generated every time the client connects. A solution would be to when connecting to a new network, send the device id that Mycroft Home gives it to the other devices, who then can store that value, and use it in the future when checking if a device has already been connected

Let specify the device to announce

I think it should be great to let the user to specify to what device(s) the sentence should be announced.

Hey Mycroft, announce on kitchen "Let me know when dinner's ready."

and on the kitchen's mycroft, should be listened something like:

You have a new message from living room: "Let me know when dinner's ready."

So, the device should have a friendly name for this skill, it should be specified on the skill settings or if it is in blank, grabbing the name of the mycroft device as default. (So, for example, I have named my mark I as "mark I", but I could specify a friendly name "kitchen" under the communications settings as it will be placed on the kitchen when the mark II arrives, and the mark II should use for example "living room").

As default a global announce can be of use, but I would rather prefer to say something like:

Hey Mycroft, announce to everyone "The dinner's ready!"

Failed to load skill

Hi there,
Just installed the skill under Arch linux. The skill fails to load.

14:20:11.341 - mycroft.skills.core:load_skill:169 - ERROR - Failed to load skill: communications-skill
Traceback (most recent call last):
  File "/home/malevolent/development/mycroft-core/mycroft/skills/core.py", line 131, in load_skill
    imp.PY_SOURCE))
  File "/usr/lib/python3.7/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/usr/lib/python3.7/imp.py", line 171, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/mycroft/skills/communications-skill/__init__.py", line 16, in <module>
    import py2p
ModuleNotFoundError: No module named 'py2p'

As the error suggest, I've installed (globally) py2p though pip

sudo pip install  py2p
Collecting py2p
  Downloading https://files.pythonhosted.org/packages/2b/2a/d85c006a08069fb987bf33d2aa0596553ddc5f809ede3980e0089a58ef75/py2p-0.7.878-py2.py3-none-any.whl (51kB)
     |████████████████████████████████| 61kB 1.8MB/s 
Collecting async-promises (from py2p)
  Downloading https://files.pythonhosted.org/packages/6e/86/baf2be0b3b9fe28ba1c1ae30176376ec8f828dbfe812b95d37645fd0a5e7/async_promises-1.1.1.tar.gz
Collecting custom-inherit (from py2p)
  Downloading https://files.pythonhosted.org/packages/0e/ea/9f5050a4f1563c8c196b3526c2057fb7846e638942d59a187b79e33d1c9e/custom_inherit-2.2.0.tar.gz
Collecting typing (from py2p)
  Downloading https://files.pythonhosted.org/packages/28/b8/a1d6b7cf322f91305bcb5e7d8f6c3028954d1e3e716cddc1cdce2ac63247/typing-3.7.4-py3-none-any.whl
Collecting base58 (from py2p)
  Downloading https://files.pythonhosted.org/packages/09/b2/21ac9591f055acc145afead895edeb73bbd69d95cf366fc5c2233f2434cb/base58-1.0.3-py3-none-any.whl
Collecting u-msgpack-python (from py2p)
  Downloading https://files.pythonhosted.org/packages/da/ec/9f984fc2be20b2b78bb4e7d9ee1a13f7868d2c075e812d7a1e0a8ef30142/u_msgpack_python-2.5.2-py2.py3-none-any.whl
Collecting pyee (from py2p)
  Downloading https://files.pythonhosted.org/packages/ad/d8/5608d571ffad3d7de0192b0b3099fe3f38d87c0817ebff3cee19264f0bc2/pyee-6.0.0-py2.py3-none-any.whl
Installing collected packages: typing, async-promises, custom-inherit, base58, u-msgpack-python, pyee, py2p
  Running setup.py install for async-promises ... done
  Running setup.py install for custom-inherit ... done
Successfully installed async-promises-1.1.1 base58-1.0.3 custom-inherit-2.2.0 py2p-0.7.878 pyee-6.0.0 typing-3.7.4 u-msgpack-python-2.5.2

But the error persists. Any idea?

Create readme

Need to format readme correctly first unfinished draft:

Should note that it should only be used on a closed, secure LAN network.

# <img src='https://raw.githack.com/FortAwesome/Font-Awesome/master/svgs/solid/comments.svg' card_color='#40DBB0' width='50' height='50' style='vertical-align:bottom'/> Communications
An intercom, messaging, and (video) calling skill for Mycroft!

## About


## Examples

## Credits

## Category
**Daily**
Entertainment
Information
IoT
Media
Productivity

## Tags

Kill skill and open ports when shutdown

When the skill is going to get shutdown, it can not start back up again because the open ports are already locked. This makes you shut the device down. This should close the ports before the shutdown.

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.