first commit not working

This commit is contained in:
2025-10-20 11:22:05 +02:00
commit c625b1f446
3 changed files with 50 additions and 0 deletions

7
epluse_rht.cmd Normal file
View File

@@ -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")

20
epluse_rht.db Normal file
View File

@@ -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")
}

23
epluse_rht.proto Normal file
View File

@@ -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"
}