Custom component - BlueIris

Stream is not working… if you will find the way please share,
As for the telegram, I’m using Node-RED, since there were issue from time to time with telegram (integration’s timeouts), I switched to push notifications via mobile app of HA

I’m seeing this error in my logs, and unsure how to troubleshoot the issue or where to look. Can anyone help?

Log Details (ERROR)

Logger: homeassistant.components.generic.camera
Source: components/generic/camera.py:152
Integration: generic (documentation, issues)
First occurred: 6:37:48 PM (2 occurrences)
Last logged: 6:39:39 PM

Error getting new camera image: Cannot connect to host 192.168.1.29:81 ssl:None [Connect call failed (‘192.168.1.29’, 81)]

Is it working expcept those 2 times you had that error or not working?

thanks

Here’s a log from after the server being up for longer. It’s happening quite a lot. I don’t see any direct issue w/ BI, but it’s incredibly slow to load the video into HA. Many times when I click the video card in HA, it’ll try and load, but will spin. I can then close and open the card (video stream) and it’ll load. But bypassing BI, and connecting HA to the camera directly is much faster. From BI, it’s quick to load the video as well. Also, BI and HA are on the same server. So I’m not sure if this has something to do with it or not.

New version released, focused on improving the way the component is loading, unloading and discover new entities (sensors, camera and switch).

the main issue as reported in the past was that once changing the entity_id / name it will return to the original after restart.

another issue that caused by the way it was handled, upon changing the options (settings) - it took few seconds to present the new entities and sometimes it happened only after restart.

In that version, the entity_id, name will remain as manually set and changes of options will take place immediately

@bar I switched from an older version that didn’t update automatically to HACS and I noticed after setting it back up, the cameras are using the full name instead of the short name as the entity_id and I just wanted to verify that was expected.

Camera Name in BI: Dining Room
Short Name in BI: DRC

Entity_ID used to be camera.drc and is now showing as camera.blueiris_dining_room.

Thanks

3 new features add over the last week:

  • Control log level of components without need to define it in logger / call service
  • Control which components are being created
  • Removal of save configuration files (for casting and lovelace UI) by moving it to options

Those features available in the intergation’s options UI, from README:

Integration options (Configuration -> Integrations -> BlueIris Integration -> Options)

Fields name Type Required Default Description
Username Textbox - Last stored username Username of admin user for BlueIris server
Password Textbox - Last stored password Password of admin user for BlueIris server
Clear credentials Check-box + Unchecked Workaround to clear the username & password since there is not support for optional fields (Not being stored under options)
Generate configurations Check-box + Unchecked Will take generate store and configuration for HA, more details below (Not being stored under options)
Log level Drop-down + Default Changes component’s log level (more details below)
Reset components settings to default Check-box + Unchecked Will reset drown-downs of componet’s creation to their default (Not being stored under options)
Camera components Drop-down - All camera Will create camera for each of the chosen camera
Motion sensors Drop-down - All non-system camera Will create binary sensor for each of the chosen camera
Connectivity sensors Drop-down - All non-system camera Will create connectivity binary sensor for each of the chosen camera
Audio sensors Drop-down - All audio supported non-system camera Will create audio binary sensor for each of the chosen camera
Profile switches Drop-down - All profiles Will create switch for each of the chosen profiles

Log Level’s drop-down
New feature to set the log level for the component without need to set log_level in customization: and restart or call manually logger.set_level and loose it after restart.

Upon startup or integration’s option update, based on the value chosen, the component will make a service call to logger.set_level for that component with the desired value,

In case Default option is chosen, flow will skip calling the service, after changing from any other option to Default, it will not take place automatically, only after restart

Control component’s creation
New feature to control which of the components will be created:

  • Sensors drop-down will be available only when MQTT component is defined
  • Audio sensors drop-down will include only audio support non-system camera
  • Connectivity and Motion sensors will be created only for non-system camera
  • In case none of the Audio, Connectivity and Motion binary sensors are being created, main binary sensor of Alerts will not be created as well
  • Profile’s drop-down will be available only when admin user’s credentials set to the integration
  • Once configuration manually changed, new camera that will be added will require manually setting configuration
  • To restore defaults which allows automatically adding new camera, check the check-box of Reset components settings to default

Component’s drop-downs NONE option - work-around
As workaround for UI not allowing submitting the form without all fields with values,
First option in each drop-down is NONE,
as long as this option is checked,
it will not allow checking other items

Auto-generating configurations files:

Will create YAML with all the configurations in the config directory under blueiris.advanced_configurations.yaml:

  • Input select (drop-downs)
  • Script to cast based on the selection
  • UI of all the components created by BlueIris based on the description above

2020-05-01

Implemented enhancements:

  • Better handling configuration changes
  • Integration’s title is now being taken from BlueIris server

2020-04-30

Implemented enhancements:

  • More enhancements to options, ability to change setup details (Edit hostname, port and SSL flag)
  • Support new translation format of HA 0.109.0

After the update, my entity_id’s changed again to the format of camera.ipaddress.fullnameofcamera. Also, in Integrations > BlueIris NVR > Options, the options go off the bottom of the screen but there is no scrollbar to see them all.

Can you please remove the integration and re-add it, it should solve it

Regarding the ability to scroll, it’s related to the HA UI, nothing I can do to add it, in my PC it fits, probably different resolution, you can try to zoom out the browser to see all fields, in mobile there’s a scrollbar

Ok, I’ll give that a try, thanks

another way to solve the issue with the generated names without removing and re-adding the integration can be done by accessing ./storage/core.config_entries and edit the integration’s title to the title you would like it to be (below is an Exmaple of BlueIris):

{
  "connection_class": "local_poll",
  "data": {
    "host": "hostname",
    "password": "encrypted_password",
    "port": "port",
    "ssl": false,
    "username": "username"
  },
  "domain": "blueiris",
  "entry_id": "d5a28bf9e180458db8cab34866eb31a8",
  "options": {},
  "source": "user",
  "system_options": {
    "disable_new_entities": false
  },
  "title": "BlueIris",
  "unique_id": null,
  "version": 1
}

after updating the file, restart the HA

Thanks for the info, removing and re-adding fixed the entity_id names back to camera.blueiris_dining_room format.

BTW, awesome work, thank you so much!

This has been working great for sometime now, thanks for all your work on it! I have a question is, When I disable a profile for a group of cameras, It pauses all the profiles on Blue Iris. Is there any way to pause or hold just that group of cameras and allow the rest to operate normally? Thanks for any future help.

2020-07-17

Implemented enhancements:

  • Added ability to set stream type in integration’s options (Originally was hard-coded), Default=H264, initiated due to #75
  • Upgrade pre-commit to 2.6.0
  • Fix pre-commit errors (F541 f-string is missing placeholders)
  • Added support for External and DIO events (Related to #74)

Note: All camera will have 2 additional sensors, to disable use integration’s options

I keep getting “Invalid administrator credentials”
Credentials are correct. Tried creating new admin credentials as per guide, but still getting this

Any ideas?

the issue you are describing found by another user in another component I developed,
Released new version that should fix it, please let me know if new version solved the issue

thanks

2020-07-23

Implemented enhancements:

  • Moved encryption key of component to .storage directory
  • Removed support for non encrypted password (Breaking Change)

Fixed bugs:

  • Better handling of password parsing

Im not getting "Invalid administrator credentials” - but am getting “Unknown error occurred” now

Thanks for looking in to this

Can you post the log? Thanks