JTK – Notes and Ramblings Things we have found …

1/25/2023

Mighty Mule and LaCrosse Update

Filed under: General,Home Automation,RTL-SDR — taing @ 4:45 pm

It turns out there is another Mighty Mule Driveway Alarm somewhere in the neighborhood so the config from our previous article needed to be updated. The other signal is weak but it triggers frequently and requires the config to be a bit more sophisticated. The first step was to update the rtl_433.conf file to send the MQTT messages as a JSON packet:

output json
output mqtt://broker_ip_address,events=rtl_433/garage[/model]

The result looks something like(after I prettied it up with a bit of formatting):

rtl_433/garage/MightyMule-FM231 {
	"time":"2023-01-24 18:37:05.994411",
	"model":"MightyMule-FM231",
	"count":1,
	"num_rows":1,
	"len":9,
	"data":"ff8",
	"battery_ok":"0",
	"id":15,
	"motion":"true",
	"mod":"ASK",
	"freq":433.89011,
	"rssi":-9.5411,
	"snr":12.69084,
	"noise":-22.2319
}

It’s all the same data but in one message. The Openhab config gets changed to have a String Channel for the MQTT JSON packet, an String Item linked to this and two additional String Items a new rule will manipulate. The rule checks the if the id matches our unit and then updates the appropriate items. The id is set on the transmitter and receiver with the dip switches. The rule is very basic but it does the job:

rule "Driveway Alarm" when
  Item Mighty_Mule_JSON received update
then
  var jsonval = Mighty_Mule_JSON.state.toString
  var id = transform("JSONPATH", "$.id", jsonval)
  var time = transform("JSONPATH", "$.time", jsonval)
  if (id == "5") {
    MightyMule_Driveway_Motion.postUpdate("ON")
    MightyMule_Driveway_Motion_Change.postUpdate(time)
  }
end

Changing the rtl_433 MQTT output to be JSON also required updating the channels for the LaCrosse Weather station. Previously the Generic MQTT Thing had channels for individual MQTT messages for temperature, humidity, wind speed and wind direction. Now the JSON messages from the weather station require the channel to have a JSONPATH transformation. The weather station will send two messages, one with temperature and humidity and one with wind speed and direction:

rtl_433/garage/LaCrosse-TX141W {
	"time":"2023-01-24 18:09:36.626950",
	"protocol":73,
	"model":"LaCrosse-TX141W",
	"id":149742,
	"channel":0,
	"battery_ok":1,
	"temperature_C":-0.8,
	"humidity":74,
	"test":0,
	"mic":"CRC",
	"mod":"ASK",
	"freq":433.87334,
	"rssi":-0.135693,
	"snr":22.09624,
	"noise":-22.2319
}

rtl_433/garage/LaCrosse-TX141W {
	"time":"2023-01-24 18:09:36.626950",
	"protocol":73,
	"model":"LaCrosse-TX141W",
	"id":149742,
	"channel":0,
	"battery_ok":1,
	"wind_avg_km_h":4.5,
	"wind_dir_deg":139,
	"test":0,
	"mic":"CRC",
	"mod":"ASK",
	"freq":433.87334,
	"rssi":-0.135693,
	"snr":22.09624,
	"noise":-22.2319
}

A MQTT channel with a topic of rtl_433/garage/LaCrosse-TX141W will receive both messages. The trick is in the JSONPATH transformation. To extract temperature, for example, use JSONPATH:$.temperature_C. This means there are four channels with the same MQTT topic and different JSONPATH transformations. The log file will get warnings that you can’t extract wind speed from the temp/humidity message or temp/humidity from the wind message.

NOTE: Our LaCrosse S81120-INT includes the LaCrosse TX145WSDTH which sends messages as LaCrosse-TX141W.

?

5/30/2022

Updates and a new RTL-SDR

Filed under: Home Automation,RTL-SDR — Tags: , — taing @ 5:53 pm

Time for some updates and to add the new RadarBox 978 MHz radio. The system is still Raspian based on Buster. Keep in mind the initially the RTL-SDR for ads-b data is device 1(RTL2832U) and the weather station data is on device 0(RTL2838UHIDIR).

I’ll take these things somewhat in the order originally installed. readsb(our option over the other dump1090 alternatives) can be updated using the same bash script that was used for the install. Be sure to keep your current /etc/default/readsb file.

