Coder Social home page Coder Social logo

luebbe / homie-node-collection Goto Github PK

View Code? Open in Web Editor NEW
26.0 9.0 12.0 247 KB

Collection of Node implementations for the Homie-ESP8266 library

License: MIT License

C++ 100.00%
mqtt homie esp8266 platformio homie-convention sensor-nodes relay measure-voltage

homie-node-collection's Issues

Generic temp sensor node

Hi,

I have seen the reused BME280Node and there is also a DHT22Node. Maybe we can refactor them a little to have some abstract "environment sensor" node as a common base. The could also host the constants from constant.h.
I have some SHT3x temp & humidity sensors here and would also create a node class. So there would already be three use cases.

WDYT?

Properties are created even if nodes not instantiated

I'm using Arduino IDE, and the behaviour is to compile all classes and include in the binary .

As the ESP have enough memory this is not a big problem.

But the properties are being defined and show for every device during the configuration :

https://github.com/luebbe/homie-node-collection/blob/master/src/AdcNode.cpp#L18

I propose to use a beforeHomeSetup() method in this classes to create this property definitions on demand using "new" to instantiate the objects.

Please look in this code and check if you think this method can be used in the other classes :

ivanfmartinez@18b90f9#diff-f817ca7fed45d85f6e3067b00c9499a2L15

compatibility with eps8266 platform Version 3.0.0

Hi,

I just updated my platform Espressif 8266 in PlatformIO from version 2.5.0 to version 3.0.0

image

Then some projects which are working with the "old" version stopped to work.

It seems that there isn't anymore the function "asprintf" the Errors are:
.pio/libdeps/H801/Homie node collection/src/BME280Node.cpp: In constructor 'BME280Node::BME280Node(const char*, const char*, int, int, Adafruit_BME280::sensor_sampling, Adafruit_BME280::sensor_sampling, Adafruit_BME280::sensor_sampling, Adafruit_BME280::sensor_filter)':
.pio/libdeps/H801/Homie node collection/src/BME280Node.cpp:31:3: error: 'asprintf' was not declared in this scope; did you mean 'asnprintf'?
31 | asprintf(&_temperatureOffsetName, "%s.temperatureOffset", id);
| ^~~~~~~~
| asnprintf
.pio/libdeps/H801/Homie node collection/src/ContactNode.cpp: In constructor 'ContactNode::ContactNode(const char*, const char*, int, ContactNode::TContactCallback)':

I haven't investigated if there are more issues.

As an workaround the addition of the platform version in platformio.ini is possible.

platform = espressif8266 @ 2.5.0

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.