Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant get this to work #5

Closed
hooray4me opened this issue Mar 6, 2019 · 107 comments
Closed

Cant get this to work #5

hooray4me opened this issue Mar 6, 2019 · 107 comments

Comments

@hooray4me
Copy link

Is there anything special I need to do to get this work?

@elad-bar
Copy link
Owner

elad-bar commented Mar 7, 2019

Can you provide more details?

Thanks

@hooray4me
Copy link
Author

the entities don't load. In the logs it only says that blueiris hasn't been tested.

@hooray4me
Copy link
Author

For clarification, my config directory (linux) is /home//.homeassistant/

I created a custom_components folder here and added the blueiris sub-folder with the 4 python scripts in it and made them executable.

I updated my config file and secrets file very similar to your example. My blueiris server is on the latest version.

Any ideas?

@hooray4me
Copy link
Author

image

@elad-bar
Copy link
Owner

elad-bar commented Mar 7, 2019

Are you using the short camera name as id?
If you are trying to access BI webserver can you see the camera over there?

If you can see it by accessing the webserver directly, try to go to the camera you are trying to add and make sure the id is the same

example:
image

@hooray4me
Copy link
Author

I am. it doesn't work. Also I I get errors if I specify more than one camera.
blueiris: #hostname / ip of BlueIris WebServer host: !secret blueiris_host #port of BlueIris WebServer port: !secret blueiris_port #Optional - will create switch if defined profile: #armed profile number armed: 1 #unarmed profile number unarmed: 2 #Username username: !secret blueiris_api_username #Password password: !secret blueiris_api_password #Optional - will allow creating binary sensors mqtt: #Watchdog MQTT Topic watchdog: BlueIris/[camera_id]/Connectivity #Motion MQTT Topic motion: BlueIris/[camera_id]/Motion #List of camera object camera: - name: 'noah' id: noah room: noah
`binary_sensor:

  • platform: blueiris

switch:

  • platform: blueiris

camera:

  • platform: blueiris
    `

image

image

@elad-bar elad-bar transferred this issue from elad-bar/ha-blueiris Apr 9, 2019
@elad-bar
Copy link
Owner

elad-bar commented Apr 9, 2019

Was it solved?

thanks

@hooray4me
Copy link
Author

no it wasn't. I ended up just adding the cameras individually to ha... Still use BI from the web.

@elad-bar
Copy link
Owner

elad-bar commented Apr 9, 2019

can you try the latest version?
if it still doesn't work, please send me the logs

thanks

@hooray4me
Copy link
Author

does the config file really start with configuration?
**configuration:** blueiris: #hostname / ip of BlueIris WebServer host: !secret blueiris_host

@elad-bar
Copy link
Owner

elad-bar commented Apr 9, 2019 via email

@hooray4me
Copy link
Author

blueiris:
#hostname / ip of BlueIris WebServer
host: !secret blueiris_host
#port of BlueIris WebServer
port: !secret blueiris_port
#Optional - will create switch if defined
profile:
#armed profile number
armed: !secret blueiris_profile_armed
#unarmed profile number
unarmed: !secret blueiris_profile_unarmed
#Username
username: !secret blueiris_api_username
#Password
password: !secret blueiris_api_password
#Optional - will allow creating binary sensors
mqtt:
#Watchdog MQTT Topic
watchdog: BlueIris/[camera_id]/Connectivity
#Motion MQTT Topic
motion: BlueIris/[camera_id]/Motion
#List of camera object
camera:
#name of the camera for display
- name: 'Olivias Room'
#BlueIris camera's short name
id: olivia
#Room name (adds as attribute)
room: Upstairs
- name: 'Noahs Room'
#BlueIris camera's short name
id: noah
#Room name (adds as attribute)
room: Upstairs
- name: 'Driveway'
#BlueIris camera's short name
id: front
#Room name (adds as attribute)
room: Outside

custom_updater:
track:
- components
component_urls:
- https://github.com/elad-bar/ha-custom-components/blob/master/blueiris.json

