Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
http prontoscript code for fibaro home center 2 needed....help please!
This thread has 9 replies. Displaying all posts.
Post 1 made on Thursday June 11, 2020 at 15:00
robinstaal
New Member
Joined:
Posts:
June 2020
6
Hay, i got a pronto tsu9800 and a (zwave) fibaro home center 2.

I like to control my fibaro with my pronto 9800 with http command's.

the fibaro website have a easy http string creator to control the fibaro with http commands but i don't know how i get them in my tsu9800!?

i got a string to turn on a zwave device on my fibaro controller for example:

[Link: test]
(test:test in the string= username and password)

in my browser this string is working and trigger my fibaro zwave device.

where do i insert this string in my tsu9800 and how?

i read so much about this on the web but all i get is very long prontoscripts for examples...(i'm not a programmer)
i need only to trigger this http string with one button...no 2 way data/info but only to trigger this string...

I don't understand anything in the ProntoScript Developer's Guide 😞

can anybody give me a simple answer?

thank you!!!!!

:-))))

Last edited by robinstaal on June 12, 2020 03:38.
Post 2 made on Friday June 12, 2020 at 17:07
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,553
Realizing you may not be a programmer, hoping this might help by comparing examples of what this user requested vs the actual data in the link you posted above. I was looking on this site to see if I could find the One-Shot Philips Http Module.

[Link: remotecentral.com]

Lyndel
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 3 made on Friday June 12, 2020 at 18:52
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,553
I found the file I was looking for on this site.

[Link: files.remotecentral.com]

Download this zip. Inside, you will find multiple zips.

You want the file named SingleShotCommEx.zip

Inside that file, there are configs for 9400, 9600, and 9800.

Inside the XCF config, you will find instructions for use.

The command string you need to send is

/api/callAction?deviceID=60&name=turnOn

However, I just realized that because you need to send Username and password, this approach will not work.

If there is a way to bypass the requirement for username/password, it will. For example, a URL that only starts with

h t t p://192.168.2.104:80


In order to do what your URL requires, you would need to do scripting custom HTTP scripting to base64 encode the username/password as required for Basic Authentication (see link below). The Philips HTTP Library Example contained within this zip does not support Basic Authentication

[Link: developer.mozilla.org]

Last edited by Lyndel McGee on June 12, 2020 19:07.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 4 made on Saturday June 13, 2020 at 02:53
robinstaal
New Member
Joined:
Posts:
June 2020
6
Wow! What a great answer! So the only little problem is the user/password....
I going to try this next week and let you know if it works.

Thank you so much!

Greetings: a happy Dutch guy!

👍👍👍😇😇😇

Last edited by robinstaal on June 13, 2020 03:41.
OP | Post 5 made on Saturday June 13, 2020 at 03:48
robinstaal
New Member
Joined:
Posts:
June 2020
6
the SingleShotCommEx.zip part is no problem and import it already in my pronto and understand how it works...no problem.

But i can't bypass the password and username on the Fibaro home center 2...i try but no way to do it...so the hard part is then the user/password part...i read the link what you send but that part i need to understand and try....but on the firts read it's going to be hard :-(
Post 6 made on Saturday June 13, 2020 at 15:09
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,553
You can find a Base64 encode/decode method here.

[Link: scotch.io]

Look at the 2nd section for browsers that don't support the encoding natively. There is a single-line object defined that you can use in Pronto to encode the HTTP Request Header if you want to build your own http client as I did in the first example.

Authentication: Basic [base64 encoded username:password string]

Add the HTTP Request header with this...

socket.write("Authentication: Basic base64string\r\n");
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 7 made on Saturday June 13, 2020 at 16:22
robinstaal
New Member
Joined:
Posts:
June 2020
6
Thanx for the help....👍going to try this tomorrow...... With this info i think it's gonna work....i let you know.....thank you so much!
OP | Post 8 made on Monday June 15, 2020 at 02:48
robinstaal
New Member
Joined:
Posts:
June 2020
6
In the pronto script i need to fill in 'button_tag'is this the 'label' name of the button? For example in the single-shot communication script the top button name is 'lights out' Is this the button tag ? Zou if i label the button to 1 The button tag name Is 0? All the rest i understand in The script. 👍

And the pasw/user part is not going to work for me.....i try the whole night to undestand the part u try to explain to me but no luck....i'm sorry...to dumb i think...:-(

Last edited by robinstaal on June 15, 2020 03:41.
Post 9 made on Monday June 15, 2020 at 19:37
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,553
From what i recall, there. Are 2 settings pages. The one that specifies the Button tags needs widget tag, page tag, and activity tag. A tag is the prontoscript name. You can set this on your activities and pages but the Home activity and Home page i think are not editable. So, when you see something like BUTTON_1,Home,Home this means a button with the prontoscript name ‘BUTTON_1‘ on the page with prontoscript name ‘Home’ in an activity with prontoscript name ‘Home’.

As you have seen, if you cannot disable the username/password combination on your equipment, this script will never work.

Please have a look at my RC profile and drop me an email. I’d be willing to hack the script to add username/password auth header there for you but be forewarned that it will send this header for every http request that you send and will not allow you to specify different user credentials for different commands.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 10 made on Thursday June 18, 2020 at 13:13
robinstaal
New Member
Joined:
Posts:
June 2020
6
I send the email with all the info inside...thanx! 😀👍


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse