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

**WARNING** - Internet offline !!


AutoFrank

Question

Morning...

I thought I'd try a catchy title to grab peoples attention :-) 

 

My internet dropped out during the night and as a result my alarm clock (HC2 + sonos-api + pushover+weather) didn't go off this morning because of a corner case in my code relating to 'no internet being available'

It was one of the first things I wrote about 2 years ago and is a reasonable easy fix

 

.....but it prompted me to drop a post here.

 

Many of our systems now use a lot of cloud or internet based elements (alexa, tune-in radio, weather, messages, etc)  and it needs to be able to function, at least in part without crashing, when the internet and all associated services are unavailable.

It may be worth checking your code to see that it is resilient and functional when internet services are not available

 

That's all for now 

 

Edited by AutoFrank
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Recommended Posts

  • 0

I agree. Internet is becoming critical for certain things. I had the same problem when I was

on holiday during the winter. My Nest thermostat wasn’t accessible because the Internet was broken at home. Luckly the internet restored. Meanwhile I have a backup solution with a 4G stick. Next issue to resolve is ... what if my router is broken while away? 

Link to comment
Share on other sites

  • 0

@AutoFrank I think it is brave of you to admit such errors exists in your scripts. It makes you a responsible person. By telling this, you warn users and help them write better code.

 

Something that is related to this... If you write code to catch such a problem, and you do not test it thoroughly, your exception handling could make things worse.

 

For instance, your code might run a tight loop, trying to fix the problem, write to the log files, whatever... Causing high CPU load, resource problems and generally make things worse. I think I give good general advice when I say: "always include a LOT of sleep() in your error handler and think twice not to spam users with thousands of error messages per hour".