camera:
#creates cameras according to the camera defined in the platform

  • platform: blueiris

binary_sensor:
#creates binary sensors according per camera defined in the platform with the topics defined

  • platform: blueiris

switch:
#creates switch to arm and disarm BlueIris (available only when profile provided)

  • platform: blueiris

this is the logs:
2019-04-09 17:19:31 WARNING (MainThread) [homeassistant.loader] You are using a custom component for custom_updater which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2019-04-09 17:19:31 WARNING (MainThread) [homeassistant.loader] You are using a custom component for blueiris which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2019-04-09 17:19:31 WARNING (MainThread) [homeassistant.components.http] legacy_api_password support has been enabled. If you don't require it, remove the 'api_password' from your http config. 2019-04-09 17:19:33 WARNING (MainThread) [homeassistant.loader] You are using a custom component for blueiris.camera which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2019-04-09 17:19:33 ERROR (MainThread) [homeassistant.loader] Unable to find platform blueiris 2019-04-09 17:19:33 WARNING (MainThread) [homeassistant.loader] You are using a custom component for blueiris.switch which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2019-04-09 17:19:34 WARNING (MainThread) [homeassistant.loader] You are using a custom component for cisco_ios.device_tracker which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2019-04-09 17:19:34 WARNING (MainThread) [homeassistant.loader] You are using a custom component for lennox.climate which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2019-04-09 17:19:43 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/home/rob/.homeassistant/custom_components/custom_updater.py", line 217, in extra_init await self.cache_versions() File "/home/rob/.homeassistant/custom_components/custom_updater.py", line 222, in cache_versions information = await self.pyupdate.get_sensor_data(True) File "/home/rob/homeassistant/lib/python3.6/site-packages/pyupdate/ha_custom/custom_components.py", line 56, in get_sensor_data components = await self.get_info_all_components(force) File "/home/rob/homeassistant/lib/python3.6/site-packages/pyupdate/ha_custom/custom_components.py", line 33, in get_info_all_components for name, component in response.json().items(): File "/home/rob/homeassistant/lib/python3.6/site-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 7 column 1 (char 6)

@hooray4me
Copy link
Author

image

@elad-bar
Copy link
Owner

elad-bar commented Apr 9, 2019

it lacks of the begining of the errors, can you cleanup the logs before starting the ha and after it fails copy that

in addition, it seems that there is a problem with your custom updater

@hooray4me
Copy link
Author

Im going to manually install and then see what happens... BTW there is a typo in in your blueiris json file on line 17 /which.py should be switch.py

@hooray4me
Copy link
Author

2019-04-09 18:01:57 WARNING (MainThread) [homeassistant.loader] You are using a custom component for blueiris which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2019-04-09 18:01:57 WARNING (MainThread) [homeassistant.components.http] legacy_api_password support has been enabled. If you don't require it, remove the 'api_password' from your http config. 2019-04-09 18:01:58 WARNING (MainThread) [homeassistant.loader] You are using a custom component for cisco_ios.device_tracker which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2019-04-09 18:01:59 WARNING (MainThread) [homeassistant.loader] You are using a custom component for blueiris.binary_sensor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2019-04-09 18:01:59 WARNING (MainThread) [homeassistant.loader] You are using a custom component for blueiris.switch which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

2019-04-09 18:01:59 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.blueiris.camera. Make sure all dependencies are installed Traceback (most recent call last): File "/home/rob/homeassistant/lib/python3.6/site-packages/homeassistant/loader.py", line 147, in _load_file module = importlib.import_module(path) File "/usr/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 "/home/rob/.homeassistant/custom_components/blueiris/camera.py", line 14, in <module> from homeassistant.components.generic.camera import (CONF_LIMIT_REFETCH_TO_URL_CHANGE, ModuleNotFoundError: No module named 'homeassistant.components.generic' 2019-04-09 18:01:59 ERROR (MainThread) [homeassistant.loader] Unable to find platform blueiris 2019-04-09 18:01:59 WARNING (MainThread) [homeassistant.loader] You are using a custom component for lennox.climate which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

