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

Make MQTT optional #32

Closed
fotiDim opened this issue Feb 26, 2020 · 10 comments
Closed

Make MQTT optional #32

fotiDim opened this issue Feb 26, 2020 · 10 comments

Comments

@fotiDim
Copy link

fotiDim commented Feb 26, 2020

Very cool component! Thanks for your work. 👏
As a suggestionI wanted to use the component without MQTT just not to have to reconfigure each camera individually in HA. Perhaps MQTT can be optional in that case.

As a side note, if the MQTT add-on is not installed then the configuration popup just never appears. If MQTT is mandatory it should fail more gracefully. Even after enabling it I had to restart HA for the configuration popup to work.

@elad-bar
Copy link
Owner

Thanks for the feedback, will add it

elad-bar added a commit that referenced this issue Feb 27, 2020
* Removed hard-dependency on MQTT, if MQTT integration was not set, binary sensors will not be created - Issue #32
* Username and password are now optional, if not set, will not create profile's switches
* Added validation for host, port and SSL state in configuration, if URL is not accessible, will throw an error
* Validate administrator username and password, in case entered wrong credentials, will throw an error
* Fix issue #28 - entities not available after restart
* Fix issue #27 - when changing switch it doesn't work smoothly and after restart
* Resources (strings) fixed
@elad-bar
Copy link
Owner

@fotiDim, please let me know how it works for you

@b0ddu
Copy link

b0ddu commented Feb 27, 2020

@elad-bar thanks for the new release.
I reinstalled everything to see how polished it it. Much better.
I have a problem though --
MQTT Listener by BlueIris is Off and motion entities are created as well with status 'Clear'.

My Hass.io: add-on 'Mosquitto broker' log below is configured and it's working though. Don't see any sensors from BlueIris even though i configured exactly as mentioned in readme.

1583123026: New connection from 10.0.0.75 on port 1883.
[INFO] found blueiris on Home Assistant
1582842774: New client connected from 10.0.0.75 as BlueIris (p1, c1, k20, u'blueiris').
1582842775: New connection from 10.0.0.75 on port 1883.
[INFO] found iotlink on Home Assistant
1582842780: New client connected from 10.0.0.75 as BIPC (p2, c1, k15, u'iotlink').
1582842813: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1582842815: New client connected from 172.30.32.1 as auto-xxxxx (p2, c1, k60, u'homeassistant').

@elad-bar
Copy link
Owner

Please go to the to the entities tab (Configuration -> Entities), if you will see those entities with error status, remove the integration and re-add it, it supposed to clean them

@b0ddu
Copy link

b0ddu commented Feb 28, 2020

@elad-bar Don't see any invalid Blue Iris related entries under Entities Tab ( Configuration -> Entities ). I did get all the motion, connectivity and cams entries and i have a Cycling Cam on lovelace and works good.

I think my problem is - don't see any Blue Iris entities under ... Configuration --> Integrations --> MQTT Mosquito Broker ; this part should be Blue Iris responsibility to push the mqtt data which has watchdog and motion alerts entries right ? i followed the instructions as in readme. I can see the BlueIris client connected to Mqtt broker too in logs and there are motion alerts reported from my cams normally. Just don't see them in MQTT. thanks.

@b0ddu
Copy link

b0ddu commented Feb 28, 2020

@elad-bar I do actually see the motion sensors showing Detected from after update from last evening. So, guess i'm good :) Thanks for the great work. Still don't know why i dont see any mqtt data from blue iris though.
Will move to exploring using stream and alerts based on motion and maybe object detection.
Thanks again.

@elad-bar
Copy link
Owner

@webwhiz, the components are not being created by MQTT integration, BlueIris integration creates them, that's the reason why you see them in BlueIris, that's by design.

MQTT integration is mandatory in case you would like to get notifications from the BlueIris as Binary Sensors mostly because the component is relaying on the connection to avoid creating multiple connection and load the CPU

@elad-bar
Copy link
Owner

can we close that issue?

@igloo15
Copy link

igloo15 commented Mar 1, 2020

I do have a question here I see sensors in my BlueIris Integration related to connectivity and motion. I have never fully configured the mqtt thing as it was tedious to go through every camera and setup mqtt broadcast.

Are those sensors (Connected and Motion) fake as in they never change because I didn't setup mqtt in BlueIris?

@elad-bar
Copy link
Owner

elad-bar commented Mar 2, 2020

If you didn't configure it, you will not get event for them and therefore will not be usable,
There is no way to know over API if the triggers set or not,
I thought at somepoint to add in options of the integration ability to exclude binary sensors (in each category - audio, motion and connectivity), switches (profiles) and camera.

Anyway, you don't need to go camera by camera to set it up, you can point to one camera to do all the configuration - in each of the camera go to:

  • Camera Settings -> Trigger and click on Sync Camera to X
  • Camera Settings -> Record and click on Sync Camera to X
  • Camera Settings -> Alerts and click on Sync Camera to X
  • Audio alerts - Need to configure per camera (supports audio) to trigger event (will be covered by the one time settings of Camera Settings -> Alerts)

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