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

String Formatting <pre>


Question

Posted

Hello,

with LUA i know \n newline;  \f formfeed; but in "Fibaro-VD" I sometimes found <pre> and </pre> obviously to separate  an format stings. 

What is the exact meaning or difference to cr+lf \r\n.

 

Want to get a chr$(10)+chr$(13)at the end of a line and keep formatting for an outputstring.

Thanks

Gerhard

6 answers to this question

Recommended Posts

  • 0
Posted

Please login or register to see this link.

  • 0
  • Inquirer
  • Posted

    Yeah a <html >Tag ! Thanks Peter

    so the format depends on your Browser environment  If you walk in the wrong direction it could be a long way.

    • 0
    Posted

    @ggoetz56

    If you're using HTML then the format is not depended on Browser environment.

    In any case to format string at VD is not an easy task and please be aware that the formats are not supported by fibaro mobile application (Android nor iOS)

    Please see:

     

     

    • 0
  • Inquirer
  • Posted

    Thanks for information,

    i need to export data (api/devices/ filter) to external system with delimiter ( Field sperarator)and  cr+lf (end of line). Got that Lua script for doing that. Used copy and past to bring data from the debug window to my disk. So i wondered about the different results on different machines. As <pre> means nothing to me, as many of the fibaro class statements, I searched in lua-doc about that , which was the wrong direction.

     

    Now i use my own script with /n/l that works, even the result is not appreciated :-D

    • 0
    Posted

    I understand. Sometimes all you need is a pointer. If you want data analysis on your pc... On this forum you'll find a way to run lua on your pc. You could transfer data with "curl". For graphs, search "grafana" and "influxdb". If you want to do graphing and number crunching, send me a PM if you want to get started with with "R-Project" (steep learnig curve but aka "command line excel on steroids").

    • 0
    Posted
    On 8/19/2018 at 12:20 AM, ggoetz56 said:

    Thanks for information,

    i need to export data (api/devices/ filter) to external system with delimiter ( Field sperarator)and  cr+lf (end of line). Got that Lua script for doing that.

    Just a thought... could you execute the api command on this external system?

    In this case the system could have the data directly from HC2..

    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...