iRule  Universal Remote Control

Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

json control of volume

lars svartdal Sep 28, 2017 10:32AM EDT

Hello.

I have just bought a pair of electrocompaniet ec-living speakers. I contacted Electrocompaniet and asked if they could be remote controlled without the ec app, for example via my irule system instead. The responded quicly and sendt me a link with info about the json protocol they are using.

So far so good, but i tried to look at the settings in json commands in irule, and the layout in the received link, and i dont see how to implement this in irule.

What i want is to be able to control the volume up/down on the speakers from irule.

Here is the link i got; http://wiki.electrocompaniet.no/Home

Is it possible that anyone can help me with the commands to send for controlling the volume from within irule ?

best regards Lars

Up 0 rated Down
Alex Milogradov Sep 28, 2017 10:47AM EDT Builder & App Support Support
Lars,


There doesn't seem to Volume Up or Down, it is direct volume level only.

{"jsonrpc":"2.0","method":"Application.SetVolume","params":{"volume":30},"id":1}
Up 0 rated Down
Lars Svartdal Sep 28, 2017 01:33PM EDT
Hello again, and thanks for your answer. one clearifying question;

If i look at the "codes" on other json controls it looks like this
jsonrpc?request=%7B%22jsonrpc%22%3A%222.0%22%2C%22method%22%3A%22Input.Back%22%2C%22id%22%3A1%7D

How do i put your example into this syntax, or is it not neccessary.?

best regards Lars
Up 0 rated Down
Alex Milogradov Sep 28, 2017 01:41PM EDT Builder & App Support Support
Lars,

Those commands are normalized and don't require POST method. With True JSON, which {"jsonrpc":"2.0","method":"Application.SetVolume","params":{"volume":30},"id":1} is, you need to use METHOD=POST.
Up 0 rated Down
Lars Svartdal Sep 29, 2017 09:55AM EDT
Hello again.
I have now been trying different options;

if i put this in browser; http://192.168.70.99:80/jsonrpc?request={"jsonrpc":"2.0","method":"Application.SetVolume","params":{"volume":30},"id":1} it works, and change volume.

I have put this ; {"jsonrpc":"2.0","method":"Application.SetVolume","params":{"volume":50},"id":1} in the data field of a newly created device called ec-living on a property called volume 50.
I have created a http gateway with address 192.168.70.99, port 80, and http method post.
The device ec-living is added to the http section.

But it does not work.......

what have i done wrong ????

Sorry for the hassle, best regards Lars
Up 0 rated Down
Alex Milogradov Sep 29, 2017 10:13AM EDT Builder & App Support Support
Lars,

Command in the builder should be jsonrpc?request={"jsonrpc":"2.0","method":"Application.SetVolume","params":{"volume":30},"id":1}
Up 0 rated Down
lars svartdal Sep 29, 2017 10:23AM EDT
Hi Alex.

i put inn the prefix as you suggested, but sorry to say, still no luck....

best regards
Lars
Up 0 rated Down
Alex Milogradov Sep 29, 2017 10:25AM EDT Builder & App Support Support
Does it require login username and password?

Can you send me all the screenshots (builder command and the gateway setup) to support@iruleathome.com
Up 0 rated Down
Alex Milogradov Sep 29, 2017 10:25AM EDT Builder & App Support Support
Also... If you simply put in the command in the browser, change POST to GET and try it.
Up 0 rated Down
lars svartdal Sep 29, 2017 10:58AM EDT
Hi Alex.

mail sendt.

best regards Lars
Up 0 rated Down
lars svartdal Sep 30, 2017 02:57AM EDT
Hello again.

I could not get it to work as described, but i found a way to use volume up/down on the internet, and by modifying some xbmc codes from the xbmc device found in irule builder i finally got it to work.

Here are the commands i used;

jsonrpc?request=%7B%22jsonrpc%22%3A%222.0%22%2C%22method%22%3A%22Input.ExecuteAction%22%2C%22params%22%3A%7B%22action%22%3A%22volumeup%22%7D%2C%22id%22%3A1%7D


jsonrpc?request=%7B%22jsonrpc%22%3A%222.0%22%2C%22method%22%3A%22Input.ExecuteAction%22%2C%22params%22%3A%7B%22action%22%3A%22volumedown%22%7D%2C%22id%22%3A1%7D

best regards Lars

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Recent Discussions

Ajax-loader-small
customer-service@iruleathome.com
https://cdn.desk.com/
false
iruleathome
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
true
Invalid characters found
/customer/en/portal/articles/autocomplete
There was an error contacting Get Satisfaction
View All
0
discussions
replies
Questions
Ideas
Problems
Praise