sudo bash -c "$(wget -O - https://github.com/wiedehopf/adsb-scripts/raw/master/readsb-install.sh)"

tar1090(an improved web page to display your data) can be updated much like readsb using the original install script.

sudo bash -c "$(wget -nv -O - https://github.com/wiedehopf/tar1090/raw/master/install.sh)"

FlightAware is updated from your site’s My ADS-B Stats page. Once on your stats page, click on the gear and choose update.

Instruction for updating ADSBexchange can be found on their github page. The short answer is a bit of command line:

curl -L -o /tmp/axupdate.sh https://github.com/adsbxchange/adsb-exchange/raw/master/update.sh
sudo bash /tmp/axupdate.sh

FlightRadar24 should update from its repository with apt-get.

Updating graphs1090 is once again as simple as running the original install script again.

sudo bash -c "$(curl -L -o - https://github.com/wiedehopf/graphs1090/raw/master/install.sh)"

I found nothing on the RadarBox site regarding updates so I left it alone for now.

At this point everything should work as before with ADSBexchange, FlightAware, FlightRadar24 and RadarBox all still working.

Now it is time to update the serial numbers on the dongles, add the new 978MHz dongle and update the existing config files to work with that info. I used the notes at dump978-fa install instructions to set the serial numbers of the dongles. The RadarBox flightstick instructions also show how to update the serial numbers. I also updated /etc/rtl_433/rtl_433.conf to point to my new device with serial number 433(rtl_eeprom -s 433) for the LaCrosse Weather Station.

I then continued to follow the dump978 instructions.

sudo apt update
sudo apt install -y dump978-fa
sudo sed -i -e 's/RECEIVER_OPTIONS.*/RECEIVER_OPTIONS="--sdr-gain 43.9 --sdr driver=rtlsdr,serial=978 --format CS8"/' /etc/default/dump978-fa
sudo systemctl restart dump978-fa

Then a quick install of the ADS-B exchange UAT/978 feed client following the github instructions.

sudo bash -c "$(wget -q -O - https://raw.githubusercontent.com/adsbxchange/adsbexchange-978/master/install.sh)"

A quick edit to /etc/rbfeeder.ini to enable UAT/978MHz and a reboot and we are in business.

http://<pi-ip>/tar1090/
http://<pi-ip>/ax978/
http://<pi-ip>/radar/
http://<pi-ip>/graphs1090/
http://<pi-ip>:8754/

https://flightaware.com/adsb/stats/user/xxx
https://www.adsbexchange.com/myip/
https://www.flightradar24.com/account/feed-stats/?id=xxxxx
https://www.radarbox.com/stations/xxxxxx

12/20/2020

Roku Remote Control

Filed under: General,Home Automation,RTL-SDR — taing @ 10:36 pm

Back in April I mentioned adding some Roku remote control. At this point I’m thinking more javascript than Python.

Roku has a good External Control Protocol reference online.

Sending commands

Unfortunately, the Roku API will not accept Cross Origin Request. This is not an issue if communicating from Node or Python but from the browser using xhr or fetch() you will get CORS errors. When sending POST for button presses you don’t care about the response for a “mode:’no-cors’ ” will work.

let resp = await fetch("http://roku-ip:8060/keypress/play", {method:'POST', mode:'no-cors'})

For the GET for status from the browser one option is a “proxy” add the “Access-Control-Allow-Origin” header. Borrowing the idea from https://medium.com/gitignore/building-a-roku-remote-web-app-1c0db0056be4 we set our Apache web server.

sudo pico /etc/apache2/apache2.conf to edit the config file and add the following lines:

<Location /roku>
    ProxyPass "http://roku-ip:8060/"
    ProxyPassReverse "/" 
    Header add "Access-Control-Allow-Origin" "*"
</Location>

You will need to have several modules loaded in Apache for this to work: headers and proxy_http. This can be done with:

sudo a2enmod proxy_http
sudo a2enmod headers
sudo systemctl restart apache2

Deep Links

A very important link for launching directly into netflix content is https://unogs.com/search/. From this site you can find the contentid for much of the netflix content.

This allows for directly linking to content with something like:

curl -d '' "http://roku-ip:8060/launch/12?contentid=70136120&mediatype=series"

This is a simple POST to the URL with no body.

The folks at unofficial Netflix online Global Search also provide an API.

12/13/2020

IR Blaster

Filed under: General,Home Automation,RTL-SDR — taing @ 3:30 pm

