Support for "BridgeCo AG Telnet server" (Marantz-Denon AVR)

RuBot shared this idea 11 years ago
Under Consideration

Unfortunatally the implementation of "socket request" functionallity is insufficient to control AV systems like Marantz and Denon. I did not succeed to manage an AV (example: sending a "PWON" message via socket request towards <IP av> on port 23)


http://us.marantz.com/DocumentMaster/US/Marantz_AV_SR_NR_PROTOCOL_V01.xls

Replies (7)

photo
1

I defenetally support this request. Till now have no idea how to control Denon.

photo
1

From protocol specification:


  1. Command structure: COMMAND + PARAMETER + CR (0x0D)

I believe that the problem you might have is the CR (carriage return) symbol to be sent at the end of the command.

Did you try using the \r escape sequence with the command?

E.g. for Body in socket request add MV35\r or MV35


Windows uses \r\n (CR+LF), Linux \n (LF) and Mac only \r (CR)


Unfortunately it seems that socket request doesn't work at the moment.

Rule creator says "rule2java: Unknown element type: hr.chus.model.action.generic.SocketClient".

I guess Zipato have disabled that at the moment.

photo
1

I've checked all possible variants, but no results so far. It is look like they did not support it yet (but this "yet" is more then one year). Thanks for the hint .

photo
1

http://avdeal.nl/productinfo/marantz/na7004i/NA7004_RS-232C_Specification.pdf/


According to this manual the receiver expects 0x0D as CR

photo
1

If you input a source port no java error is thrown. But the carriage return I tried to send did not work as well. Could someone capture the packets that are sent to the receiver from the Zipabox?

photo
photo
1

You can control it by using telnet. Is their a way to use telnet in rules?

photo
1

It is possible to do via socket, but it is not accepted the Carriage return.

photo
1

Thanks, I will use an web server with php then as workaround...

photo
photo
3

Ok, so all those of you who insist on making this via ZipaBox, I found a solution to send 0x0d :)


1. Open firefox and make sure you have firebug installed.

2. Go to my.zipato.com and login

3. Create or edit your rule that will (or already contains) do the socket request(s).

Here is simple rule I created for the purpose of this example.

da35e7a0c21f41476327654035c95fcd


4. Configure your socket request(s) and write what you need to send in body or just add text markers for request body (like ##body1##, ##body2##... etc.). In my example it is MV35u000D (we will fix u000D to be full \u000D later)

5. Click save button to close socket request configuration

6. Open firebug and make sure console and net is enabled so you see browser requests. Maybe you can open firebug at earlier step or even before loading my.zipato.com

7. Click "Save" on rule and monitor Firebug console for "saveProgramTrigger" request

15ed6112aebe0bf22f3c91a1ee699064


8. Right click on the request line and select "Copy as cURL"

9. Paste in some text editor. I am using Notepad++ and it will look like the following:

2aabccc0c18742d272746f7828f61ef9


10. Now find your body placeholders or body text (yeah it might be hard). Replace it with whatever body you need for the request(s).

In my case I am replacing MV35u000D to MV35\u000D. Yes, escape sequences are properly understood now and MV35\u000D will be translated to MV35 + 0x0D which was the initial topic.

11. Now you need curl to execute the request. Linux/*NIX users probably won't have any trouble with this. Windows user may ssh somewhere or download curl for windows and struggle with command prompt :)

Some terminals may find command line data too long and truncate it, so you may copy the part after --data to some file like data.txt and load from there.


955a39dd8d93d040cb834fd60bac7681


If you get "success":true in response then you did everything properly.


12. Now you should not forget to go to my.zipato.com and click "Synchronize rules" on the right side of app dashboard.


13. And here is the result with simple socket server listening and dumping the data.

eb971cbcfb99d0261da151f26ed1ab19

photo
1

Thanks a lot! Although I have to wait for tomorrow morning and some coffee before trying it out (and unterstand it;-)...

photo
1

So you captured the Zipato output before getting sent to the cloud and then to the box, modify it and then send the modified output to the box. Right? You are insane! ;-)

photo
1

Yup, just do small modification to insert special chars that otherwise are removed/converted by the browser.

If you have troubles with my "curl" tutorial, there's a way with a Chrome extension called "Postman".

With it you just do the same in a more gui way.

Let me know if you have issues with above, I will write alternate steps using Postman extension for Chrome.

photo
photo
1

It might be possible to alter the post body directly from browser (Firefox/Chrome) using some extension that allows it. You just need to find the post data for body and insert \u000D there for 0x0D.

I believe you can research that on your own :)


Also... if you modify your rule with puzzle editor... i believe you will have to repeat the procedure to insert 0x0d in place.

photo
1

Would it be possible for you to just capture the final communication between the Zipabox and the receiver?

photo
1

I don't understand why you would need to capture that.


The receiver protocol is clearly defined in the document in the beginning of the topic.


Rules from puzzle rule creator are converted into form post data (and some JSON stuff) and sent to Zipato cloud API service. Then they are being translated into whatever Zipabox understands and when you click "Synchronize rules", they are being sent to your Zipabox.

All further communication (socket requests) are done from your Zipabox to the end IP/Hostname defined in socket request settings.

And when request is made, the body content is sent to the receiver.

So if you want to power on then send PWON + 0x0d.

If we take my example, replace MV35u000D with PWONu000D and then follow the steps to inject the missing \ which turns \u000D


If you let me know what rule you would like to create then I might be able to prototype it for you.

photo
1

It probably makes no sense. I hoped to see what happens with the CR commands in the body field of the socket request action. But I think you have shown, that it removed on the way to the cloud. So forget it, to late for coherent Zipabox thoughts... In anyways thanks a lot for your efforts and documentation!

photo
photo
1

Ok, it works. Will no modify my wake up rule to include sound. :-)

photo
1

Great to hear it works for you.


Maybe you can share with others your wake up rule? :)

This forum needs more rule examples.

photo
1

It's not absolutely reliable but it seems to work in principle. Regarding rule examples: I will document some of my rules and put them online later.

photo
1

Here it is. It would be nice if you and other people could post your useful rules there as well.

photo
Leave a Comment
 
Attach a file