Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Chris
    @Christian-Me
    @kleini You are right. It is always a problem for standards to establish them self. Who was first, the egg or the chicken or it took more than 3 years for bluetooth to start, now it is everywhere. ESPEasy works quite well with Homie (I have around 15 devices around my home ) But it is too heavy and not suitable for 1MB devices. My sonoffs-mini installed never rebooted since then (35 days ago). This is one reason I started to shift to my own custom firmware. Hacking of the shelf devices brings many advantages (nice case, good power supply and stability) The other is I like to have more logic in the device and not using the as a remote controlled actor / sensor (so I like to solve the OTA problem soon).
    davida72
    @davida72
    Hey. New to Homie and PlatformIO so this is likely obvious but I can't see it. Where can I see the log messages? I assumed they'd be in the terminal window along with the system messages, but I don't see them.
    davida72
    @davida72
    ignore - it's working after reboot
    Lübbe Onken
    @luebbe
    @Christian-Me , you're right. I use homie based firmware for all my custom hardware and espurna for all off-the-shelf stuff, because I just have to configure and upload the firmware. I could collect the bits and pieces for the different smart plugs on GitHub and build homie based firmware (did that for the sonoffs). The best solution would probably be something template based. Using (some of) the templates from https://templates.blakadder.com/ and my homie-node-collection. How far would we get? Would we need to implement tons of other nodes? Would it be possible at all to create a beginner friendly firmware (in terms of configuration) which fits onto a 1MB device without a web sever?
    Marcus Klein
    @kleini
    I am not talking about getting all templates into a single firmware. I would rather go first for separated firmwares for each device. But all of them built completely automatic using Circle CI e.g.
    Lübbe Onken
    @luebbe
    Exactly. I also want one dedicated firmware, as small as possible, for each device. But the configuration should be as easy as possible. So if someone finds a new xyz-smart-relay with power monitoring on ebazon, (s)he should be able to say: relay (inverted logic) on pin0, LED on pin1, which should show the connection status, another led on pin2, which should show the relay state, power monitor on pins 12,13,14.
    Put this information plus description into a template and circle ci, platformio builds the binary.
    Marcus Klein
    @kleini
    That would be far more, than I would like to have. My idea was just: Take exactly this firmware file for xyz-smart-relay, which contains according Homie nodes and pin configuration.
    And there would be a long list of firmwares...
    Chris
    @Christian-Me
    I`m not a professional programmer. My personal approach is a firmware for intermediate coders like me & many "Bed Room Coders". Full featured "no coding" flash and configure by a web interface are enough for most tastes. To propagate the homie convention on these firmware perhaps better to write a "communication" plugin to integrate Homie like I did for ESPEasy. My approach is more a "framework" where you only have to add some compiler defs some configurations and perhaps individual logic in callbacks and hit "compile" and end with a flash size of around 350k and not 1MB. (Early Alpha: https://github.com/Christian-Me/homie-firmware look into "device-H801-5chLED.h" or "device-BME680.h" and "platformio.ini" to get the idea.
    Marcus Klein
    @kleini
    arcao/Syslog looks interesting. webserver in 350k is ambicious.
    Chris
    @Christian-Me
    The syslog does a great job ... perhaps I add a stream operator (when I find out how to do that) but for now im fine wit print and printf supporting progmem... Webserver? I don't plan one in my concept. Config and updates should rely on OTA. You do your configurations in source and upload it. So the target is someone like me able to hack some code but don't want to start from scratch or fill in webforms or rudimental scripting options. Will have to find out how to protect against software crashes after OTA. Think the boot cause could branch into a "save" OTA only part looking for an update (on MQTT) after a software reset that perhaps fix the error.
    Marcus Klein
    @kleini
    okay, I misunderstood "web interface"
    Marcus Klein
    @kleini
    @Christian-Me if you have insight into Tuya sub chip and its control I would like to see an example. I have here one of these AOFO smart power strips, which I would like to "migrate" to Homie.
    Igor
    @igrowing
    Hi guys, i wonder if there is summary of feature differences or feature sets per major Homie releases (V1, V2, V3). Is there?
    Lübbe Onken
    @luebbe
    Igor
    @igrowing
    Yes, thank you. https://homieiot.github.io/specification/spec-core-v3_0_0-diff/ - this is what was looking for.
    Chris
    @Christian-Me
    @kleini Think I was unclear here: There are enough "full featured" firmwares already existing (Tasmota, ESPHome, ESPEasy ...). To propagate the homie convention for these polular firmwares it is perhaps better to produce "homie add-ons / plugins" than invent another full featured firmware only for the homie convention.
    Tuya chips are controlled by serial in many different baud rates. I'm still using ESPEasy with the _P165_SerSwitch.ino plugin on a wall dimmer which is one of my most nonreliable devices: crashing may times per day and sometimes not rebooting until I power circle it. Perhaps you like to look into that. Will try to implement it myself soon.
    Marcus Klein
    @kleini
    MQTT over SSL/TLS is a hard requirement for me. All ready to use firmwares do not come with SSL/TLS support.
    Adam Smith
    @adamwcsmith
    Hello all, just found this group, glad you're here. I've been working on and off for a temperature-sensor project at home, just came back to it after not looking at it since last winter. I'm trying to use homie-esp8266 on mostly ESP-01 modules, I can load firmware, load config/SPIFFS, connect to WiFi and MQTT, send node/properties from the device based on DS18B20 sensor values, set some control settings via MQTT back to the board. Very cool!
    However, I'd like to have a generic firmware that I can plug a varying number of DS18B20 sensors into. The array/range stuff in homie-esp8266 seems to not be well documented for how it actually works, and I'm not sure it works like the homie-iot convention 3.0.1 anyway. Worse, I loaded the new OpenHAB 3.0, which is now compatible with homie-iot 4.0 and so it doesn't support arrays at all. Does anyone have a recommendation for generating multiple nodes/properties without pulling my hair out? I can live with a single-digit number of sensors per ESP-01, so it's not like an LED strip with 10s or 100s of lights to control. Any suggestions appreciated!
    Lübbe Onken
    @luebbe
    IMHO there's no need for ranges in this case. My homie node collection contrains drivers for the DS18B20 https://github.com/luebbe/homie-node-collection.
    In https://github.com/luebbe/homie-relay-array I just named the four relays for the valves "valve1", "valve2", ... I thought about using ranges for a minute, but considered it too much effort.
    Adam Smith
    @adamwcsmith
    Lübbe - Your library is interesting, I'll have to look into it further, thanks. For a case with a few sensors I agree, it can be handled - for a case like a strip-light with maybe 10's or 100's of instances a range/array seems much more functional. I guess I could use something like a string to pass through MQTT/Homie and then interpret it creatively in the code . . . mostly wondering if anyone knows what the implementation or logical problems were with the existing definition? Seems strange to lose it...
    I'm working in Arduino IDE instead of PlatformIO, is it possible / anything special I have to do to use your collection?
    Lübbe Onken
    @luebbe
    I used the Arduino IDE for my first steps and moved to VS Code + platformio immediately. The arduino IDE is nice, but it feels like a toy to me. Probably you just have to copy everything into the library folder.
    Adam Smith
    @adamwcsmith
    Thanks!
    camiloavil
    @camiloavil
    Does anyone used the homie convention on a esp32cam? I think it would be interestingbto add pir and temperature sensor
    Igor
    @igrowing

    Magic! Thank you very much, Marcus.
    What I did:

    1. Set ESP to flash mode + burn the firmware.
    2. Reboot the ESP into flash mode again and run 'pio run -t uploadfs' from root folder of the project when the .ino file is open.
    3. Reboot the ESP normally. Indeed, no configs needed and SPIFFS is ok now.

    Guys, I got new computer, so started with old problems :)
    The problem above was solved with old computer (gone).
    In the new computer pio run -t buildfs completed with:

    Building in release mode
    Warning! '-Wl,-T' option for specifying linker scripts is deprecated. Please use 'board_build.ldscript' option 
    in your 'platformio.ini' file.
    Building file system image from 'Data' directory to .pio\build\esp12e\spiffs.bin
    *** [.pio\build\esp12e\spiffs.bin] Error 148

    Searching didn't help. The only mention is for different ESP module type. My platformio.ini:

    [env:esp12e]
    platform = espressif8266
    board = esp12e
    framework = arduino
    build_flags = -Wl,-Teagle.flash.4m.ld

    Please, advise.

    camiloavil
    @camiloavil
    @igrowing maybe reinstall platformio.
    Igor
    @igrowing
    As advised here the problem solved with:
    Just replace build_flags = -Wl,-Teagle.flash.4m.ld with board_build.ldscript = eagle.flash.4m1m.ld
    Marcus Klein
    @kleini
    @Christian-Me maybe prampec/IotWebConf is something for a more lightweight web interface than config mode. I just stumbled over that but did not have a look into it.
    Lübbe Onken
    @luebbe
    @kleini Did you also read the heise online article about the ESP VOC sensor? ;) Here's the full url: https://github.com/prampec/IotWebConf
    Chris
    @Christian-Me
    @luebbe very similar to an "old" project of mine https://github.com/Christian-Me/healthy-indoors-project ;) and many other projects out there. But actually I plan to get rid off the hole web interface for my home devices.... let`s see where this end. Great would be to be able to hard code the WiFI credentials inside the firmware with ESP8266-Homie to skip the step to upload the config.json.
    Marcus Klein
    @kleini
    @luebbe I only cross-read it. Looks interesting but my priorities are currently here: https://github.com/kleini/homie-relays-device/
    MCP23017 IO expander works without any problems, will now extend its outputs with A2982 8-channel source driver to drive then relays directly. another option would be to use opto-copplers but they consume more space than a A2982. If all that works on a breadboard, I will extend your RelayNode with an array option to drive 16 relays and build PCBs.
    @Christian-Me Uploading some config.json is not a big deal. I use nodemcu upload_reset_method with these two additional NPN transistors next to ESP12-F and I don't need to press any buttons for programming any more. Works all from the desktop.
    Chris
    @Christian-Me
    @kleini perhaps if I'm a little bit further in my project I can explain my approach better. For now the config.json upload works (even I spend some hours debugging why the config.json in a way "erased" with my firmware after boot. ui_bundle.gz is still there and working - and did not found a real cause. disabling HOMIE_CONFIG 0 is my workaround for now (ram and flash is reported under 50% and without config under 35%)
    Nice project. Are you planning to use solid state relays (the small omron have a nice foodprint) to? I don`t like the klicks of relays. I use the chinees 4 ch modules quite often.
    Chris
    @Christian-Me
    Were you source these nice cases? Would like to find them with a clear top cover to add a display or leds behind without dremeling around
    Marcus Klein
    @kleini
    there will a logic board and a "high voltage & relays board". so replacing the relays board with another one should be simple as long as the coils of the relays can be driven with 12V
    Marcus Klein
    @kleini
    I order my hardware at reichelt.de. They have a lot of stuff, part prices are okay, especially if you buy larger amounts of single parts.
    Lübbe Onken
    @luebbe
    Very nice projects indeed :thumbsup:
    @Christian-Me it should be possible to hardwire WiFi credentials into the firmware which will be used as fallback if the config.json doesn't exist (yet) or the credentials from config.json don't work.
    Chris
    @Christian-Me

    hardwire WiFi credentials into the firmware

    Something like this
    Homie.setParamter(WIFI_SSID, "MyNetwork");

    Lübbe Onken
    @luebbe
    Exactly. And the parameters are read from a non-versioned include file.
    camiloavil
    @camiloavil
    Hi everyone. I don't know if someone already ask this. But this implementation can be connected to mqtt over tls? I am trying but I can't do it maybe is a mistake
    Marcus Klein
    @kleini
    Hi @camiloavil. I use encrypted connections for all of my Homie devices. I don't have the perfect example for you, as I am working on a lot of different libraries for fixes here and there, but you can have a look at the following ones:
    https://github.com/kleini/homie-relays-device/
    https://github.com/kleini/sonoff-4ch
    https://github.com/kleini/sonoff-basic
    https://github.com/kleini/shelly-1
    https://github.com/kleini/esp8266-12e
    I don't utilize actually the md5 sum of the MQTT server certificate. Maybe that is a tricky part.
    camiloavil
    @camiloavil
    @kleini hi. Tks for the information. I had to check the information about it. And it work it's necessary add the build flags and check the config.json and that is it. Finally mqtt is over tls tks
    Igor
    @igrowing
    Hi Marcus. Timer lib is used in your sketch instead of Ticker. What's advantage of Timer over Ticker? Thank you!
    camiloavil
    @camiloavil
    @kleini Hi. do you use ota at the same time whit mqtt over ssl. I already set correctly mqtt ssl and validate fingerprint whit "openssl x509 -in mqttserver.crt -sha1 -noout -fingerprint" on broker certificate. But when i try to update the firmware over OTA the esp disconnect of mqtt and the process stop. I get this "Waiting for device to come online...
    Waiting for device info...
    Publishing new firmware with checksum 3f5fae2195fc08ccc8451c80fdb0e4ad
    Expecting checksum 3f5fae2195fc08ccc8451c80fdb0e4ad, got a8bcb28814ff5429971876586176899f, update failed!
    "
    I only can update over ota whitout ssl connection do you know what's the error ?