GithubHelp home page GithubHelp logo

Comments (18)

bwssytems avatar bwssytems commented on July 28, 2024

So, You are almost there, I think....

So use the custom method as you said with the URL you need.

Then you have to select 'PUT' as the verb

The URL encoding should be ok.

Put the XML data in the examples in the body of on or off depending on what you need.

Hope that gives some direction.

from ha-bridge.

willplaice avatar willplaice commented on July 28, 2024

Hi

Im getting some sort of preamble in the command ? best way I can explain is - capture from ha-bridge on left, and from the call via the web app on the left (which works) -

any ideas?

traces

from ha-bridge.

bwssytems avatar bwssytems commented on July 28, 2024

Ahh, I see now. It is a "POST" command, even thought PUT is in the body...misleading.

So it is a POST command for the http verb and the on or off body is everything after the the quotes in the Form item capture..... "Form item:" "<YAMAHA_AV cmd" " = " ""PUT"><Main_Zone>......

from ha-bridge.

willplaice avatar willplaice commented on July 28, 2024

ok so the following in the body ?

"<YAMAHA_AV cmd" = ""PUT"><Main_Zone>Down</Main_Zone></YAMAHA_AV>”

?

I’ve grabbed 1.4.0 and here’s the comparison now:

note I still have additional characters being sent in the actual message…

pastedgraphic-1

from ha-bridge.

bwssytems avatar bwssytems commented on July 28, 2024

You actually need to include a "Form item:" in the beginning as well just like the first one you showed. The wireshark output puts the field name there and then puts the text it received in quotes and that contained "Form item:".

from ha-bridge.

willplaice avatar willplaice commented on July 28, 2024

ok..

here’s the device config - and referring to the screen capture, can you see the extra characters in the left hand side, before the “POST” i’m guessing this is my problem ?

"name":"avDown","deviceType":"custom","targetDevice":"Encapsulated","offUrl":"","onUrl":"http://192.168.1.119:80/YamahaRemoteControl/ctrl","httpVerb":"POST","contentType":"application/x-www-form-urlencoded","contentBody":"\"Form item:" "PUT"\u003e\u003cMain_Zone\u003e\u003cVolume\u003e\u003cLvl\u003e\u003cVal\u003eDown\u003c/Val\u003e\u003cExp\u003e\u003c/Exp\u003e\u003cUnit\u003e\u003c/Unit\u003e\u003c/Lvl\u003e\u003c/Volume\u003e\u003c/Main_Zone\u003e\u003c/YAMAHA_AV\u003e"},{"id":"1584565507”,

On 21 Feb 2016, at 17:18, bwssytems [email protected] wrote:

You actually need to include a "Form item:" in the beginning as well just like the first one you showed. The wireshark output puts the field name there and then puts the text it received in quotes and that contained "Form item:".


Reply to this email directly or view it on GitHub #50 (comment).

from ha-bridge.

bwssytems avatar bwssytems commented on July 28, 2024

I'm not sure what you see as this looks good to me?

from ha-bridge.

willplaice avatar willplaice commented on July 28, 2024

see attached - it's sending the whole string in the key field and nothing in value ?

missing value

from ha-bridge.

bwssytems avatar bwssytems commented on July 28, 2024

I was reading the remote app info and I am now very confused. Are these strings actually sent to the Yamaha Receiver or are they the config for the remote app?

from ha-bridge.

willplaice avatar willplaice commented on July 28, 2024

ok, and again many thanks for looking at this..

(please look at the last screen capture)

I have a wireshark trace of a working http post message that i want to copy into ha-bridge (the one on the right is the working one)

on the left is the output from ha-bridge with the device config below, as you can see there is a difference.

the working xml has values for key and vlaue

what i am sending via ha-bridge has all the detail in the key field and a blank value field.

i am guessing i’ve not put a coma or quote in the right place.

i hope that’s a clear explanation of the problem I’m having.

On 22 Feb 2016, at 15:24, bwssytems [email protected] wrote:

I was reading the remote app info and I am now very confused. Are these strings actually sent to the Yamaha Receiver or are they the config for the remote app?


Reply to this email directly or view it on GitHub #50 (comment).

from ha-bridge.

bwssytems avatar bwssytems commented on July 28, 2024

Ok, the confusing thing is the decoding from wireshark. Look at the hex dump below and that is the key: I copy and pasted, please check.

"name":"avDown","deviceType":"custom","targetDevice":"Encapsulated","offUrl":"","onUrl":"http://192.168.1.119:80/YamahaRemoteControl/ctrl","httpVerb":"POST","contentType":"application/x-www-form-urlencoded","contentBody":"<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Volume><Lvl><Val>Down<Val><Exp></Exp><Unit></Unit></Lvl></Volume></Main_Zone></YAMAHA_AV>"}

from ha-bridge.

bwssytems avatar bwssytems commented on July 28, 2024

Ok the markdown languag screwed that up... Just follow the text in the dump.

from ha-bridge.

bwssytems avatar bwssytems commented on July 28, 2024

Aha, used the markdown language to fix the text above. Do not include the quotes in the beginning and the end.

from ha-bridge.

willplaice avatar willplaice commented on July 28, 2024

ok so i now see that when i paste strings into the content body on field, i get the extra characters added that i'm seeing being sent.... I'll edit the device.db file and see if i can get what i want to to send there.

from ha-bridge.

dale3h avatar dale3h commented on July 28, 2024

I was able to get this working from the HA Bridge web UI alone. When I compared the data I captured to the data from this post, I noticed that there was a / missing in the closing tag for Val.

Just to confirm, "Form item:" is not required in the "Content Body On"

Here is the body that worked for me: <YAMAHA_AV cmd="PUT"><Main_Zone><Volume><Lvl><Val>Down</Val><Exp></Exp><Unit></Unit></Lvl></Volume></Main_Zone></YAMAHA_AV>

Here is the config from device.db: {"id":"1554843008","name":"avDown","deviceType":"custom","targetDevice":"Encapsulated","onUrl":"http://192.168.1.119:80/YamahaRemoteControl/ctrl","httpVerb":"POST","contentType":"application/x-www-form-urlencoded","contentBody":"\u003cYAMAHA_AV cmd\u003d\"PUT\"\u003e\u003cMain_Zone\u003e\u003cVolume\u003e\u003cLvl\u003e\u003cVal\u003eDown\u003c/Val\u003e\u003cExp\u003e\u003c/Exp\u003e\u003cUnit\u003e\u003c/Unit\u003e\u003c/Lvl\u003e\u003c/Volume\u003e\u003c/Main_Zone\u003e\u003c/YAMAHA_AV\u003e"}

from ha-bridge.

bwssytems avatar bwssytems commented on July 28, 2024

Is this working now?

from ha-bridge.

willplaice avatar willplaice commented on July 28, 2024

Hi. Yep. Seems pasting into the web gui causes formatting issues at least for me. So I'm having to edit the db file. But it works ! Thanks for the development and the support !

On 1 Mar 2016, at 14:57, bwssytems [email protected] wrote:

Is this working now?


Reply to this email directly or view it on GitHub.

from ha-bridge.

dale3h avatar dale3h commented on July 28, 2024

Just to prevent any confusion for future users that come across this post: when pasting into the web UI, make sure that you're using < and >. In the config file is where you'll want to use \u003c and \u003e.

from ha-bridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.