Help on getting data from http response

Avatar
  • updated
  • Under review

I'm  trying to get data from the respnonse "actualvolume" 

I've been exploring the forum here but i can't figure out what i'm doing wrong.


Parse type: Jhson

I get this response:

{"?xml":{"@version":"1.0","@encoding":"UTF-8"},"volume":{"@deviceID":"C4F312D5994F","targetvolume":"16","actualvolume":"16","muteenabled":"false"}}

Image 2282

Image 2283

Image 2284


Image 2288

Avatar
Dave De Busschere
Quote from Ricardo Pinto

Excellent!

I'm glad that it helped. Does the cyclical get the volume work well also, and update the visualization?

Best regards 

The value on the integer (button) doesn't change when i use the BOSE remote or app?

I'm trying with the programm but no result so far.

Avatar
Dave De Busschere

the POST and GET command interfear eachother. When i change the value in the BOSE app to it automaticly changes back to the comfort click value. Because the integer didn't change to the BOSE app vol.

Avatar
Ricardo Pinto

Hi,

Probably we're missing something, because POST and GET command is not supposed to interfere with each other.

Can you export your implementation, even if it's not complete, so we can double check?

Best regards

Avatar
Dave De Busschere
Quote from Ricardo Pinto

Hi,

Probably we're missing something, because POST and GET command is not supposed to interfere with each other.

Can you export your implementation, even if it's not complete, so we can double check?

Best regards

J2043-BOSE lifestyle650.bos

solved the interfear, it was actualy that the Bos was sending his value toward the BOSE.

But i'm still not able to make the Bos visual (Integer) to change to the reading from the BOSE


It just stays on the setting i last used in Bos, so if i change the volume with the BOSE remote, i do get the value with the GET command but i don't see how i can make the Integer change to the actual reading.


Best Regards,

Avatar
Ricardo Pinto

Hi,

Try this....

You are using Double values to get the data, and I was expecting integers, so I wasn't getting there...

Import this example and test it.

- Insert the "Volume button" double on the visualization;

- I used a Percentage template for the default value;

- Change the style to manual;

- On the Status Values create from 0 to 100;

- Set Show Bar to True;

- Choose 0 as Decimal places;

- Choose Control Type as Percent Setter;

I suppose that when the "actual" double updates, or with cyclical call, the volume button value will update.

For that, the Program gets the "actual" double as trigger, and sets that value to the button. So if you have cyclical get active for the volume, in theory the button in the visualization should change also.

Best regards

Casa-BOSE lifestyle650.bos

Avatar
Dave De Busschere
Quote from Ricardo Pinto

Hi,

Try this....

You are using Double values to get the data, and I was expecting integers, so I wasn't getting there...

Import this example and test it.

- Insert the "Volume button" double on the visualization;

- I used a Percentage template for the default value;

- Change the style to manual;

- On the Status Values create from 0 to 100;

- Set Show Bar to True;

- Choose 0 as Decimal places;

- Choose Control Type as Percent Setter;

I suppose that when the "actual" double updates, or with cyclical call, the volume button value will update.

For that, the Program gets the "actual" double as trigger, and sets that value to the button. So if you have cyclical get active for the volume, in theory the button in the visualization should change also.

Best regards

Casa-BOSE lifestyle650.bos

Hi Recardo,

I get en "internal server error" message when:

1. i change volume with the BOSE remote

2. when i change volume with the visualization

But i do get following:

- the value in the visualizations changes when i use the BOSE remomote ;-)

- when i use the visualization to change the volume i get the error message. BUT the volume of het BOSE won't change.

Avatar
Dave De Busschere

Hi, 

I can use integers as we to retrieve the values.

If this is easier I'll change everything to integers ( can also use strings if needed).

Regards,

Avatar
Dave De Busschere
Quote from Ricardo Pinto

Hi,

Try this....

You are using Double values to get the data, and I was expecting integers, so I wasn't getting there...

Import this example and test it.

- Insert the "Volume button" double on the visualization;

- I used a Percentage template for the default value;

- Change the style to manual;

- On the Status Values create from 0 to 100;

- Set Show Bar to True;

- Choose 0 as Decimal places;

- Choose Control Type as Percent Setter;

I suppose that when the "actual" double updates, or with cyclical call, the volume button value will update.

For that, the Program gets the "actual" double as trigger, and sets that value to the button. So if you have cyclical get active for the volume, in theory the button in the visualization should change also.

Best regards

Casa-BOSE lifestyle650.bos

Hi Recardo,

Got it working.

I put everything on integer instead of double. 

Thanks for al the effort you put into it.

Avatar
Dave De Busschere


Bom dia Ricardo,

Now we (you and me) got the volume control to work, I'm moving to the next part MUTE and ON/OFF.

I don't see how I input the key_value and key_status in the post data?

<key state="$KEY_STATE" sender="$KEY_SENDER">$KEY_VALUE</key>

(At he bottom of this message is my input), without result.

I also changed the $key_value with "MUTE" and $KEY_STATE with"press".


Muito obrigado,

Here is the list reference from Bose:


Avatar
Fabien Fuster

Hi Dave,

Reading the data, if not mistaking, you should send the following :

<key state="press" sender="Gabbo">MUTE</key>

Regards,