We get started with the Sparkfun WRL-15031. The hook-up guide is a good place to start. I am using the  IR Controller ESP8266 firmware.

I don’t have PlatformIO installed so I used the standard Arduino IDE. This was my first time with the ESP8266 so I needed to add the ESP8266 Arduino Core. In the current Arduino IDE this can be done by adding https://arduino.esp8266.com/stable/package_esp8266com_index.json to  the File>Preferences>Additional Boards Manager URLs field of the Arduino IDE. Then using the Board Manager from the Tools > Board menu you can install the esp8266 platform.

Once you have the IDE installed and the board set to Generic ESP8266 you need to make sure you have some libraries installed. ESP8266WebServer, ESP8266WiFi and WiFiManager but you may need to install ArduinoJson, Time and IRremoteESP8266.

It’s time to load the sketch, compile and upload.

The key here is to make sure you set the IO pin definitions correctly.

const int pinr1 = 13; // Receiving pin
const int pins1 = 4; // Transmitting preset 1
const int pins2 = 12; // Transmitting preset 2
const int pins3 = 12; // Transmitting preset 3
const int pins4 = 12; // Transmitting preset 4
const int configpin = 0; // Reset Pin
const int ledpin = 5;

I changed getExternalIP = false; and removed the user_id related and Alex integration code. I set ntpServerName to my internal NTP server. I changed the ntp sync time from 5 minutes to 12 hours near the end of the setup() function: setSyncInterval(43200);.

Once the code is compiled and loaded some testing is needed. On the initial run the ESP will be in AP mode with a SSID of IR Controller Configuration. You can connect and set access point info, hostname, static IP, subnet mask, port, default gateway and passcode.

Once you’re able to connect it is time to find some IR codes. There is a bit of good info in the Tasmota IR page. I found Sony DVD player remotes and some of the IR controlled LED votive candles. There is also good info for Samsung and Vizio TVs online. The codes from http://remotecentral.com often need to be manipulated before they are compatible with the ESP IR library. I created a Excel spreadsheet with worksheets for Vizio, Sony and Samsung.

Once we have the codes we can start controlling things from the web. For example:

http://someip:port/msg=msg?code=E0E040BF:SAMSUNG:32&pass=1234&simple=1

will send a power on/off command of 32 bits in SAMSUNG format. After testing a bit of this I created a simple webpage to send a variety of codes.

There is more Arduino IR blaster info at Ken Shirriff’s blogpost 1 and post 2. For more info on Sony codes refer to https://www.sbprojects.net/knowledge/ir/sirc.php and http://www.hifi-remote.com/sony/.

For the record: Toshiba remote: SE-R0047, Vivio Remote unmarked, Sony Remote RMT-B119A, JVC Remote: RM-S212U.

12/5/2020

screen at startup

Filed under: General,Home Automation,RTL-SDR — taing @ 11:33 pm

Sometimes it would be nice to have screen start a detached session at start-up. This isn’t complicated. There are two steps. The first is to create a script to be run in the detached session and make it executable. We’ll call it start.sh.

pico start.sh
chmod +x start.sh

The second is to edit /etc/rc.local to have the script run inside screen at start-up. Add the following line before the exit 0 line.

su - pi -c "screen -dm -S pistartup ~/start.sh"

That’s all there is to it. I found notes on this at https://coderwall.com/p/quflrg/run-a-script-on-startup-in-a-detached-screen-on-a-raspberry-pi.

12/4/2020

More Flight tracking – adding RadarBox

Filed under: General,RTL-SDR — Tags: , — taing @ 5:55 pm

Radarbox.com is another flight tracking site similar to FlightAware, ADSB-Exchange and FR24. Instructions for feeding to Radarbox can be found at https://www.radarbox.com/sharing-data. Like most of the similar sites, feeding will get you an upgraded account for free. If you are already feeding others it is as simple as downloading and running a bash script.

Once you download and run the script a new repo will be added and their custom feeder app will be installed. Once their feeder starts running you can use sudo rbfeeder --showkey to see what your “key” is. A quick visit to the Radarbox website to create an account then “claim” your system at http://radarbox.com/raspberry-pi/claim and you are good to go.

6/21/2020

Update to LaCrosse weather

Filed under: General,Home Automation,RTL-SDR — taing @ 5:51 pm

