-
Notifications
You must be signed in to change notification settings - Fork 7
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
turn led on #6
Comments
Hi, |
Yep I mean in the integration, how do you debug it? Edit 1: do you intercept the request from app to cam? |
Yes, I have a router that can record the network traffic, then I can look at it through wireshark. Anyway, here's what I found:
TL;DR: didn't manage to get it to work |
Thank you for your reply, maybe I could investigate a bit more how to do this, if I find something I open a pr ;) |
That would be awesome :)
|
Hey @dbuezas I was checking the communication between ICsee app -> camera, and as you said, there is binary interaction only :'( Questions
Note: I don't know if you tested it in the dark, because this functionality just work without lights, even using ICSee app. |
Hi, I mentioned that repo because that's what this integration uses internally, and because it has functions to get and set various configurations. I started an issue in that repo about this topic, check it out: |
Thanks for the update, I didn't know you handle binary for some functionalities, I will follow the issue that you mentioned, and see if I can help somehow :D |
I tried replicating the binary protocol, but i didn't succeed. It seems to be encrypted |
When I was installing pip3 install dvrip, it was installing a old version
and your code worked for me :D, Just for your information ;) |
Hey @dbuezas Good news I found witch field is responsible for control this light! it's and when I switch between those values I see the change in the app, I'm doing this info = cam.get_info("Camera.Param")
# EO-IR Alert
info[0]['DayNightColor'] = '0x00000003'
# Full Color
info[0]['DayNightColor'] = '0x00000004'
# Infrared Night Vision
info[0]['DayNightColor'] = '0x00000005'
cam.set_info("Camera.Param", info) The question is, how to integrate it with home assistant :D, do you have some example how you change settings from HA? Edit 1: In my case I want to switch between |
Wow, really... I tried 0x0, 0x1 and 0x2 🤦 For Home Assistant, I'll add them to this integration. Did you also confirm that they turn the LED on/off? |
Hey @dbuezas , Yep I tested, and It worked <3 |
Ok, I'll add that to the integration. I tested it in one of my cameras and it didn't work, but it is a weird camera anyway hehe |
Experimental release with light control https://github.com/dbuezas/icsee-ptz/releases/tag/v3.0.1 |
Do you have some example to use in card? Do I need to add a new sensor? |
I got this issue
I'm using version 3.0.1 |
did you remove and readd your cameras? |
Removing the cameras from this integration is enough :) |
I've changed the unique ids of things to mac addresses, so the old entities are missing data. |
I removed from integration and HACS and I'm still getting an issue :'(
But the strange thing is, that worked for you 🥲 |
Remove the devices from the integration instead |
And then restart for good measure |
Did you run your HA in docker? you said that you changed to mac, I don't know how you use this, but docker network is not in the same camera's network! do you think it could be the issue? I removed restart, and I'm still facing the same issue :'( |
Oh, i mean mac address.
Those controls are in the Device view. Go to http://homeassistant.local:8123/config/devices/dashboard or through the integration. It gathers all entities that belong to the same device (now identified via its mac address). To control that you can use the the service: select.select_option
data:
option: Color light
target:
entity_id: select.antena_day_night_color |
Can you delete the camera (click on the three dormts right to "configure", then delete) and then add it again. What do you see? |
as I was suspecting the issue was because my HA wasn't in the same camera's network, when I added container in the host network, it worked. just to you have an idea how It is setup.
as you can see my HA was behind of traefik, and to access HA was possible just via proxy. anyway the issue was network, I can see other way to handle just HA in different way. now I can see the new configurations that you added, I will try to configure and let you know. |
Hey @dbuezas it worked from HA 🥳 But do you have some example to add a button to switch between 2 values ? |
In case you could provide some example, it gonna help me. But this issue can be closed in ny opinion, I can handle lights from HA ! Thank you so much for your support |
I was thinking... Isn't it possible you keep the configuration as before and with Mac address? Or maybe by ip address 🤔? Because I could make this work but with some shit workarounds 🥲 |
Now it is mac addresses, before it was serial number, and before just ip. |
Probably for you get the mac into the network, you do some nmap to get the devices, but it works when the HA is in the same network as others devices. As I'm using docker, it generates a sub network and nmap won't work. It's my guess, because after add the container in the same network of "host", it worked. After I add this line in my docker-compose.yaml
|
Indeed! |
I'll rephrase: is there any reason not to keep everything in the same subnet? Other integrations use the same procedure to grab the mac address, so they also expect this. |
All services in my "raspberry" are running in docker, and all containers are using a docker network (named proxy), docker don't allow me to use network and network_mode together, then just for HA I need to keep outside of proxy network. Definitely I fixed some issues, but created others 😅, but well probably there is some better solution for my side, I'm sure that someone else faced the same problem 😆, I just need to search a bit more. |
I'll see if I can fall back to serial number if the mac address can't be resolved |
Released in https://github.com/dbuezas/icsee-ptz/releases/tag/v3.0.2 (enable experimental entities in the CONFIGURE options of the integration to access LED controls) |
Hello do you have any idea how to turn led on?
The text was updated successfully, but these errors were encountered: