Open xKronyx opened 4 years ago
Yeah I have been getting this lots. It has not worked for me reliably.
i'm trying this now.
https://github.com/james-fry/hassio-addons/issues/23#issuecomment-552189765
I am also seeing this. Also it hangs with nothing in the logs..
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]"
I am trying this now. Looks like everything loaded successfully. I will see how long it stays running now. Thanks!!
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.
Bummer. Have you tried a ruibuild of the addon?
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.
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
The command line I shared above you can modify to try and match your previous mqtt topics.
Can you share the mqtt messages you receive and would like to keep receiving?
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!!
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]"
With or without those additional lines that you had removed earlier?
Without
Those additional lines were the old method rtl_433 used to publish mqtt. The newer versions have a built in mqtt publisher. It eliminates an external call.
Also the -M newmodels flag will be forced one day within the rtl_433 software. Changing all your topics to interlogic-security
From: ericreich notifications@github.com Sent: Sunday, January 12, 2020 1:54:54 PM To: james-fry/hassio-addons hassio-addons@noreply.github.com Cc: clsferguson Corpo_@hotmail.com; Comment comment@noreply.github.com Subject: Re: [james-fry/hassio-addons] Async read stalled, exiting! (#29)
With or without those additional lines that you had removed earlier?
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/james-fry/hassio-addons/issues/29?email_source=notifications&email_token=ALU4VKLAUC3UEO4WKTRDCULQ5N7R5A5CNFSM4J3LYOD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIXD6WY#issuecomment-573456219, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALU4VKON4OAM7R5CRSIXAXTQ5N7R5ANCNFSM4J3LYODQ.
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"
Yeah I removed the -M flag for your setup.
Weird though that node red doesn't see it.
The new method changes the battery field still while using old models. Maybe that's why?
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.
Copy that man. Good luck.
I actually have the exact same setup. I made binary mqtt sensors in home assistant though to watch for those payloads.
I can try that. Could you send me how you configured your sensors in your yaml file?
On Jan 12, 2020, at 3:45 PM, clsferguson notifications@github.com wrote:
I actually have the exact same setup. I made binary mqtt sensors in home assistant though to watch for those payloads.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/james-fry/hassio-addons/issues/29?email_source=notifications&email_token=AOIBYP7NHJCSXYFJQ66CL53Q5OFP5A5CNFSM4J3LYOD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIXFCSY#issuecomment-573460811, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOIBYP5LPVUPIHSENZUJNYLQ5OFP5ANCNFSM4J3LYODQ.
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 }}'
That works. I am using the 1st method with the -M.
Also had to use the new topic to create the sensor like you have. Seams to work like a champ. We will see now if it stays stable for more than a few hours.
Thanks again for your help.
On Jan 12, 2020, at 4:17 PM, clsferguson notifications@github.com wrote:
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 }}' — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/james-fry/hassio-addons/issues/29?email_source=notifications&email_token=AOIBYP4Z5DJDFQCRE47A3B3Q5OJG7A5CNFSM4J3LYOD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIXFXCQ#issuecomment-573463434, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOIBYPY7X32TISLFFKZ7CXLQ5OJG7ANCNFSM4J3LYODQ.
Cool let me know. I'm curious.
is it working?
I just got it replaced a few minutes ago. We will see how it acts now.
On Jan 16, 2020, at 1:47 AM, clsferguson notifications@github.com wrote:
is it working?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/james-fry/hassio-addons/issues/29?email_source=notifications&email_token=AOIBYPZGAWG5WQ2N5DAJJQLQ6AGINA5CNFSM4J3LYOD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJDDKCA#issuecomment-575026440, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOIBYP4WTLSYSVZPUMYNJWLQ6AGINANCNFSM4J3LYODQ.
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
Thanks !
The addon is running on docker, hassio also on docker on ubuntu 19.04 I have this error since 2 weeks, it was working since about 6 months without any issues, the only thing i can see is the Hassio / home assistant updates. Anyone have a clue ?
Thanks !