Link to comment
Share on other sites

  • 0
  • Inquirer
  •  

    32 minutes ago, petergebruers said:

    I think I give good general advice when I say: "always include a LOT of sleep() in your error handler and think twice not to spam users with thousands of error messages per hour".

     

    I think this is the best piece of advice given in a long time :-)

     

    32 minutes ago, petergebruers said:

    I think it is brave of you to admit such errors exists in your scripts. It makes you a responsible person. By telling this, you warn users and help them write better code.

     

    Thanks @petergebruers

    Edited by AutoFrank
    Link to comment
    Share on other sites

    • 0

    @AutoFrank, @petergebruers,

     

    Thank you both for coming forward with this problem. I know that I have several solutions that depend on internet connection like Weather State and Forecast, Alarm Clock and some others. There is still much work to do to make this internet down proof.

    Link to comment
    Share on other sites

    • 0

    As Internet indeed becomes more and more important, it's likely more people would consider a second internet connection.

    Although this is not directly related to Fibaro, I'd be happy to write a short tutorial on how to relatively easily setup a router for home usage with (existing) x86/amd64 hardware using freeware software solutions (pfsense for instance), with active failover mechanisms in place.. If anyone would appreciate, just let me know!

    • Like 1
    Link to comment
    Share on other sites

    • 0
    31 minutes ago, MaTi said:

    As Internet indeed becomes more and more important, it's likely more people would consider a second internet connection.

    Although this is not directly related to Fibaro, I'd be happy to write a short tutorial on how to relatively easily setup a router for home usage with (existing) x86/amd64 hardware using freeware software solutions (pfsense for instance), with active failover mechanisms in place.. If anyone would appreciate, just let me know!

     

    Hi @MaTi,

     

    I'm always interested in various solutions. At the moment I have one land line with VDSL 30/5 connection, but I'm thinking to get one over the GSM network that is even faster where I leave. Having this two available I like to know if I can used them in parallel and to have this fail over system in place.

     

    So, I will appreciate your effort! Thank you!

    Link to comment
    Share on other sites

    • 0
    Guest spazpeker
    3 hours ago, Sankotronic said:

     

    Hi @MaTi,

     

    I'm always interested in various solutions. At the moment I have one land line with VDSL 30/5 connection, but I'm thinking to get one over the GSM network that is even faster where I leave. Having this two available I like to know if I can used them in parallel and to have this fail over system in place.

     

    So, I will appreciate your effort! Thank you!

    Most 4g routers let you select DSL falling back to GSM 4g / 3g

    Link to comment
    Share on other sites

    • 0
    3 minutes ago, spazpeker said:

    Most 4g routers let you select DSL falling back to GSM 4g / 3g

     

    Hi @spazpeker,

     

    My ISP router does not support GSM SIM card and I plan to get GSM internet from another provider which has better offer so I will have two separated routers. GSM router from another provider can't be used for land line because my ISP force me to use their equipment.

    Link to comment
    Share on other sites

    • 0

    so, buy another router that supports a gsm sim or stick, plenty to choose from.

    for almost every provider you can exchange the modem (modem or router are differant things.

     

    28 minutes ago, Sankotronic said:

     

    Hi @spazpeker,

     

    My ISP router does not support GSM SIM card and I plan to get GSM internet from another provider which has better offer so I will have two separated routers. GSM router from another provider can't be used for land line because my ISP force me to use their equipment.

    what is youre modem brand?

    Edited by akatar
    Link to comment
    Share on other sites

    • 0
    8 minutes ago, akatar said:

    so, buy another router that supports a gsm sim or stick, plenty to choose from.

    for almost every provider you can exchange the modem (modem or router are differant things.

     

    what is youre modem brand?

     

    Hi @akatar,

     

    Thanks for asking. I have Speedport W724V that does support GSM dongle but I can't use it since my ISP disabled that option. Anyway it is more crippled than the one Deutsche Telekom is providing to their users.

    Link to comment
    Share on other sites

    • 0

    the problem is, with two seperate inernetgateway's, you have 2 seperate networks.

    or you will have to use another ips modem of you have to bridge it to another router, does it have a bridge function?

    41 minutes ago, Sankotronic said:

     

    Hi @akatar,

     

    Thanks for asking. I have Speedport W724V that does support GSM dongle but I can't use it since my ISP disabled that option. Anyway it is more crippled than the one Deutsche Telekom is providing to their users.

    what is the name of youre provider?

    Link to comment
    Share on other sites

    • 0
    16 minutes ago, akatar said:

    the problem is, with two seperate inernetgateway's, you have 2 seperate networks.

    or you will have to use another ips modem of you have to bridge it to another router, does it have a bridge function?

    what is the name of youre provider?

     

    Hrvatski Telekom d.d. and it is under majority ownership of Deutsche Telekom. Why?

    Link to comment
    Share on other sites

    • 0

    try to find the setup, so you can use youre own modem

    Please login or register to see this link.

    i cant read this

    Link to comment
    Share on other sites

    • 0
    24 minutes ago, akatar said:

    try to find the setup, so you can use youre own modem

    Please login or register to see this link.

    i cant read this

     

    It is not that model. They don't have any Q&A for model I have. It is this one:

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

     

    Of course above pictures are from internet :-) 

    Link to comment
    Share on other sites

    • 0
    2 hours ago, Sankotronic said:

     

    Hi @spazpeker,

     

    My ISP router does not support GSM SIM card and I plan to get GSM internet from another provider which has better offer so I will have two separated routers. GSM router from another provider can't be used for land line because my ISP force me to use their equipment.

     

    Hi @Sankotronic

    Can't you install your own router?

     

    My setup:

     

    Asus RT-AC88U with DUAL-WAN fail-over enabled with Merlin Firmware

    Primary connection = Cable 240Mb/30Mb (Belgian Cable Provider)

    Secondary connection = USB Data Dongle (Belgian GSM Provider)

     

    More info can be found here

    Please login or register to see this link.

     

     

     

    57 minutes ago, akatar said:

    the problem is, with two seperate inernetgateway's, you have 2 seperate networks.

    or you will have to use another ips modem of you have to bridge it to another router, does it have a bridge function?

    what is the name of youre provider?

     

    Hi @akatar

    You use only the primary gateway, the second will become active if the first fails. The router does this automatically

     

    Edited by Sjekke
    Link to comment
    Share on other sites

    • 0

    it's not about the model,

    it's about vlans and paswords

    Just now, Sjekke said:

     

    Hi @Sankotronic

    Can't you install your own router?

     

    My setup:

     

    Asus RT-AC88U with DUAL-WAN fail-over enabled

    Primary connection = Cable 240Mb/30Mb (Belgian Cable Provider)

    Secondary connection = USB Data Dongle (Belgian GSM Provider)

     

    More info can be found here

    Please login or register to see this link.

     

     

     

     

    Hi @akatar

    You use only the primary gateway, the second will become active if the first fails. The router does this automatically

     

    not with two seperate routers

    Link to comment
    Share on other sites

    • 0
    2 minutes ago, akatar said:

    it's not about the model,

    it's about vlans and paswords

    not with two seperate routers

     

    When you use 2 routers, you really go for full redundancy ... nice BUT ...

    • Your switch can die, so needs to be redundant ... but HC2 only has 1 Ethernet
    • Your HC2 can die, so needs to be redundant ...

    It's a personal choice how far you want to make your system redundant but it will have a cost. I only wanted to help @Sankotronic and @AutoFrank by giving my current setup.

     

    I think most of us are happy with a second (cheaper) internet connection to be always online. So @AutoFrank was awake on time this morning ;)

     

     

     

     

     

    Link to comment
    Share on other sites

    • 0
    34 minutes ago, Sjekke said:

    Hi @Sankotronic

    Can't you install your own router?

     

     

    Hi @Sjekke,

     

    Unfortunately I can't. My ISP provider checks MAC address of the router connected so it can't be replaced with another better one. Once I try to ask them to replace it, but they refused to do that so I'm stuck with theirs. Same is with all our ISP's. Some routers MAC address can be changed but then if they find out that I use router not apporved by them I could have more trouble so it is not worth it.

     

     

     

    Link to comment
    Share on other sites

    • 0
    26 minutes ago, Sjekke said:

     

    When you use 2 routers, you really go for full redundancy ... nice BUT ...

    • Your switch can die, so needs to be redundant ... but HC2 only has 1 Ethernet
    • Your HC2 can die, so needs to be redundant ...

    It's a personal choice how far you want to make your system redundant but it will have a cost. I only wanted to help @Sankotronic and @AutoFrank by giving my current setup.

     

    I think most of us are happy with a second (cheaper) internet connection to be always online. So @AutoFrank was awake on time this morning ;)

     

     

     

     

     

    youre current setup has 1 router,

     

    please enlighting me how to use 2 routers.

     

    2 routers meens 2 different gateway ip's on the same network, you can only put 1 gateway adres in the hc2

    you can not use the dhcp server on both routers, there can be only one dhcp server on 1 network.

     

    note: modem and routers are two different things

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 12 hours ago, Sjekke said:

    So @AutoFrank was awake on time this morning

     

    @Sjekke, @Sankotronic, @petergebruers

     

    I always try and simplify things or keep things simple and as such for me the solution will be along the the following.

     

    Normal Operation

    VD alarm clock sets time and morning scene wakes us up by morning greeting consisting of weather and then radio station from sonos,

    I already have a check to see if the station we select is not available, it switches to another.but internet offline means no weather and no tuneIn for internet radio

     

    Solution / Fix

    I will place a MP3 in the clip folder (for the sonos-http-api) and if no internet is detected then it will play the MP3 file instead of the greeting and radio from tuneIn

    If the sonos-http-api is not available then I'll raise the light level in our room gradually and this will wake us up.

     

    Adding extra resilience ...

    I have found that sometime my router needs to reboot once the internet service is restored by the provider.. I'll also be adding an aeotec wall plug to my router and if the internet is offline I'll reboot every 30 minutes and check connection until it's back available.

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