GithubHelp home page GithubHelp logo

janisplayer / pico-smartmeter Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 141 KB

SmartMeter over LoRa and WiFi with Graphical User Interface

License: GNU General Public License v3.0

C++ 56.82% HTML 34.20% PHP 8.98%

pico-smartmeter's Introduction

Pico-SmartMeter

SmartMeter over LoRa and WiFi with a graphical user interface.

This project is a modified version tailored by me for the Pico with the LoRa module. I have created my own web interface.

Implementing DeepSleep under the Arduino IDE is somewhat complicated. The power consumption is approximately 18 mAh at a 50 MHz clock. The 600 mAh battery was depleted after 33 hours. I also attempted to implement my own DeepSleep and further lower the clock frequency, but encountered strange issues when the clock frequency was increased again. Since this problem only occurred when the Pico was actually connected to the electricity meter and the entire code was executed, I didn't want to test it for too long in the community basement. So, if anyone can further reduce the power consumption, that would be great. However, one should not expect too significant improvements. DeepSleep would be much more beneficial. Currently, a 10000 mAh battery is recommended at least to avoid frequent trips to the cellar each month.

The DeepSleep issue is explained quite well here (2), and implementing it under the Arduino IDE is not an easy task. For testing purposes, the receiving script still includes a Heltec library. So, the code still needs to be adjusted for the RadioLib, but this should be done quickly. For the reader head, the pins can be easily changed here: SoftwareSerial SmlSerial(1, 0); // RX, TX. The LoRa pins can also be defined and adjusted above. WiFi or LoRa can be activated and deactivated with the variables useWiFiMode and useLoRaMode. The device ID can be turned on or off. If there are hardly any other devices in the radio range, it can be turned off. The data is currently not encrypted, and the device ID is also static. SSID and password, server, port, and secret should be adjusted. For other microcontrollers, you can find the pinout for most LoRa-compatible devices not only in the manufacturer's documentation but also at Meshtastic. The pins are listed in variant.h. The web interface still lacks a few options, such as monthly consumption, better performance through the use of the Decimation-LTTB algorithm, and caching of database queries.

Pico-SmartMeter

SmartMeter über LoRa und WiFi mit grafischer Benutzeroberfläche

Dieses Projekt ist eine modifizierte Version, die von mir für den Pico mit dem LoRa-Modul angepasst wurde. Ich habe eine eigene Web-Oberfläche erstellt.

Die Implementierung von DeepSleep unter der Arduino IDE gestaltet sich etwas kompliziert. Der Stromverbrauch beträgt bei einem 50 MHz Takt etwa 18 mAh. Der 600 mAh Akku war nach 33 Stunden leer. Ich habe auch versucht, meinen eigenen DeepSleep zu implementieren und den Takt weiter zu senken, was jedoch zu seltsamen Problemen führte, wenn der Takt wieder erhöht wurde. Da dieses Problem nur auftrat, wenn der Pico tatsächlich am Stromzähler angeschlossen war und der gesamte Code durchlaufen wurde, wollte ich nicht zu lange im Gemeinschaftskeller testen. Wenn also jemand den Verbrauch weiter senken kann, wäre das großartig. Allerdings sollte man keine zu großen Verbesserungen erwarten. DeepSleep würde deutlich mehr helfen. Aktuell wird ein 10000 mAh Akku mindestens empfohlen, damit man nicht zu oft im Monat in den Keller laufen muss.

Die DeepSleep-Problematik wird hier (2) recht gut erklärt, und die Implementierung unter der Arduino IDE ist keine einfache Aufgabe. Für Testzwecke hat das Empfangsskript noch eine Heltec-Bibliothek. Der Code muss also noch für die RadioLib angepasst werden, was jedoch schnell erledigt sein sollte. Für den Lesekopf können die Pins ganz einfach hier SoftwareSerial SmlSerial(1, 0); // RX, TX geändert werden. Die Pins für LoRa können auch oben definiert und angepasst werden. WiFi oder LoRa können mit den Variablen useWiFiMode und useLoRaMode aktiviert und deaktiviert werden. Die Device-ID kann ein- oder ausgeschaltet werden. Wenn kaum andere Geräte in der Funkreichweite sind, kann sie deaktiviert werden. Die Daten sind zum jetzigen Zeitpunkt nicht verschlüsselt, und die Device-ID ist auch statisch. SSID und Passwort, Server, Port und Secret sollten angepasst werden. Für andere Mikrocontroller könnt ihr das Pinout für die meisten LoRa-fähigen Geräte nicht nur in der Herstellerdokumentation finden, sondern auch bei Meshtastic. In der variant.h stehen die Pins. Der Weboberfläche fehlen noch ein paar Optionen, wie zum Beispiel einen Monatsverbrauch, eine bessere Leistung durch die Nutzung des Decimation-LTTB-Algorithmus und das Caching von Datenbank Anfragen.

SmartMeter WebPage

pico-smartmeter's People

Contributors

janisplayer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.