Friday, 18 December 2015

How To Setup OSMC with Raspberry pi for Media Automation.

Hello readers, 
In this blog I am gonna share the steps which you need to follow to setup Open Source Media Center (OSMC) also known as Kodi on Raspberry Pi and configure your own Home Media Center.
Step1 - Setting up OSMC on Raspberry Pi. ->Download OSMC from this link https://osmc.tv/download/ 
  • Install OSMC on the SD card, setup wireless connection by connecting Raspberry Pi with your home network (Wifi hotspot) at the time of installation. 
  • Insert the SD card in the Pi, connect the Pi with ethernet cable or wifi dongle, keyboard, mouse and HDMI cable before powering it on.

Step2 - Configuring unique ip address for listening on OSMC.
Step4 - Installing Kore Android/IOS application in your smart phone to control the media on OSMC.
Step5 - Connecting hard disk with OSMC installed Raspberrypi.
Step6 - Configure Kore app to listen on configured IP address.
With this step, your OSMC should be up & Running & you can seamlessly enjoy your movie experience. The next step talks further about how to automate your media center to be in sync with the local system media files, so that you do not have to manually push media files to your hard disk. Basically it gives you a plug and play feature! 
You need a Winscp client on your computer machine. The scripts are simple Winscp scripts which can be run from the command line. This is a part of my Open Source Project HoMeAu, you can check the scripts at this link: https://github.com/ak1801/HoMeAu
Step7 - Run winscp script - media_push.txt to push any media file to desired location on the hard disk. Pass the filepath as parameter while executing the script. Execute following command in cmd from winscp installation directory: winscp.com /script=media_push.txt /parameter // filepath\filename
Step8 - Automate the script for scheduled file transfer & sync local media directory with remote media directory using the script media_sync.txt.

IMPORTANT NOTE:

User osmc is not a root user, it does not have root permissions. To write copy any media in your hard disk, you need to have root level access. For this you need to add permissions in sudoers file located at (/etc/sudoers).
To can make changes to sudoers from putty/bash:
Create a back up of this file before editing using -> cp filename{,.bak}

Type visudo and press enter.

Navigate to the place you wish to edit using the up and down arrow keys.

Press insert to go into editing mode.

Make your changes - for example: user ALL=(ALL) ALL.

Note - it matters whether you use tabs or spaces when making changes.

Once your changes are done press esc to exit editing mode.

Now type :wq to save and press enter.

You should now be back at bash.

Now you can press ctrl + D to exit the session if you wish.

Tuesday, 7 July 2015

Ideas that will drive the future!

With due regards to the makers of IronMan 1/2/3, Her, Total Recall (both old and new), here are some Project Ideas on IoT which I feel is required to be built. 

Project Ideas:
  1. Emotion Control
    1. Benefits: More and more people are suffering from stress related ailments and diseases. Stress leads to changes in emotional responses like anger, fear/excitement to daily events. An IoT device that estimates one's stress level and provides primary alerts and secondary alerts either to indicate the stress level or to take precautionary measures will be useful.
    2. Implementation: The device will eventually boil down to a wearable (watch, etc.) that will sense/measure/track body vitals like breath, blood pressure, heart rate and maybe even get a visual of the person. Based on these data, an estimate of the person's stress level will be made using algorithms and then alert the primary and secondary users (doctors, parents, friends) when the person is getting stressed. A doctor's help would be needed in estimating the stress level.
    3. Challenges: Device power consumption requirements, form factor i.e. can it be designed to be seamlessly integrated into your daily life, customization, how to manage false alerts?, cost, etc.
  2. Jarvis
    1. Benefits: A personal assistant/virtual friend that understands your mood and customizes your home environment to suite your taste. Jarvis will be a robot like device that will control your home modem/WiFi router, lights, fans, AC, appliances using IoT enabled devices to create the best environment as per an individuals personal preferences. Jarvis will also be able to talk to you and maybe even see you to understand your mood.
    2. Implementation: 10-15 IoT enabled devices to control various electrical appliances and equipment in your home. 1 IoT enabled central command center either a server or PC that will talk to each IoT device and run machine learning algorithms to estimate your mood to create the required ambiance.
    3. Challenges: Machine learning algorithms, how is data security managed? cost of such a platform.
  3. Women & Child Safety
    1. Benefits: Provide a safe environment and means of protection for women, children and senior citizens by designing a device that will track movements, location, means of alerting primary and secondary users (parents, friends, others)
    2. Implementation: An IoT device that has a push button to send an alert and which can connect to a mobile device either via Bluetooth, WiFi. The device design can be based on Arduino. Device to bluetooth connectivity was demonstrated at an earlier hackathon. Will probably need geofencing to provide connectivity to the devices or other means of detecting device movements in a school environment. Device can also capture audio. Some colleges and schools have tried using IoT enabled ID cards that track entry and exit into premises.
    3. Challenges: How to manage device charging? How much battery power will be required? Can a cheap wearable from China be hacked to get some know how?