From c625b1f446d05a1bf0ccfea83a24c066d0df5bc2 Mon Sep 17 00:00:00 2001 From: Alexander Soederqvist Date: Mon, 20 Oct 2025 11:22:05 +0200 Subject: [PATCH] first commit not working --- epluse_rht.cmd | 7 +++++++ epluse_rht.db | 20 ++++++++++++++++++++ epluse_rht.proto | 23 +++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 epluse_rht.cmd create mode 100644 epluse_rht.db create mode 100644 epluse_rht.proto diff --git a/epluse_rht.cmd b/epluse_rht.cmd new file mode 100644 index 0000000..c8c7d45 --- /dev/null +++ b/epluse_rht.cmd @@ -0,0 +1,7 @@ +require asyn +require stream +# Parameterized snippet to load support for the eplue EE31 environmental sensor used at ICON and Neutra. + +drvAsynIPPortConfigure("neutra-sps", "neutra-sps:4001",0,0,0) + +dbLoadRecords("epluse_rht.db", "PREFIX=SQ:NEUTRA, PORT=neutra-sps") diff --git a/epluse_rht.db b/epluse_rht.db new file mode 100644 index 0000000..11f8bd2 --- /dev/null +++ b/epluse_rht.db @@ -0,0 +1,20 @@ +record(bo, "$(PREFIX):FETCH") +{ + field(DTYP, "stream") + field(DESC, "Initialization parameters") + field(OUT,"@epluse_rht.proto fetch_rht($(PREFIX)) $(PORT) 0") + field(SCAN,"1 second") +} + +record(ai, "$(PREFIX):TEMP") +{ + field(DESC, "Temperature") + field(EGU, "degC") +} + +record(ai, "$(PREFIX):RELHUM") +{ + field(DESC, "Relative Humidity") + field(EGU, "%RH") +} + diff --git a/epluse_rht.proto b/epluse_rht.proto new file mode 100644 index 0000000..513b11d --- /dev/null +++ b/epluse_rht.proto @@ -0,0 +1,23 @@ +# A protocol file for a E+E EE31 rhT sensor +# Its a binary protocol + +Terminator = ''; +ReplyTimeout = 3000; + +# unsolicited weight message +fetch_rht { + # First 2 bytes addr, 0 in our case + # 3rd byte is command, fetch rht values + # 4th byte length of message, 2 bytes + # 5th and 6th byte, data. For this case it is 1 + + out 0x0000 0x67 0x02 0x0001 0x6a; + # First 2 bytes is address + # command + # length + # ack + # ack + # 2 ieee_754 floats. + # Read exactly one char, but drop it. crc8 + in 0x0000 0x67 0x0A 0x06 0x06 "%(\$1:TEMP)#R%(\$1:RELHUM)#R%*c" +}