UART Serial to Ethernet Module - How do I read data?

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • Tico
    Lox Guru
    • 31.08.2016
    • 1035

    #1

    UART Serial to Ethernet Module - How do I read data?

    I've purchased a UART Serial to Ethernet module to control an Evapolar airconditioning unit -





    The manufacturer has very kindly written bespoke firmware to allow me to control it remotely. It's going to be used to cool a solar battery enclosure with the water supply connected to a continuous flow.

    I've successfully set up the Loxone miniserver to turn the device on and off and change the fan speed using Virtual Outputs.

    The UART Serial to Ethernet module is set as a TCP Server. I've got Virtual Outputs for the various functions -

    ON: address tcp://10.1.1.10:20108, Command for ON - s
    OFF: address tcp://10.1.1.10:20108, Command for ON - f
    Fan speed increase 1 step: address tcp://10.1.1.10:20108, Command for ON +
    Fan speed decrease 1 step: address tcp://10.1.1.10:20108, Command for ON -

    The outputs work well but I've had no success reading data from the device using Virtual Inputs.

    The data available should be inflow temperature and outflow temperature after cooling. The manufacturer advises that for getting temperature you should read the output of the UART (TCP socket), strings starting from "# Temp1:" and "# Temp2:" containing temperature values. The data updates every second.

    Any suggestions on how to set up this sort of Virtual Input?
    Zuletzt geändert von Tico; 01.12.2016, 22:19.
    Ich spreche kein Deutsch. Gib Google Translate die Schuld, wenn ich unverständlich bin.
  • Tico
    Lox Guru
    • 31.08.2016
    • 1035

    #2
    Just to close the loop and hopefully help anyone planning on using a UART to Ethernet module with Loxone -

    I've worked out how to get the flow of data from the aircon visible in Loxone Config. It ended up I needed to change the 'work mode' of the UART to Ethernet module to 'UDP Server'. From that point on, the flow of data was visible in the UDP Monitor within Loxone Config.

    Unfortunately that broke the controlling functions that were previously working when using TCP commands and plain text with the module in 'TCP Server' mode (ON, OFF, fan speed increase, fan speed decrease).

    The fix was to send the functions in hex format when the module is in UDP Server mode -

    ON: address /dev/udp/10.1.1.10/20108, Command for ON \x73
    OFF: address /dev/udp/10.1.1.10/20108, Command for ON \x66
    Fan speed increase 1 step: address /dev/udp/10.1.1.10/20108, Command for ON \x2B
    Fan speed decrease 1 step: address /dev/udp/10.1.1.10/20108, Command for ON \x2D

    The UDP flow of data from the airconditoner returns the following string each second -

    # Voltage: 4763\r\n# Fan Encoder: 3905\r\n# Fan PWM: 477\r\n# LED_RGB: 0 0 0\r\n# Temp1: 2868\r\n# Temp2: 2881\r\nTemp Sensor Error: 255\r\nno_water: 1\r\nreg_iColorEncoder: 24401\r\nreg_IWaterColorEncoder: 1601\r\n\r\n

    Using 'Command recognition' of

    \iTemp1: \i\v
    \iTemp2: \i\v

    pulls the appropriate data from the string for the relevant Virtual Input.
    Zuletzt geändert von Tico; 01.12.2016, 22:11.
    Ich spreche kein Deutsch. Gib Google Translate die Schuld, wenn ich unverständlich bin.

    Kommentar

    Lädt...