irritanterik / homey-http-request-actions

HTTP request actions for flows on Homey by Athom
16 stars 14 forks source link

Post command changes after saving flow #8

Closed posthok closed 8 years ago

posthok commented 8 years ago

http flow 1 After saving this flow this happens. http flow

irritanterik commented 8 years ago

Have you typed the values instead of pasting it from a rich text editor? What browser/platform do you use?

Op 22 jul. 2016 11:43 schreef "posthok" notifications@github.com:

[image: http flow 1] https://cloud.githubusercontent.com/assets/6661318/17053260/7413ffee-5001-11e6-8a4c-cba27e1d17e6.jpeg After saving this flow this happens. [image: http flow] https://cloud.githubusercontent.com/assets/6661318/17053272/8afbfbe4-5001-11e6-8fad-31f093d6a1d5.jpeg

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/irritanterik/homey-http-request-actions/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/AOhu1P2RX2osviR3CqCiq47AcesfHI_nks5qYJDSgaJpZM4JSmjf .

posthok commented 8 years ago

text input in Chrome. after saving it runs once and after that the text changes. After changing the text and saving it, it happens again. Running 1.31 by the way

irritanterik commented 8 years ago

Ok, I'll investigate after my holiday. As a work around you could use the geek options in this card. With that you can put the query parameters in a json structure.

posthok commented 8 years ago

Thanx

posthok commented 8 years ago

Also in the geek version the input changes instantly from type=command&param=switchlight to type=command¶m=switchlight when saved. I'm using 8.39 btw. Working in chrome and windows 10 app, the result stays the same

irritanterik commented 8 years ago

With geek options you must input query parameters JSON formatted:

{"method":"post"
,"protocol":"http:"
,"hostname":"192.168.0.10"
,"path":"/service"
,"query":{"type":"command","param":"switchlight"}
}
irritanterik commented 8 years ago

¶ means ¶ according to HTML. Unfortunantly somewere in the Homey framework &para (without semicolon) is interpreted as HTML character. You'll also see this behaviour on other flow cards: image

For now, you can switch the parameters in your post url, so variable param follows the ? and variable type follows &: http://192.168.0.x:port/service?param=switchlight&type=command

irritanterik commented 8 years ago

I reported this issue https://github.com/athombv/homey/issues/767

posthok commented 8 years ago

Ok thanx that worked.