Jump to content

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


  • 0

mail notification in lua scene


michelds

Question

Hello,

As a beginner I'm trying to understand lua a bit.
I have a small lua code that gives the temperature of the room thermostat.
Lines 10 and 20 work perfectly, (the mail is sent), but lines 30 and 40 don't work.

 

 (load):4: attempt to concatenate a nil value (local 'heatingThermostatSetpoint')


The "heatingThermostatSetpoint" is a virtual thermostat, linked to the room thermostat.
Does anyone know what to do.
Can someone also tell me how I can get different results in 1 email.

 

Thanks.

 

Please login or register to see this attachment.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi,

 

I'm a LUA-Beginner by myself but I think I have found the Problem.

 

A virtual Thermostat didn't have the property "Value". You can only use thermostatMode or HeatingThermostatSetpoint.

 

Try   hub.getValue(170"heatingThermostatSetpoint") in line 3.

 

You can find the propertys of your devices on the left side when you are working on a Quick App. 

 

Regards

Marcel

 

 

Please login or register to see this attachment.

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Thanks Marcel, it works.
    I also put the "hub.getvalue" in the "hub.alert".
    Maybe my syntax is too complicated, but it works.

    Now like to receive everything in one e-mail?

    I also installed the quick app "Thermostat - & Heating Zone", but I don't know how to configure it.

     

    ?

    Michel

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • After some searching I managed to get different values in 1 notification mail and to simplify the syntax:

     

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...