Shop OBEX P1 Docs P2 Docs Learn Events
Home Assistant / MQTT use by our forum members? — Parallax Forums

Home Assistant / MQTT use by our forum members?

I use Home Assistant (an open-source project) for monitoring and controlling various devices in my home.

Does anybody here in the forums use this as well? I'm asking as I'm thinking about some form of MQTT support for our P2's...

Would this be useful at all?

Comments

  • I think this will be really important to have at some point.

    You're probably ahead of the pack once again Stephen!

  • ColeyColey Posts: 1,110

    Yeah I use HA at home with MQTT and also in my work with MQTT using the Mosquito broker.

    It's very versaltile and is become very widespread now.

    My background is electronic security systems and some IP CCTV cameras even have MQTT built in for sending video analytics metadata and for activating different operating modes.

  • VonSzarvasVonSzarvas Posts: 3,450
    edited 2022-01-04 15:49

    Another vote from me !

    Good memories of an Erlang server with MQTT I used to run for asset tracking; really simple efficient and scalable system- feels an ideal match for Propeller ! If you need help with getting an MQTT broker server online, I could help with that. Never heard of HA, but will read about it soon. Sounds like something I'd like :)

  • Stephen MoracoStephen Moraco Posts: 316
    edited 2022-01-04 21:38

    @Coley @Tubular @VonSzarvas Thanks for your responses.
    This gives me ideas of what to do in upcoming projects.

    @Coley if you have any RPi's (or Omega2's) check out these links:
    RPi/Omega2 Monitor Card
    RPi Reporter Daemon
    Omega2 Reporter Daemon

    (Other things I do with my time... ;-)

  • Hi,
    as you will need something to connect to Wifi in any case, for me it seems best to do as much as possible on the controller, that does wifi, like esp32 for example. If you could use esp32 with arduino for MQTT there are nice libraries and tutorials. Simpler nodes could be done with esp32 alone, while more complex nodes can add P2.
    At least for me, having a small number of different systems has great benefit!
    (At the moment I have abandoned MQTT, because this adds the complexity of a linux server system. Instead I use ESP32 each running as FTP-Servers and accessible per telnet. )

    So in the context of IOT I would argue to see P2 as a (optional!!! (space, power, complexity, cost)) subsystem, because the Wifi- software, which has to run on the ESP32 is way more complex and the benefit of existing libraries there is huge. There are a lot of Wifi functions possible. For example NTP is great. It seems not to make sense to me to have P2 control them.

    I wonder, if it would be interesting for newcomers to P2 to avoid programming of P2 completely by using the builtin Tachyon as a protocol between the ESP32 and P2 using the existing console serial.

    Just a few thoughts...
    Christof

  • @"Christof Eb." Thanks for the feedback. Of course, you are correct. Watch this space for news in a couple of weeks. ;-)

  • 1960: "The government plans to put recording devices in our homes!!! 😮"

    2022: "Alexa, can I feed pancakes to my cat?"

  • I would second Chritofs point. I'm using ESPs and they offer a lot in terms of protocol support. E.g. HTTP, mDNS for discovery, SmartConfig to configure the WIFI credentials, etc. That's where their power lies. So for me a project that involves an ESP out of necessity for the connectivity would question involving the P2 unless there is something the P2's strengths come into play. At which point I just use UART or SPI to control it from the ESP32.

  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2022-01-07 21:54

    MQTT-over-UART could be a valuable protocol, though...

    https://stackoverflow.com/questions/37636072/mqtt-serial-message-without-ethernet

  • You can of course send any data over UART, and make that part of an MQTT message. Or an HTTP request. Or OSC. Or whatever. Why tie this to MQTT?

    Maybe I'm thinking this too much from my perspective where I just write code for both platforms. For folks who struggle with that, a convenience-oriented, UART-controllable firmware might be nice. It would need much more than MQTT though IMHO, such as means to configure WIFI credentials/modes, IP-configuration, credentials, etc.

  • For holiday lighting this past year I used an ESP32 to control an array of WS2812's using mosquito running on a Raspberry Pi. It worked great accept that I could not get all the effects I wanted driving the array from the ESP.
    Having multiple sequences running on different parts of the array was beyond the ESP. I can get the effects I want by driving the array from a Flip but alas no connection to MQTT. I'm trying to use the ESP as an interface to the flip but cannot find an example from either Parallax forums or the ESP Forums.

    All of the examples I find are for talking to the serial link are for debugging to the terminal programs on either system. Does anyone know where I can find sample/example code that shows using two ports one for system com and the other for debugging.

    Thanks
    Don

  • I just got the MXCHIP Iot Devkit the other day to see what it's all about. The kit had a number of sensors and even if I didn't use it for Iot project there was enough hardware to make it worth having.

    After setting it up and looking through the documentation I realized that it was using MQTT under the covers to talk to AZure. I used MQ back in 2000 for communicating between are system for high speed guaranteed message delivery between are systems. It was at the time very complicated to setup as it did work for moving information around a system.

    Anyway I set it up with no issues and was able to send message back and forth between AZure and the MXCHIP kit. I also had an ESP32 chip laying around and was able to get that to work with AZure as well without needing a kit.

    I think moving this to the P2 would be simple enough and should be able to use the parallax ESP8266 device as the connecting internet device to the cloud.

    I did not pursue this any further as I didn't see any value in writing data to the cloud or sending messages from the cloud to control devices.

    Mike

  • In case you are wondering what's up...

    I use home assistant, which in most cases uses MQTT for one-way and bidirectional communication with connected devices. This is an easy port to our RPI Gateway for P2. which means we can pretty quickly have P2 <-> serial <-> RPI <-> MQTT (bidirectional) comms. I'll be adding a full demo to our IoT gateway project and then posting a video showing the interaction between Home Assistant and the newly connected P2.

Sign In or Register to comment.