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

HC3 Reference list / inventory list


Question

Posted

Hello

I'm looking for a way to create a reference list and / or inventory list!

I want to edit this later in Excel.

I read a lot but found nothing with which to create or create something like this.

Commands for file processing on an FTP / server / computer seem to be missing ?!

Did I not read it correctly again or is there no possibility?

Greetings Frank

 

Recommended Posts

  • 0
Posted
1 hour ago, FBerges said:

create a reference list and / or inventory list


what kind if list are you thinking of ?

  • 0
  • Inquirer
  • Posted (edited)

    A list that I can read in and edit in Excel.

     

    e.g.
    Log on to the FTP / server / research
    Generate a file e.g. xxxx.txt if not already available
    Open the file
    Append line (ID, name, room, content)
    Close the file

    Edited by FBerges
    • 0
    Guest kallecux
    Posted

    Hi @FBerges,

    i use this scene to create a hometable - maybe it can help you:

    Please login or register to see this code.

    Greetings

    Karl Heinz 

    • 0
  • Inquirer
  • Posted

    Ah that's great, I don't need to create it anymore.
    Unfortunately that's only 50% of my problem, I could have managed that too, but the matter with the file is still open.
    But thanks again for this part that saves me work!

     

    Grüße in den Norden der Republik

    Frank

    • 0
    Posted

    @FBerges Hi,

     

    In what Kallecux wrote is a function that prints this table parsed and separated for you;

    print ("_DATE; _RAUM; _GERAET; _ID; TYPE")

    Then do CTRL + C and paste it into file.csv
    Then just open it in Excel.

     

    OFFTopic?..:

    So far this option is not.
    I have an idea.
    For a list of references, this is a very big solution. It's more about logging data when a person wants to do it locally without some MQTT brokers and the like.

    If I wanted to solve it, I would do it like this:
    Running NAS with PHP.
    (RPi with PHP is also needed).
    When MySQL is there, it will be a form of database. It can also be managed via the web interface.
    A script has been created on it, which will fill the table according to the information sent by the POST method.
    The required information will then be sold to HC3 in the form of an http string.

    It is not possible to use a simple solution in JavaScript, because these are done on the client side (and HC3 will not be able to).

     

    eM.

     

    • 0
  • Inquirer
  • Posted

    Hello

    Yes, the drag and drop is already clear.
    Would also be enough for logging from time to time.
    But you've seen through me, I'm also thinking of other forms of application such as continuous logging of functions, measured values and other things.
    I also thought about the database, RPi, PHP, etc., but it is too time-consuming and too complicated for me.
    I would have to familiarize myself with too many systems and is the result worth the effort?
    Well then I hope that something comes from Fibaro so that something can be recorded.
    But I think they have different problems and priorities than something like that.
    Greetings from Germany / Sauerland
    Frank

    • 0
    Posted

    Mmmmmm.... No *file* access to any kind of HomeCenter but they do have an API which is arguably more stable than file access (but it is not really 100% stable though largely compatible over longer periods :D)

     

    If you own a HC2 try the excellent toolkit written by long time member @Krikroff

     

     

    If you own a HC3 try the BUI: go to "Settings" (cog wheel) then "6 general" and you'll find a button next to "Generate system report" and also "Export temperature and energy data to .csv file"

     

    If you want to access the raw data yourself I would recommend the "/interface/data" api so got to http://your_ip/interface/data - you will get a big JSON structure containing devices, rooms, and more.

     

    In this script you will find one way to use that API:

     

    Please login or register to see this attachment.

     

    I wrote that script to diagnose timing issues, what it does is "dump" all events that happen on your HCx to standard output. It uses the /interface/data api to return names of devices. See comments at the start of the script on how to use it.

     

     

    /interface/data

    • 0
  • Inquirer
  • Posted

    Hello @petergebruers

    I hadn't tried the "Generate system report" yet.
    That's even better than Karl Heinz's.
    That's exactly what I wanted.
    Now and then you have tomatoes on your eyes.
    But that with file handling has not yet been resolved.
    I don't think we will find a solution that is not yet integrated into LUA.
    Fibaro will certainly have different priorities than file handling with the HC3.
    A Samba interface would have to be integrated and that is certainly not that easy.
    Greetings from the neighboring country to Belgium
    Frank

    • 0
    Posted

    OMG 

    files, samba etc 

    For what purposes you need file accessing here?!
    why you can’t store “file” in globals?
    why you can’t story from HC2 to file via external www server?!
    you are talking as I can undersides about NAS, I can guess what NAS provide www natively 

    so just building something on HC side via LUA you can POST vi http to NAS and story it in file, SQLite MySQL or azure or AWS


    some music by your subject ;) 

     

    • 0
  • Inquirer
  • Posted

    Hello @10der

     

    The music is great! ?

     

    I would like to do this without a subsystem and without long training in e.g. SQL etc.
    It may all work the way you wrote, but I don't want to doubt it, but it seems very complicated to me.


    What I mean by Samba I think you understand.

     

    With this I could register as a user on a NAS or PC, create and open files and write or add a text to the file.
    Then close the file and the pear is peeled!

     

    You can use it to write a lock file without long back and forth.
    That would be easy for others to understand and done quickly.
    But for that the music (Samba) has to be in the HC3 :-)

     

    Or am I on the wrong track? ?

     

    Greetings to Ukraine
    Frank

     

    • 0
    Posted

    @FBerges Frank, I can really understand you. Files on pc, 8 bit games  Green monitors. 
    while all ppl sleeping here - more than I can develop on COBOL ;) 

    Frank, yes I am old man ;) ha ha 

    but you should forgot for files on network forgot about samba ( tbh interesting why you not asking about supporting NFS) 

    Frank, you are on wrong way here, IMHO, sure 

    HC3 now can upload all information to many targets, InfluxDb, clouds dB, etc etc so on so on

    Samba as for me is overhead here. Trust me as old developer...

    Have a nice day (I hope you are reading here at the morning) 

    • 0
  • Inquirer
  • Posted

    Good Moirgen
    Yeah yeah make fun of my way of thinking!?
    That is not too bad, it was all a long time ago and I have forgotten a lot.?
    The old stuff is no longer valid today and is needed.
    What you write is definitely right from the point of view of an accomplished programmer, I certainly do not deal with that.
    But what's wrong with simply wanting something and not always the all-round solution.
    Many users of the HC3 are occasional programmers and or beginners.
    They need simple solutions that work without long deliberation.
    Working with a database is "higher" programming and modern, but also more complex and difficult to understand.
    Many say there is still a system that I have to deal with.
    The goal for a programmer should be to keep the things he does understandable for others and to take the user with him and show them easy ways.
    If Samba is not the right way to go, why do a database when a simple make, open, append, write, close at file level do it too?
    You can explain this to more people than to use an SQL Base.
    If you have a txt file with ";" you can make anything out of it separately.
    Most of them can work with Excel and that can easily be read into Excel.
    SQL also has no problem with this.
    I wish you a nice day!?

    Greetings to Ukraine
    Frank

    • 0
    Posted

    Frank, morning 

    (no offense)

    For noobs HC3 UI has button for exporting data to the file 

    this button IMHO for you.

    you can automatically export this file via curl or wget 

    if you learning what is it  

    • 0
  • Inquirer
  • Posted

    No, I didn't feel offended!
    This is a problem with Google translation because my English is not that good.
    The function would then have to be selected.
    I am happy to learn something!
    The translation is to blame if it comes across as strange.
    I meant something else !
    I want to document something in a file!
    If, for example, a sensor is triggered or a measured value has exceeded a limit, I would like to write it to a file including time and date in order to evaluate it later.
    That should be as simple as possible and be readable for everyone quickly and without much tinkering.
    The use cases are diverse and many could certainly use something like this.
    The motto is simple!
    I could live with an SQL, could run a Raspi (3 of them are running here)!
    I get by with what I have and program what I need myself!
    But why make it complicated and difficult for the beginner when it can be easy?

    Greetings Frank

    ?

    • 0
    Posted
    3 hours ago, FBerges said:

    I want to document something in a file!

    Understood. I posted a script to do that but you may have missed the point of that script or I did not explain properly.

     

    3 hours ago, FBerges said:

    could run a Raspi (3 of them are running here)!

    Good. I run that script on a Raspberry Pi.

     

    3 hours ago, FBerges said:

    But why make it complicated and difficult for the beginner when it can be easy?

     

    I think it would be useful to have an "export" button on the "History" panel (event log of HC3).

     

    I let you be the judge of what is "difficult".

     

    To see all events, write them to a file...

     

    1) Install Lua on your pi (or windows PC or Mac)

    2) run this script on your pi 

    Please login or register to see this attachment.

    • Thanks 1
    • 0
  • Inquirer
  • Posted

    Yes that's all great and thank you to you!
    I guess I'm not explaining right what I want.
    I tried to explain that I neither want a Raspi nor any other system as a subsystem.
    Entering data on an SQL is known to me.
    I know about the export via the menu in the HC3.
    The program on a PC, MAC or Raspi is also a great thing
    I'll try that but it's not what I want.

    Yes, I am a stubborn head!

    I would like to log on to the FTP, file server or PC on the HC3 via LUA and write something in a text file.
    This should happen automatically without a button or user intervention on the HC3.
    e.g.
    When the door is opened write the date, time and sensor ID in the text file
    That is "actually" just the commands in LUA on the HC3 would have to be there.

    But since you have thankfully suggested other solutions to me, I think that it will stick with my wishes and there is no easy solution.

    Thanks again for your effort!
    Frank

    • 0
    Posted
    2 minutes ago, FBerges said:

    I'll try that but it's not what I want.

    No, I understand that. I wanted to share it anyway because a few things in that script are "undocumented" but one day you might like it to do some sort of diagnosis.

     

    2 minutes ago, FBerges said:

    When the door is opened write the date, time and sensor ID in the text file
    That is "actually" just the commands in LUA on the HC3 would have to be there.

    Indeed, plus add a "file access protocol", yes that is what you said to begin with and that is why you mentioned SAMBA but there are plenty of alternative protocols (sftp, why not nfs like @10der  suggested ;))

     

    I like the idea, but I think it is not going to happen because Fibaro tries to make this box "secured" and adding another protocol increases the chances of attack(s).

     

    Never say never though ... and you may be sure the responsible person for the HC3 development will have read your request!

    • Thanks 1
    • 0
  • Inquirer
  • Posted

    OK now I guess it came over.

    Yes, the "refreshStates_3.lua" is a great thing and I just looked at it. It is very interesting to spot some errors and amnn has another debugging option.
    I have no idea about the other protocols sftp or nfs and have to deal with them first.
    So first of all new territory!
    With my inquiry, I first wanted to find out whether someone has already built something and whether there are solutions.
    You old hands have a huge head start that I cannot and do not want to catch up.
    I always strive for a simple solution because if something should happen, who keeps the system running.
    Many people get simple systems up and running, but when things get tough that's a different matter.
    So I always try to take the easy way.
    That with the Samba protocol and the secure system HC3 is a good argument I hadn't thought about it yet!?
    Let's see if there is still something coming from Fibaro (Hello fellow readers! ?).
    Keep the system as safe as possible!?
    Greetings Frank

     

    • 0
    Posted

    @FBerges

    Hi gentlemen ... evening :)
    I once published an opinion here, the possibilities of using the SYSLOG logging system.
    It has its structure, priorities, etc. Basically, only the support of UDP was expected.
    The safety of HC3 should not be compromised, it is a one-way data transfer.
    If Fibaro implemented it, a bunch of things could be logged to the external system.
    I'll think about whether to start creating a QA Syslog will be the right choice, or reach for an SQL solution.
    Samba is as hard as a colander and especially has problematic stability.

    @petergebruers @10der

    What do you think about it?

     

    eM.

    • 0
    Posted

    512/UDP port closed on Hc3

    more than 

    to HC3 syslog as I can know has a specific information not useful for as

    my IMHO right way write all event from zwave and ZigBee in MQTT server 
    but my IMHO it’s my IMHO @A.Sochaand Co thinking something differently 

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