hass-aarlo icon indicating copy to clipboard operation
hass-aarlo copied to clipboard

Arlo Chime silent mode - can't turn off chime

Open avishayil opened this issue 4 years ago • 3 comments

Current configuration allows only few states:

  • Silent mode is on
    • Incoming call is on
    • Chime is on
  • Silent mode is on
    • Incoming call is off
    • Chime is on
  • Silent mode is off

Is there any possibility to add the opposite state?

  • Silent mode is on
    • Incoming call is on
    • Chime is off

This is very useful for night times, where kids are sleep and you don't want the chime to ring, but you do want your phone to call if someone rings.

I can help since i'm familiar with Python, I found the code but i'm struggling to set up a development environment to isolate the issue.

Thanks!

Avishay.

avishayil avatar Oct 14 '20 07:10 avishayil

From what I understand by investigating the web console of arlo, the payload looks like:

action: "set"
properties: {silentMode: {active: true, call: true}}

But from the app I can disable only the chime, so I think what is needed is to investigate the web call from the apk... wonder if it's possible to reverse-engineer the apk and figure the api call.

avishayil avatar Oct 14 '20 08:10 avishayil

I reverse-engineered the APK and found the following method:

.method private final parseJsonObject(Lorg/json/JSONObject;)V
    .locals 4

    const-string/jumbo v0, "silentMode"

    .line 20
    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object p1

    const-string v0, "active"

    .line 22
    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 23
    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getBoolean(Ljava/lang/String;)Z

    move-result v0

    iput-boolean v0, p0, Lcom/arlo/app/devices/doorbell/SilentMode;->isActive:Z

    :cond_0
    const-string v0, "call"

    .line 26
    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 27
    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getBoolean(Ljava/lang/String;)Z

    move-result v0

    iput-boolean v0, p0, Lcom/arlo/app/devices/doorbell/SilentMode;->isCall:Z

    :cond_1
    const-string v0, "chimes"

    .line 30
    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_2

    .line 31
    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object p1

    .line 32
    invoke-virtual {p1}, Lorg/json/JSONObject;->keys()Ljava/util/Iterator;

    move-result-object v0

    .line 33
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_2

    .line 34
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    .line 35
    invoke-virtual {p1, v1}, Lorg/json/JSONObject;->getBoolean(Ljava/lang/String;)Z

    move-result v2

    .line 37
    iget-object v3, p0, Lcom/arlo/app/devices/doorbell/SilentMode;->chimes:Ljava/util/Hashtable;

    check-cast v3, Ljava/util/Map;

    invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v2

    invoke-interface {v3, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_0

    :cond_2
    return-void
.end method

Seems like "chimes" attribute is handling the chime call functionality, but i'm not totally sure since it looks like the request value is a json object and not a boolean

avishayil avatar Oct 14 '20 09:10 avishayil

@avishayil If you're still using aarlo, did you ever find a way to disable the chime?

wizonesolutions avatar Oct 12 '21 17:10 wizonesolutions