Using Andreas Spiess – MQTT Pi Zero Image

Using a SONOFF Unit

Node-Red - My Venture

WARNING & DISCLAIMER

I am not expert in using a Raspberry Pi and/or installing software upon it.  In my venture of a very basic home automation system, well WIFI controllable plugs at this early stage.  I’ll have to admit its been a massive learning curve and plenty of time has been wasted, no that’s a bit strong, spent trying to get things to work.  Therefore I am most like be unable to answer many questions that you may have. Sorry about that.

However i will be listing any video that i have used to help me in my quest.

These are just my notes that I have made to remind myself what to do.  I decided to make a blog about my troubles as I am sure I am not alone in the steep learning curve.

Using Linx is a very strange environment at the beginning its becoming easier the more you do, but i have to admit i have wanted to through the Pi out of the window many times.

I must thanks two people for help and their great Youtube Channels

Peter Scargill

Here is a link to Peter’s YouTube Channel  https://www.youtube.com/user/pdscargill and his fantastic Blog post https://tech.scargill.net/

Andreas Spiess

Here is a link to Andreas’s  https://www.youtube.com/channel/UCu7_D0o48KbfhpEohoP7YSQ and his Blog post http://www.sensorsiot.org/

I must Thank Andreas  for his YouTube video as that’s how I become interested in Sonoff’s.  I have used his fantastic Pi image that can be found here  https://www.youtube.com/watch?v=bpg6RSHS4Zc&t=217s  the download link is in the description.

With this image it contains everything you need to get you started.

When entering your WiFi information

i used sudo nano /etc/network/interfaces

and you will see the page below.

dietPi-wifi-code-to-enter

Under the WIFI section, where you see WLAN ( you can see it twice) enter your WIFI SSID.

And where you see 1234567 ( you can see it twice) enter your WIFI  password.

You must enter you information twice, I did not do this the first time, and the Pizero would not connect.

 

 

Starting & Updating Diet-Pi Image

You need to down load the image from here its Andreas Spiess Youtube channel

Please watch the whole video Andreas explains it really well but at 3:23 he tells you all about his Pi image. And while there please subscribe to his fantastic channel

The Win32 Disk Imager can be found here https://sourceforge.net/projects/win32diskimager/

When entering your WiFi information

i used sudo nano /etc/network/interfaces

enter you information twice, I did not do this the first time and i could not connect to my WIFI.

 

 

Upon initial boot up the Pi warned me that I should update Diet-Pi

Enter the command  dietpi-update

dietpi-updates

This took around 10 minutes

A reboot is required  with the command reboot now

Then use the dietpi-config  and select option 5  to set you your location and time zone, the the middle option Timezone

 

 

Seeing your Pi file on a PC

I followed this webpage  but as samba is already installed i just changed the smb.conf file

http://www.opentechguides.com/how-to/article/raspberry-pi/86/shared-folder-windows.html

my workgroup is called WORKGROUP

and you need to edit this file

/etc/samba/smb.conf

path = /
browsable = yes
guest ok = yes
writable = yes
read only = no
force user = root
available = yes
valid user = admin
force group = root

We can now restart the samba server. The simplest way is this:

sudo service smbd restart

If all is well you should see your Pi on your network and be able to view all of the files on the Pi including writing to it and deleting from it.

If anybody see an error or a better way to do this please comment below