Comments (18)
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.
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?
from ha-bridge.
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.
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…
from ha-bridge.
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.
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.
I'm not sure what you see as this looks good to me?
from ha-bridge.
see attached - it's sending the whole string in the key field and nothing in value ?
from ha-bridge.
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.
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.
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.
Ok the markdown languag screwed that up... Just follow the text in the dump.
from ha-bridge.
Aha, used the markdown language to fix the text above. Do not include the quotes in the beginning and the end.
from ha-bridge.
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.
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.
Is this working now?
from ha-bridge.
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.
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)
- Executing .bat script Windows HOT 17
- 2023: HA-Bridge does not work anymore (no device detection possible) HOT 41
- Cannot Link HA Bridge to Harmony Hub HOT 6
- Backup recovery not working HOT 1
- HA Bridge any refresh planned ? HOT 4
- cant exec shell script HOT 4
- Alexa can no longer set bright/dim percentage HOT 2
- Philips HUE app finds ha-bridge as HUE Bridge, but asks for me to press "the button in the center" to connect... HOT 3
- Add / update bridges devices without SPA url ? HOT 1
- Home Assistant Z-Wave Fan Speed HOT 2
- Feature request
- Harmony find Bridge, but "no Lights paired with your Bridge"
- When saving a function, the target setting remains empty HOT 2
- HABridge loosing config
- problems with ${device.*} script variable constructs
- Cannot Execute Command/Script/Program (v5.4.1) Ubuntu & Docker Compose HOT 14
- Requested Route has not been mapped in Spark for Accept and Not Found 404 Errors HOT 1
- Device not found.
- Device Not Found
- All device connections offline HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-bridge.