While these updates were made a while ago they weren’t documented. In the original post on the LaCrosse Weather station, rtl_433 sends mqtt data to our openhab server. On github we found a simple means to get rtl_433 to run as a service.

The core is to update /etc/rtl_433/rtl_433.conf. There is a sample file at conf/rtl_433.example.conf. Most important is the output mqtt... line for example:

output mqtt://jtk-openhab,devices=rtl_433/garage[/model]

If the Pi has multiple dongles you will also need to confirm the device line. Then create /etc/systemd/system/rtl_433-mqtt.service:

[Unit]
Description=rtl_433 to MQTT publisher
After=network.target
[Service]
ExecStart=/usr/local/bin/rtl_433
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target

Enable the service with systemctl enable rtl_433-mqtt.service.

4/3/2020

Weather radio part 4

Filed under: General,Home Automation,RTL-SDR — taing @ 1:23 pm

Continuing the weather radio development. I found some notes on to try sox instead of lame for the encoding for ezstream. This requires installing the mp3 library for sox with sudo apt-get install libsox-fmt-mp3. This appears to provide for somewhat better sound quality.

This means we replace

lame --bitwidth 16 --signed -s 22050 --lowpass 3500 --abr 64 --scale 8 -r -m m - -

with

sox -t raw -r 22050 -b 16 -e signed -c 1 -v 7 - -r 22050 -t mp3 -c 1 -C 64 - sinc -3.5k

The final line:

rtl_fm -f 162550000 -s 22050 -p 14 | tee >(sox -t raw -r 22050 -b 16 -e signed -c 1 -v 7 - -r 22050 -t mp3 -c 1 -C 64 - sinc -3.5k |ezstream -c ezstream.xml) | multimon-ng -t raw -a EAS /dev/stdin | python ~/tg-dsame/dsame.py --no-text --mqtt jtk-pi2 --json output.json

Weather Radio Part 3

Filed under: General,Home Automation,RTL-SDR — taing @ 10:19 am

The weather radio scripts from before had issues. The live stream from the SDR was working but the alerts were never being triggered so further work was needed.

There are now at least two other forks of the original dsame project. From nivex we have some reworking of the main dispatch routine. And from bwarden we have a reworking of the parser.

I have cloned bwarden as the new starting point and merged a portion of the nivex changes. A copy of this version of dsame.py can be found here. Or you can look at my fork on github.

Step 1 was to get the output into a json format without the text. Fortunately, this is pretty much built it. For a test using the sample txt file:

python dsame.py --no-text --json /dev/stdout <sample\ alert/WXR-RWT.txt

This has the added bonus of writing to standard out immediately and not waiting/buffering until process end.

With this working lets try to update dsame.py to output to MQTT. I’m working from a machine that already has Mosquito installed along with the Python paho library.

