Unable to change the profile to away/home


#1

Hi Team,

I’m trying to toggle the structures awayState to away and home in a button click as shown below in android application. I’m unable to change it more than once. I’m always getting the awayState as ‘home’ only eventhough I changed it to ‘away’. Also, the state is not getting reflected in http://home.nest.com even in the successful case that means in the first attempt from home-> away. Please help me asap its a blocker for me.

Thanks,
Krishna

mNest.structures.setAway(mStructure.getStructureId(), awayState, new Callback() {
                    @Override
                    public void onSuccess() {
                        Log.d(TAG, "Away state set successfully--->"+mStructure.getAway());
                        boolean bCameraTurnOnState = false;
                        if(mStructure.getAway().equalsIgnoreCase("Away")){
                           bCameraTurnOnState = true;
                        }
                        mNest.cameras.setIsStreaming(mCamera.getDeviceId(), bCameraTurnOnState, new Callback() {
                            @Override
                            public void onSuccess() {
                                Log.d(TAG, "Camera turned on Successfully.--->");
                            }

                            @Override
                            public void onFailure(NestException exception) {
                                Log.d(TAG, "Camera turned on Failed.--->");
                            }
                        });
                    }

                    @Override
                    public void onFailure(NestException exception) {
                        Log.d(TAG, "Away state set Failed---> " + exception.getMessage());
                    }
                });

#2

Can someone help me on this?. It is a blocker for me.

Thanks,
Krishna


#3

Can you post a log of the url and payload that your code is sending out?