How to update speedtest mod – Pi-hole

Updating speedtest mod is simple.

Switch to root

If you dont have speedtest.db in /etc/pihole
# get latest webpage.sh file
Get latest admin from github
If git remote -v  gives something like origin https://github.com/arevindh/AdminLTE If git remote -v  gives something like mod https://github.com/arevindh/AdminLTE

Add Speedtest to Pihole WebUI

So this project is  just another fun project integrating speedtest to PiHole Web UI.

Note : It’s just a quick solution , nowhere near perfect . If you made it better please let me know here Google+ Community

It will be using speedtest.net on background for testing. More frequent the speed tests more data will used.

What does this mod have in extra ?

  1. Speedtest results of 1 /2 4/ 7/30  days as graph.
  2. Custom speed test server selection.
  3. Detailed speedtest results page.
  4. Ability to schedule speedtest interval.

Latest Updates will listed here :  Pihole mods Community 

Inspiration : https://arstechnica.com/business/2016/02/comcast-customer-made-bot-that-tweets-at-comcast-when-internet-is-slow/

How to update to new version

Tested on Raspberry pi and Ubuntu PC

Needs latest pihole installed and working

Start with installing required packages on your Raspberry Pi / Linux

Find php version 

if it is 5.x

if it is 7.x

Restart Pi

You can try run it using

If Everything is ok, proceed to next step

Get the new set of admin Code from github ( New method  or try old one here)

Test its working

Go to your pihole admin page

http://pi.hole/admin

Note : First load may be slow

Login 

Now go to settings and enable speedtest

Note: If the item does not change to option you have chose just go to dashboard and comeback, it will be fine. I am currently working on it

Now create a speedtest Manually and make sure it’s appearing on dashboard

Go back to terminal and type  Not needed  : admin will call this if there is no data 

It may take few seconds to appear , but once its loaded you can see that on dashboard.

Please consider posting a screenshot link in the comments , I would like to know how it looks on different devices.

If there are any problems , ask here :  PiHole mods G+


Will my regular updates have problems ?

If you are upgrading pihole please revert all changes back and do the upgrade. Scroll down for instructions .

Speedtest gone missing after Pi-hole update

Dont worry your data is safe , update procedure here

Can the developer held responsible if anything goes wrong.

Absolutely not ,but you can always ask for help

I lost my DB file what Should I do ?

Here is a blank one : SpeedtestDB Zip

Can i get more features added to it ?

You can ask me via this link, I will do if feasible

Can I get it via regular pihole -up

Not currently. Hope this will get integrated into the baseline. If that happens you can easily get it via regular pihole update

The time is not not showing correctly in chart 

Please get latest code via git pull

I don’t want this , I want to go back to the original version .

If you have followed all instructions correctly , the code below will revert all the changes you have done .


Notes

Just a quick solution , you should move the db file to a directory outside www folder for security reasons.

Uses codes from

  • https://github.com/sivel/speedtest-cli
  • https://github.com/HenrikBengtsson/speedtest-cli-extras

 

Old Method for admin area

Voice activated Google Assistant on Raspberry Pi with visual feedback

How to enable Ok google in Google Home running on raspberry pi.

Add visual notifications

It allows us to understand what is the current state of our Raspberry Pi assistant

Blue Light : Google  Assistant is listening.

Red :Ligh : Google Assistant is saying something.

Schematics 

Coding part

Clone the Google SDK git repository  to home directory .

Now edit the hotword.py file

 

sudo nano /home/pi/assistant-sdk-python/google-assistant-sdk/googlesamples/assistant/library/hotword.py

Modify the contents [ changes/ additions are highlighted ]

Install RPI GPIO in virtual environment 

pip3 install RPi.GPIO

Testing 

Run as a Service

Make sure that you are in virtual environment 

(env) pi@raspberrypi:~ $

else run

source /home/pi/env/bin/activate

 

We need to create an shell script to enable virtual environment “hotword.sh “

nano /home/pi/assistant-sdk-python/google-assistant-sdk/googlesamples/assistant/library/hotword.sh To run as a service you need to create a service file in /lib/systemd/system/ folder

sudo nano /lib/systemd/system/assistant.service Enable and start service

sudo systemctl start assistant.service

Check Status of the service

sudo systemctl status assistant.service

Enable service

sudo systemctl enable assistant.service

All cotents are also in Gist: https://gist.github.com/arevindh/ae50e18394625747e6beae600b10e374

Enable GPIO in env
pip3 install RPi.GPIO

USB Sound Card Adapter
https://goo.gl/Y3RYTq

 

Install httpd 2.4 on centos 6/7 from source

Here is the guide to install httpd 2.4 on your centos 7 / 6 install

Make sure you have already installed following packages on your server.

Then, we will choose the latest version from Apache website. and download it.

If you are using this article on CentOS 7, the APR version on yum won’t work for you, and you should compile the apr, and apr-util from source, so please remove it from your server if you installed it via yum, `and try following:

Download and unzip all needed files

Configure , make and make install

Start Your server

 

You can see the reference article here

IoT Project “Smart Home” : Part 1

“Smart Home” my final year MCA project based on Internet of things . The project came from some project seen on Raspberry Pi Website .

The Project is divided into 3 parts

  1. Nodes communicate with Server
  2. Server Mosquitto which uses MQTT Protocol
  3. Android App , which  communicates with server

Each node can have the following functionalities.

  • Turn ON /OFF the multiple devices.
  • Report the current status of the device.
  • Measure the climatic conditions.
  • Detect and report user presence.

All  the above can be obtained using arduino and needed sensors but communicating with server can be very difficult so better is go with a microcontroller with supports both processor and wifi , i chose esp8266  read more about esp8266 here .

MQTT Protocol is used to communicate between nodes , server , android app

Next Part : The Node

#Esp8266 #smarthouse #iot

A post shared by Siddhu Arevindh (@_itsmesid_) on

 

Pcb for #smarthome using #esp8266 an #iot based project

A post shared by Siddhu Arevindh (@_itsmesid_) on