Comments (6)
I think this may be related to a change in Hass code that this component may not have been updated for. Introduced around 0.70
You may have to edit the shinobi.py file that is in the camera folder (joys of custom components, you sometimes have to get your hands dirty).
Change line 16 in that file
FROM
shinobi = loader.get_component('shinobi')
TO
shinobi = hass.components.shinobi
I think that might work. Don't have a setup to test myself though. (I'll edit the code formatting once I get at my comp in a minute, can't add code tags on Mobile)
from homeassistant_custom_components.
Okay, I actually like this troubleshooting thing but maaaan was it tough to find.
Here is your code.
shinobi = loader.get_component('shinobi')
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_WHITELIST, default=[]): cv.ensure_list,
vol.Optional(CONF_BLACKLIST, default=[]): cv.ensure_list
})
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
all_monitors = shinobi.get_all_started_monitors()
I made the following change.
DEPENDENCIES = ['shinobi']
DOMAIN = 'shinobi'
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_WHITELIST, default=[]): cv.ensure_list,
vol.Optional(CONF_BLACKLIST, default=[]): cv.ensure_list
})
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
shinobi = loader.get_component(hass, 'shinobi')
You forgot the "hass" argument from the get_component function. I have cameras in my hass configuration now. They don't have jpegs in the overview but i dont have jpeg available in my shinobi, so I'll play with that a little later. Making this change should get it going.
from homeassistant_custom_components.
You've definitely got 2 shinobi.py files?
The one in the root and the one in a camera folder as set out in the repo?
Sounds like it's either not seeing the camera folder, the camera folder is empty, or a permissions issue
from homeassistant_custom_components.
Wow...soooo, you were right, I thought I copied the files but actually just copied the html versions of the github page. So they are now correct, component is set up but.....
I now have a new issue. The API key is set up as all hosts because I could not get the API key to work unless it is all zeros. Group_key is set up and I dont use ssl. This is the error from hass.
Log Details (ERROR)
Tue Jul 10 2018 12:39:05 GMT-0400 (Eastern Daylight Time)
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/app/homeassistant/setup.py", line 56, in async_setup_component
return await task
File "/usr/src/app/homeassistant/setup.py", line 116, in _async_setup_component
conf_util.async_process_component_config(hass, config, domain)
File "/usr/src/app/homeassistant/config.py", line 655, in async_process_component_config
platform = get_platform(hass, domain, p_name)
File "/usr/src/app/homeassistant/loader.py", line 58, in get_platform
return get_component(hass, PLATFORM_FORMAT.format(domain, platform))
File "/usr/src/app/homeassistant/loader.py", line 86, in get_component
module = importlib.import_module(path)
File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/config/custom_components/camera/shinobi.py", line 16, in <module>
shinobi = loader.get_component('shinobi')
TypeError: get_component() missing 1 required positional argument: 'comp_or_platform'
from homeassistant_custom_components.
Don't think the Hass arguement was previously required before 0.70 but good find
from homeassistant_custom_components.
Thank you very much @jkvalence and @cbrherms !
from homeassistant_custom_components.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homeassistant_custom_components.