For help, advice and discussion about stuff not related to aviation. Play nice: no religion, no politics and no axe grinding please.
  • 1
  • 19
  • 20
  • 21
  • 22
  • 23
  • 31
By Colonel Panic
#1821236
Location of files in Linux (Ubuntu)

I'm getting errors within the Home Assistant logs, eg
ERROR (Main Thread) [pyatv.support.mdns] exception during data handling
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pyatv/support/mdns.py", line 419, in datagram_received


But if I go to Computer/usr/local/lib/python3.8 the only folder in it is dist-packages and not site-packages . Un-hiding hidden files doesn't help either. :?

Where else should I look? HA is running within Docker but I can't find Docker within Files either :oops:

TIA
User avatar
By stevelup
FLYER Club Member  FLYER Club Member
#1821244
That stuff is inside the docker container - you won't find it on the local system.

If you open a terminal window inside HA, you'll be able to find that folder.

But trust me, finding that location is not going to help you one bit. I'd just ignore this for now.

Issue is discussed here:-

https://github.com/home-assistant/core/issues/44471
https://github.com/postlund/pyatv/pull/899

Basically it's a bug in the mDNS handling of the Apple TV plugin. The person who wrote pyatv has fixed it, and the changes should eventually get merged into HA.
By Colonel Panic
#1822212
Raspberry Pi file permissions

I have created a file blacklist-rtl.conf and put it in the correct directory. I now need to "give it 0777 permissions" - which I understand means giving it all sorts of read/write permissions, and I am relaxed about that. Using FileZilla, if I right click on it / File Permissions, I see that it starts off with 644; but if I change it to either 0777 or 777 it fails with an error
Command: chmod 777 "blacklist-rtl.conf"
Error: set attrs for /etc/modprobe.d/blacklist-rtl.conf: permission denied

What else should I be doing?

TIA

Image
User avatar
By stevelup
FLYER Club Member  FLYER Club Member
#1822219
Sorry, yes - if that wasn't clear, you'll need to SSH onto the PI and do that. That said, it's awful practice using 777 - especially on any device that's connected to the internet.

Would be better to just change the owner to the right one. 777 is a dirty fix.
By Colonel Panic
#1822220
Thanks both; I used >>sudo chmod 0777 /etc/modprobe.d/blacklist-rtl.conf<< in Terminal and it worked (having logged back in via FileZilla to check). Onwards & Upwards!
By Colonel Panic
#1822226
I am following this guide, ~ half way down the first post to "intercept" the 433mhz signal from my Watchman Oil Tank sensor (which normally sends the data to a 13A socket plug "display"), but I want to integrate the data in to Home Assistant.

As Home Assistant is running on a NUC (the full HA OS, no longer within Docker etc, so no easy way to run this new stuff on the NUC), I am seeing if I can get the 433 interception stuff to work of a spare Pi. If all goes to plan (feint hope at this stage), I would use the MQTT broker that is running elsewhere to do the parsing.

As to WHY he changed the permissions to 0777 I dunno ... :oops:
By Colonel Panic
#1822404
Some success; plugged in my new £19 RF USB dongle and a seemingly valid stream returns, with an update of my oil tank contents once every 15 mins (currently 96cm full). Will work on the MQTT & parsing tomorrow, but this ought to be fairly easy to blend in to my Home Assistant GUI. 8)

Dead cheap too!

Code: Select all{"time" : "2021-01-26 15:30:47", "model" : "Oil-SonicSmart", "id" : 136628653, "flags" : 128, "maybetemp" : 24, "temperature_C" : 8.333, "binding_countdown" : 0, "depth_cm" : 96}
Flyin'Dutch' liked this
By Colonel Panic
#1822626
Sorry, quick Linux question

Does the "Need to be root" message mean that the instruction before it "failed"? If so, why as I thought that sudo sort of meant that I was root? And if not, how do I become root?

Code: Select allpi@raspberrypi:~ $ sudo udevadm control --reload-rules && udevadm trigger
Need to be root.
pi@raspberrypi:~ $ sudo reboot now


TIA
User avatar
By stevelup
FLYER Club Member  FLYER Club Member
#1822632
sudo udevadm control --reload-rules && udevadm trigger

should have been

sudo udevadm control --reload-rules && sudo udevadm trigger

(only your first command would have been sudo'd)
User avatar
By stevelup
FLYER Club Member  FLYER Club Member
#1822633
Just out of interest, where are you getting your instructions from?

Making those earlier files 777 was just pointless - I can't see any reason why they should not be 644 as they were, and if this is a copy-paste as well from somewhere else, it's equally odd.

-edit- ah, I see, it all came from the same thread.

I do wonder if that person is just randomly doing stuff until things work without really understanding what they're doing.

-edit- doing both those steps is actually pointless...

You either need to do the trigger -or- reboot. Either thing will do the same thing. You might as well have just rebooted.

And you don't need to reload the rules anyway, that happens automatically.
By Colonel Panic
#1822639
:oops: :oops:
The instructions are at https://community.home-assistant.io/t/o ... ors/223986 . They could well be wrong / less than ideal, but I wouldn't have known where to start, and with a bit of tweaking I have at least managed to get the RF data stream to come though to my MQTT broker elsewhere on my LAN, and from there in to my Node_RED Pi.

Meanwhile, thinking ahead to when I need to shutdown / reboot the Pi next time, do I need to add a script so that it starts the routine to fetch the RF stream automatically, or will that happen anyway? AIUI, it is this command (suitably adjusted) that starts the stream

Code: Select allrtl_433 -F json -M utc | mosquitto_pub -t home/rtl_433 -l -h <your ip of mosquitto server> -p 1883 -u <yourmosquittousername> -P <yourmosquittopassword>
  • 1
  • 19
  • 20
  • 21
  • 22
  • 23
  • 31