Go to advanced search

by harvy
Sun Oct 10, 2021 3:10 pm
Forum: Python
Topic: memory leak help!
Replies: 3
Views: 227

Re: memory leak help!

Thanks! That change seems to have done the trick!
Screenshot_20211010-160517~2.jpg
Screenshot_20211010-160517~2.jpg (177.65 KiB) Viewed 153 times
Indentation has gone all over due to too many bodges and copy pasted. I'm slowly tidying up now across the whole suite of software for heating!

Thank you for your help!
by harvy
Sun Oct 10, 2021 11:34 am
Forum: Python
Topic: memory leak help!
Replies: 3
Views: 227

Re: memory leak help!

as a follow up, i installed memory_profiler not sure on the output as what i think it means is what it actually means, but: pi@raspberrypi:~ $ python -m memory_profiler switch_relay_memory.py ^CFilename: switch_relay_memory.py Line # Mem usage Increment Line Contents ================================...
by harvy
Sun Oct 10, 2021 10:42 am
Forum: Python
Topic: memory leak help!
Replies: 3
Views: 227

memory leak help!

Hi All, I have had this code running on an old version - maybe Jessie or older! for about a year or so without problems. I couldnt setup smb shares so had to upgrade to buster, did a full wipe and new image of the OS and copied back the scripts. Since doing this, I loose connection to the PI after a...
by harvy
Mon Sep 13, 2021 5:21 pm
Forum: General discussion
Topic: How to mount remote share
Replies: 11
Views: 587

Re: How to mount remote share

I'm just setting a new vm to play with NFS, the issue i have (and didn't spend any time investigating!) is that i could only mount on the client as root (using sudo) which meant the usual user couldn't do anything on it. As root on the os, if i create a file, then only the admin on synology can use ...
by harvy
Mon Sep 13, 2021 2:58 pm
Forum: General discussion
Topic: How to mount remote share
Replies: 11
Views: 587

Re: How to mount remote share

thanks @DougieLawson I did look at that also - though i would need to keep ssh active on my NAS for this to work - again something I was hoping to avoid!

I may end up having to use a credentials file on each host.

NFS is making the files on nas as root owner.
by harvy
Mon Sep 13, 2021 1:30 pm
Forum: General discussion
Topic: How to mount remote share
Replies: 11
Views: 587

Re: How to mount remote share

Thanks for the reply,
I want to try and avoid having the passwords on the pi's if possible - I've started setting up new ones with ssh keys and disabling logins, Will have a look at the NFS setup and see if i can do that in some form without allowing guest.
by harvy
Mon Sep 13, 2021 1:04 pm
Forum: General discussion
Topic: How to mount remote share
Replies: 11
Views: 587

How to mount remote share

Hi All, I have a number of pi's (1b, 2b, 3b's) and a bunch of vm's running raspbian PC, for various tasks around the house. I have a Synology NAS. I want to make a share on the NAS available to the various Raspbian installs -Say mount the share as /home/user/scripts the way i have done this in the p...
by harvy
Mon Mar 29, 2021 11:48 am
Forum: Graphics, sound and multimedia
Topic: Grounding Check!
Replies: 0
Views: 194

Grounding Check!

Hi all, I am looking to setup a PI for Audio and LED output. I am looking to setup a Matrix of LED's - WS2801's (approx 400 if it works!) and also play music. LED wise i have a 60A 5V PSU, and multiple 2m stings of LED's and will be wiring the power of each end of each string back to the PSU. The PS...
by harvy
Tue Sep 01, 2020 9:22 am
Forum: Python
Topic: web page data grabbing issue
Replies: 8
Views: 552

Re: web page data grabbing issue

Hi, Thanks for the response. The code as provided is on N3rgy's git hub: https://github.com/n3rgy/data Which is essentially what i have started with, but can not get it to work. I think it was designed more for web page access? Only changes i made was the Authentication key *which could be wrong!* a...
by harvy
Fri Aug 28, 2020 9:29 am
Forum: Python
Topic: web page data grabbing issue
Replies: 8
Views: 552

Re: web page data grabbing issue

Any tips on how to do this?
by harvy
Thu Aug 27, 2020 6:57 pm
Forum: Python
Topic: web page data grabbing issue
Replies: 8
Views: 552

Re: web page data grabbing issue

Changed it to this: rdata = requests.get( url=apiurl, headers=headers ) print "rdata:", rdata print "rdata type:" , type(rdata) print "rdata.text:" , rdata.text print "rdata.content:" , rdata.content Output is this: which is where i have been banging my head! ...
by harvy
Thu Aug 27, 2020 4:12 pm
Forum: Python
Topic: web page data grabbing issue
Replies: 8
Views: 552

Re: web page data grabbing issue

For info, if i add
print type(rdata)

the output is
<class 'requests.models.Response'>
by harvy
Thu Aug 27, 2020 4:02 pm
Forum: Python
Topic: web page data grabbing issue
Replies: 8
Views: 552

web page data grabbing issue

Hi All, I am trying to scrape my data from m3rgy website, hacking the provided api code to make it work to what i want... I've managed to get to a point where the api is giving me back a webpage in python, but i cant seem to find the data itself on the page? If i copy/paste the address i am doing th...
by harvy
Fri Nov 08, 2019 8:24 am
Forum: Raspberry Pi Desktop for PC and Mac
Topic: Installation Step failed when installing to ESXI
Replies: 0
Views: 496

