SwichKingPi an Image

General questions and comments.
gorhak
3 stars
3 stars
Posts: 59
Joined: Wed 28 Sep 2011, 15:35
Location: Spånga

SwichKingPi an Image

Post by gorhak » Fri 07 Nov 2014, 20:11

SwitchKingPi an Image
for RaspberryPi, ver B+ and 2, with Telldus and SwitchKing running on Mono HardFloat

Download attached torrent:
2015-02-08-SwitchKingPi-4G.torrent
Unpack it with 7-zip to obtain the img-file
2015-02-08-SwitchKingPi-4G.img

Write image to SD card, minimum 4GB but I recomend 8GB, using Win32DiskImager.exe
(I use: Transcend TS16GUSDHC10U1 Ultimate 600x MicroSDHC Memorycard - 16GB)

Put SD card in RaspberryPi and start

Figure out your RaspberryPi:s IP addres. (Check your router, or DHCP server)

Connect from windows using PuTTY.

Start raspi-config:
-Expand the file system
-Set your configuration/language and keyboard, swedish is selected
-Select overclocking if you want, 700MHz selected. However, don't use Turbo if you'r runing RPi 2.

Stop SwitchKing Service
/etc/init.d/switchkingd stop

Brows your network for SwichKingPi from windows and open SwitchKing Server/DB/

If you alredy have, copy your switchKing.server.db3 to DB folder and change permissions and ownership
sudo chmod 666 /bin/SwitchKing/Bin/DB/switchKing.server.db3
sudo chown pi:pi /bin/SwitchKing/Bin/DB/switchKing.server.db3

Start SwichKing's supervision crontab-job on SwichKingPi
crontab -e
remove the # form the lines that looks like
# */1 * * * * nice -n19 sudo bash /usr/local/sbin/switchking.sh
# */10 * * * * nice -n19 sudo bash /usr/local/sbin/telldus.sh
and save: ctrl-X Y Enter

The SwitchKing service will start within a minute, check with
skstatus.sh

From SwitchKing Client on Windows connect to SwichKingPi, remembering your IP

If you have a big DB you may need to extend the timouts in the Clients config file.
I used 1 hour for all these four (don't forget to change back), ex from windows:
C:\Program Files (x86)\Switch King\Switch King Client\SwitchKingPro.exe.config
...
<binding name="WSHttpBinding_FrameworkService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
...

There are five bash scripts that runs as crontab-jobs located in /usr/local/sbin/
switchking.sh: Checks if switchkingd is running every minute, if not it: starts switchking service
telldus.sh: Checks if telldusd is running every 10 minute, if not it restarts telldus and switchking services
maintenance.sh: Runs a maintenance / updating job every day at 02:00
restart.sh: Restrats telldus and swichking services every day at 05:00
boot.sh: Updates RPI firmware and reboots the SwitchKingPi every Monday morning at 03.00

There are two other bash scripts in /usr/local/sbin/
skstatus.sh: Prints the status of telldus and switchking daemons
cleanlogs.sh: Deletes the log files, remaining the links on ~/

If you want to reproduce it yourself, or just curious check this
2015-02-08-SwitchKingPi-helperfiles.7z.torrent
GOOD LUCK
Göran
You do not have the required permissions to view the files attached to this post.
Last edited by gorhak on Sun 08 Feb 2015, 21:43, edited 2 times in total.

chris
3 stars
3 stars
Posts: 136
Joined: Tue 09 Nov 2010, 21:51

Re: SwichKingPi an Image

Post by chris » Sat 08 Nov 2014, 22:27

Fungerar perfekt tusen tack :D

albinsson
3 stars
3 stars
Posts: 117
Joined: Sat 17 Dec 2011, 20:28

Re: SwichKingPi an Image

Post by albinsson » Tue 11 Nov 2014, 11:57

Fungerade finfint enligt din guide! Tack så mycket
Tyvärr blev mitt system alldeles för segt för att det ska vara användbart. Jag fick köra vidare på min Windows 8 netbook.
Vet inte, men kan det bero på att man har för många enheter? Min server DB ligger på ca 15Mb

The_Lizzard
1 star
1 star
Posts: 1
Joined: Sun 23 Nov 2014, 15:43

Re: SwichKingPi an Image

Post by The_Lizzard » Sun 23 Nov 2014, 15:48

Funkar klockrent! Tusen tack! :D

600gts
1 star
1 star
Posts: 3
Joined: Mon 28 Oct 2013, 14:54

Re: SwichKingPi an Image

Post by 600gts » Sun 23 Nov 2014, 20:38

Tjoho, sugen på att testa detta. Nån som kan dela imagen?

///Mattias

OMX-dulfer
1 star
1 star
Posts: 3
Joined: Mon 23 Jul 2012, 17:14

Re: SwichKingPi an Image

Post by OMX-dulfer » Tue 25 Nov 2014, 23:57

Fungerar klockrent. Stort tack!!
It work´s perfect. Many thanks!!

600gts
1 star
1 star
Posts: 3
Joined: Mon 28 Oct 2013, 14:54

Re: SwichKingPi an Image

Post by 600gts » Thu 27 Nov 2014, 21:58

Hej

Tack för detta, laddade in det hela igår å det funkar fin fint ännu :-)

Jag delar den Bosse så det borde funka för dig att dra från mig?

MVH
Mattias

gorhak
3 stars
3 stars
Posts: 59
Joined: Wed 28 Sep 2011, 15:35
Location: Spånga

Re: SwichKingPi an Image

Post by gorhak » Thu 27 Nov 2014, 22:58

Min dator står alltid på och mytorrent likaså. Nedladdad ett tiotal gånger så det borde finnas ett antal användare som också delar ut. Jag antar att man delar med sig efter att ha laddat hem. Får in timeout så försök igen, eller kanske kolla om det går att förlänga tiden för timeout.
Göran

OMX-dulfer
1 star
1 star
Posts: 3
Joined: Mon 23 Jul 2012, 17:14

Re: SwichKingPi an Image

Post by OMX-dulfer » Sat 29 Nov 2014, 00:29

Seedar på jag med :wave:

metalic
1 star
1 star
Posts: 2
Joined: Sat 29 Nov 2014, 22:13

Re: SwichKingPi an Image

Post by metalic » Sat 29 Nov 2014, 22:16

Hej! Sjukt bra guide och image. Det bara "funkar" hur bra som helst!

Jag har en fundering dock, hur får jag detta registrerat med Telldus Live? Skulle vilja kunna använda Tellevent på iOS som förlitar sig helt på Tellevent Live!.

Tack oavsett, /metalic

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest