Go to advanced search

by DougieLawson
Mon Sep 24, 2018 1:01 pm
Forum: Troubleshooting
Topic: MFRC522 Raspberry 3b+ random read problem
Replies: 1
Views: 21

Re: MFRC522 Raspberry 3b+ random read problem

Since you're using https://github.com/mxgxw/MFRC522-python you should open an issue at: https://github.com/mxgxw/MFRC522-python/issues to get some help from the program's author/developer.
by DougieLawson
Mon Sep 24, 2018 10:12 am
Forum: Weather station
Topic: Suddenly the temperature and humidity data are incorrect
Replies: 9
Views: 729

Re: Suddenly the temperature and humidity data are incorrect

Sorry my program doesn't work on a standard weather station because my system has some extra pieces in /boot/config.txt

The original version of that HTU21D program is here: https://raw.githubusercontent.com/Raspb ... /HTU21D.py
by DougieLawson
Mon Sep 24, 2018 12:15 am
Forum: Raspbian
Topic: Console window mistyping
Replies: 2
Views: 56

Re: Console window mistyping

What country are you in? What's your keyboard layout? Have you set your locale, timezone, WiFi country and keyboard layout using the GUI preferences dialog (or with sudo raspi-config)?
by DougieLawson
Sun Sep 23, 2018 9:55 pm
Forum: Automation, sensing and robotics
Topic: Pi Based Heating* Control system
Replies: 11
Views: 6726

Re: Pi Based Heating* Control system

Arrgh! The perils of new forum members bumping ancient old crap posts. They really should get locked after 6 months of inactivity.
by DougieLawson
Sun Sep 23, 2018 9:53 pm
Forum: Weather station
Topic: Suddenly the temperature and humidity data are incorrect
Replies: 9
Views: 729

Re: Suddenly the temperature and humidity data are incorrect

You've got a broken HTU21D. #!/usr/bin/python3 import struct import array import time import i2c_base HTU21D_ADDR = 0x40 CMD_READ_TEMP_HOLD = b"\xE3" CMD_READ_HUM_HOLD = b"\xE5" CMD_READ_TEMP_NOHOLD = b"\xF3" CMD_READ_HUM_NOHOLD = b"\xF5" CMD_WRITE_USER_REG = b"\xE6" CMD_READ_USER_REG = b"\xE7" CMD_...
by DougieLawson
Sun Sep 23, 2018 8:34 pm
Forum: Automation, sensing and robotics
Topic: Pi Based Heating* Control system
Replies: 11
Views: 6726

Re: Pi Based Heating* Control system

Toshibass wrote:
Thu May 22, 2014 9:19 pm
You should also take a look at https://code.google.com/p/webiopi/ perfect for your project

Toshi Bass
Are you joking? That pile of junk hasn't been updated since 2015. There are much better ways to control GPIOs now (usually using RPi.GPIO, GPIOZero and/or PIGPIO/pigpiod).
by DougieLawson
Sat Sep 22, 2018 9:34 pm
Forum: General discussion
Topic: nginx 504 gateway time out
Replies: 7
Views: 143

Re: nginx 504 gateway time out

What do you have in /etc/nginx/sites-enabled/default? # You may add here your # server { # ... # } # statements for each of your virtual hosts to this file ## # You should look at the following URL's in order to grasp a solid understanding # of Nginx configuration files in order to fully unleash the...
by DougieLawson
Sat Sep 22, 2018 9:31 pm
Forum: General discussion
Topic: fail2ban multiple expression in single filter
Replies: 12
Views: 233

Re: fail2ban multiple expression in single filter

Run fail2ban-regex logfile_here filter_name_here to test the filter file you're building.

fail2ban-regex /var/log/openvpn.log /etc/fail2ban/filter.d/openvpn.conf
by DougieLawson
Sat Sep 22, 2018 11:58 am
Forum: Other programming languages
Topic: BBC BASIC (Raspbian) source code released
Replies: 13
Views: 242

Re: BBC BASIC (Raspbian) source code released

Because if others were to send that link around, it becomes simple just another dropbox link containing potentially anything. It would look better if it was a download link from http://www.bbcbasic.co.uk/bbcbasic.html Runs OK on my ZeroW. Although if I were in any way interested in BASIC I'd probab...
by DougieLawson
Sat Sep 22, 2018 11:52 am
Forum: General discussion
Topic: fail2ban multiple expression in single filter
Replies: 12
Views: 233

Re: fail2ban multiple expression in single filter

Each regex is in a new line. Here's my filter for OpenVPN # Fail2Ban filter for selected OpenVPN rejections # [Definition] # Example messages (other matched messages not seen in the testing server's logs): #Tue Sep 18 10:05:03 2018 185.200.118.67 TLS Error: TLS key negotiation failed to occur within...
by DougieLawson
Sat Sep 22, 2018 11:48 am
Forum: General discussion
Topic: Anyone know where I can get a copy of the default config.txt file?
Replies: 3
Views: 120

Re: Anyone know where I can get a copy of the default config.txt file?

You can start Raspbian with an empty config.txt. There's nothing critical in there.

sudo raspi-config (or the preferences GUI) will add the pieces that you need once you're running.
by DougieLawson
Fri Sep 21, 2018 7:44 pm
Forum: Beginners
Topic: How to call js from html
Replies: 10
Views: 141

