Java Runtime Environment: which java platform is used and what version
openHAB version:2
Issue of the topic: please be detailed explaining your issue
Please post configurations (if applicable):
Items configuration related to the issue
Sitemap configuration related to the issue
Rules code related to the issue
Services configuration related to the issue
If logs where generated please post these here using code fences:
Hi
i am facing problem with bruah Mqtt multi sensor setup in openhab2
i am sucessfully getting mqtt out out
> pi@raspberrypi:/etc/openhab2/items $ mosquitto_sub -h localhost -t bruh/sensornode1 -v
> bruh/sensornode1 {“state”:“OFF”,“color”:{“r”:255,“g”:255,“b”:255},“brightness”:255,“humidity”:“55.50”,“motion”:“standby”,“ldr”:“265”,“temperature”:“80.78”,“heatIndex”:“82.18”}
but un able to display in openahab basic UI
below is items mqtt code
Number temperature2 “Temperature [%.1f°C]” {mqtt="<[broker:bruh/sensornode1:state:JSONPATH($.temperature)]"}
Number temperature3 “Real feel Temperature [%.1f°C]” {mqtt="<[broker:bruh/sensornode1:state:JSONPATH($.heatIndex)]"}
and below is sitemap
sitemap Home label=“MyHome”
{
Frame {
Text item=temperature2
Text item=temperature3
}
}
below is error log
2018-03-01 13:42:59.761 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type JSONPATH
2018-03-01 13:42:59.764 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn’t post update for ‘temperature3’
2018-03-01 13:55:27.560 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type JSONPATH
2018-03-01 13:55:27.564 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn’t post update for ‘temperature2’
Hi
thanks for help now few thing confusion about mqtt and sitemap becuase i am new i used to do work on Home assistant
Number LDR “LDR [%.1f%%]” {mqtt=“<[broker:bruh/sensornode1:state:JSONPATH($.ldr)]”}
how to print this currently its printer as Number
and how to do below mqtt in item and site map
platform: mqtt_json
name: “SN1 LED”
state_topic: “bruh/sensornode1”
command_topic: “bruh/sensornode1/set”
brightness: true
flash: true
rgb: true
optimistic: false
qos: 0
what i have to use for show rgb selection in site map as well in items
I have everything on the multisensor working through Openhab except for the LED. Anyone have an example for changing color, or have the native MQTT cmnd to change it manually from MQTT client?
Thanks!
rule "alarmSetRedlight"
when
Item Motion changed from standby to "motion detected"
then
SensornodeSet.sendCommand("{\"state\":\"ON\",\"color\":{\"r\":255,\"g\":0,\"b\":0}}")
end
rule "alarmNolight"
when
Item Motion changed from "motion detected" to standby
then
SensornodeSet .sendCommand("{\"state\":\"OFF\",\"color\":{\"r\":0,\"g\":0,\"b\":0}}")
end