Skip to content

getting output from a temperature sensor #26

@hboetes

Description

@hboetes

I'm trying to get data from a simple temperature sensor over the network via modbus. The device is accessible via the provided windows software, but doing it with modbus-cli would be much nicer.

The device (https://www.elen.sk/en/Products/temperature-humidity-led-displays-sensors/air-temperature-and-humidity/ths-sensor-40-poe-lan.html) has 2 registers, 0 for temperature and 10 for humidity, and I'd think I would get output like this, but I don't.

h.boetes@habocp3 ~ %  modbus 10.10.11.22:502 0x0             
Parsed 0 registers definitions from 1 files
h.boetes@habocp3 ~ %  modbus 10.10.11.22:502 0xa
Parsed 0 registers definitions from 1 files
h.boetes@habocp3 ~ %  modbus 10.10.11.22:502 0x10
Parsed 0 registers definitions from 1 files

The program uses sample template XML files like this:

<?xml version="1.0" encoding="UTF-8"?>
<elensensorconfigurator version="2.00.00">
  <description>
    <model>TS Lan</model>
    <interface>Ethernet</interface>
    <protocol>Modbus TCP</protocol>
    <value>Temperature</value>
    <register>0</register>
    <variabletype>I = Int (2 Byte Signed):</variabletype>
    <format>0.0</format>
    <measurement>°C</measurement>
    <lowlimit>21</lowlimit>
    <highlimit>26</highlimit>
    <hysteresis>0.1</hysteresis>
  </description>
  <settings>
    <commport>No use</commport>
    <baudrate>No use</baudrate>
    <parity>No use</parity>
    <data>No use</data>
    <stopbit>No use</stopbit>
    <ipaddress>192.168.0.68</ipaddress>
    <ipport>502</ipport>
    <slaveid>1</slaveid>
  </settings>
  <lng>1051</lng>
  <info>
    <line>THS sensor with Ethernet interface.</line>
    <line></line>
    <line>Temperature [°C] - external sensor connected to Ethernet LAN.</line>
    <line></line>
    <line>MODBUS TCP protocol.</line>
    <line>Register: 0</line>   
  </info>
</elensensorconfigurator>

What would be right way to get the proper output?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions