Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
electrikE

electrik

@electrik
About
Posts
384
Topics
2
Shares
0
Groups
0
Followers
2
Following
0

Posts

Recent Best Controversial

  • Help coding: adding functionality relying on MySensors-func/library (saveState/loadState) (c++)
    electrikE electrik

    If you want to use library functions outside the main sketch, you can also just include the core header, e.g.

    #include "core/MySensorsCore.h"
    
    Troubleshooting

  • Nano minimum voltage
    electrikE electrik

    If you use an ISP programmer, you can reprogram the fuses and use it on lower voltages also. Upto 1.8v but also 3.3v

    Hardware

  • script to convert serial to mqtt?
    electrikE electrik

    I haven't tested it, but this one seems to fit what you need
    https://github.com/mycontroller-org/serial2mqtt/blob/master/README.adoc

    Development

  • Auto resend on NACK
    electrikE electrik

    @skywatch said in Auto resend on NACK:

    @electrik & @Marek - Are you both sure about that? It seems to me that both those statements are doing what was intended.

    Now that I see it again, I'm not so sure anymore actually.

    In your code you used the variable msg. That should be one of msgFgeHum, msgFgeTemp, msgFzrHum, msgFzrTemp.
    That is why the compiler complains msg is unknown.

    You also enabled the ack message, this is just a software acknowledge, while the send function returns the status of the hardware acknowledge. So if you check with

    if (send(msgFgeHum.set(fgehum),true))
    {
    // this is sent ok
    }
    else
    {
    // sending failed
    }
    

    you check if the hardware acknowledge was successful. The software ack should be tested differently and some more logic is needed for it.

    Hope this helps

    Troubleshooting

  • Motion Sensor not presenting to RS485 Gateway / TSM:FPAR:NO REPLY
    electrikE electrik

    You should move the define for the node ID before you include mysensors.h

    Home Assistant

  • Handling NACKs in the gateway
    electrikE electrik

    Exactly. Better to ask then waste many hours 😏

    Development gateway

  • MySensor Request Function
    electrikE electrik

    You can remove these lines, the declaration is already done in the MySensors framework. For presentation() it is needed because you write code there, that is in the function. Now you only call the function, and the code is already in the framework.

    General Discussion

  • Use FreeRTOS?
    electrikE electrik

    I am using the Pinchange interrupts to wake up from sleeping.
    Maybe this helps?
    See code snippets below.

    #include <PinChangeInt.h>  //include PinChange lib from MySensors utilities
    

    in setup()

      attachPinChangeInterrupt(BotLeft_PIN, BotLeft_ISR, CHANGE);
    

    and in the ISR

    void BotLeft_ISR() {
    _wokeUpByInterrupt = 0xFE; // work-around to force MS lib to handle this interrupt
     // more code here
    }
    Development

  • Smartmeter sensors
    electrikE electrik

    There are many examples...
    https://forum.mysensors.org/topic/3764/p1-smart-meter-nta8130-readout-using-mysensors/7

    Or on GitHub, needs some tinkering to integrate in mysensors

    https://github.com/search?l=C%2B%2B&q=P1+meter&type=Repositories

    Edit
    There is also a library available
    https://github.com/matthijskooijman/arduino-dsmr

    My Project

  • Motion sensor increase Time high status via software
    electrikE electrik

    @skywatch still if you use wait(), the rest of the code in the loop is not executed during the waiting time. Only the mysensors core is executed

    Feature Requests

  • MySensor Request Function
    electrikE electrik

    You should do the same for requestTime();

    General Discussion

  • Debug messages over Wi-Fi
    electrikE electrik

    Hello
    I've tried to use this with an ESP32 (I modified some defines for the architecture, to make it compatible). In MyHwESP32.h I've changed

    #define MY_SERIALDEVICE Serial
    

    to

    #ifndef MY_SERIALDEVICE
      #define MY_SERIALDEVICE Serial
    #endif
    

    I think this why it doesn't work for you @ricorico94 with version 2.3 of MySensors.

    It worked sometimes, but usually Putty responds "Network error: Connection refused"

    Any ideas?

    Development

  • Correct Usage of MY_DEBUGDEVICE
    electrikE electrik

    MY_DISABLED_SERIAL wil output nothing on the serial, no matter software or hardware serial. So in your case you don't need to define it.
    And try removing the semicolon after

    #define MY_DEBUGDEVICE mySerial;
    
    My Project

  • ESP8266 Gateway runs DHCP, not static
    electrikE electrik

    @martim Did you read this thread?
    https://forum.mysensors.org/topic/9431/solved-esp8266-mysensors-2-2-0-problem-with-static-ip-configuration

    Troubleshooting

  • [SOLVED] Strange behavior on MQTT Gateway Reset
    electrikE electrik

    @mfalkvidd said in Strange behavior on MQTT Gateway Reset:

    MySensors does set the retain message on I_BATTERY_LEVEL messages (but no other messages)

    If the define MY_MQTT_CLIENT_PUBLISH_RETAIN is used, all messages are retained. But that is not active by default, so probably not used in this case. Just to be complete ;-)

    General Discussion

  • [SOLVED] Error building ESP32 node: multiple definition of `app_main'
    electrikE electrik

    You can also try to use esp32 board definition v1.0.0. I guess you are now using 1.0.1

    Development

  • 💬 Building a MQTT Gateway
    electrikE electrik

    @linkinpio in the pubsubclient library, you can change the timeout on connecting to the mqtt broker. Default it is 15s, reducing it to e.g. 2s will increase the availability of the main loop.

    Announcements

  • MQTT Nodemcu Gateway Compile Error
    electrikE electrik

    Did you try this?

    https://forum.mysensors.org/search?term=ets_update_cpu_frequency&in=titlesposts&matchWords=all&sortBy=relevance&sortDirection=desc&showAs=posts

    Troubleshooting

  • 💬 RFM69(H)W Arduino Mini Pro Shield v2
    electrikE electrik

    Here the picture of the assembled board. The top board is a temperature sensor so not necessarily needed.
    IMG_20220307_141308.jpg

    OpenHardware.io rfm69 arduino pro mini shield rfm69hw
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular