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
Mr Jack 10
Just started with the HC2 and for sure completly new to LUA.
I already had an Iungo Energy manager to get the usage on electricity and gas from the smart meter, and also the water usage.
At this stage I managed to get a reponse from the energy manager, but didn't succeed to get the values for use in a virtual device.
I hope someone can give me a suggestion to put me in the right direction on how to get the values from the response.
Please login or register to see this code.
Response received is:
[DEBUG] 15:07:30: 200
[DEBUG] 15:07:30: 0
[DEBUG] 15:07:30: ENCODE RESULT :"{\"ok\":true,\"type\":\"response\",\"time\":0.001937499968335,\"rv\":{\"propsval\":[{\"id\":\"name\",\"value\":\"Smart meter\"},{\"id\":\"usage\",\"value\":362},{\"id\":\"T1\",\"value\":4113.167},{\"id\":\"T2\",\"value\":2884.556},{\"id\":\"-T1\",\"value\":0},{\"id\":\"-T2\",\"value\":0},{\"id\":\"L1I\",\"value\":1},{\"id\":\"L1Pimp\",\"value\":0.362},{\"id\":\"L1Pexp\",\"value\":0},{\"id\":\"c_tariff\",\"value\":2},{\"id\":\"gas_usage\",\"value\":0},{\"id\":\"gas\",\"value\":1681.49},{\"id\":\"Cost-T1\",\"value\":0.2166},{\"id\":\"Cost-T2\",\"value\":0.2166},{\"id\":\"Cost-nT1\",\"value\":0},{\"id\":\"Cost-nT2\",\"value\":0},{\"id\":\"Cost-gas\",\"value\":0.597},{\"id\":\"Client-blob\",\"value\":\"\"},{\"id\":\"available\",\"value\":true}]},\"systime\":1456149950,\"seq\":1,\"error\":false}"
Link to comment
Share on other sites
Top Posters For This Question
35
13
7
5
Popular Days
Apr 28
7
Mar 2
7
Dec 29
7
Mar 1
6
Top Posters For This Question
Mr Jack 35 posts
twanve 13 posts
cag014 7 posts
John9439 5 posts
Popular Days
Apr 28 2016
7 posts
Mar 2 2016
7 posts
Dec 29 2016
7 posts
Mar 1 2016
6 posts
Popular Posts
Mr Jack
Actual status of the VD Please login or register to see this code. Please login or register to see this attachment. Please login or register to see this attachment.
onesim
when i built my own virtual device for energy reading, i remember it stopped after few minutes... sadly, i don't remember what i did to correct it looking at my code and comparing it to yours, i
Mr Jack
Version 1.3. Added: Total energy usages from the Smart Meter, minus the energy values from all z-wave devices with power metering, to get the total of the remaining non measured power consumption
Posted Images
75 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.