kairoaraujo / kodak-smart-home

Kodak Smart Home integration for Home Assistant
Apache License 2.0
7 stars 3 forks source link

Additional info #16

Open joer293 opened 1 year ago

joer293 commented 1 year ago

I know this is a stale project, but I wanted to provide URL’s that are available if you want to add features to this integration. I can’t find anyone else interested in these findings.

These are all local, using the IP of the camera. Works against c525’s.

/?req=get_mac_address

/?req=melody_vol &value=2

/?req=get_caminfo

/?req=get_pu_signal_strength

/?req=set_flipup&value=1 (1=ceiling mount, 0 normal.)

/?req=set_flicker&value=50 (value in hertz 50 or 60)

/?req=set_night_vision&value=0 (0=auto, 1=on, 2=off)

/?req=set_motion_source&value=0&schedule=0 (0=off, 1=on, )

/?req=set_motion_sensitivity&value=1 (low=1, medium=3, high=5)

/?req=set_motion_storage&value=1 (1=cloud, 0=SD)

/?req=set_motion_snapshot_storage&value=1 (1=cloud upload, 0=off)

/?req=auto_rm_clip&value=0&clips=10 (0=don’t delete 1=delete)

/?req=set_sound_detection&value=0&sensitivity=1&schedule=0 (0=off, 1=on, )

/?req=set_sound_detection&value=1&sensitivity=3 (1=low, 3=medium, 5=high)

/?req=set_temp_detection&value=0&type=3 (0=off, 1=on)

/?req=set_resolution&value=480 (480=normal. 720=HD)

/?req=set_blue_led&enable=0&on_time=180&red_led_affect=0 (0=off, 1=on)

/?req=homemode_advise_setting&interval=1440&threshold=20&enable=1 (0=disable, 1=enable)

/?req=pair_stop&silence=1 (restart camera)

/?req=get_temp_humid

req=set_sec_type&value=1

/?req=get_session_key&mode=local&port1=55390&ip=xxx.xxx.xxx.xxx&streamname=C9CBBB22B6E94B43DDD160209C2XXX_8

With the session key URL this returns a valid SIP based live video feed with the key to authenticate with.

sbeukers commented 9 months ago

UPDATE_WIFI_INFO_CMD = "change_router_info"; UPDATE_WIFI_INFO_PARAMS = "&ssid=%s&password=%s"; UPDATE_WIFI_INFO_PARAM_SSID = "&ssid=%s&password=%s"; change_router_info&ssid=%s&password=%s&ssid=%s&password=%s

btw: ssid1=Primary SSID ssid2=Secundary SSID ssid3=Current SSID

eightball011854 commented 9 months ago

@sbeukers @h0d3nt3uf3l

right i made a temp guest network with a dummy password to be able to share this with yall

what am i doing wrong in my command?

http://192.168.222.1/?req=change_router_info&ssid=VFAtTElOS19BRjYz&password=bGV0c2dvZW50OA==&ssid=VFAtTElOS19BRjYz&password=bGV0c2dvZW50OA==

sbeukers commented 9 months ago

Can you try it like this? No guarantees... hope it works

http://192.168.222.1/?req=change_router_info&ssid=VFAtTElOS19BRjYz&password=bGV0c2dvZW50OA&ssid=VFAtTElOS19BRjYz&password=bGV0c2dvZW50OA

trullock commented 9 months ago

That base64 encode is probably/hopefully a URL safe variant, are you all accounting for that? E.g. trailing padding and slashes

h0d3nt3uf3l commented 9 months ago

@sbeukers @h0d3nt3uf3l right i made a temp guest network with a dummy password to be able to share this with yall what am i doing wrong in my command?

Nice. I see two points.

The command only need 1 ssid. In the caminfo are three ssids sure, but in the code can see that we only can one set.

http://192.168.222.1/?req=change_router_info&ssid=VFAtTElOS19BRjYz&password=bGV0c2dvZW50OA==

Second. In your caminfo I see that your HomeMode is active. That's why you get a direct connection to your camera, but not to the router. You have to disable the HomeMode. In worst case I think you have to reset the camera? I don't know it.

URL for disable your Homemode http://192.168.222.1/?req=homemode_advise_setting&interval=1440&threshold=20&enable=0

