0

I used google's json validator and it says my json is valid, but for some reason google home control still gives me "couldn't update settings, check your connection". If I intentionally throw an error (like invalid variable) in my server, google home logging actually shows backend failure, but no error is reported when i use a proper json. What other errors could it be?

Here's my json structure:

{
    "requestId": "xxxxxxxxxxx",
    "payload": {
        "agentUserId": "xxxxxxxx",
        "devices": [{
            "id": "xxxxxxxxx",
            "type": "action.devices.types.AIRPURIFIER",
            "traits": ["action.devices.traits.OnOff", "action.devices.traits.Toggles", "action.devices.traits.FanSpeed", "action.devices.traits.SensorState"],
            "name": {
                "defaultNames": ["air Purifier"],
                "name": "Air Purifier",
                "nicknames": ["Air Cleaner"]
            },
            "willReportState": true,
            "attributes": {
                "commandOnlyOnOff": false,
                "availableFanSpeeds": {
                    "speeds": [{
                        "speed_name": "S1",
                        "speed_values": [{
                            "speed_synonym": ["low", "speed 1"],
                            "lang": "en"
                        }]
                    }, {
                        "speed_name": "S2",
                        "speed_values": [{
                            "speed_synonym": ["midlow", "speed 2"],
                            "lang": "en"
                        }]
                    }, {
                        "speed_name": "S3",
                        "speed_values": [{
                            "speed_synonym": ["mid", "speed 3"],
                            "lang": "en"
                        }]
                    }, {
                        "speed_name": "S4",
                        "speed_values": [{
                            "speed_synonym": ["midhigh", "speed 4"],
                            "lang": "en"
                        }]
                    }, {
                        "speed_name": "S5",
                        "speed_values": [{
                            "speed_synonym": ["high", "speed 5"],
                            "lang": "en"
                        }]
                    }],
                    "ordered": true
                },
                "reversible": false,
                "availableToggles": [{
                    "name": "automatic",
                    "name_values": [{
                        "name_synonym": ["auto", "auto mode"],
                        "lang": "en"
                    }]
                }],
                "sensorStatesSupported": [{
                    "name": "AirQuality",
                    "descriptiveCapabilities": {
                        "availableStates": ["healthy", "moderate", "unhealthy"]
                    }
                }]
            },
            "deviceInfo": {
                "manufacturer": "Hyperian",
                "model": "100",
                "hwVersion": "1.0",
                "swVersion": "1.0"
            }
        }]
    }
}
Hyperian
  • 127
  • 3
  • 13

1 Answers1

0

Wasn't able to find an effective way of debugging this type of problem. If only their cloud logging actually logs incoming json, not just errors.

my error had to do with something unrelated to the json structure.

Hyperian
  • 127
  • 3
  • 13