Bit out of my depth here and still reading but is there an easy way to test the JSONPATH transformation is working correctly please. Some posts say that jsonpath transformation needed reinstalling, did this through paperui but no change and am trying to avoid a complete reinstall until I understand the problem
I’ve gone through several tutorials and posts around getting 3 sonoff (tasmota) devices working with openhabian 2.2. on a pi2. Zulu 8.25.076.
I can power them on/ off in habpanel but the reading for the wifi connection strength (RSSI) shows as null in habpanel
I’ve learned a lot so far and am still trying to RTFM but am slowly drowning on this one. Help please.
Am I right that you use either addons.cfg _OR_paperui to install the transform (I’ve used the later but may be missing some config steps with it?
Output from MQTT-SPY
{"Time":"2018-05-05T10:55:34","Uptime":"0T09:15:15","Vcc":3.277,"POWER":"OFF","Wifi":{"AP":1,"SSId":"VM843376-2G","RSSI":40,"APMac":"C0:FF:D4:23:2A:30"}}
sonoff.items
Switch sonoff_basic1 "sonoff_basic1" <power> (LR,gpower){ mqtt=">[broker:cmnd/sonoff_basic1/POWER:command:*:default],<[broker:stat/sonoff_basic1/POWER:state:default]", autoupdate="false" }
Switch sonoff_slampher1 "sonoff_slapmher1" <power> (LR,gpower){ mqtt=">[broker:cmnd/sonoff_slampher1/POWER:command:*:default],<[broker:stat/sonoff_slampher1/POWER:state:default]", autoupdate="false" }
Switch sonoff_pow1 "sonoff_pow1" <power> (LR,gpower){ mqtt=">[broker:cmnd/sonoff_pow1/POWER:command:*:default],<[broker:stat/sonoff_pow1/POWER:state:default]", autoupdate="false" }
Switch sonoff_basic1_reachable "sonoff_basic1:reachable" (gReachable){ mqtt="<[broker:tele/sonoff_basic1/LWT:state:MAP(reachable.map)]" }
Switch sonoff_pow1_reachable "sonoff_pow1:reachable" (gReachable){ mqtt="<[broker:tele/sonoff_pow1/LWT:state:MAP(reachable.map)]" }
Switch sonoff_slampher1_reachable "sonoff_slampher1:reachable" (gReachable){ mqtt="<[broker:tele/sonoff_slampher1/LWT:state:MAP(reachable.map)]" }
Number sonoff_basic1_RSSI "sonoff basic1: RSSI [%d %%]" (gRSSI){ mqtt="<[broker:tele/sonoff_basic1/STATE:state:JSONPATH($.Wifi.RSSI)]" }
Number sonoff_pow1_RSSI "sonoff_pow1: RSSI [%d %%]" (gRSSI){ mqtt="<[broker:tele/sonoff_pow1/STATE:state:JSONPATH($.Wifi.RSSI)]" }
Number sonoff_slampher1_RSSI "sonoff_slampher1: RSSI [%d %%]" (gRSSI){mqtt="<[broker:tele/sonoff_slampher1/STATE:state:JSONPATH($.Wifi.RSSI)]" }
//Maintenance
String Sonoff_Action "Sonoff Action" <sonoff_basic1>
String Sonoff_Action "Sonoff Action" <sonoff_pow1>
String Sonoff_Action "Sonoff Action" <sonoff_slampher1>
String Sonoff__basic1_Current_FW_Available "Current Release [%s]" <sonoff_basic1> (Sonoff_Maintenance) { http="<[tasmotaRelease:10000:JSONPATH($[0].name)]"}
NB I’ve tried it with $.StatusSTS.Wifi.RSSI as per the tutorial but I think it should be as above? - am I right?
mqtt.cfg
#
# Define your MQTT broker connections here for use in the MQTT Binding or MQTT
# Persistence bundles. Replace <broker> with an ID you choose.
#
# URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883
broker.url=tcp://localhost:1883
# Optional. Client id (max 23 chars) to use when connecting to the broker.
# If not provided a random default is generated.
#<broker>.clientId=<clientId>
# Optional. True or false. If set to true, allows the use of clientId values
# up to 65535 characters long. Defaults to false.
# NOTE: clientId values longer than 23 characters may not be supported by all
# MQTT servers. Check the server documentation.
#<broker>.allowLongerClientIds=false
# Optional. User id to authenticate with the broker.
broker.user=openhabian
# Optional. Password to authenticate with the broker.
#<broker>.pwd=<password>
# Optional. Set the quality of service level for sending messages to this broker.
# Possible values are 0 (Deliver at most once),1 (Deliver at least once) or 2
# (Deliver exactly once). Defaults to 0.
#<broker>.qos=<qos>
# Optional. True or false. Defines if the broker should retain the messages sent to
# it. Defaults to false.
broker.retain=true
# Optional. True or false. Defines if messages are published asynchronously or
# synchronously. Defaults to true.
broker.async=false
# Optional. Defines the last will and testament that is sent when this client goes offline
# Format: topic:message:qos:retained <br/>
#<broker>.lwt=<last will definition>
I’m sure I’m missing something obvious but not sure what. Should there be a rule or something in the transforms folder for this?
Happy to get logs if someone can help me filter for the right things - it’s being filled up with the Sony TV binding searching for the TV at the moment