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
gestel73 0
i'm trying to get some values from my smart meter via json. i need the data value
the lua code i'm using:
Please login or register to see this code.
the debug output:
[DEBUG] 21:21:25: { "ActTime" : 1454012495, "ServerTime" : "2016-01-28 21:21:35", "Sunrise" : "08:25", "Sunset" : "17:19", "result" : [ { "AddjMulti" : 1.0, "AddjMulti2" : 1.0, "AddjValue" : 0.0, "AddjValue2" : 0.0, "BatteryLevel" : 255, "Counter" : "3141.216", "CounterToday" : "2.501 m3", "CustomImage" : 0, "Data" : "3141.216", "Description" : "", "Favorite" : 1, "HardwareID" : 2, "HardwareName" : "Slimmemeter", "HardwareType" : "P1 Smart Meter USB", "HardwareTypeVal" : 4, "HaveTimeout" : false, "ID" : "1", "LastUpdate" : "2016-01-28 21:20:04", "Name" : "Gasmeter", "Notifications" : "false", "PlanID" : "0", "PlanIDs" : [ 0 ], "Protected" : false, "ShowNotifications" : true, "SignalLevel" : "-", "SubType" : "Gas", "SwitchTypeVal" : 1, "Timers" : "false", "Type" : "P1 Smart Meter", "TypeImg" : "counter", "Unit" : 2, "Used" : 1, "XOffset" : "0", "YOffset" : "0", "idx" : "8" } ], "status" : "OK", "title" : "Devices" }
[DEBUG] 21:21:25: OK
[ERROR] 21:21:25: line :debug (arg 2), expected 'string const &' got 'nil'
what am i doing wrong? can anyone help?
the json output when i type the adres in my browser.
Please login or register to see this code.
6 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.