Comments (28)
Yeah I have been getting this lots. It has not worked for me reliably.
from hassio-addons.
i'm trying this now.
from hassio-addons.
I am also seeing this. Also it hangs with nothing in the logs..
from hassio-addons.
I think I resolved it for me. it is a problem with the code in the rtl2mqtt.sh file. Just coded for an outdated version of rtl_433. Try this.
remove
/usr/local/bin/rtl_433 -F json -R $PROTOCOL -f $FREQUENCY -g $GAIN -p $OFFSET | while read line
do
DEVICE="$(echo $line | jq --raw-output '.model' | tr -s ' ' '_')" # replace ' ' with '_'
DEVICEID="$(echo $line | jq --raw-output '.id' | tr -s ' ' '_')"
MQTT_PATH=$MQTT_TOPIC
if [ ${#DEVICE} > 0 ]; then
MQTT_PATH=$MQTT_PATH/"$DEVICE"
fi
if [ ${#DEVICEID} > 0 ]; then
MQTT_PATH=$MQTT_PATH/"$DEVICEID"
fi
# Create file with touch /tmp/rtl_433.log if logging is needed
[ -w /tmp/rtl_433.log ] && echo $line >> rtl_433.log
echo $line | /usr/bin/mosquitto_pub -h $MQTT_HOST -u $MQTT_USER -P $MQTT_PASS -i RTL_433 -r -l -t $MQTT_PATH
done
replace it with (one line)
/usr/local/bin/rtl_433 -M newmodel -R $PROTOCOL -f $FREQUENCY -g $GAIN -p $OFFSET -F "mqtt://$MQTT_HOST:1883,user=$MQTT_USER,pass=$MQTT_PASS,retain=0,events=$MQTT_TOPIC[/model][/subtype][/id]"
from hassio-addons.
I am trying this now. Looks like everything loaded successfully. I will see how long it stays running now. Thanks!!
from hassio-addons.
This is not working for me. This changes the MQTT topic as well as the payload sent to MQTT. I have tried to modify my Node Red automations to the new topic, but does not ever trigger. I do see the messages are getting to the MQTT broker. Also when the add on fails to talk to the dongle, there are no messages. I have had to revert back to the previous lines that were removed.
from hassio-addons.
Bummer. Have you tried a ruibuild of the addon?
from hassio-addons.
Yes, I have tried to rebuild as well. I am going to order another brand dongle to verify that I am not having hardware issues.
Looking at using this part on Amazon... B01GDN1T4S.
Thoughts on a good quality SDR dongle? I am using it on 319.5 Mhz.
from hassio-addons.
I am using this one on my pi3 b+ same frequency.
https://www.amazon.ca/dp/B00PAGS0HO/ref=cm_sw_r_other_apa_i_S13gEb9FEERHA
from hassio-addons.
The command line I shared above you can modify to try and match your previous mqtt topics.
from hassio-addons.
Can you share the mqtt messages you receive and would like to keep receiving?
from hassio-addons.
Thats the same dongle I am using, just different logo and brand. It's the same shape and color.
Here is what I am expecting.. on topic "homeassistant/sensor/Interlogix/aac6da"
{
"time": "2020-01-12 14:20:20",
"model": "Interlogix",
"device_type": "contact",
"id": "aac6da",
"battery": "OK",
"switch1": "OPEN",
"switch2": "OPEN",
"switch3": "CLOSED",
"switch4": "OPEN",
"switch5": "OPEN",
"raw_message": "8d14a4"
}
Here is the topic I was getting with your update.. " homeassistant/sensor/Interlogix-Security/contact/aac6da"
{
"time": "2020-01-12 14:23:08",
"model": "Interlogix-Security",
"subtype": "contact",
"id": "aac6da",
"battery_ok": 1,
"switch1": "OPEN",
"switch2": "OPEN",
"switch3": "CLOSED",
"switch4": "OPEN",
"switch5": "OPEN",
"raw_message": "cd15b4"
}
I think some of those other lines that I remarked out look to be modifying the model, but I am not that good with coding. I tried to just swap out the driver loading line with yours, but no luck as well...
Thanks for your help!!
from hassio-addons.
Use this line.
/usr/local/bin/rtl_433 -R $PROTOCOL -f $FREQUENCY -g $GAIN -p $OFFSET -F "mqtt://$MQTT_HOST:1883,user=$MQTT_USER,pass=$MQTT_PASS,retain=0,events=$MQTT_TOPIC[/model][/id]"
from hassio-addons.
With or without those additional lines that you had removed earlier?
from hassio-addons.
from hassio-addons.
I do not see the -M in your new line...
So I am getting the correct topic "homeassistant/sensor/Interlogix/aac6da"
and payload of..
{
"time": "2020-01-12 15:14:37",
"model": "Interlogix",
"device_type": "contact",
"id": "aac6da",
"battery": "OK",
"switch1": "OPEN",
"switch2": "OPEN",
"switch3": "CLOSED",
"switch4": "OPEN",
"switch5": "OPEN",
"raw_message": "cd15b4"
}
But for some reason Node Red is not acting on it. I even tried a complete reboot of Hassio.. Flipped back to original lines, and it works again.
Just an FYI, In node red, I am looking for the payload to contain "switch1": "OPEN" or "switch1": "CLOSED"
from hassio-addons.
Yeah I removed the -M flag for your setup.
Weird though that node red doesn't see it.
from hassio-addons.
The new method changes the battery field still while using old models. Maybe that's why?
from hassio-addons.
I'm not doing anything with that battery field..
Even then with the new line you sent, I am getting the exact same MQTT message and topic now. It should trigger without making any changes to node red.
Got me... I guess I will try a new dongle to see if it stays up and running longer than just a few hours.
from hassio-addons.
Copy that man. Good luck.
from hassio-addons.
I actually have the exact same setup. I made binary mqtt sensors in home assistant though to watch for those payloads.
from hassio-addons.
from hassio-addons.
binary_sensor:
- platform: mqtt
device_class: door
name: "Dining room door 433"
state_topic: "RTL/sensor/Interlogix-Security/contact/adad73"
qos: 0
payload_on: "OPEN"
payload_off: "CLOSED"
value_template: '{{ value_json.switch1 }}'
- platform: mqtt
device_class: window
name: "Kylee's bedroom window 433"
state_topic: "RTL/sensor/Interlogix-Security/contact/a7974b"
qos: 0
payload_on: "OPEN"
payload_off: "CLOSED"
value_template: '{{ value_json.switch1 }}'
from hassio-addons.
from hassio-addons.
Cool let me know. I'm curious.
from hassio-addons.
is it working?
from hassio-addons.
from hassio-addons.
replacing with this line did the trick !
/usr/local/bin/rtl_433 -R $PROTOCOL -f $FREQUENCY -g $GAIN -p $OFFSET -F "mqtt://$MQTT_HOST:1883,user=$MQTT_USER,pass=$MQTT_PASS,retain=0,events=$MQTT_TOPIC[/model][/id]"
And comented the old one
#/usr/local/bin/rtl_433 -M newmodel -F json -R $PROTOCOL -f $FREQUENCY -g $GAIN -p $OFFSET | while read line
Thanks !
from hassio-addons.
Related Issues (20)
- rtl4332mqtt : Named pipe instead of reconnects? HOT 1
- plugin stops- unable to connect HOT 11
- `frequency` , `gain`, `frequency_offset` not detailed in readme - how to calculate? HOT 9
- Malformed json sent to the mqtt broker ? HOT 2
- Starting up fails HOT 4
- Can not add repo to Supervisor
- USB Claim interface error -6 HOT 1
- Request: Ability to set additional MQTT parameters (RETAIN, QOS, etc)
- unable to get RTL_433 to MQTT Bridge to work with HAssio HOT 1
- Can't get HA to discover mqtt
- New protocols HOT 2
- library librtlsdr.so.0 not dound in /usr/local/bin/rtl_433 RTL-Stick does not get Signals library HOT 3
- Latest Supervisor Update - 2021.02.5 - keeps this add-on from starting HOT 19
- Can't install?
- After Upgrading HA, addon stopped working HOT 4
- usb_open error -1 HOT 3
- s6-overlay-suexec: fatal: can only run as pid 1 HOT 2
- How to - rtl_433 update 23.11
- Wrong project url in ink2mqtt json file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hassio-addons.