Installation Step failed when installing to ESXI

Hi All, I have an ESXI host, where i have a number of versions of linux "Raspbian" debian installs for various tasks, one is for pihole, one vpn, a third for heating, all installed without problems. I'm trying to create a new install for developing/testing some screen scraping scripts, but...
by harvy
Tue Sep 10, 2019 7:53 pm
Forum: Raspberry Pi Desktop for PC and Mac
Topic: docker on raspberry pi desktop for PC
Replies: 1
Views: 1635

Re: docker on raspberry pi desktop for PC

found it ...


for anyone else who tries to do this:

https://docs.docker.com/install/linux/d ... ocker-ce-1
by harvy
Tue Sep 10, 2019 7:40 pm
Forum: Raspberry Pi Desktop for PC and Mac
Topic: docker on raspberry pi desktop for PC
Replies: 1
Views: 1635

docker on raspberry pi desktop for PC

Hi all, Im testing/playing with setting up PI Hole, which i want to run in a docker container to allow it to be restarted automatically etc in case of any problems, plus be able to rebuild quickly if i break it. I have an ESXI Host where i have rasbpian for pc installed, but am having problems insta...
by harvy
Wed Jan 10, 2018 9:18 pm
Forum: Troubleshooting
Topic: Raspberry password is change automatically
Replies: 15
Views: 5707

Re: Raspberry password is change automatically

I've just had the same on one of my four pi's today - some time around mid day GMT... The pi is NOT internet facing - its behind my router, and only openvpn port to another device... nothing in bash_history for pi user. default ssh port is not 22, and pi user is not default. but meanwhile pi is runn...
by harvy
Wed Jan 10, 2018 9:03 pm
Forum: Troubleshooting
Topic: Password changed and new rsh key?
Replies: 0
Views: 317

Password changed and new rsh key?

So i have a pi setup to control my heating, runs come custom python code for reading DS1820b sensors, and writes to a mysql db (on a seperate server). It also runs some code to host a python based web page, to display room temp, and ability to adjust the temp. Been using it for best part of 5 months...
by harvy
Thu Jan 04, 2018 7:55 pm
Forum: General programming discussion
Topic: some SQL help
Replies: 4
Views: 1274

Re: some SQL help

I cant do mysqldmp as its not installed (im running the db on a synology nas box - its installed via phpmyadmin rather then directly). I've done a create like to get the sql: -- Table structure for table `temp_log` -- CREATE TABLE IF NOT EXISTS `temp_log` ( `measurement_id` int(11) NOT NULL AUTO_INC...
by harvy
Fri Dec 29, 2017 7:31 pm
Forum: General programming discussion
Topic: some SQL help
Replies: 4
Views: 1274

Re: some SQL help

bit of headscratching later: set @sensor='28-00000595cc2a'; set @log=2100; select (hour(TIMEDIFF(b.time,a.time))*60)+minute(TIMEDIFF(b.time,a.time)) as Seconds_on, b.current-a.current as temp_increase from heating_log AS a, heating_log AS b where a.log_id = @log and b.log_id = (select min(log_id) fr...
by harvy
Fri Dec 29, 2017 4:49 pm
Forum: General programming discussion
Topic: some SQL help
Replies: 4
Views: 1274

some SQL help

Having a bit of a dense moment - I have a log table for heating, everytime the heating comes on, i get an entry for what the current temp is, the target temp, time, and on or off. example entrys are: log_id sensor_id time Ascending current target on_off(1 signifies on, 0 is off) 2137 28-00000595cc2a...
by harvy
Mon Apr 03, 2017 9:02 pm
Forum: Automation, sensing and robotics
Topic: Sensing when Garage Door is Open
Replies: 25
Views: 18308

Re: Sensing when Garage Door is Open

Evening all, Apologies for bringing this one back up, just wandered if someone can help me with this? I'm doing the same, but without the LED's. I want to know when the sensor is open/closed and use that in a program. I've connected a 270 ohm between 3.3 and pin 17, from pin 17 to the relay, which t...
by harvy
Thu Feb 16, 2017 6:20 pm
Forum: Troubleshooting
Topic: how many DS1820b's on a single Pi
Replies: 5
Views: 1472

Re: how many DS1820b's on a single Pi

Just to update, changed to 2k2, and all sensors are working ok apart from one, which is only reporting 85.... Which I think is not initialized...

One day I'll get round to checking
by harvy
Mon Jan 23, 2017 3:42 pm
Forum: Troubleshooting
Topic: how many DS1820b's on a single Pi
Replies: 5
Views: 1472

Re: how many DS1820b's on a single Pi

I've done a star topology, in hindsight prob should have done it differently, but wiring is done now... I will change the resistor to 2K2 and see if its any better. Is there a way to measure and calculate the value the resistance should be? I have a basic multi meter which can measure resistance, vo...
by harvy
Mon Jan 23, 2017 1:51 pm
Forum: Troubleshooting
Topic: how many DS1820b's on a single Pi
Replies: 5
Views: 1472

how many DS1820b's on a single Pi

Good Afternoon, I have a number of sensors wired up around the house for floor and room tempratures. All individually work and give me correct readings (except 1 which consistantly gives me a reading of 85), however they all drop off the pi if being used together. Setup is as follows: 1 sensor is bu...

Go to advanced search