Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Mumris
    M
    • Continue chat with Mumris
    • Start new chat with Mumris
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    Mumris

    @Mumris

    1
    Reputation
    3
    Posts
    968
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Website www.linkedin.com/in/saulius-pakalnis-b59b4782/; mumris.eu Location Lithuania

    Mumris Follow

    Posts made by Mumris

    • Dynamic DNS Update Client based on M5 Stack ATOM Lite

      REF: https://github.com/mumris/Secure-Dynamic-DNS-Update-Client-

      Introduction
      When you sign up with an Internet Service Provider, you will end up either with a static IP address or a dynamic IP address. What is the difference between the two? Dynamic means “constantly changing.” The prefix dyna means power; however, dynamic IP addresses are “not more powerful”, but internet providers can change them without any notice. Static means staying the same. Static. Stand. Stable. Yes, static IP addresses do not change.
      For a home user, there is no difference between the two plans until one do not need access to home devices or home computer from the internet. However, if you have IP camera or other Internet of Things (IoT) device and want to control them from Internet, the situation becomes different.
      For most home internet users a cost of Static IP address is too expensive. You can still use dynamic IP address but then some internal home system must track it changes. Then DDNS is very helpful. For an example: http://www.duckdns.org/. Dynamic domain name service (DDNS) enables you remotely access your computer, control remote IP cameras and other Internet of Things devices on your home or small business broadband connection even when connected to the internet via a dynamic IP address. Some public organizations or companies provide this service free on their web sites.
      Ok, but how the DDNS knows when your dynamic IP address is changed by Internet provider and how it upgrades it from your home? The answer: you need to install IP address update client.
      So what is an DDNS Update Client?
      An update client is a computer application or a feature in your router that keeps your hostname’s IP address up-to-date. The update client periodically checks your network’s IP address and, if it sees that your IP address has changed, it sends (updates) the new IP address to your hostname in your DDNS account.
      I have programmed and installed DDNS Client into cheap and small ESP32 based device. It uses WIFI for internet and USB for +5V power. Ref.: https://shop.m5stack.com/collections/m5-atom/products/atom-lite-esp32-development-kit

      How it works?
      Every 4 hours it obtains your home Public IP address from some Internet server using Get my IP address request. You can program 3 servers, or use default ones. For an example: https://ip.seeip.org/
      Note: The software uses secure “https:” requests (SSL TCP/IP) to obtain Public IP address and send it to DDNS. Public IP address Servers with non-secure “http:” requests are not supported.
      If it detect your home IP address change, it updates your DDNS hostname to resolve to your remote IP address.
      Then the device disconnects from WIFI and sleeps with a very low power consumption for 4 hours. Then it awakes, connects to WIFI, and checks Public IP address, sends it to DDNS if Internet provider in case of changes and goes to sleep again for 4 hours.
      M5 Stack ATOM Lite programming and Installation with Arduino IDE (https://www.arduino.cc/).
      Download and install ESP32 zip package from https://github.com/espressif/arduino-esp32/
      Install ESP32 zip package from: Menu->Sketch->include Library->Add Zip Library

      From Menu->Tools->Manage Libraries -> Download: ESP32 Lite Pack Library, ESP_HTTPS_Server, Adafruit NeoPixel, and others if missing.

      Arduino IDE setup->File->Preferences->Additional Boards Manager URLs:
      https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
      https://dl.espressif.com/dl/package_esp32_index.json

      Arduino IDE setup->Board:"M5Stack-ATOM", Partition scheme “No OTA”

      Compile the sources files with Arduino IDE (https://www.arduino.cc/).

      Setting WIFI name, WIFI password, and other parameters of M5 Stack ATOM Lite device
      Connect “M5Stack ATOM Lite” to computer USB. USB to COM port settings, standard, just select 115200 bits/second. Follow the terminal hints.
      WIFI name, password, DDNS name https command and three public IP addresses can be set or modified through Serial port connection during first run time (30 seconds timeout). They becomes default (saved in Nonvolatile memory). For serial port programming, I recommend free software Termite.exe (https://termite.software.informer.com/3.2/).
      Then you must to set GET request string to DDNS. If you get a token, the request looks like browser command line, as an example:
      “https://www.duckdns.org/update?domains=PUT_YOUR_NAME&token=e2403930-f58a-4237-a162-16f28444d8f7"). You can insert 'MY_PUBLIC_IP_ADDR' substring in https request. Then the substring automatically is replaced with your router real public IP address: xx:xx:xx:xx.
      The request format is universal and lets you to send any https command to any DDNS server.

      Do not forget to set ports forwarding of your home router for IoT controllers or/and cameras which you would like to control over Internet. See my example for M5Stack-Timer-Camera X: https://github.com/mumris/M5Stack-Timer-Camera-X/tree/master/examples/M5 Web_cam_timer X

      posted in Atom
      M
      Mumris
    • RE: Timer Camera X

      https://github.com/mumris/M5Stack-Timer-Camera-X

      New features added M5 Timer Camera X (ESP32, sensor OV3660). Compile the sources files with Arduino IDE (https://www.arduino.cc/). For serial port programming, I recommend free software Termite.exe (https://termite.software.informer.com/3.2/)

      1. WIFI name and password is set or modified through Serial port connection during M5 Timer Camera X first run time (30 seconds timeout). They becomes default (saved in Nonvolatile memory).
      2. Added simple security feature. Web password must be set during first run time (30 seconds timeout). It is saved in Nonvolatile memory. Then on LAN (Ethernet) Timer Camera X page can be accessed http://192.168.x.x:80/password
      3. Added feature for web access through Internet connection. Two ports (80, 81) must be forwarded in setup of local router. For an example, web access default port 80 to 5001, and live video streaming local port 81 to port 5002.
        You can choose any not used port, just live streaming port number must be incremented by 1. From internet it is accessed using http string, as http://x.x.x.x:5000/password, or using free DDNS service (for an example: www.duckdns.org) http://youraccountname.duckdns.org:5000/password,
        Where “password” is your string, which you entered during first run of M5 Timer Camera X.
      4. Added watchdog feature which restarts ESP32 if free RTOS for some reasons halts. For stability reasons. The camera X restarts at every 14 hours if nobody streams live video.
      5. Memory is initiated to Max video frame size at start up. It gives dynamic memory allocation stability.
      6. Face recognition is disabled for smallest frame size, as it “hangs” camera.
      7. On Camera WEB site added favicon, spinning windmill vertical axes rotor Tulip icon (just for a fun), RSSI (WIFI signal strength), frame rate and battery status indicators.
      8. Web HTML page is no more G-zipped as it is automatically modified when Web password is set.
      9. Most companies have policy to filter all traffic coming to Internet. For this task, they target Google Chrome, Internet explorer, Mixrosoft Eadge or Firefox streams through their proxy servers. To avoid your home camera live video stream blocking I recommend Epic Privacy Browser (https://www.epicbrowser.com/).
      posted in PRODUCTS
      M
      Mumris
    • I have modified the software to fully working Internet version. Try it. Instructions are in ReadMe.txt file.

      Re: Timer Camera X
      https://github.com/mumris/TimerCam-arduino/tree/master/examples/M5 Web_cam_timer X

      posted in PRODUCTS
      M
      Mumris