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

Request: option to allow stream to be configurable #49

Closed
WhistleMaster opened this issue Sep 21, 2020 · 25 comments · Fixed by #73
Closed

Request: option to allow stream to be configurable #49

WhistleMaster opened this issue Sep 21, 2020 · 25 comments · Fixed by #73

Comments

@WhistleMaster
Copy link

Thanks for the great work on this component !

It would be great to get an option to allow stream to be configurable. I have an AXIS M3058, and the default image with the component is the 360° fisheye view. It would be great to be able to select, as an example, the quad-view.

Thanks !

@Kane610
Copy link
Owner

Kane610 commented Sep 21, 2020

Awesome!

Just a thought: stream profiles doesn't solve this? https://github.com/Kane610/axis/blob/master/axis/stream_profiles.py

@WhistleMaster
Copy link
Author

Unfortunately, no, you can't select a "view" for a profile. It seems that it's only for parameters such as resolutions, etc.

I can use different URLs, such as http://<AXIS_IP>/axis-cgi/jpg/image.cgi?camera={1-12} to get a still image, or rtsp://<AXIS_IP>/axis-media/media.amp?videocodec=h264&camera={1-12} for streaming.

@WhistleMaster
Copy link
Author

WhistleMaster commented Dec 24, 2020

Just figured out something this morning... I have to setup both the ONVIF and the AXIS integration for my camera to get all the different profiles with each view and also the different sensors.

If I setup each integration separately, either I get the different profiles with each views but not the sensors and vice-versa.

Strange thing is that I can't select any profile with the AXIS integration:
Screenshot 2020-12-24 at 14 07 31

@Kane610
Copy link
Owner

Kane610 commented Dec 26, 2020

I will look at this soon. The two integrations shouldn't affect each other

@Kane610
Copy link
Owner

Kane610 commented Jan 2, 2021

@WhistleMaster could you share logs of this behavior?

@Kane610
Copy link
Owner

Kane610 commented Jan 2, 2021

Have you configured stream profiles on the camera? I dont think there are any automatically created profiles but you have to do it yourself

@WhistleMaster
Copy link
Author

WhistleMaster commented Jan 2, 2021

Yes there are already there on the camera and I can get them with the ONVIF integration. Which logs would you like ?

@Kane610
Copy link
Owner

Kane610 commented Jan 2, 2021

So you mean you don't get the stream profiles from the camera with the axis integration? Are you perhaps using too low level of credentials?

Enable debug logging for the axis integration and share what pops out of it :)

@WhistleMaster
Copy link
Author

Indeed. I've tried with the root user with the AXIS integration but I don't get any stream profiles either. I've created a ONVIF user in "administrator" user group, but it doesn't work with the AXIS integration (I cannot log in from the integration) but this user does work with the ONVIF integration and I get the stream profiles.

I will enable debug logging and send the logs :)

@WhistleMaster
Copy link
Author

And here are the logs:
ha_logs.txt

@Kane610 Kane610 linked a pull request Jan 3, 2021 that will close this issue
@Kane610
Copy link
Owner

Kane610 commented Jan 3, 2021

According to the logs there are no configured stream profiles. And I'm working on adding proper view area support

@Kane610
Copy link
Owner

Kane610 commented Jan 4, 2021

How are the different views for your 360 device presented? How do you know that you get a view which is not the 360° view?

@Kane610 Kane610 reopened this Jan 4, 2021
@Kane610
Copy link
Owner

Kane610 commented Jan 4, 2021

Parts of it is solved, but not yet in home assistant

@WhistleMaster
Copy link
Author

WhistleMaster commented Jan 5, 2021

According to the logs there are no configured stream profiles. And I'm working on adding proper view area support

Well, the profiles are defined in the OVNIF section of the camera ("ONVIF media profiles"), that's maybe why I can see it with the OVNIF integration but not with the AXIS one. I don't have stream profiles defined in the "Stream profiles" section.

Screenshot 2021-01-05 at 12 33 27

Screenshot 2021-01-05 at 12 33 41

How are the different views for your 360 device presented? How do you know that you get a view which is not the 360° view?

They are available with the "ONVIF media profiles" but not with the "Stream profiles". I have to use an OVNIF user to get them with the ONVIF integration.

@Kane610
Copy link
Owner

Kane610 commented Jan 5, 2021

Ok, well I'm not utilizing any onvif functionality. Its all Vapix APIs I call

@WhistleMaster
Copy link
Author

That’s why then, so the only way to get the different views other than the 360 one is to use the ONVIF profiles and the ONVIF integration because the standard AXIS stream profiles through vapix calls don’t propose this option to choose the view.

I guess we can close this issue. Thanks for your help !

@Kane610
Copy link
Owner

Kane610 commented Jan 6, 2021

Isn't it worth investigating more?

@WhistleMaster
Copy link
Author

You tell me :)

As I see it, the only way would be to include some ONVIF functions in your AXIS integration to include the profiles but that would require two different users, one for the AXIS integration and one for the ONVIF.

@WhistleMaster WhistleMaster reopened this Jan 6, 2021
@WhistleMaster
Copy link
Author

WhistleMaster commented Jan 9, 2021

I don't know if that could be of any help, but Synology Surveillance Station allows to select a "Video Channel" and it is not using ONVIF.

Screenshot 2021-01-09 at 08 19 08

I can use different URLs, such as http://<AXIS_IP>/axis-cgi/jpg/image.cgi?camera={1-12} to get a still image, or rtsp://<AXIS_IP>/axis-media/media.amp?videocodec=h264&camera={1-12} for streaming.

Maybe that's what is used in Synology Surveillance Station.

@Kane610
Copy link
Owner

Kane610 commented Jan 9, 2021

I think those are view areas. I have that implemented. Just need to verify everything :)

@Kane610
Copy link
Owner

Kane610 commented Jan 12, 2021

I think I found it, it is the root.Image parameters in param.cgi

@Kane610
Copy link
Owner

Kane610 commented Jan 17, 2021

I've done something, try it out in beta shortly!

Screenshot 2021-01-17 at 19 21 17

@Kane610
Copy link
Owner

Kane610 commented Feb 12, 2021

Haven't heard anything and functionality is available, closing this. Feedback would be appreciated.

@Kane610 Kane610 closed this as completed Feb 12, 2021
@WhistleMaster
Copy link
Author

I've just updated HA this morning and tried the new AXIS integration and... it's working perfectly fine ! That's great, I can select the view now, thanks for the great work !

@Kane610
Copy link
Owner

Kane610 commented Feb 13, 2021

Thanks for the feedback! Happy i could solve it 😃

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

Successfully merging a pull request may close this issue.

2 participants