rickyphewitt / emby-skill Goto Github PK
View Code? Open in Web Editor NEWThis skill allows audio playback from an emby server
This skill allows audio playback from an emby server
2019-11-20 11:33:51.606 | INFO | 641396 | Emby | failed to connect to emby, error: HTTPConnectionPool(host='emby', port=8096): Max retries exceeded with url: /Users/AuthenticateByName (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f66c2607040>: Failed to establish a new connection: [Errno -2] Name or service not known'))
It's failing to connect as the settings.json file keeps getting overwritten. Correct host is stored in settingsmeta.yaml
skillMetadata:
sections:
- name: Server
fields:
- type: label
label: Server settings
- name: hostname
type: text
label: Url
value: 'http://192.168.1.2'
- name: port
type: number
label: Port
value: '8096'
- name: User Login Information
fields:
- type: label
label: Username and Password. Leave the password blank if you do not use a password.
- name: username
type: text
label: Username
value: 'username'
- name: password
type: password
label: Password
value: 'password'
But settings.json is continually overwritten with http://emby:
{"__mycroft_skill_firstrun": false, "port": 8096, "hostname": "http://emby", "password": "password", "username": "username"}
`
All files are owned by mycroft:mycroft
I have installed the emby skill. But it does not show up under installed skills.
install emby --- 5.40
emby has already been installed
As a new PiCroft user I'm not that familiar with the settings etc. PiCroft will respond to various commands but oddly not 'what time is it'.
Is there a limit to the number of skills that can be installed? Is there another way to manage the skill, perhaps on the Pi (3b) from the CLI?
As the emby client grows it should be moved to its own project so it can be used/extended outside of the emby mycroft skill
Allow the user to next/pre/pause
Hello, the jellyfin-skill port has shuffle mode. I ported this skill to implement it and once I have it working I would like to merge it with the main skill. I'm happy to help with anything else. I did manage to get a Jellyfin skill working since @tuxfoo's stopped working. https://github.com/ghostbuster84/jellyfin-skill https://github.com/ghostbuster84/emby-skill
Even if the skill config has changed the skill will attempt to connect to the emby server and when it fails speak an error. This is an endless loop :(
Need to determine if the configuration change updates the values for this skill, if so attempt to connect, if not then ignore the change.
Currently the skill says 'playing' even when no items are found. Add a check for when no media items are found and inform the user. Something like: "Couldn't find {media} to play"
Skill will always be free,but if users would like to thank the developer(s) they should be able to.
Thinking paypal for now, can add others later.
As this skill has been updated past what is provided in the mycroft skills repo. A pull request should be opened and the skill update so users get the updated version of the skill and not the initial version that is currently in the store.
When the skill is initially installed it needs to be setup at home.mycroft.ai. Instead of informing the user the skill was unable to connect to the Emby server if this is the first time the skill is ran inform the user to setup the skill.
Currently there is an issue when running the mocked unit tests.
Should it work?
Is there some switch to get more debug msgs? I only see this:
14:55:50.816 - Emby - INFO - {'utterance': 'play korn from emby', 'media': 'korn'} 14:55:50.823 - Emby - INFO - 'NoneType' object has no attribute 'instant_mix_for_media'
I am not sure if it connect to my jellyfin server?
Emby's "instant mix" feature is basically useless in my library -- it just plays random songs basically when I use it. So when I say "hey mycroft, play from mb" it just plays random things. The artist
and album
specifiers work, but it would be nice if only items matching my search term would play in the generic case.
"CHECK EMBY" returns an error.
Configured via the web admin in mycroft. Running piCroft on Raspberry 3. Emby server functions correctly, no problem there.
Not sure how to troubleshoot this, debug. Please advise.
16:47:14.879 | INFO | 674 | Emby | {'utterance': 'check emby', 'utterances': ['check emby']}
16:47:22.511 | ERROR | 674 | mycroft.skills.mycroft_skill.mycroft_skill:on_error:923 | An error occurred while processing a request in Emby
Traceback (most recent call last):
File "/home/pi/mycroft-core/mycroft/skills/mycroft_skill/event_container.py", line 73, in wrapper
handler(message)
File "/opt/mycroft/skills/emby.rickyphewitt/__init__.py", line 69, in handle_diagnostic
self.speak_dialog('diag_public_info_success', info)
File "/home/pi/mycroft-core/mycroft/skills/mycroft_skill/mycroft_skill.py", line 1227, in speak_dialog
self.dialog_renderer.render(key, data),
File "/home/pi/mycroft-core/mycroft/dialog/dialog.py", line 110, in render
line = line.format(**context)
KeyError: 'LocalAddress'
The skill in the mycroft repo is quite old (2 years+) and should be updated to what is on master of this repo. In addition it would be nice to create a release and have a known good version of the skill so development can continue with w/o breaking people who may install from msm.
Mycroft repo: https://github.com/MycroftAI/mycroft-skills
I have picroft setup with an emby server running also on my network.
I can get a single song played, but the "album" and "artist" search terms do not return anything (and the skill tells me that it is playing a "mix" but plays nothing) and the logs show a zero return from emby.
If I "search" for something which is common among songs then the logs show a result of more than one but the skill just plays one of the them (the first I guess).
As no-one else has reported these sort of problems I am imagining that perhaps my emby server is not setup correctly. It is running in a linux debian stretch container under proxmox, and browser and smart tv access works to it.
Actually it is doing the "mix" job and giving me multiple songs when I ask for one however the Artist and Album modes are not working at all.
Hi there,
It looks like there’s a slight problem with the new settingsmeta file. The contents got changed to YAML formatting, so need to rename that file from settingsmeta.json
to settingsmeta.yaml
Also on line 18 you probably need to remove the slash where it says “Username/password”, maybe replace that with just “and”.
Similar to the spotify skill, Audio ducking should be implemented so you can control mycroft while listening to music. While spotify has a setting to pause audio when the "wake" word is invoked, by default the music should be paused then resumed after interaction with mycroft is done.
Ideally the following setup would be used for CI
This would provide greater QA on PR's and provide a common base for developers to test this skill against.
Ensure that everywhere Mycroft is "speaking" the speak_dialog method is used. This ensures the skill can be easily translated to other languages.
Hi Ricky,
Thanks for the great skill! I am wondering if you have ever looked into adding DLNA support. What i can gather the Emby API supports this, but I am really new to python, skills and mycroft in general. I am looking into some things, but it will involve a steap learning curve. :)
Hope to hear from you.
Cheers
So this skill doesn't work well for me. If I tell it to play something nothing happens, no error... nothing. However if I tell it to play an artist it gives the following error:
""
20:07:34.870 - mycroft.skills.skill_manager:handle_converse_request:498 - ERROR - Error in converse method for skill emby.rickyphewitt
Traceback (most recent call last):
File "/home/xxx/mycroft-core/mycroft/skills/skill_manager.py", line 492, in handle_converse_request
result = instance.converse(utterances, lang)
AttributeError: 'NoneType' object has no attribute 'converse'
""
On a side note if I rewrite the vocab of the skill to be like "emby play song" rather than "play song from emby" it works.
If the hostname/ip for the emby server does not have a url scheme set it to the default of http://
The initial implementation works but never returns an exact match no adds any weight if the utterance includes emby keywords.
The common play framework should be smarter about identifying what the user wants and attempt to provide a more accurate match level when a song/album/artist is specifically found.
In addition the common play framework should be tested with other skills that also use this framework to see how both skills interact and if there are ways to increase the odds that the correct skill (based on intent) receives and plays the media.
Also increase the response time of the skill. Right now the skill returns to the common play framework after it has searched emby, found a media item, gather additional media items from the 1st one (think artist, gathering songs), and converted all those gathered items to playable audio streams. In some cases this is slow enough that the common play framework wait times out.
Right now the utterances supported are {media} from emby.
Support should be added such that from can be replaced with other common words such as: on, with, by ect
Support the ability to shuffle all work by an artist.
E.g "Shuffle artist {artist here} from emby"
This would find/shuffle all songs by that artist and start playing them.
When you checkout the Emby Premier feature page of Emby they talk about using Google Home or Amazon Echo to play episodes or movies - will this plugin support this too eventually?
On devices that have an lcd screen it would be nice to show the currently playing song info.
For a first pass thinking artist - songname
Whenever I try to play a playlist by saying "hey mycroft, play playlist country music from emby" it returns saying "unable to find or play playlist country music".
First off, thank you for the skill.
It would be nice to be able to play playlists from emby. For example, "play Christmas mix from emby".
The Emby Api requires various bits of information about a device when it connects via the api.
See https://github.com/MediaBrowser/Emby/wiki/User-Authentication for the details.
It would be nice for a user to have multiple connected Mycroft Devices and be able to identify which is which.
Per device Details:
DeviceId - This is a unique to the device. Either generated or pulled from the device. Could include Model if availble. Mark 1/Picroft/Linux?
Repo Details:
Version - Commit hash or tag?
Client - Emby For Mycroft?
Add ability to play a single song.
Support the ability to play an album
"Play album {someAlbum} from emby
Would be nice to release versions of this skill. That way there would be a list of releases and hopefully an easy way to determine what version is currently in the mycroft skills repo.
The Mycroft Team has created a Common Play Framework for skills that use the "play" keyword.
This helps determine from n number of skills which skills should handle the play request.
See for info: https://mycroft.ai/documentation/skills/common-play-framework/
But need to inhereit from a different base class and impmlement 2ish methods
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.