Code Monkey home page Code Monkey logo

Comments (4)

lrswss avatar lrswss commented on June 2, 2024

The number is derived from the MAC address of the ESP8266, but making it configurable is no big deal. Same holds true for the MQTT port.

The header file WiFiUDP.h is included in influx.h. Do you get compiler warnings/errors or why are you asking? Mentioning the old version number I guess you're using the Arduino IDE, right? I switched to VisualStudio/PlatformIO quite a while ago, so I no longer compile the code explicitly under the Arduino IDE.

from esp8266-wifi-power-meter.

nonick321 avatar nonick321 commented on June 2, 2024

Thank you, I found the codeparts with the MAC or systemID Call.

No, i freshly installed Visual Code and PlatformIO. I then cloned into your repository and opened the folder in Visual Code. The compiler complained about the missing WiFiUDP.h. After adding it manually under "include", the compilation went through without errors.

sorry, i'm new to this whole stuff. This is my first project ...

Another Question: I added your Project via MQTT to iobroker. MQTT connection drops twice per minute with "connection lost: Timeout". Any idea how i can fix this? My fritzbox shows Signalstrength of -79 to -74 which is not too good, but the GUI is responsive

from esp8266-wifi-power-meter.

lrswss avatar lrswss commented on June 2, 2024

Just uploaded v2.1.3 with options in web ui to configure the MQTT port and power meter id. Please check if it's working as expected.

Sorry, I cannot reproduce your error due to missing header WiFiUDP.h. I cleaned up my project in VS and download/compiled all libraries from scratch: no warnings or errors message from the compiler.

I'm using HA and never experienced any connection timeout warnings. Low signal strength is probably not the cause. But I think the warnings are no matter of concern. Looking at the source code of the PubSubClient library I found MQTT_KEEPALIVE and MQTT_SOCKET_TIMEOUT to be set to 15 seconds by default. Timeout and keep alive could be increased with setSocketTimeout() and setKeepAlice() in mqtt.cpp which might fix iobroker's complains. You could try to set the publish interval to 30 or even 15 secs and check if you still get connect lost warnings.

from esp8266-wifi-power-meter.

nonick321 avatar nonick321 commented on June 2, 2024

Thank you so much. I changed the timeout and keepalive to 40 seconds and the publish intervall to 30s. The connection is now stable and no more warnings in iobrokers log.

All your other changes (Meter Name, Port) work great. Thanks for this!

from esp8266-wifi-power-meter.

Related Issues (13)

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.