Go to advanced search

by DougieLawson
Thu Feb 22, 2018 10:50 pm
Forum: Weather station
Topic: It stopped uploading to Oracle
Replies: 3
Views: 89

Re: It stopped uploading to Oracle

Make the change to your crontab to include

Code: Select all

>> /home/pi/weather.log
on the end of the command.
by DougieLawson
Thu Feb 22, 2018 12:21 am
Forum: Beginners
Topic: Just got my pi, stumped on something
Replies: 2
Views: 153

Re: Just got my pi, stumped on something

sudo apt install python{,3}-mysql.connector
Job done.

https://dev.mysql.com/doc/connector-python/en/ tells you how to use it.
by DougieLawson
Wed Feb 21, 2018 6:09 am
Forum: Automation, sensing and robotics
Topic: Pi to Pi communication over Local network
Replies: 6
Views: 467

Re: Pi to Pi communication over Local network

lamaan wrote:
Tue Oct 31, 2017 4:10 pm
... want to achieve is that I want to send commands from one pi and recieve it on the other pi and also send some data of sensor readings from one Pi to another.
Take a look at MQTT with HiveMQ, Mosquitto or RabbitMQ
by DougieLawson
Wed Feb 21, 2018 5:55 am
Forum: General discussion
Topic: Snap7
Replies: 1
Views: 124

Re: Snap7

Are you using python2 or python3?

Use sudo pip ... to install for python2, use sudo pip3 ... to install for python3.
by DougieLawson
Wed Feb 21, 2018 5:37 am
Forum: Off topic discussion
Topic: Recommendations for a good, but cheap, multimeter
Replies: 26
Views: 3108

Re: Recommendations for a good, but cheap, multimeter

cesttonal wrote:
Tue Feb 20, 2018 5:37 pm
if anyone has used Mastech MS8268.
I'll let you know some time after early April. I've been meaning to upgrade from my own analog meter and that looks like the one my wife can get for my birthday.
by DougieLawson
Wed Feb 21, 2018 5:24 am
Forum: Weather station
Topic: It stopped uploading to Oracle
Replies: 3
Views: 89

Re: It stopped uploading to Oracle

Change your crontab entries to

Code: Select all

/home/pi
from

Code: Select all

~
so that you can be sure cron can find the programs.

Add some logging change

Code: Select all

weather-station/upload_to_oracle.py
to

Code: Select all

weather-station/upload_to_oracle.py >> /home/pi/oracle.log
by DougieLawson
Mon Feb 19, 2018 10:23 pm
Forum: Advanced users
Topic: Help Making a Clock
Replies: 3
Views: 211

Re: Help Making a Clock

Here's a python program that calculates sunrise/sunset import ephem from numpy import pi from datetime import date, time, datetime def time_string(et): et = et.tuple() d = date(et[0], et[1], et[2]) t = time(et[3], et[4], int(et[5])) dt = datetime.combine(d, t) return dt.strftime("%d %b %Y %H:%M:%S U...
by DougieLawson
Mon Feb 19, 2018 10:16 pm
Forum: Advanced users
Topic: What's the best way for setting up a server?
Replies: 3
Views: 160

Re: What's the best way for setting up a server?

Wemos D1 can do MQTT subscriptions and publishing with https://pubsubclient.knolleary.net
by DougieLawson
Mon Feb 19, 2018 9:45 pm
Forum: Off topic discussion
Topic: RPi4
Replies: 20
Views: 674

Re: RPi4

You do realise that anyone who knows about any future product would be gagged with a non-disclosure agreement. Therefore, as always, these "wish list" pink ponies and unicorn threads are entirely pointless and will never get details about "RPi Next", RPi4, RPi5, RPi73 or RPi99999999.
by DougieLawson
Sun Feb 18, 2018 12:12 pm
Forum: Beginners
Topic: What sould I do with Python version
Replies: 4
Views: 132

Re: What sould I do with Python version

All new code should be written in python3. As a new user forget python 2 ever existed.
by DougieLawson
Sat Feb 17, 2018 11:53 pm
Forum: Raspbian
Topic: /etc/inittab no longer present in Raspbian Jessie?
Replies: 34
Views: 67708

Re: /etc/inittab no longer present in Raspbian Jessie?

sudo raspi-config in an LXTerminal window runs a configuration program.
by DougieLawson
Sat Feb 17, 2018 10:35 pm
Forum: General discussion
Topic: Home Automation
Replies: 3
Views: 172

Re: Home Automation

Best starting point for MQTT is: http://hivemq.com/mqtt-essentials/

Easy way to get a broker installed is sudo apt install mosquitto mosquitto-client*