@hooray4me
Copy link
Author

Here's the latest log:
2019-04-09 18:10:00 WARNING (MainThread) [homeassistant.components.http] legacy_api_password support has been enabled. If you don't require it, remove the 'api_password' from your http config. 2019-04-09 18:10:02 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.blueiris.switch. Make sure all dependencies are installed Traceback (most recent call last): File "/home/rob/homeassistant/lib/python3.6/site-packages/homeassistant/loader.py", line 147, in _load_file module = importlib.import_module(path) File "/usr/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 941, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed 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 "/home/rob/.homeassistant/custom_components/blueiris/__init__.py", line 18, in <module> from .blue_iris_data import BlueIrisData File "/home/rob/.homeassistant/custom_components/blueiris/blue_iris_data.py", line 4, in <module> from homeassistant.components.generic.camera import (CONF_STREAM_SOURCE, CONF_STILL_IMAGE_URL) ModuleNotFoundError: No module named 'homeassistant.components.generic' 2019-04-09 18:10:02 ERROR (MainThread) [homeassistant.loader] Unable to find platform blueiris 2019-04-09 18:10:02 WARNING (MainThread) [homeassistant.loader] You are using a custom component for lennox.climate which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2019-04-09 18:10:02 WARNING (MainThread) [homeassistant.loader] You are using a custom component for cisco_ios.device_tracker which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2019-04-09 18:10:02 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.blueiris.binary_sensor. Make sure all dependencies are installed Traceback (most recent call last): File "/home/rob/homeassistant/lib/python3.6/site-packages/homeassistant/loader.py", line 147, in _load_file module = importlib.import_module(path) File "/usr/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 941, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed 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 "/home/rob/.homeassistant/custom_components/blueiris/__init__.py", line 18, in <module> from .blue_iris_data import BlueIrisData File "/home/rob/.homeassistant/custom_components/blueiris/blue_iris_data.py", line 4, in <module> from homeassistant.components.generic.camera import (CONF_STREAM_SOURCE, CONF_STILL_IMAGE_URL) ModuleNotFoundError: No module named 'homeassistant.components.generic' 2019-04-09 18:10:02 ERROR (MainThread) [homeassistant.loader] Unable to find platform blueiris 2019-04-09 18:10:02 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.blueiris.camera. Make sure all dependencies are installed Traceback (most recent call last): File "/home/rob/homeassistant/lib/python3.6/site-packages/homeassistant/loader.py", line 147, in _load_file module = importlib.import_module(path) File "/usr/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 941, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed 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 "/home/rob/.homeassistant/custom_components/blueiris/__init__.py", line 18, in <module> from .blue_iris_data import BlueIrisData File "/home/rob/.homeassistant/custom_components/blueiris/blue_iris_data.py", line 4, in <module> from homeassistant.components.generic.camera import (CONF_STREAM_SOURCE, CONF_STILL_IMAGE_URL) ModuleNotFoundError: No module named 'homeassistant.components.generic' 2019-04-09 18:10:02 ERROR (MainThread) [homeassistant.loader] Unable to find platform blueiris 2019-04-09 18:10:02 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.blueiris. Make sure all dependencies are installed Traceback (most recent call last): File "/home/rob/homeassistant/lib/python3.6/site-packages/homeassistant/loader.py", line 147, in _load_file module = importlib.import_module(path) File "/usr/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 "/home/rob/.homeassistant/custom_components/blueiris/__init__.py", line 18, in <module> from .blue_iris_data import BlueIrisData File "/home/rob/.homeassistant/custom_components/blueiris/blue_iris_data.py", line 4, in <module> from homeassistant.components.generic.camera import (CONF_STREAM_SOURCE, CONF_STILL_IMAGE_URL) ModuleNotFoundError: No module named 'homeassistant.components.generic' 2019-04-09 18:10:02 ERROR (MainThread) [homeassistant.loader] Unable to find component blueiris 2019-04-09 18:10:02 ERROR (MainThread) [homeassistant.setup] Setup failed for blueiris: Component not found. 2019-04-09 18:10:03 ERROR (SyncWorker_14) [homeassistant.components.sensor.rest] Error fetching data: <PreparedRequest [GET]> from http://localhost:5556/devices/bathroom/apps/tv.emby.embyatv/state failed with HTTPConnectionPool(host='localhost', port=5556): Max retries exceeded with url: /devices/bathroom/apps/tv.emby.embyatv/state (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7da400c518>: Failed to establish a new connection: [Errno 111] Connection refused',)) 2019-04-09 18:10:03 ERROR (SyncWorker_7) [homeassistant.components.sensor.rest] Error fetching data: <PreparedRequest [GET]> from http://localhost:5556/devices/state/oliviaroom failed with HTTPConnectionPool(host='localhost', port=5556): Max retries exceeded with url: /devices/state/oliviaroom (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7da4053f98>: Failed to establish a new connection: [Errno 111] Connection refused',)) 2019-04-09 18:10:03 ERROR (SyncWorker_8) [homeassistant.components.sensor.rest] Error fetching data: <PreparedRequest [GET]> from http://localhost:5556/devices/state/playroom failed with HTTPConnectionPool(host='localhost', port=5556): Max retries exceeded with url: /devices/state/playroom (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7d9c1b1278>: Failed to establish a new connection: [Errno 111] Connection refused',)) 2019-04-09 18:10:03 ERROR (SyncWorker_4) [homeassistant.components.sensor.rest] Error fetching data: <PreparedRequest [GET]> from http://localhost:5556/devices/state/bathroom failed with HTTPConnectionPool(host='localhost', port=5556): Max retries exceeded with url: /devices/state/bathroom (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7d9c1b1be0>: Failed to establish a new connection: [Errno 111] Connection refused',)) 2019-04-09 18:10:03 ERROR (SyncWorker_10) [homeassistant.components.sensor.rest] Error fetching data: <PreparedRequest [GET]> from http://localhost:5556/devices/oliviaroom/apps/tv.emby.embyatv/state failed with HTTPConnectionPool(host='localhost', port=5556): Max retries exceeded with url: /devices/oliviaroom/apps/tv.emby.embyatv/state (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7d9c1b6978>: Failed to establish a new connection: [Errno 111] Connection refused',)) 2019-04-09 18:10:03 ERROR (SyncWorker_5) [homeassistant.components.sensor.rest] Error fetching data: <PreparedRequest [GET]> from http://localhost:5556/devices/playroom/apps/tv.emby.embyatv/state failed with HTTPConnectionPool(host='localhost', port=5556): Max retries exceeded with url: /devices/playroom/apps/tv.emby.embyatv/state (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7d9c1cb080>: Failed to establish a new connection: [Errno 111] Connection refused',)) 2019-04-09 18:10:04 WARNING (MainThread) [homeassistant.components.sensor] Platform rest not ready yet. Retrying in 30 seconds. 2019-04-09 18:10:04 WARNING (MainThread) [homeassistant.components.sensor] Platform rest not ready yet. Retrying in 30 seconds. 2019-04-09 18:10:04 WARNING (MainThread) [homeassistant.components.sensor] Platform rest not ready yet. Retrying in 30 seconds. 2019-04-09 18:10:04 WARNING (MainThread) [homeassistant.components.sensor] Platform rest not ready yet. Retrying in 30 seconds. 2019-04-09 18:10:04 WARNING (MainThread) [homeassistant.components.sensor] Platform rest not ready yet. Retrying in 30 seconds. 2019-04-09 18:10:04 WARNING (MainThread) [homeassistant.components.sensor] Platform rest not ready yet. Retrying in 30 seconds.