Re: How to call js from html

If the <script> tag references something in the root of the webserver the file is served from /var/www/html (by default). You can put <script src=js/foobar.js> and that will serve the javascript from /var/www/html/js/foobar.js.
by DougieLawson
Fri Sep 21, 2018 3:40 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: PCF8523 install on Pi3 Stretch
Replies: 13
Views: 228

Re: PCF8523 install on Pi3 Stretch

Try this: cd /boot sudo mv config.txt config.txt~ # save the original version sudo nano config.txt dtoverlay=i2c-rtc,pcf8523 dtparam=spi=on dtparam=i2c_arm=on [CTRL] + [O] then [ENTER] - to write out the file [CTRL] + [X] to exit nano cat /boot/config.txt # to see the contents sudo reboot
by DougieLawson
Fri Sep 21, 2018 3:34 pm
Forum: Beginners
Topic: How to call js from html
Replies: 10
Views: 141

Re: How to call js from html

topguy wrote:
Fri Sep 21, 2018 3:06 pm
- In the "script.js" file there is a function called "$(document).ready()" that calls the other functions.
With jQuery that $(document).ready() function gets called as an onload() event. So as soon as the browser finishes loading the page it will get called.
by DougieLawson
Fri Sep 21, 2018 2:59 pm
Forum: Beginners
Topic: How to call js from html
Replies: 10
Views: 141

Re: How to call js from html

HTML normally runs in the browser not on the server. That's done with script files that are served from port 80, (in my example that's relative to the HTML page I've just loaded). <script src="mqttws31.js" type="text/javascript"></script> <script src="jquery.min.js" type="text/javascript"></script> ...
by DougieLawson
Fri Sep 21, 2018 2:45 pm
Forum: Troubleshooting
Topic: RPi Zero + Raspbian Stretch send Oops when starting Kodi
Replies: 4
Views: 87

Re: RPi Zero + Raspbian Stretch send Oops when starting Kodi

Run
sudo apt-get update && sudo apt-get -y dist-upgrade
That should get you the latest raspberrypi-kernel package which should include James's kernel/bootcode fix.
by DougieLawson
Fri Sep 21, 2018 2:35 pm
Forum: Beginners
Topic: LCD Display
Replies: 10
Views: 164

Re: LCD Display

Get the I2C "back pack" displays. They work and they're dead easy to program.

https://www.ebay.co.uk/itm/1602-16-2-HD ... 1658918102
by DougieLawson
Fri Sep 21, 2018 2:31 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: PCF8523 install on Pi3 Stretch
Replies: 13
Views: 228

Re: PCF8523 install on Pi3 Stretch

Are you using plain Raspbian Stretch or something else, like NOOBS or Ubuntu?
by DougieLawson
Fri Sep 21, 2018 7:06 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: PCF8523 install on Pi3 Stretch
Replies: 13
Views: 228

Re: PCF8523 install on Pi3 Stretch

Do you have dtoverlay=i2c-rtc,pcf8523 in /boot/config.txt? That gets [email protected]:~ $ i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- --...
by DougieLawson
Thu Sep 20, 2018 5:30 pm
Forum: Raspbian
Topic: installing BIND from source
Replies: 2
Views: 55

Re: installing BIND from source

What prompted you to install from source? There's a ready built bind9 package as part of Raspbian Stretch.
by DougieLawson
Thu Sep 20, 2018 4:26 pm
Forum: General discussion
Topic: Shut down rpi with a keyboard key combo
Replies: 12
Views: 335

Re: Shut down rpi with a keyboard key combo

mooblie wrote:
Thu Sep 20, 2018 4:12 pm
k-pi wrote:
Thu Sep 20, 2018 9:33 am
Rather than sudo poweroff, I prefer sudo halt -p. :D
The pros and cons of each being...?
The halt option causes more wear on the space bar to achieve exactly the same outcome (since they are synonymous).
by DougieLawson
Thu Sep 20, 2018 6:26 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Multiple RPI on I2C bus and hat EPROM
Replies: 5
Views: 174

Re: Multiple RPI on I2C bus and hat EPROM

You can only have one I2C master per bus. The RPi can only run as a master with the standard kernel driver.
by DougieLawson
Wed Sep 19, 2018 9:57 pm
Forum: Beginners
Topic: US and UK keyboard keeps toggling back and forth.
Replies: 4
Views: 90

Re: US and UK keyboard keeps toggling back and forth.

On a Windows system you can get a £ with [ALT]+[0]+[1]+[6]+[3] not sure if that's available on the desktop but it will work on a PuTTY ssh session.
by DougieLawson
Wed Sep 19, 2018 8:04 pm
Forum: General discussion
Topic: Shut down rpi with a keyboard key combo
Replies: 12
Views: 335

Re: Shut down rpi with a keyboard key combo

I've got a keyboard combo that works in an LXTerminal window.

Press the following keys in order
[S][U][D][O][SPACE][P][O][W][E][R][O][F][F][ENTER]

Don't press the shift or it won't work.
by DougieLawson
Tue Sep 18, 2018 12:27 am
Forum: Troubleshooting
Topic: Pi3 won't recover from reboot
Replies: 14
Views: 357

Re: Pi3 won't recover from reboot

This looks like it's fixed in 4.14.70+ and 4.14.70-v7+.

Go to advanced search