Hi everyone, I’m very new to LORA and Meshtastic and I’m looking to see if it can help me with a bit of home automation.

Currently I can control my entrance gate with a relay on a local MQTT network, however mobile internet near my house is very unreliable so opening the gate while I’m outside doesn’t always work well.

What I’d like to be able to do is open/close my gate with a meshtastic device that I could keep in my car. I understand that I could use a POE wisblock in my house as the meshtastic server that interacts with my local MQTT network, then I could use a device in the car to send the signal to open/close the gate to the wisblock server device which would be located about 50m away.

My question is, is there a device I can get for my car capable of displaying custom text such as below that would tell me when I’m in range of the wisblock and whether or not the gate is currently open?

Eg:

GATE: Connected  
GATE STATUS: OPEN  

Alternatively, instead of text this could probably be achieved with 2 controllable LEDs

As well as the text, I’d like to have two buttons on the device which can send a message to open/close the gate. I understand that a lot of the meshtastic functionality like sending messages is done through the app, but I’d rather not depend on a phone at all if I don’t have to.

I’m happy to figure out all the programming myself, such as configuring the text, and automatically sending messages from the server to update the gate status. I’d just like to know if a device like this exists in the meshtastic space.

Thanks

  • Salamander@mander.xyzM
    link
    fedilink
    arrow-up
    2
    ·
    29 days ago

    Hmm this is what I think about this:

    On the device by the gate:

    Continuous loop:

    • Switch to transmit mode

    • Check if the gate is open or closed

    • Transmit the result

    • Switch back to receive mode and wait 15 seconds

    When a message is received:

    • Run a security check

    • If the message is the Open or Close command, forward it to MQTT


    On the device in the car:

    Continuous loop:

    • Decrease the timer value

    When a message is received:

    • Set connection state to connected

    • Enable the Open/Close display and set it to the received state

    • Reset the timer to 45 seconds

    If the timer ends:

    • Set connection state to disconnected

    • Disable the Open/Close display

    On button press:

    • Stop receiving

    • Generate a secure message (Open or Close)

    • Transmit the message

    • Resume receiving


    Option 1: Use an ESP32 with WiFi and a LoRa module near the gate. This device can handle both the LoRa interface and the MQTT push with relatively simple firmware. For the device in the car, WiFi is not needed, so you can choose any microcontroller and a LoRa module.

    For the interface, LEDs are the simplest. Map the GPIOs to four LEDs (Red, Green | Red, Green). For example:

    • Red and Off = Disconnected

    • Green and Red = Connected and Closed

    • Green and Green = Connected and Open

    Two more GPIOs in input mode can handle the two physical buttons for Open and Close.

    If you want a screen, there are many options. You can use a small OLED, touch screen, or colored E-Ink. The choice depends on whether the car device is battery powered or has constant power, and how much complexity you want in the code.

    Option 2: Use Meshtastic. The device by the gate can be connected to something like a Raspberry Pi, and a Python script can process incoming messages and handle the heartbeat transmissions. Meshtastic gives you some built-in security, but you still need to be careful. The difficulty is keeping track of the connected state and the Open/Close state from the heartbeat, and then mapping that to a display or LEDs. That would probably require customizing Meshtastic firmware.

    Because of that, I think writing custom firmware is easier than trying to adapt Meshtastic for this use case. BUT - I have not been keeping up to date with the newest Meshtastic versions, and I don’t know all of the sensor-related features. So it is possible that there is already some built-in method that replicates this and I just don’t know about it.

    • HarngoMan@piefed.socialOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      28 days ago

      Wow thanks for such a thorough answer!

      It seems like as of right now meshtastic devices don’t have the ability to finely control LEDs/button actions to work for my use case. Which is a shame since I was hoping I could just buy a meshtastic device that has some programmable buttons inside a pre-built enclosure.

      Seems like I’ll have to go down a more advanced route of getting a microcontroller, wiring up buttons and LEDs and getting a custom built enclosure.

      Seems like I could get something simple like this heltec device, which is arduino compatible so I could program the buttons and LEDs, then just find/make a case.

      • Salamander@mander.xyzM
        link
        fedilink
        arrow-up
        2
        ·
        28 days ago

        It seems like as of right now meshtastic devices don’t have the ability to finely control LEDs/button actions to work for my use case. Which is a shame since I was hoping I could just buy a meshtastic device that has some programmable buttons inside a pre-built enclosure.

        Maybe they do have that ability already. I am not sure. I have mostly used Meshtastic devices for communication and I have played a little bit with LoRa modules for more basic sensors and logging. Perhaps someone else knows more about the Meshtastic-specific features when it comes to telemetry and triggering devices.