@elad-bar
Copy link
Owner

what version of HA are you using?

@hooray4me
Copy link
Author

0.88.2

@elad-bar
Copy link
Owner

component is aligned with latest version of HA v0.91, HA changed the structure of components that's why it didn't find the generic camera class

@elad-bar
Copy link
Owner

did you try that with latest version of HA?

@hooray4me
Copy link
Author

hooray4me commented Apr 21, 2019 via email

@hooray4me
Copy link
Author

I upgraded to .91. I am not able to get this to run from custom_updater.
rob@ha:~/.homeassistant$ tail home-assistant.log for name, component in response.json().items(): File "/home/rob/homeassistant/lib/python3.6/site-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 7 column 1 (char 6) rob@ha:~/.homeassistant$ tail home-assistant.log for name, component in response.json().items(): File "/home/rob/homeassistant/lib/python3.6/site-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 7 column 1 (char 6)
config:
custom_updater: track: - components component_urls: - https://github.com/elad-bar/ha-custom-components/blob/master/blueiris.json

@hooray4me
Copy link
Author

I manually updated the blueiris component. I can get the elements to show up in unused entities, but they do not work and I don't show a login in blueiris for my ha user.

No errors in the logs

_rob@ha:~/.homeassistant$ tail home-assistant.log
2019-04-23 14:53:52 WARNING (MainThread) [homeassistant.loader] You are using a custom component for blueiris which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

