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
Dino 0
I'm a beginner in Lua code and was trying to get data form another system. It is working but with two types it isn't working.
Output from the homewizard system (Solar measurement) is:
"s1":{"po":476,"dayTotal":5.56,"po+":3290,"po+t":"13:07","po-":0,"po-t":"00:01"},
Lua code I have used:
-- assign Homewizard data to Labels 1,2, 3, 4 of virtual device
fibaro:call(163,"setProperty","ui.Label1.value",result.response.energylinks[1].s1.po)
fibaro:call(163,"setProperty","ui.Label2.value",result.response.energylinks[1].s1.dayTotal)
fibaro:call(163,"setProperty","ui.Label3.value",result.response.energylinks[1].s1.po-)
fibaro:call(163,"setProperty","ui.Label4.value",result.response.energylinks[1].s1.po+)
The po and dayTotal are working fine but the po- and the po+ are giving this error:
[ERROR] 22:18:15: line 39: unexpected symbol near ')'
Any suggestions......many thanks
9 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.