I've just built a system that will control 64 switches from a RPi, it's available as a bespoke commercial system if you'd like to buy a copy.
by DougieLawson
Sat Feb 17, 2018 10:28 pm
Forum: General discussion
Topic: Pi Access with Tablet/Smart Phone
Replies: 9
Views: 401

Re: Pi Access with Tablet/Smart Phone

I use JuiceSSH https://juicessh.com which I thought was so good I paid for the upgraded version.

The only practical way to make a connection using your existing WiFi network or to run your RPi as an access point.
by DougieLawson
Sat Feb 17, 2018 10:25 pm
Forum: Networking and servers
Topic: How to use NTP to sync two pi's clocks (don't care about accuracy)?
Replies: 12
Views: 441

Re: How to use NTP to sync two pi's clocks (don't care about accuracy)?

Run one ntpd as a master, run any other ntpd systems as a slave to that. Master /etc/ntp.conf driftfile /var/lib/ntp/ntp.drift statistics loopstats peerstats clockstats filegen loopstats file loopstats type day enable filegen peerstats file peerstats type day enable filegen clockstats file clockstat...
by DougieLawson
Fri Feb 16, 2018 3:32 am
Forum: General discussion
Topic: Convert Short to a 2's complement char help needed in C
Replies: 30
Views: 890

Re: Convert Short to a 2's complement char help needed in C

Easiest conversion in C to char from other formats is sprintf () with a suitable formatting mask.
by DougieLawson
Fri Feb 16, 2018 1:11 am
Forum: Beginners
Topic: Replacing Arduino nanos with Raspi
Replies: 3
Views: 192

Re: Replacing Arduino nanos with Raspi

There's no analog inputs on a Pi. If you need analog the best way is to use an Arduino connected to your Pi.
by DougieLawson
Thu Feb 15, 2018 8:11 pm
Forum: General discussion
Topic: RPi 3 combined with Arduino...
Replies: 8
Views: 367

Re: RPi 3 combined with Arduino...

You connect it with a USB-A to USB-B printer cable for a regular Uno. You connect it with a USB-A to microUSB for a Nano.

It will appear as /dev/ttyACM0 or /dev/ttyUSB0 depending on the serial interface controller on the Arduino.
by DougieLawson
Thu Feb 15, 2018 11:24 am
Forum: Troubleshooting
Topic: Raspbian Stretch is not using Predictable Network Interface Names. Why?
Replies: 5
Views: 178

Re: Raspbian Stretch is not using Predictable Network Interface Names. Why?

It changed to a raspi-config option with the 2017-11-29 build. Too many folks moaned about predictable names.
by DougieLawson
Thu Feb 15, 2018 8:04 am
Forum: General discussion
Topic: RPi 3 combined with Arduino...
Replies: 8
Views: 367

Re: RPi 3 combined with Arduino...

Why not get your mate to run a demo for you.

Arduinos, esp8266 and wemoses are brilliant for simple IoT tasks. The raspberry is ideal as a command & control server for that stuff. It isn't adding extra power to the pi it's offloading tedious workload to the microcontroller.
by DougieLawson
Thu Feb 15, 2018 8:00 am
Forum: Troubleshooting
Topic: Epson Scanner...
Replies: 7
Views: 193

Re: Epson Scanner...

Take a look whether it is supported by SANE. My 2005 Canon scanner that wouldn't work with wonders got a new lease of life with SANE.
by DougieLawson
Thu Feb 15, 2018 7:54 am
Forum: Troubleshooting
Topic: Path= ignored if destop file is in autostart
Replies: 4
Views: 138

Re: Path= ignored if destop file is in autostart

Path= will ALWAYS be ignored, the environment variable is PATH=
by DougieLawson
Thu Feb 15, 2018 7:44 am
Forum: Beginners
Topic: USB flash drives & ownership
Replies: 3
Views: 161

Re: USB flash drives & ownership

Option 2 matches the incantations you'd put in /etc/fstab so is generally more sane.
by DougieLawson
Thu Feb 15, 2018 6:00 am
Forum: Raspbian
Topic: Add additional DNS servers
Replies: 3
Views: 159

Re: Add additional DNS servers

Have you thought about the more mundane option of changing the settings in your router?
by DougieLawson
Wed Feb 14, 2018 11:23 pm
Forum: Troubleshooting
Topic: After reboot pi3 is loosing weather location and digital clock format
Replies: 2
Views: 103

Re: After reboot pi3 is loosing weather location and digital clock format

Is your network connected?

What do you get from
ip addr show
ip route
ping -c3 $(ip route | awk '/default/ {print $3}')
ping -c3 8.8.8.8
ping -c3 google.com

Go to advanced search