2019-04-23 14:53:54 WARNING (MainThread) [homeassistant.loader] You are using a custom component for blueiris.binary_sensor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

2019-04-23 14:53:55 WARNING (MainThread) [homeassistant.loader] You are using a custom component for blueiris.camera which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

2019-04-23 14:53:55 WARNING (MainThread) [homeassistant.loader] You are using a custom component for myicomfort.climate which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

2019-04-23 14:53:55 WARNING (MainThread) [homeassistant.loader] You are using a custom component for blueiris.switch which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant._

`blueiris:
host: !secret blueiris_host
port: !secret blueiris_port
profile:
armed: !secret blueiris_profile_armed
unarmed: !secret blueiris_profile_unarmed
username: !secret blueiris_api_username
password: !secret blueiris_api_password
mqtt:
watchdog: BlueIris/[camera_id]/Connectivity
motion: BlueIris/[camera_id]/Motion
camera:
- name: 'Olivias Room'
id: olivia
room: Upstairs
- name: 'Noahs Room'
id: noah
room: Upstairs
- name: 'Driveway'
id: front
room: Outside

blueiris_host: 172.17.17.75
blueiris_port: 80
blueiris_api_username: ha
blueiris_api_password: Bartlebee92
blueiris_profile_armed: 1
blueiris_profile_unarmed: 2

binary_sensor:

  • platform: blueiris

camera:

  • platform: blueiris

switch:

  • platform: blueiris`
    image

image

@hooray4me
Copy link
Author

It looks like the camera_proxy_stream api is not passing the blueiris credentials to the blueiris server. I see repeated login attempts without a username on the blueiris server.
image
image

@hooray4me
Copy link
Author

I've even set the logger level to debug for the blueiris components, but can't seem to get any more information from it.

logger: default: critical logs: homeassistant.loader: warning homeassistant.components.blueiris: debug homeassistant.components.blueiris.camera: debug homeassistant.components.blueiris.binary_sensor: debug homeassistant.components.command_line.sensor: critical homeassistant.components.rest.sensor: critical

@hooray4me
Copy link
Author

I found that it won't work if you have use secure session keys enabled, which kinda stinks... with out it I don't get the nice UI3 login page or the security that comes from it.
image

do you have any examples of what controls I can use for these cameras as ui cards?

@elad-bar
Copy link
Owner

I'm not using it, will check it in the weekend and see how to fix that security settings,
I'm using the motion sensor on top of the image from the camera,
It supports binary sensors of:

  • Audio
  • External
  • Motion
  • Watchdog

2 first just added thanks to @darkgrue

In addition switch to control whether the BlueIris is armed or not:

  • switch.bi_alerts

@darkgrue
Copy link
Contributor

The Use secure session keys and login page uses HTTP_DIGEST_AUTHENTICATION. Which you probably don't want to use for two reasons. First, I see in other component integrations there are comments that "currently aiohttp only works with basic authentication". Also, if you wish to use Casting, I don't think Chromecast or Google Assistant supports passing authentication values (though you may get away with passing it in the URL, not clear on that - but you cannot perform HTTP Digest auth passing values in the URL, it must be in the header). So, to cast you'd need to set Require from Non-LAN only, and uncheck Use secure session keys and login page.

To be fair, HTTP Digest auth only gives you marginal better security, you'd be far better served setting up SSL (which appears to be another prerequisite for integrating with Google Assistant). I threw another Pi running a NGINX reverse-proxy in front of my Home Assistant and Blue Iris servers for that reason.

@bhcallaway73
Copy link

I installed the Mosquitto broker from the hass.io add-on store and did the autoconfig in configuration/integrations. I completed the instructions for the blueiris side, just not sure how to test it.
/
Does the custom updater update automatically or only if I click update?

@hooray4me
Copy link
Author

@bhcallaway73 what do you have HA installed on? I think custom updater auto updates but i'm not sure as I'm not using it. if you open up ssh to your instance of ha, then start an interactive session.
mosquitto_sub -h 127.0.0.1 -u username -P password -t #

then goto /dev-mqtt on your ha instance... publish a topic... if you have everything setup, then the topic should show up on your ssh.

image

@bhcallaway73
Copy link

bhcallaway73 commented Apr 27, 2019

Its an ubuntu server and hass.io is installed in a docker instance which I'm also not real familiar with. I have several containers I've setup manually for transmission, sonarr, sabnzbd, plex etc. thats fully automated, just never used docker.

I see a ton of authentication errors in the mosquitto log. I had the blueiris user set as a non admin. Not sure if that matters or if I put the password in wrong. I'll see if I can figure out how to do what you asked with docker.

@darkgrue
Copy link
Contributor

darkgrue commented Apr 27, 2019

@bhcallaway73 soo... I'd comment out the custom updater so you don't get the bad code again... check back to the repo once the current code is fixed... @elad-bar @darkgrue maybe let us know when the code for streaming is fixed?

Getting streaming - especially streaming with Google Assistant, is currently my priority. But it should be possible to get the click-action to stream correctly, and I think I've got a handle on the fix.

@darkgrue
Copy link
Contributor

Its an ubuntu server and hass.io is installed in a docker instance which I'm also not real familiar with. I have several containers I've setup manually for transmission, sonarr, sabnzbd, plex etc. thats fully automated, just never used docker.

I see a ton of authentication errors in the mosquitto log. I had the blueiris user set as a non admin. Not sure if that matters or if I put the password in wrong. I'll see if I can figure out how to do what you asked with docker.

Non-admin users work fine for MQTT auth, as that's how I'm set up. Make sure you've got everything configured right on both ends, as there are a lot of pieces. Pretty easy to miss something.

@bhcallaway73
Copy link

I did a "docker container attach addon_core_mosquito" and published as you said but nothing came through. Not sure if that gives a interactive session but when I do the same for the homeassistant docker, I do see activity. Just can't figure out how to break out of attach.

@bhcallaway73
Copy link

Sorry, spelled mosquitto wrong above but it was right in the command. BTW, thanks guys for all your help

@hooray4me
Copy link
Author

@bhcallaway73 I'm ubuntu server all the way as well. and I run most of those services (emby is much better than plex you should look into it :) )

I chose the python virtual method instead of docker...
https://bonani.tech/how-to-install-hass.io-on-ubuntu-server-18.04/
I had alot of issues when I tried docker.

so did you set the mosquito user and pw set up correctly?
mosquitto_passwd -c /etc/mosquitto/pwfile ha

then use THAT user in your config?

mqtt:
discovery: true
broker: !secret mqtt_broker
port: 1883
client_id: !secret mqtt_cid
username: !secret mqtt_user
password: !secret mqtt_pass

@hooray4me
Copy link
Author

@bhcallaway73 scratch that url I just posted... thats different than the one I did :)

@hooray4me
Copy link
Author

@hooray4me
Copy link
Author

@bhcallaway73 feel free to email me with questions, don't want to gum up this issue thread robhedrick@outlook.com

