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

update Module configuration trough internet


Question

Posted

Hello,

I am intrigued by the prospect of remotely updating the configuration of a keypad module through a specific TCP/IP packet sent to my HC3 (Home Center 3), accessible from anywhere in the world. To realize this, I understand the importance of having a fixed IP address or utilizing a DDNS (Dynamic Domain Name System) service.
 

To illustrate further, consider a scenario where the following information is stored within HC3: Code:
12345, Start: 25/06/23 10:00, Stop: 27/06/23 10:00, Switch Module: 23.
In this case, if the code 12345 is entered between 25/06/23 10:00 and 27/06/23 10:00, switch module 23 should activate for a duration of 10 seconds.

 

Here, I propose two approaches:

 

**Approach 1:**
Add multiple 4 to 10-digit numbers along with start and stop date/time, as well as a switch module ID, to a configuration file named "config."

A scheduled task (Cron), executed hourly, will read the start/stop dates from the "config" file. When the current date/time aligns with this range, the keypad will be updated with the respective code, enabling it to accept that code from that point onward. Once the HC3 receives a "code ok" message from the keypad, it will cross-reference the associated switch module from the "config" and trigger it to activate for 10 seconds.

 

**Approach 2:**
Similarly, incorporate multiple 4 to 10-digit codes, start/stop date/time, and switch module IDs into the "config" file.

Update the keypad to accept all codes from the "config." Upon receiving a "code ok" signal from the keypad, the HC3 will verify whether the current date/time falls within the specified range in the "config." If this condition holds true, the HC3 will identify the associated switch module and activate it for 10 seconds.

 

Now, addressing my inquiries:

a) Is it feasible to convey these settings to the HC3 using a JSON package over the internet? Other suggestions?
b) How and where would this information be stored within the HC3?
c) Are there any available sample scripts showcasing this functionality?

 

I am a seasoned C++ software engineer, though I admit I lack familiarity with HC3 and its capabilities. Should a comprehensive explanation necessitate more than a few sentences or examples, I am prepared to compensate you for your valuable time.

 

 

Kind regards,
Steve

 

2 answers to this question

Recommended Posts

  • 0
Posted

@Picmaster

Hello.
According to the question, I understood that you are trying to provide a configurable access system with the help of a keyboard and HC3 + switching element to control the lock, which will be in a secure area.
1) if you are dealing with object security, definitely do not use a public IP with open ports. Use a VPN if possible.

2) I don't know if you want a complete solution without your work...and you intend to pay for it, or if you just want to point in the right direction and you can have fun with it yourself.

3) if you know how to program at least C++ as you write, LUA will be a piece of cake for you. There is a strong community here and very capable colleagues will help you.
You will need to create a QuickApp.
You can get the basics from the manual

Please login or register to see this link.


Please login or register to see this link.


Maybe a solution, how I would give it to a single soul.
To connect to HC3, use the Fibaro cloud and connect to it using respect.
You can have variables that you fill with specific times for specific devices. Or, create a variable that you will fill with a JSON string according to the required timestamps and device. QA decodes this variable and stores it in internal variables. However, this assumes an authorized administrator.


Another option is to use an external device (server) that you fill with data and QA will download this data using JSON tables itself. So you won't have to deal with access to a remote location, but HC3 QA will pull the data itself. The only question is where to place this server (in the locality/on the Internet) and how to secure the transmission (authentication+authorization, https,...)
This is how I transfer some data from the local ESP32, electricity meter consumption, download the weather forecast from the Internet, develop stock market shares, into the HC3.

 

Another way is to use some ready-made solutions, such as EventRunner, etc., which allow you to create timers. Search the forum here.

  • 0
  • Inquirer
  • Posted

    Thank you! I will review the information you've provided to get started.

    To address your questions:

    Yes, I understand that security will be a concern. Initially, I plan to test the setup without implementing security measures. Once everything is functioning properly, I'll then incorporate a security layer.

    Additionally, I enjoy being hands-on and handling tasks myself. While some portions can be written independently, collaborating on coding with someone else can also be an awesome experience.

    Best regards,
    Steve

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