Platform information:
- Hardware: Raspberry Pi 3 Model B Rev 1.2 // 1GB RAM // 32GB SD
- OS: Raspbian GNU/Linux 10 (buster) // Linux 4.19.75-v7+
- Java Runtime Environment: openjdk version (build: 1.8.0_222)
- openHAB version: openHAB 2.5.0-1 (openHABian)
Issue of the topic: Question about manually sending a Modbus poll (remotely) and feedback on my first set-up.
Dear openHAB-community,
is it possible to somehow send a individual modbus poll remotely without implementing it as a specific data thing just using the general format of modbus?
Lets says i want to change the adres of my sensor with this command:
Is it possible to somehow directly send that poll in hexadecimal form? And is it somehow possible doing that remotely via VPN/reverse proxy or some other solution and connecting via SSH/openhab console?
My complete first set-up:
I would love get some feedback. Are there things i should to differently?
Binding, persistences, transformations etc. used:
Modbus, ntp, influxdb, transformation-javascript - 2.5.1, Grafana v6.5.3
Modbus_senor.things:
// Brigde to the physical RS-485 connection, defining the connection parameters
Bridge modbus:serial:slave01
[port="/dev/ttyUSB0",baud=9600,id=1,stopBits="1.0",parity="none",dataBits=8,encoding="rtu"]
{
// Data pollers for temp and humidity registers
Bridge poller SensorRead1[start=1, length=2, refresh=1000, type="input"]
{
Thing data temperature1 [readStart="1", readValueType="int16", readTransform="JS(IntToFloat.js)"]
Thing data humidity1 [readStart="2", readValueType="uint16", readTransform="JS(IntToFloat.js)"]
}
}
Local_Time.things:
DateTime Local_date_time "Date/time:" {channel="ntp:ntp:my_local_time:dateTime"}
.items:
Number Humidity_read "Relative humidity: [%.1f/100 %%]" {channel="modbus:data:slave01:SensorRead1:humidity1:number"}
Number Temperature_read "Temperature: [%.1f °C]" {channel="modbus:data:slave01:SensorRead1:temperature1:number"}
DateTime Local_date_time "Date/time:" {channel="ntp:ntp:my_local_time:dateTime"}
Transforms(IntToFloat.js):
(function(inputData) {
var DIVISiON_FACTOR = 10;
return parseFloat(inputData) / DIVISiON_FACTOR;
})(input)
.sitemap:
sitemap HVAC label="HVAC Monitoring"
{
Frame label="Local Date & Time" {
Text item= Local_date_time label="Time:[%1$tH:%1$tM:%1tS]" icon="time"
Text item= Local_date_time label="Date:[%1$td.%1$tm.%1$tY]" icon="calendar"
}
Frame label="Modbus Sensor 1" {
Default item= Humidity_read icon="humidity" label="Relative humidity: [%.1f %%]"
Default item= Temperature_read icon="temperature" label="Temperature: [%.1f °C]"
}
}
BasicUI:
Habpanel with Grafana:
Thanks for any feedback and help in advance!
Sancho