@bhcallaway73
Copy link

I installed via this method.
https://github.com/home-assistant/hassio-installer

Thanks, I'll email.

@darkgrue
Copy link
Contributor

darkgrue commented Apr 28, 2019

Pull Request #7 is in. This should fix the Streaming/Casting issues. Google Assistant can "see" the cameras, and will stream them to a Google Hub, like an official camera would.

There are still some problems with the core Stream Component that have to be addressed by the HA team. There is a workaround for open HA Issue ("Stream Component and base_url #22252"), and I'm currently working around the Casting performance issues by referencing the MJPEG stream, (instead of the proxy Stream Component). However, the Stream Component still looks pretty choppy. It's a new HA Component, so it should improve over time.

@bhcallaway73
Copy link

Motion wasn't working for me until I changed the topic from BlueIris/&CAM/&TYPE to BlueIris/&CAM/MOTION because BI was sending MOTION_A as the topic.

@darkgrue
Copy link
Contributor

Motion wasn't working for me until I changed the topic from BlueIris/&CAM/&TYPE to BlueIris/&CAM/MOTION because BI was sending MOTION_A as the topic.

Hrm, this seems to be a Blue Iris thing. It's appending the motion zone to the &TYPE macro, which isn't really helpful - if it's sent at all, it should be its own macro. Your workaround will prevent AUDIO and EXTERNAL events from being seen (but will fix all problems with motion zones).

Testing a workaround where the motion topic is changed to MOTION_A - which will compromise. This will probably have to be solved with a combination of documentation and code changes, as well as a feature request on the BI side of things...

Good catch, nonetheless...

@hooray4me
Copy link
Author

actually it does that because there are different types of motions and zones... my driveway cam sends MOTION_ABC because my trigger is defined to only trigger if the object travels through zone a b and c so I dont get false alerts.

@darkgrue
Copy link
Contributor

actually it does that because there are different types of motions and zones... my driveway cam sends MOTION_ABC because my trigger is defined to only trigger if the object travels through zone a b and c so I dont get false alerts.

It's part of the motion zones, correct.

However, having the motion zones added to the &TYPE macro, makes the macro less useful, as we don't have separate MQTT topics we can set for any other trigger type, other than WATCHDOG.

Because of that, we either have to sacrifice AUDIO and EXTERNAL events, use only the MOTION_A event, or require the user to set up their own sensors to monitor the other motion topics. Having BI remove the zone indicator from &TYPE to another macro (say, &ZONE or something) would be a lot more ideal, as it gives us the flexibility to group all the alerts of a type under one topic, or not.

@hooray4me
Copy link
Author

can we not handle the different mqtt topics for motion combinations that get published in a case/switch statement? I don't know if three's a way to query the camera to see what kind of motion has been configured

MOTION_A
MOTION_AB
MOTION_ABC
MOTION_ABCD
MOTION_ABCDE
...etc.

I created my own sensors anyway... the baby cam's only need a sensor for MOTION_A but the driveway needs MOTION_ABC...

@darkgrue
Copy link
Contributor

can we not handle the different mqtt topics for motion combinations that get published in a case/switch statement?

Ehhhh... That's 8! permutations, and that's only if you don't take directionality into account (BI can specify AB, A>B, and B>A, though I don't have BI handy right now to see how the MQTT messages for each of those get expressed). 40,320+ sensors per camera and the if/then logic to process them would be a bit excessive, to say the least.

I don't know if three's a way to query the camera to see what kind of motion has been configured

The BI RESTful API gives a lot more configuration information, but that doesn't appear to be one of them. Even so, creating all the logic would get out of hand pretty quickly.

I created my own sensors anyway... the baby cam's only need a sensor for MOTION_A but the driveway needs MOTION_ABC...

I think for anything other than the default case ("MOTION_A"), we're going to have to rely on the user to configure their own use case. Anticipating that has too many design issues and trade-offs to be useful. In most use cases, I would imagine only one or two MQTT messages are going to be of significance, but the end-user is going to have to be the one to decide. We can definitely get the info into HA, but we're going to have to leave some of the configuration up to them.

