sia-ha
sia-ha copied to clipboard
Controls
Hello, nice job on integration, I just tested it, status updates but I cannot arm or disarm Ajax from Hass. Can you explain what am I doing wrong? Thanks.
Hi! There is no option to control Ajax status throught SIA. The only possible solution is to dissasemble SpaceControl and connect button wirings to custom HW: https://cheater.dev/ajax.jpg
What kind of Hardware you personally use?On the picture it looks like it's ESP32, but can you be more specific? Thanks. Also, in your opinion, is it possible to use Ezviz and Imou API for integrating their cameras into Hass through p2p using login and pass, as its done in Ajax? Thanks in advance.
This is not my photo/device - just found it in Ajax facebook group. I prefer using ESP32-WROOM-32 from local stores with firmware from esphome.io.
About cameras - it's better to connect them directly throught RTSP without p2p as it uses cloud services which may add a delay or other instability: rtsp://admin:[email protected]:554/h264/ch01/main/av_stream I do like this with my dahua cameras.
But you can also use this: https://www.home-assistant.io/integrations/ezviz/
What store can you recommend for buying ESP32? Is Adruino.ua any good? About cameras, rtsp is not going to work for many reasons, its not secure, and you cannot access camera remotely from anywhere if you have gray IP, not even Mikrotik can bypass gray IP. For example, if you have multiple objects such as home, garage, office and so on, where there is no white IP address, you wont be able view camera over rtsp or onvif remotely from other place. Thats why its better to have p2p like Ajax did, so you can view all cameras local/remote from your mobile device anywhere on the planet.
Yes, bought some items from there aldeady.
For the cameras - maybe Dynamic DNS would help? Or a VPN connection to a server with white IP?
Nope, unfortuneately ddns works only if you have static/dynamic white IP, as for VPN, its quiet expensive to install good routers on each location, moreover for VPN you have to have at least 1 server with white ip, and if its not main location with most cameras you are doomed. Also VPN cuts internet speed very big time, so everything will be slow. P2P is much faster and easier option, but only Ajax could integrate API into their Malevich OS, and it doesnt have option to save recordings to your phone or remote NAS.
The thing is, I know a lot about networking and video surveillance, but not much in programming and integrating APIs, especially in hass )) If I could write an integration that works with account of p2p cameras it would raise community of Hass by millions, since Imou and Ezviz are most cheap and good cameras for consumers worldwide.
I believe that there is no such option to obtain a SDK from EZVIZ or other cameras as manufacturers wants to sell you their own cloud saving service. And Ajax can't save any recordings because of that contract. Probably there is an option to decompile their mobile apps and write an analogue. But this feature probably will be closed from cloud side.
Any idea how they did it? They cannot make recording because their Ajax service is on Amazon Cloud, and since they are not acting as video surveillance company, its too expensive to save data on their cloud server. But you can view camera from anywhere, and if you add it to Hass, you can save videos on remote Nas or inside hass somehow.

There must be SDK for dahua for sure:
Ezviz sdk is on their website.
https://www.google.com/amp/s/support.ajax.systems/ru/dahua-integration/%3famp

Ajax officially got the SDK from Hikvision, Dahua, etc after signing some contracts with manufacturers. Ajax may add a subscription to store videos on their cloud but they will lose the access to the camera's clouds. Ajax just show the video from cameras p2p cloud in their app, nothing more, they probably can't even get a screenshot from it on any alert event.
Thats fine as long there will be video from live feed, there are a lot of video capture/saving options ))) wondering if its possible to get sdk officially, or is it possible to implement it unofficilly?
Another option would be nice is to get working Integration into Synology, since it perfectly works with hass as well. Hass allows get all video and sensors from synology, i dont think sdk is open source but it works.
So there are some options:
- Surrender and pay for Hikvisions cloud storage. They provide their own servers for p2p and they want money for that.
- Try to hack their protocol. Hard and could be killed by simple protocol update.
- Modify the firmware in cameras to send rtsp stream to your custom server. Also hard, but there are some investigations were done by habr users.
- Install better HW with routing options. RTSP is the only realtime feed you can get. Maybe even raspberry with nginx would help.
"Modify the firmware in cameras to send rtsp stream to your custom server. Also hard, but there are some investigations were done by habr users." This option probably best bet. Since Nginx will require vpn or white ip. Hacking their protocol unreal its encrypted, it could take ages or a lot of cryptocurrency miners.
So basically the only option possible on local network just send rtsp traffic to lets say remote NAS (Synology) on different location, then transcode it to mp4 and add mp4 as Camera to Surveillance Station on Synology box or hass, or capture videostream and send it over to nas, am I missing something?
I believe that there is no need to convert it to mp4, you can connect it as RTSP stream directly to surveillance software, need only to create link between server and camera. Also I have a similar workaround to access IPTV streams outside provider's network through VPN(can be a SSH tunnel) between 2 nginx instances (both running on NASes, but can be a cheaper alternative, like raspberry).
VPN will cut internet speed too much, while mp4 can be uploaded on full speed or can be streamed to youtube or other service and then can be imported to NAS on white ip as a camera. Thing is, its too much traffic.
You can create a secure stream between 2 nginx instances by providing SSL certificates. It will serve just like https on almost full speed with no need on VPN connection. It will be the fastest solution without big delay.
Ok, thanks ill try that, but still skeptical.
Thats a really big integration which makes my repo as same as eavanvalkenburg's one.
I see the main goal here is to update readme with call to use an official integration. I'd rather change it locally.
Here is APi use any random number 8 chars for Authorization: https://api.ajax.systems/swagger-ui/#/login/login