MQTT command preparation in Loxone (text manipulation)

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • jkosatko
    Azubi
    • 11.10.2022
    • 3

    #1

    MQTT command preparation in Loxone (text manipulation)

    Hello everyone,

    I would like some help with setting up an MQTT command to control the AC unit.

    Unfortunately the AC unit does not support Loxone (Sinclair) and Loxone does not make a module for it either. Fortunately the AC unit is supported by node-red. Node-red supports MQTT. I have MQTT installed on a Loxberry where the AC unit and MQTT are coupled together. So from Loxone I just need to send the MQTT command that I want to assemble in Loxone.

    From the room temperature control block I have the set temperature, from the climate control block I have the information whether to heat or cool (each separated output). And from all of this I need to produce something like "publish zigbee2mqtt/AC/set {"power": "on", "mode": "heat" OR "cold", "temperature":25, "fanSpeed": "auto", "swingHor": "full", "swingVert": "full"}" on power on and "publish zigbee2mqtt/AC/set {"power": "off"}"

    How to easily put together one temperature and two inputs into one Virtual Output command?

    Thanks for the ideas​
  • Labmaster
    Lox Guru
    • 20.01.2017
    • 2593

    #2
    use the "status" funktionblock to combine different inputs to one text output

    another thing, why not using the NodeRed Loxone Node (https://flows.nodered.org/node/node-red-contrib-loxone) instead of MQTT ?
    That way you would save the addtional MQTT in between.

    Kommentar

    • filipboute
      Azubi
      • 02.10.2023
      • 3

      #3
      Hi jkosatko,

      I'm in the same situation. I've installed sinclair AC's in our new home and found out that there is no default integration available for Loxone.

      However, last week I've found this github post :



      As Sinclair is unsing Gree hardware I've managed to get everything working with this javascripts.

      So basically what you need is a linux machine with nodejs and NPM. There you have to put the index.js script and the /app folder with the 3 other javascripts.

      When you run the command syntax as described in the github post this javascript will bind to the AC unit's controller and then you can readout all values through mqtt or send commands from loxone trough mqtt with a virtual output.

      Only thing is that the javascript crashes for some reason after sending a command. I'm not a programmer so I didn't found a solution for that but I've found out that I can run the script as a process using PM2. So when I'm sending a command from loxone now, loxberry mqtt triggers the javascript running on my linux machine, executes the command, crashes and is immediately being relaunched by PM2

      So I'm running 4 scripts at the same time now using PM2 for my 4 AC units.

      From Loxone I'm using the AC Control building block to send the commands.
      Only thing I had to do in the javascripts I make some modifications as for example the AC Control is sending out values 1 to 8 for fan and air flow settings where the javascript is expecting a string but that was pretty simple to do.

      Just let me know if you need any help or having questions about this. I've been busy the whole week to get this to work but it's very cool now that I can control all AC units from the Loxone app.

      Kommentar

      Lädt...