I have no idea what would happen :)

P.s. the change_router_info always says 0 ... the command was successfully received from the camera and respond with the 0, but the values could not processed. That's what I think

sbeukers commented 9 months ago

@sbeukers @h0d3nt3uf3l right i made a temp guest network with a dummy password to be able to share this with yall what am i doing wrong in my command?

Nice. I see two points.

The command only need 1 ssid. In the caminfo are three ssids sure, but in the code can see that we only can one set.

http://192.168.222.1/?req=change_router_info&ssid=VFAtTElOS19BRjYz&password=bGV0c2dvZW50OA==

Second. In your caminfo I see that your HomeMode is active. That's why you get a direct connection to your camera, but not to the router. You have to disable the HomeMode. In worst case I think you have to reset the camera? I don't know it.

URL for disable your Homemode http://192.168.222.1/?req=homemode_advise_setting&interval=1440&threshold=20&enable=0

I have no idea what would happen :)

P.s. the change_router_info always says 0 ... the command was successfully received from the camera and respond with the 0, but the values could not processed. That's what I think

remove the "==" at the end.

Good one to disable Home mode! I still believe the code generates 2 SSID's per URL populated or not.

the ssid3 in the caminfo is the current ssid. You can definitely set 2.

(mine: ssid1=mycurrent&ssid2=Sprookjescamping-339A&ssid3=mycurrent) the middle one was a vacation home :)

h0d3nt3uf3l commented 9 months ago

Sure there is a way but I don't found it yet. Your explanation about the ssid seems legit :)

eightball011854 commented 9 months ago

get_caminfo: flicker=60&flipup=0&fliplr=0&brate=500&svol=2&mvol=22&wifi=100&bat=14&hum=-1&tem=-273&hum_float=-1.0&tem_float=-273.0&storage=1&md=0:0:3:0&sd=0:2:3:0&td=0:3:1529:0&lbd=1:0:1:0&ir=0&lulla=0&res=720&sdcap=-113&sdfree=0&sdatrm=1&sdnoclips=10&mdled=0&ca=1&charge=1&lulvol=3&isp_idx=1&agc_lvl=3&ssid1=&ssid2=&ssid3=&hw_id=4&puscan=1&pu_ana_en=1&rtscan=1&panel_vox=0&charge_dur=307&mvr=1&dnsm=8.8.8.8&dnss=80.244.62.0&wifi_env=20010210004000D&lulla_dur=15&localip=192.168.222.1&sync_channel=3&rp_pair=0&rp_conn=disconnect&blue_led_en=1&blue_led_ontime=180&red_led_affect=0&block_pu_upgrade=0&pu_fw_pkg=00.00.00&advise_homemode=0&snapshot_storage=1&soc_ver=517260&

disabled home mode, ran every iteration of change_router (single ssid, multiple ssid, no ==) but this is what i got

@sbeukers @h0d3nt3uf3l

h0d3nt3uf3l commented 9 months ago

@eightball011854 Allright. Read yesterday a few posts back. Your cam is reseted, ok. Just going thourgh the InitialSetup section in the App and try to get the needed commands for you. Can you get me your http://192.168.222.1/?req=get_url

eightball011854 commented 9 months ago

commands

get_url: api=&mqtt=&stun=&rms=&ana=&ntp=mt-t01-r2.perimetersafe.com:9100

h0d3nt3uf3l commented 9 months ago

Are you familia with http-post data with an authorisation-header?

eightball011854 commented 9 months ago

Are you familia with http-post data with an authorisation-header?

now you lost me lol

h0d3nt3uf3l commented 9 months ago

Ok, I bought me a second camera to test my thoughts and I try to get a little Android-App running to initialize the camera. Maybe there is a way to get things running without an app, but that I have to try later.

h0d3nt3uf3l commented 8 months ago

Little Update. Programmed an android app so far which get the Wlan credentials to the camera. After a reboot the cam says "Great, connected to router" and in fact it got an IP and is connected. Sadly after 30 seconds it says "Setup failed", do a reboot an clear all credentials. This last step I can't get further at the moment. I don't find the command to save and finish the setup.

sbeukers commented 8 months ago

Little Update. Programmed an android app so far which get the Wlan credentials to the camera. After a reboot the cam says "Great, connected to router" and in fact it got an IP and is connected. Sadly after 30 seconds it says "Setup failed", do a reboot an clear all credentials. This last step I can't get further at the moment. I don't find the command to save and finish the setup.

Have you tried: /?req=setup_wireless_save

h0d3nt3uf3l commented 8 months ago

Nope I don't, because it's a generic app for more than the Kodak cam. The setup_wireless_save is the command for a doorbell, so I use another command on that point. I know it's the right command because the cam is connecting to my wlan after that :) But like I said it's still clearing all settings

anthonycmain commented 8 months ago

I have started a React Native (iOS and Android apps) project to try and support this community further based upon all the great information in this thread.

Feel free to get involved

https://github.com/anthonycmain/kodakam?tab=readme-ov-file

anthonycmain commented 8 months ago

Does anyone have a breakdown of all the get_caminfo properties?

@joer293?

h0d3nt3uf3l commented 8 months ago

Thanks @anthonycmain for your project. I'll contribute my learning about the app soon in your project.

joer293 commented 5 months ago

Just wanted to mention why I haven't looked more into these cameras. I've recently noticed firewall traffic viewing the camera feeds remotely. I took 2 of the 3 offline completely several weeks ago. I left 1 up just to watch if I could catch anything as a honeypot. Last night there was someone talking back through the last camera I kept online for this. Just a couple seconds, it sounded like they were reading off part of an IP address. My firewall only allows outbound connections to what used to be perimitersafe's IP's and ports. Just out of curiosity does anyone heard what happened to that companies servers and software after bankruptcy? Someone had to have gotten it and used it.

krzemien77 commented 5 months ago

Just wanted to mention why I haven't looked more into these cameras. I've recently noticed firewall traffic viewing the camera feeds remotely. I took 2 of the 3 offline completely several weeks ago. I left 1 up just to watch if I could catch anything as a honeypot. Last night there was someone talking back through the last camera I kept online for this. Just a couple seconds, it sounded like they were reading off part of an IP address. My firewall only allows outbound connections to what used to be perimitersafe's IP's and ports. Just out of curiosity does anyone heard what happened to that companies servers and software after bankruptcy? Someone had to have gotten it and used it.

Very interesting - timing also.

My wife's iPhone has quite recently notified her - via Passwords app - that her account / password at kodaksmarthome.com is probably compromised. To quote:

'This password has appeared in a data leak, which puts this account at high risk of compromise. You should change your password immediately.'

I'm not sure if this password - not that complicated though, but still - has just been coincidentally matched to this service, or there's more to it...? On the other hand, am 99.9% sure it's not been reused elsewhere.

Needless to say, there might be more to this story, with Kodak suddenly winding down this part of their business last year, than meets the eye.

trullock commented 5 months ago

Just wanted to mention why I haven't looked more into these cameras. I've recently noticed firewall traffic viewing the camera feeds remotely. I took 2 of the 3 offline completely several weeks ago. I left 1 up just to watch if I could catch anything as a honeypot. Last night there was someone talking back through the last camera I kept online for this. Just a couple seconds, it sounded like they were reading off part of an IP address. My firewall only allows outbound connections to what used to be perimitersafe's IP's and ports. Just out of curiosity does anyone heard what happened to that companies servers and software after bankruptcy? Someone had to have gotten it and used it.

Does that mean you know what the camera feed urls are?

hiluke88 commented 4 months ago

Just want to add that the c525 camera and official kodak app are still working in Australia. They went down for a few weeks late last year but have been mostly working since then. Not sure if this is because of our consumer laws requiring products to work for a certain time period, or if the local distributor took it over. However I am concerned that I am on borrowed time using these. If there is anything that would help contribute to this project from a working setup including the Android app, please let me know.

drahdiwaberl commented 4 months ago

Just want to add that the c525 camera and official kodak app are still working in Australia. They went down for a few weeks late last year but have been mostly working since then. Not sure if this is because of our consumer laws requiring products to work for a certain time period, or if the local distributor took it over.

just happened to have stumbeld upon the note on top of that page: https://support.kodaksmarthome.com/hc/en-us/sections/360005483597-KODAK-CHERISH-C525P-C525-C520