this is my items file-
String A_Temperature “A_Temperature:[%s °C]” {}
String A_Pressure “A_Pressure:[%s mb]” {}
String A_Humidity “A_Humidity:[%s %%]” {}
DateTime Today “Last Updated Time [%1$tH:%1$tM:%1$tS]”{}
String MyString “Value:[%s]” {mqtt="<[mosquitto:ge:state:default]"}
this is my sitemap file-
sitemap test
{
Frame label="ST Board"
{
Text item=A_Pressure
Text item=A_Temperature
Text item=Today
}
}
and this is my rules file
import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*
import org.openhab.core.library.types.DateTimeType
import java.text.util.Calendar
import java.text.SimpleDateFormat
rule “MqttPostionPatrikParse”
when
Item MyString received update
then
var String json=(MyString.state as StringType).toString
var String temp=transform(“JSONPATH”,"$.d.A_Temperature",json)
var String press=transform(“JSONPATH”,"$.d.A_Pressure",json)
var String humi=transform(“JSONPATH”,"$.d.A_Humidity",json)
A_Temperature.sendCommand(temp)
A_Humidity.sendCommand(humi)
A_Pressure.sendCommand(press)
Today.sendCommand(new DateTimeType())
end
And these are working fine in Basic UI.
My question is can I make a binding for openhab2 with the help of these files.