OpenGarage Forums Comments, Suggestions, Requests request frequency option in integration for /OUT/STATE

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2451

    jagos
    Participant

    I love MQTT integration with the published topic <og name>/OUT/STATE which publishes OPEN or CLOSED approximately every 15 seconds.

    I run my own local MQTT server and would really like the option to set the frequency to every 5 seconds.

    Would you please consider for the next release including under Options => Integration a setting in seconds for this frequency?

    This would make detecting state change much quicker in some personal software I have written.

    Thanks for the consideration.

    #2453

    Ray
    Keymaster

    The best way is probably modify the firmware and recompile it yourself. The particular 15 second interval is here in the source code:
    https://github.com/OpenGarage/OpenGarage-Firmware/blob/master/OpenGarage/main.cpp#L1304

    #2461

    Lostsoulfly
    Participant

    Not to hijack this thread but I am curious why MQTT doesn’t simply send the information on connection or state change instead of every xx seconds? I mean, it could certainly still send heartbeat containing the current status once every 60 minutes or so but it is excessive to do it every 15 seconds without any changes.

    Seems like it would be far more responsive for use in automations (in Home Assistant, in my case) if OG simply sent an MQTT message whenever an event happens instead of on an internal timer.

    #2468

    jagos
    Participant

    I originated this thread but don’t recall getting an email about @Lostsoulfly’s post even though I have notify checked.

    I very much like the idea of getting the MQTT OPEN/CLOSED status upon detected change. This would be better than being able to change the heartbeat time.

    But I also would very much not want the heartbeat version to go away, at least as an on/off option if not always on. The reason is that a change can be missed if, for example, the MQTT server is down when it happens like during a reboot of the MQTT server. Having to handle this scenario almost makes the auto-generated version worthless. My code is very simple with the current version.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

OpenGarage Forums Comments, Suggestions, Requests request frequency option in integration for /OUT/STATE