Forum
Home Automation - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Kodi (/forum-18.html)
+---- Forum: Addons (/forum-19.html)
+---- Thread: Home Automation (/thread-1783.html)

Pages: 1 2


Home Automation - Aweponken - 19th Nov, 2013 11:51 PM

Hello! I'm a bit new to Xbian and coding, but I'll try to make myself understood.

So I'm doing this project at school. I have a eGalax touch screen hooked up to my RPi. Via the GPIO of the Pi I have jumper cables hooked up to a relay board.
I want to use the touch screen to control the relay board.
So first off I flashed the RPi with Raspbian and made a simple Python script to make sure I could control the relay. Everything went just fine.
So now I've been chasing for some kind of UI to be able to control the relay in Xbian(or XBMC overall) instead.
I need a few things to be clear.
Is Xbian running as superuser? Is there anyway to make it run as superuser? Is there any other way to access the GPIO without running as superuser?
And the last question, is there anyone out there, who is able to make a simple addon to control the GPIO pins, or at least know how it could be made?!
Thanks in advanced,
Arvid


Re: Home Automation - f1vefour - 20th Nov, 2013 12:04 AM

When you say XBian root do you mean the user or XBMC?

I would take a look at @CurlyMo project: http://wiki.pilight.org/doku.php

Not exactly what your after since it's aim is wireless, although it could be made to work in your situation.


RE: Home Automation - Aweponken - 20th Nov, 2013 02:41 AM

(20th Nov, 2013 12:04 AM)f1vefour Wrote:  When you say XBian root do you mean the user or XBMC?

I would take a look at @CurlyMo project: http://wiki.pilight.org/doku.php

Not exactly what your after since it's aim is wireless, although it could be made to work in your situation.
Thanks for reply!
Uhm, root as if I were able to access the GPIO pins via an addon, does that help? Sorry for bad knowledge..

Thanks a lot for the link! At least it seems possible! (Hurray!)


RE: Home Automation - belese - 20th Nov, 2013 02:57 AM

If you need root in an addon,
maybe you can do a wrapper script, call it from addon with sudo, and add the script in sudoers,
it won't need to run xbmc in root.


RE: Home Automation - CurlyMo - 20th Nov, 2013 05:23 AM

(20th Nov, 2013 12:04 AM)f1vefour Wrote:  When you say XBian root do you mean the user or XBMC?

I would take a look at @CurlyMo project: http://wiki.pilight.org/doku.php

Not exactly what your after since it's aim is wireless, although it could be made to work in your situation.
pilight does not only do wireless, but also wired devices like 1-wire sensors, relays and such.


Re: RE: Home Automation - f1vefour - 20th Nov, 2013 05:57 AM

(20th Nov, 2013 05:23 AM)CurlyMo Wrote:  
(20th Nov, 2013 12:04 AM)f1vefour Wrote:  When you say XBian root do you mean the user or XBMC?

I would take a look at @CurlyMo project: http://wiki.pilight.org/doku.php

Not exactly what your after since it's aim is wireless, although it could be made to work in your situation.
pilight does not only do wireless, but also wired devices like 1-wire sensors, relays and such.

I meant controlling the devices wirelessly.


RE: Home Automation - CurlyMo - 20th Nov, 2013 06:29 AM

Just like i said, you can do all that with pilight as it is able to control relay's and has an integrated webclient.


RE: Home Automation - Skywatch - 20th Nov, 2013 07:39 PM

Also consider WebIOPI.

I am looking at this over Christmas break and hope to get some things working then. I already have some sensors working with it.

Skywatch


RE: Home Automation - CurlyMo - 20th Nov, 2013 08:03 PM

The difference is that it's not specialized in domotica which pilight is.


RE: Home Automation - Aweponken - 20th Nov, 2013 10:52 PM

(20th Nov, 2013 02:57 AM)belese Wrote:  If you need root in an addon,
maybe you can do a wrapper script, call it from addon with sudo, and add the script in sudoers,
it won't need to run xbmc in root.
This seems like it could be working idea. I'll be looking for some plugin to modify, since I'm not capable of doing one from scratch(I think).


(20th Nov, 2013 06:29 AM)CurlyMo Wrote:  Just like i said, you can do all that with pilight as it is able to control relay's and has an integrated webclient.
Pilight seems awesome, but does it have an addon so you could install it directly to XBIAN?
Or do I have to build my own addon based on the webclient?

(20th Nov, 2013 07:39 PM)Skywatch Wrote:  Also consider WebIOPI.

I am looking at this over Christmas break and hope to get some things working then. I already have some sensors working with it.

Skywatch

Seems to be quite the same thing as pilight. Also webbased. Do you control your relay with the PI, or do you use a WEBGUI running on a different computer?

Thanks again for all your answers guys!


RE: Home Automation - CurlyMo - 20th Nov, 2013 11:48 PM

First it's pilight not Pilight.

Check this thread for xbmc integration: http://www.pilight.org/Thread-My-setup-XBMC-event-based-lighting

Installing into XBian can be done by using the pilight apt repo.

WebIOPI is not the same as pilight. webIOPI controls basic hardware interfaces. pilight lets you also control hardware interfaces but also includes many protocols to decode various wired and wireless protocols. pilight also offers a JSON API so you can use various GUIs to control your devices. There are already people working on mobile phone apps, there is a cross-platform java GUI and just like webIOPI a integrated webserver / GUI. In pilight, the hardware interfaces, protocols, and clients (through the API) are fully modular. It's written in C so low-profile and fast. You can check http://wiki.pilight.org for a full description.


RE: Home Automation - IriDium - 21st Nov, 2013 03:36 AM


This is not a problem - Prefix removed



RE: Home Automation - Skywatch - 28th Nov, 2013 01:53 AM

I have some 2.4GHz transceivers on order. Will pilight come with NRf24L01+ drivers or code installed ready to use?

Just curious as it's been a while since you started on this porject.

Cheers

Skywatch


RE: Home Automation - CurlyMo - 28th Nov, 2013 05:48 AM

No, but hardware support is modular but easily created.


RE: Home Automation - Aweponken - 5th Feb, 2014 09:35 AM

(20th Nov, 2013 11:48 PM)CurlyMo Wrote:  First it's pilight not Pilight.

Check this thread for xbmc integration: http://www.pilight.org/Thread-My-setup-XBMC-event-based-lighting

Installing into XBian can be done by using the pilight apt repo.

WebIOPI is not the same as pilight. webIOPI controls basic hardware interfaces. pilight lets you also control hardware interfaces but also includes many protocols to decode various wired and wireless protocols. pilight also offers a JSON API so you can use various GUIs to control your devices. There are already people working on mobile phone apps, there is a cross-platform java GUI and just like webIOPI a integrated webserver / GUI. In pilight, the hardware interfaces, protocols, and clients (through the API) are fully modular. It's written in C so low-profile and fast. You can check http://wiki.pilight.org for a full description.

So, I'm bringing up this old thread again, as I'm picking up the project. I've been looking at both pilight and webIOPI. WebIPOI has a terrible looking UI and poor cross-platform compatibility.
So, I've decided to use pilight.
Thanks for the link CurlyMo, but I'm looking for a UI. I want to be able to press a specific button to light a certain lamp. I guess I have to intergrate the UI into Xbian by myself, but maybe you could help me set it up so I can control the relayboard from the webUI?
Thanks in advance