Go to advanced search

by DougieLawson
Tue Sep 25, 2018 6:18 pm
Forum: Advanced users
Topic: Connect camera other then Pi Module?
Replies: 3
Views: 41

Re: Connect camera other then Pi Module?

Not possible.

Your camera has HDMI OUTPUT, your RPi has HDMI OUTPUT, your TV has HDMI INPUT.

You can only connect OUTPUTs to INPUTs.
by DougieLawson
Tue Sep 25, 2018 5:49 pm
Forum: Automation, sensing and robotics
Topic: Will gps with raspberry work inside home?
Replies: 4
Views: 86

Re: Will gps with raspberry work inside home?

You need line of sight with the sky. It may work on a window sill, but beyond that it won't without an external antenna.
by DougieLawson
Tue Sep 25, 2018 4:47 pm
Forum: Beginners
Topic: Mysql table creation to store sensor data
Replies: 13
Views: 211

Re: Mysql table creation to store sensor data

Have one column for a reading and eight rows (one for each sensor). It's easier.
by DougieLawson
Tue Sep 25, 2018 4:37 pm
Forum: Weather station
Topic: New set up with issues
Replies: 2
Views: 82

Re: New set up with issues

Describe your issues and we'll take a look.

What fails, what error messages do you get?
by DougieLawson
Tue Sep 25, 2018 4:36 pm
Forum: Weather station
Topic: Suddenly the temperature and humidity data are incorrect
Replies: 12
Views: 773

Re: Suddenly the temperature and humidity data are incorrect

It should be possible with a temperature controlled soldering iron and some flux impregnated soldering wick
by DougieLawson
Tue Sep 25, 2018 7:31 am
Forum: Beginners
Topic: Mysql table creation to store sensor data
Replies: 13
Views: 211

Re: Mysql table creation to store sensor data

A better design might be CREATE sensor_table (sensor_name varchar(45), temperature dec(10,2), recorded_at timestamp); Sensor_name is unique not null, recorded_at is unique, not null, current_timestamp and temperature is not null. The benefit of that is that it's extensible, you don't have to redesig...
by DougieLawson
Mon Sep 24, 2018 9:05 pm
Forum: Beginners
Topic: Mysql table creation to store sensor data
Replies: 13
Views: 211

Re: Mysql table creation to store sensor data

W. H. Heydt wrote:
Mon Sep 24, 2018 7:18 pm
All very good but with one terminology caveat... Schemas aren't written in SQL (Structured Query Language) but in DDL (Data Definition Language).
Pedant. I was trying to keep it simple for the OP's benefit. Lots of folks see SQL and DDL as a single somewhat ugly amalgamation.
by DougieLawson
Mon Sep 24, 2018 6:11 pm
Forum: Beginners
Topic: Mysql table creation to store sensor data
Replies: 13
Views: 211

Re: Mysql table creation to store sensor data

You need to know what your data source looks like before you can start the design of your SQL schema. Giving columns banal names like "S1" and "S2" may appear easy but having a column for, for example, a temperature reading called "S3" versus one called "ambient_temp" isn't going to make your SQL pr...
by DougieLawson
Mon Sep 24, 2018 5:28 pm
Forum: Beginners
Topic: Sunwait + cron, but it's not working
Replies: 12
Views: 275

Re: Sunwait + cron, but it's not working

What are you trying to achieve? This is my crontab in /etc/cron.d/sunwait [email protected]:/etc/cron.d # cat sunwait 45 4 * * * root /usr/local/bin/sunwait civ up +0:00:00 51.2N 1.13W ; /usr/local/bin/sunny.sh light; 30 15 * * * root /usr/local/bin/sunwait civ down -0:00:00 51.2N 1.13W ; /usr/local/bin/s...
by DougieLawson
Mon Sep 24, 2018 1:01 pm
Forum: Troubleshooting
Topic: MFRC522 Raspberry 3b+ random read problem
Replies: 2
Views: 53

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: 12
Views: 773

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: 73

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: 6763

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: 12
Views: 773

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: 6763

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: 156

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: 244

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: 337

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: 244

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: 132

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: 156

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: 253

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: 156

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.

Go to advanced search