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
MartW 1
Has anyone tried using Chat GPT to write the Lua code?
Edited by MartWI know very little coding, just started learning. Out of curiosity I've tried asking ChatGPT4 to write lua code for Fibaro to, for example, turn on a light if a pir sensor has breached and turn it off again if the sensor hasn't been breached for 10 mins.
It does write some code and includes comments in the code for where you need to add specific vales (Node ID's etc) but I've not had success with this slightly complicated task with the code it has made yet, but I'm still trying. You do need to understand what your system and hardware is doing, for instance, my pir sensor when tripped puts out a value of 1 and stays at 1 until 5 seconds after it stops sensing motion, then resets to 0 and so you might need to tell it to take that into account.
I did get my brother to come over and write some code, he writes computer games, but in C++ and isn't familiar with either Lua or Fibaro. It did take us about 6 hours to get a bit of code to switch on a light if the pir was breached and only turn it off if it hadn't been breached for X amount of time and without throwing up the too many instances error. He will be much quicker when I next get him over to write something - if I haven't learnt how to do it myself inbeween.
Still, anybody tried ChatGPT? I was surprised it knew about Fibaro to be honest, but it did.
spelling/grammer errors
12 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.