@hooray4me
Copy link
Author

Why not create a function to populate all possible combinations of permutations?
`function combinations(str) {
var fn = function(active, rest, a) {
if (!active && !rest)
return;
if (!rest) {
a.push(active);
} else {
fn(active + rest[0], rest.slice(1), a);
fn(active, rest.slice(1), a);
}
return "MOTION_" + a;
}
return fn("", str, []);
}

var motion = combinations("ABCDEFG");`

then do a comparison against the motion variable... if the mqtt message matches motion, trigger motion...

@darkgrue
Copy link
Contributor

Why not create a function to populate all possible combinations of permutations?

I addressed that. It's not that you can't write the code to create all the combinations of the sensors, it's that you've created over 40 thousand possible object entities per camera. That would be... bad. If you didn't fault out just trying to create all that, you'd have to service all of them somehow and there aren't enough clock cycles in a day.

8! is a very large number, in this context.

@hooray4me
Copy link
Author

hm :/ ... can we match with a wild card? blueiris/somecamera/MOTION_* ?

@darkgrue
Copy link
Contributor

hm :/ ... can we match with a wild card? blueiris/somecamera/MOTION_* ?

I don't see how, because the MQTT broker sees BlueIris/Cam1/MOTION_A and BlueIris/Cam1/MOTION_AB, etc... as all different message topics.

I'm not a MQTT mechanic, so I can't speak with absolute certainty, but AFAIK MQTT doesn't "see" topics as wildcards (it wouldn't make sense, it'd go against the efficiencies of queues). You'd have to tell Home Assistant to associate a sensor with those topics, and then service each topic (by polling or interrupt) to aggregate that status. That would be very resource-intensive (to the point of absurdity).

The other way would be to have the MQTT broker aggregate those messages somehow. In which case, you're now writing a custom MQTT broker (kind of outside the scope of what we got into) that is, well, broken by design.

The best way is to have Blue Iris not do this and have it separate the trigger type from the motion zone. I put it in the BI suggestion box, we'll see... Who knows, maybe Version 5 revamped the whole way MQTT works in BI and fixes all of this? That'd be nice!

I don't think most users are going to want or need that many motion zones, and will only care about one or two cases, out of whatever large number (I'm not sure it's really 8!, but it's still an absurd number) of possible configurations. In which case, they can create a MQTT Binary Sensor, rather than the auto-created "MOTION_A" sensor.

@hooray4me
Copy link
Author

You can subscribe to a wildcard topic... blueiris/camera/MOTION_#

@hooray4me
Copy link
Author

or even blueiris/+/MOTION_+ since each wildcard area is single hierarchy

@darkgrue
Copy link
Contributor

or even blueiris/+/MOTION_+ since each wildcard area is single hierarchy

Based on the MQTT documentation, doesn't appear that it's possible to do a wildcard on a partial topic match. It's topic-level or nothing. =(

You could match "BlueIris/Cam1/#", but that would match any of "BlueIris/Cam1/WATCHDOG", "BlueIris/Cam1/AUDIO", "BlueIris/Cam1/MOTION_A", "BlueIris/Cam1/MOTION_AB", etc.

It'd only work if we had separate trigger and zone macros, e.g. "BlueIris/Cam1/MOTION/A", then we could subscribe to "BlueIris/Cam1/MOTION/#"

I can give it a try to confirm, but I don't think we can really do this without changes on the BI side (which, I'd argue there's probably a compelling reason to want to have).

@hooray4me
Copy link
Author

Have you seen this yet? https://blueirissoftware.com/BlueIris5.pdf I wonder what will change in the API?

@elad-bar
Copy link
Owner

Have you seen this yet?

Yes, I didn't start developing the intergation to the REST API mainly because I thought something like that will happen and it worth waiting.

@bhcallaway73
Copy link

Is it possible to use more profiles than just arm/disarm? Like an option to arm the sleep profile?

@elad-bar elad-bar closed this as completed Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants