Hi,
I am working on LoRa and am trying to integrate LoRa “things” (using TTN network) in OH. Therefore I installed MQTT on my OH (1.8.3). Result is that in the log file it says that MQTT client is generated, MQTT binding and event bus binding is done successfully.
I have a couple of issues:
1> Is there a way to see the raw incoming messages? Have changed the logback.xml and included DEBUG logging for binding.mqtt and io.transport.mqtt - however cannot see message details in the logs.
2> When e.g. the message only contains temperature I believe the following must be done: Create item and define the transformation/regex that must be done to extract the temperature information from the MQTT message - agree?
Number LoRa_Temp “LoRa temp [%s]” {mqtt="<[TTN:70B3D57ED0000285/devices/0000000031D2E38E/up:state:transform / regex]"}
3> The TTN broker sends message which comtain quite a bit of info. On Node-Red I can easily decode them and am wondering what the best way is to do this on OH. In the end I want to use the information in the payload (base64 encoded). Below an example:
{“payload”:“W3sibGF0IjoiNTIuMTgxODU0MCJ9LCB7ImxuZyI6IjUuOTM5OTk5MSJ9LHsiYWx0IjoiIDQ1LjcifSx7ImNycyI6IjEzNC43NiJ9LHsia21oIjoiIDAuMzEifV0=”,“port”:1,“counter”:106,“dev_eui”:“0000000031D2E38E”,“metadata”:[{“frequency”:868.1,“datarate”:“SF7BW125”,“codingrate”:“4/5”,“gateway_timestamp”:1773600928,“channel”:0,“server_time”:“2016-06-30T09:12:08.952785832Z”,“rssi”:-49,“lsnr”:9,“rfchain”:0,“crc”:1,“modulation”:“LORA”,“gateway_eui”:“5CCF7FFFFF1B7205”,“altitude”:0,“longitude”:0,“latitude”:0}]}
Thanks,
Jeroen