Hi all,
started on my first config of the hpp binding with OH3.4
I don’t get an idea how to start.
I need to call: api/call/dial?number=sip:10@…
The result of this will be like:
When I configure this I get the result but the command is send again and again, even without a linked item to the channel.
How can I configure the channel to only be executed on a switch item? and receiving the result in a string item?
And next question how to send then the result of the string item into the command of another channel?
The http binding is designed to frequently execute the same command. Therefore you can configure the refresh parameter within the thing.
If you only want to call your url based on a switch you need a rule:
Either execute the http action directly within the rule or dynamically enable / disable the http thing within the rule
ok, I thought the binding is although used for switching lights on/off. What kind of commands do I want to send a thousand times?
I think enable and disable a thing is not a good practice, I would need for each command channel a new thing…
I hope I can find something about http authentification for Java Script to build everything in a rule
Maybe not commands but reading days from another website where no other binding exists.
Also the http binding differentiate between getting an items state (therefore automatic refresh is required) and sending an command.
If an item that’s linked to the channel receives a command, the command will be forwarded ia the http thing
That’s already available, please have a look into actions, that you can use in your rules