Announcement

Collapse
No announcement yet.

mcsMQTT Plugin Testing

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • mcsMQTT Plugin Testing

    Installing an MQTT broker on my test RPi2 / Wheezy running in the attic. (well it was already installed anyhow).

    Base Homeseer 3 configuration is running on two machines.

    1 - HS3 Pro V.420 is running on an Intel Haswell i-Series motherboard with 16Gb of RAM Ubuntu 16.04 64 bit (Plus Oracle VB's for some Windows HS3 stuff).
    2 - HS3 Lite V.420 is running on a Pine64 2Gb machine Ubuntu 16.04 64bit

    This POE connected RPi2 is multifunctioning today serving as a 1-wire temperature hub, ZNet like device and NOAA SDR capture device running Wheezy (still).

    Switched here to using the Pine64 running Ubuntu 16.04 64 bit for HS3 and reusing the old RPi's for tinker toys these days.

    Will be upgrading the Pine64 to a Rock64 (4Gb RAM and 32Gb eMMC drive) - hopefully an RTC will be integrated in to the next Rock64 build.

    The Pine64 / HS3 lite box / mcsMQTT plugin with be initially utilized as a broker to the RPi - DigiTemp 1-wire sensor hub.

    Every minute or so DigiTemp writes a CSV file: (Note too the box is currently running OWFS).

    Feb 27 18:00:03 Sensor 0 C: 18.25 F: 64.85
    Feb 27 18:00:04 Sensor 1 C: 18.78 F: 65.81 H: 46%
    Feb 27 18:00:05 Sensor 2 C: 18.81 F: 65.86 H: 52%
    Feb 27 18:00:05 Sensor 3 C: 19.41 F: 66.93 H: 52%
    Feb 27 18:00:06 Sensor 4 C: 19.06 F: 66.31 H: 51%
    Feb 27 18:00:06 Sensor 5 #0 36
    Feb 27 18:00:06 Sensor 5 #1 36

    Sensors 5 is a dual counter.

    [ATTACH]67065[/ATTACH]

    Currently for Homeseer 3 the data file sits in the /HomeSeer/data directory and is read by a VB script one variable at a time every 5 minutes.
    The script is very hands on as I am using the 1-wire mac addresses one at a time for the reads.

    Here it will be a curl or perl or python script sending out the 1-wire stuff.

    Looking at the RPi in the attic and MQTT was already all installed...tested fine:

    ~# mosquitto_pub -d -t pete_mqtt -m "hello pete"
    Client mosqpub|6933-ICS-ZNet sending CONNECT
    Client mosqpub|6933-ICS-ZNet received CONNACK
    Client mosqpub|6933-ICS-ZNet sending PUBLISH (d0, q0, r0, m1, 'pete_mqtt', ... (10 bytes))
    Client mosqpub|6933-ICS-ZNet sending DISCONNECT

    ~# mosquitto_sub -d -t pete_mqtt
    Client mosqsub|6928-ICS-ZNet sending CONNECT
    Client mosqsub|6928-ICS-ZNet received CONNACK
    Client mosqsub|6928-ICS-ZNet sending SUBSCRIBE (Mid: 1, Topic: pete_mqtt, QoS: 0)
    Client mosqsub|6928-ICS-ZNet received SUBACK
    Subscribed (mid: 1): 0
    Client mosqsub|6928-ICS-ZNet sending PINGREQ
    Client mosqsub|6928-ICS-ZNet received PINGRESP
    Client mosqsub|6928-ICS-ZNet received PUBLISH (d0, q0, r0, m0, 'pete_mqtt', ... (10 bytes))
    hello pete
    Client mosqsub|6928-ICS-ZNet sending PINGREQ
    Client mosqsub|6928-ICS-ZNet received PINGRESP
    Client mosqsub|6928-ICS-ZNet sending PINGREQ
    Client mosqsub|6928-ICS-ZNet received PINGRESP
    Client mosqsub|6928-ICS-ZNet sending PINGREQ
    Client mosqsub|6928-ICS-ZNet received PINGRESP

    @Michael,

    Am I approaching this OK for testing?

    Been lately maxi testing using the RPi's I have. I also have Arduino's to test but waiting for a bit on these.
    Last edited by Pete; February 27th, 2018, 01:45 PM.
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel CPU - Mono 6.00
    Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e BeeLink 4Gb BT3 Pro - Mono 6.00

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

  • #2
    It is not clear to me what your objective is with this. Seems like you have a HS box that is reading 1-wire via script and populating devices. If your objective is to then use MQTT to publish to the other HS box or other receivers then you could do this with mcsMQTT. Show the non-plugin devices (checkbox) and Accept the 1-wire sensor devices in HS3. Each time the device value changes mcsMQTT will publish via MQTT the updated value. In the other HS3 you will see the published topics and in that instance Accept them to create HS3 devices and updated values. The same could be done with mcsXap.

    If your objective is to replace your 1-wire approach to be more direct without the file and scripts then there should be Pi or other micro controller solutions, but I have not explored in that path. I do know that Node Red (on Pi and other places) is a good approach to stitch together different interfaces such as 1-wire and MQTT.

    Comment


    • #3
      Yes and yes.

      I had / have nodejs, npm and node red installed but before that OWFS was doing MQTT.

      Long term goals here are to redo my weather station stuff and move from Cumulus to WeeWx. (and be able to utilize my multiple weather stations and indoor and outdoor sensors whatever type they may be).

      Well too to DIY build one of these...(also have a Meteostick that could also talk MQTT).

      WeatherDuino Pro2 & Pro2 PLUS Weather Stations
      Last edited by Pete; February 28th, 2018, 01:11 PM.
      - Pete

      Auto mator
      Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel CPU - Mono 6.00
      Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e BeeLink 4Gb BT3 Pro - Mono 6.00

      X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

      Comment

      Working...
      X