Let’s try adding a bit to the dsame code. The big piece looks like:

            if mqtthost:
                try:
                    import paho.mqtt.publish as mqtt
                    import json
                    data=kwdict(ORG=ORG, EEE=EEE, TTTT=TTTT, JJJHHMM=JJJHHMM, STATION=STATION, TYPE=TYPE, LLLLLLLL=LLLLLLLL, COUNTRY=COUNTRY, LANG=lang, event=get_event(EEE), type=get_indicator(EEE), end=fn_dt(alert_end(JJJHHMM,TTTT)), $
                    mqtt.single('raw/weatherAlert',json.dumps(data), hostname=mqtthost)
                except Exception as detail:
                        logging.error(detail)
                        return

Hopefully he output looks something like this(extra linefeeds added for clarity):

{"LANG": "EN", 
 "organization": "National Weather Service", 
 "end": "07:30 PM", 
 "JJJHHMM": "3650000", 
 "LLLLLLLL": "KEAX/NWS", 
 "COUNTRY": "US", 
 "PSSCCC": "020103-020209-020091-020121-029047-029165-029095-029037", 
 "seconds": 1800, 
 "PSSCCC_list": ["020091", "020103", "020121", "020209", "029037", "029047", "029095", "029165"], 
 "start": "07:00 PM", 
 "length": "30 minutes", 
 "STATION": "KEAX", 
 "TTTT": "0030", 
 "location": "Pleasant Hill, Missouri", 
 "date": "Thu Apr  2 20:44:27 2020", 
 "type": "T", 
 "EEE": "RWT", 
 "ORG": "WXR", 
 "MESSAGE": null, 
 "TYPE": "NWS", 
 "event": "Required Weekly Test"}

The new command line to stream and send mqtt looks like:

rtl_fm -f 162550000 -s 22050 -p 14 | tee >(lame --bitwidth 16 --signed -s 22050 --lowpass 3500 --abr 64 --scale 8 -r -m m - - |ezstream -c ezstream.xml) | multimon-ng -t raw -a EAS /dev/stdin | python ~/tg-dsame/dsame.py --no-text --mqtt hostname_here --json output.json
  1. receive from the SDR dongle
  2. split stdin – tee redirects to
    1. lame
    2. ezstream
  3. tee pipes to
    1. multimon-ng
    2. dsame script – sends to
      1. mqtt
      2. json appends to output.json file

A different option to multimon-ng might be minimodem. I claims to convert SAME audio to text and back again.

4/2/2020

Doorbell and Gas meter

Filed under: Home Automation,RTL-SDR — taing @ 3:51 pm

In looking for the Honeywell doorbell, model RCWL330A, FCC ID HS9-51459SL, which should be at 916.8MHz I found my gas meter (rtl_433 device 149). The output looks like:

time      : 2020-04-02 14:04:27
model     : ERT-SCM      Id        : 5458xxxx
Physical Tamper: 3       ERT Type  : 24            Encoder Tamper: 0         Consumption Data: 525682
Integrity : CRC
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : 2020-04-02 14:05:02
model     : ERT-SCM      Id        : 5600xxxx
Physical Tamper: 0       ERT Type  : 8             Encoder Tamper: 0         Consumption Data: 208204
Integrity : CRC
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : 2020-04-02 14:07:28
model     : ERT-SCM      Id        : 5458xxxx
Physical Tamper: 3       ERT Type  : 24            Encoder Tamper: 0         Consumption Data: 525682
Integrity : CRC
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : 2020-04-02 14:07:55
model     : ERT-SCM      Id        : 5458xxxx
Physical Tamper: 3       ERT Type  : 24            Encoder Tamper: 0         Consumption Data: 525682
Integrity : CRC
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

I’ve modified the Id field to but this above shows both my meter and the neighbors. A quick check of wikipedia gives a few more details on the data. Github also has a project targeting these meters – rtlamr. Grid Insite has more detail on the technology and history of these meters.

Now, back to the doorbell. I was hoping this might be a built in device for rtl_433 but further searching reveals it might be different from the predefined devices 115 & 116. Strangley I see nothing from the doorbell but is still rings. Further testing obviously needed.

4/1/2020

Updates to flight tracking

Filed under: General,Home Automation,RTL-SDR — Tags: , — taing @ 3:21 pm

After not changing the pi for the outdoor temp/humidity I2C sensor, I decided to use the Pi 3 to replace the older Pi 2 that was doing the ads-b flight tracking and feeding on FlightRadar24. This started with rtl_433 already and installed and working as described in an earlier post. rtl_433 is not required but having installed it I’m sure rtl_sdr is installed and the udev rules for the dongle are already in place. I decided to try readsb instead of dump1090-fa. And dump1090-mutability is now marked as maintained.

I found automated scripts for both dump1090-fa and readsb. The script for readsb seems to have worked. I have the webpage at both http://<host>/radar and http://<host>:8080. Script archived here.

The enhanced tar1090 web interface is installed next. The new interface can be seen at http://<host>/tar1090.

Adding a bit of config info:

Set your location with sudo readsb-set-location 50.12344 10.2342.

sudo pico /etc/default/readsb to edit the main config file.

In the case of more than one RTL-SDR dongle in the Pi you may need to modify the line RECEIVER_OPTIONS="--device 0 --device-type rtlsdr --gain -10 --ppm 0" for the correct device number.

sudo pico /usr/share/readsb/html/script/readsb/defaults.js to edit the default webinterface config.

sudo pico /etc/default/tar1090 to edit the tar1090 web interface configuration. A restart with sudo systemctl restart tar1090 is needed after any changes.

Next we’ll add PiAware so we can feed FlightAware some of our data.

wget https://flightaware.com/adsb/piaware/files/packages/pool/piaware/p/piaware-support/piaware-repository_3.8.1_all.deb
sudo dpkg -i piaware-repository_3.8.1_all.deb

sudo apt-get update
sudo apt-get install piaware

sudo piaware-config allow-manual-updates yes

If you are upgrading/replacing and existing site you can use piaware-config feeder-id 12345678-1234-1234-1234-123456789abc to set the site id. You will need to restart the service after making the change.

Confirm your FlightAware feed at https://flightaware.com/adsb/stats. You can make an account and update your position. The service status can be seen with sudo service piaware status.

Next we will add ADSB Exchange feeder:

sudo apt-get install git
sudo rm adsb-exchange -rf
git clone https://github.com/adsbxchange/adsb-exchange.git
cd adsb-exchange
sudo bash setup.sh

If that is successful you should be able to find yourself at https://www.adsbexchange.com/myip/

Now we can add the ADSBX stats package for feeders:

cd /home/pi
git clone https://github.com/adsbxchange/adsbexchange-stats.git
cd adsbexchange-stats
chmod +x install.sh
sudo ./install.sh

Flightradar24 instructions from their forums are not 100%. The contents of the script referenced does not completely match the manual steps. There are alternative but similar instructions in a different forum post.

sudo apt-key adv --recv-key --keyserver pool.sks-keyservers.net C969F07840C430F5
sudo nano /etc/apt/sources.list

then add the following line to the file (/etc/apt/sources.list)

deb http://repo.feed.flightradar24.com flightradar24 raspberrypi-stable
sudo apt-get update
sudo apt-get install fr24feed
fr24feed --signup
sudo systemctl restart fr24feed.service

There might be a warning you that there is no dump1090 installed and that one will be installed by fr24feed when it starts. This did not appear to happen.

You can monitor status for the fr24feed with fr24feed-status or at http://<host>:8754.

Next we add graph1090 following the install instructions in the readme. The graphs are then available at http://<host>/graphs1090 or http://<host>/pref.

The graph1090 instructions recommend reducing the number of sd card writes for a pi. Below with reduce the writes to once every 10 minutes.

sudo tee /etc/sysctl.d/07-dirty.conf <<EOF
vm.dirty_ratio = 40
vm.dirty_background_ratio = 30
vm.dirty_expire_centisecs = 60000
EOF

3/31/2020

Adding Lacrosse Weather to Garage Pi

Filed under: General,Home Automation,RTL-SDR — taing @ 6:54 pm

The sdr stick we are using is the NooElec R820T.

Following the instructions from https://morioh.com/p/fd9b47cbc020 :

# install dependencies
sudo apt-get install libtool libusb-1.0.0-dev librtlsdr-dev rtl-sdr cmake

# clone rtl_433 Git Repository
git clone https://github.com/merbanan/rtl_433.git

# change to directory
cd rtl_433/
# make build folder
mkdir build
cd build/
# compile
cmake ../
# make
make
# install
sudo make install
# test if rtl_433 was properly installed
rtl_433 -h

After this we copied the udev rules from https://github.com/osmocom/rtl-sdr/raw/master/rtl-sdr.rules to /etc/udev/rules.d/rel-sdr.rules. This resolves the permission issue access the dongle when not root.

A test of rtl_433 then see the LaCrosse Technologies TX145WSDTH remote temp/humidity/wind speed/wind direction sensorthat came with the S81120 base station.

rtl_433 -F mqtt:<host>:1883 is enough to get things going to the mqtt broker on the destination machine.

Sample Output as seen on the destination PC using mosquitto_sub -v -t '#' :

rtl_433/jtk-garage/events {"time":"2020-03-31 16:31:10","model":"LaCrosse-TX141W                                                                                                                                                             ","id":303173,"channel":0,"battery_ok":1,"temperature_C":5.1,"humidity":75,"test                                                                                                                                                             ":0,"mic":"CRC"}
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/time 2020-03-31 16:31:10
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/id 303173
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/channel 0
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/battery_ok 1
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/temperature_C 5.1
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/humidity 75
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/test 0
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/mic CRC
rtl_433/jtk-garage/events {"time":"2020-03-31 16:31:10","model":"LaCrosse-TX141W","id":303173,"channel":0,"battery_ok":1,"wind_avg_km_h":3.5,"wind_dir_deg":351,"test":0,"mic":"CRC"}
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/time 2020-03-31 16:31:10
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/id 303173
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/channel 0
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/battery_ok 1
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/wind_avg_km_h 3.5
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/wind_dir_deg 351
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/test 0
rtl_433/jtk-garage/devices/LaCrosse-TX141W/0/303173/mic CRC

Now we can edit the openhab files to make use of this info…

Older Posts »

Powered by WordPress