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
RonS 0
Hello,
I am trying to read my Smile P1 interface to my electricity- and gasmeter. If I call this URL in my browser:
Please login or register to see this link.
I receive a response just in plain text that holds the data I need.
However, if I use this in a VD using the following code I do not see any data in the variable response, in fact the debug output does not even show this line (the one in bold). Despite the html status 200, Fibaro errorcode 0 and when I evaluate the response length it provides a number that could fit the browsers response.
PI1 = Net.FHttp("my_local_ipaddress");
PI1:setBasicAuthentication("smile", "my_smile_id");
local response, status, errorCode;
response, status, errorCode = PI1:GET("/core/domain_objects");
fibaro:debug("Response length: " .. string.len(response));
fibaro:debug("Response: " .. response);
fibaro:debug("Status: " .. status);
fibaro:debug("Errorcode: " .. errorCode);
Here the debug info:
[DEBUG] 13:04:35: Errorcode: 0
[DEBUG] 13:05:08: This device: 95
[DEBUG] 13:05:08: Response length: 23541
[DEBUG] 13:05:08: Status: 200
[DEBUG] 13:05:08: Errorcode: 0
[DEBUG] 13:05:41: This device: 95
[DEBUG] 13:05:41: Response length: 23541
[DEBUG] 13:05:41: Status: 200
[DEBUG] 13:05:41: Errorcode: 0
[DEBUG] 13:06:14: This device: 95
[DEBUG] 13:06:15: Response length: 23541
[DEBUG] 13:06:15: Status: 200
[DEBUG] 13:06:15: Errorcode: 0
I am obviously missing something so help would be much appreciated.
Ron
3 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.