guino / BazzDoorbell

124 stars 22 forks source link

tuya_config.json overwritten after running ppsapp #104

Open sle118 opened 1 year ago

sle118 commented 1 year ago

aside from taking the doorbell offline, is there any way to prevent ppsapp to overwrite values set in tuya_config.json by the script? Trying to enable onvif, amongst others. Changes are there in the file, but as soon as ppsapp starts, changes are overwritten.

guino commented 1 year ago

@sle118 usually the settings from the json file can be changed in the phone app -- if you change them there they should go down to the device. Most devices I've seen will not disable onvif on the json file when you enable it, but I have seen a few that do overwrite the setting -- I believe we 'patched' some of those to force-enable onvif (regardless of server connection). I can try to help you with patching it, if required.

If you don't want anything 'fancy' you could simply look for the references to tuya_config.json in ghidra, then find the one that 'writes' the file and just disable it (or possibly change the filename) so it writes to some other file/location (and keeps your manually edited json intact for it to read later). The way I had done in the past was looking for references to the onvif_enable setting, then overwriting the value to be always 1 -- but if you have more settings getting overwritten it may not be the worth making changes for each of them.