Welcome to Smart Home Forum by FIBARO
Dear Guest,
as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.
As a member you can:
- Start new topics and reply to others
- Follow topics and users to get email updates
- Get your own profile page and make new friends
- Send personal messages
- ... and learn a lot about our system!
Regards,
Smart Home Forum by FIBARO Team
Question
sarf77 11
Hi all,
I'm trying to teach myself string code for http requests.
Now there's every chance I will get terminology wrong here but please correct me.
So I've used Fibaros "Creating Virtual Devices" tutorial but cant seem to get this functioning.
In the VD Ive used 10.0.0.24 as the IP
Ive used port 11111
I have a HC2 at 10.0.0.24
I have a HCL at 10.0.0.2
The device I am wanting to switch for experimental purposes is device id 66 on the HCL which is just a relay.
I can get this to work switching a device on the HC2 but cant seem to get a command to the HCL.
The string code I have written is this :
POST /api/devices/66/action/turnOn HTTP/1.1
Host:10.0.0.2
Authorization: Basic (then login:password in base64) c3RvcC5zdGVhbGluZy5teS5wYXNzd29yZA==
attached is the screen capture for when i click the relay on in my browser in hcl
and second image is the response I get when I click the VD button.
Please help this newbie take over the world
Please login or register to see this attachment.
Please login or register to see this attachment.
Edited by SmarterelecLink to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.