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
Corceiro 3
I'm trying to learn and do more complex stuff but I've having issues with the correct syntax from Swagger to LUA Scenes.
I'm trying to change the Energy Consumption and Production Meters on the Energy Panel through a scene.
I'm trying something like:
api.put("/energy/settings",{"energyConsumptionMeters": [649] })
to make my energy meter device n. 649 a energy consumption meter on the Energy Panel, but I get the error [ERROR] [SCENE220]: (load):1: '}' expected near ':'
I tried different syntax and searched a lot on Google, but I'm not familiar with LUA code and can't quite get, yet, how to use the API.
Why doesn't it work like the syntax I use to enable and disable some devices on LUA Scene:
api.put("/devices/"..653,{enabled=true})
api.put("/devices/"..654,{enabled=false})
Shouldn' t it be the same?
I was also trying something like
api.put("/devices/"..653,{saveToEnergyPanel=true})
But it doen't work either...
Can someone give me a brief explanation of what I'm doing wrong (or some link or papers were I can learn how to do it)?
Thank you very much for your time.
Edited by Corceiro7 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.