FORUM FIBARO
Forum systemu FIBARO

| FAQ |  Search |  Memberlist |  Usergroups |
| Register |  Log in |

Previous topic «» Next topic
Home Center - Xbmc
Author Message
Shad

Age: 31
Joined: 28 Jan 2013
Posts: 991
Location: Gabon
Posted: 2013-03-15, 23:42   Home Center - Xbmc

LINK PLUGIN

I am glad to share the new release.
Here the repository

A lot of new feature for this addon:
- Add Virtual device in zip file
- Improvement for scene, only need 3 scene for everything
- Add PVR system (didn't try to material for that)
- Add display of playlist, I know problem on display
- Add a panel for camera system, so only need to press button for all of your scene
- Remote control compatible with music and video
- Possibility to show 8 camera on system

Here how to implement everything in you system.

- Global Variable
You need to create a global Variable with value. I will use Xbmc_Salon and for the value:
- Empty
- Movies
- TVShows
- PVR
- Music

- How to virtual device
You must import virtual device. File is in zip file.
You just need to edit ip and port on the top and in button 12, add name of new profile xmbc for slave.



- Scene
You need to Create 3 scenes and edit room with you global variable name:
Start Scene:
Code:
--[[
%% properties
%% globals
--]]
local room = "Xbmc_salon";
local startSource = fibaro:getSourceTrigger();

if ( startSource["type"] == "other" ) then
  fibaro:sleep(5*1000);
  if ( fibaro:getGlobalValue(room) == "Empty" ) then
    fibaro:setGlobal(room, "Movies");
  end
  if ( (fibaro:getGlobalValue(room) == "Movies") or (fibaro:getGlobalValue(room) == "TVShows") ) then
    -- Code for Movie or TVShows
  elseif ( fibaro:getGlobalValue(room) == "Music" ) then
    -- Code for Music
  elseif ( fibaro:getGlobalValue(room) == "PVR" ) then
    --  Code For PVR
  end
  fibaro:sleep(60*1000);
end


Pause scene:
Code:
--[[
%% properties
%% globals
--]]
local room = "Xbmc_salon";
local startSource = fibaro:getSourceTrigger();

if ( startSource["type"] == "other" ) then
  if ( (fibaro:getGlobalValue(room) == "Movies") or (fibaro:getGlobalValue(room) == "TVShows") ) then
    -- Code for Movies and TVShows
  elseif ( fibaro:getGlobalValue(room) == "Music" ) then
    --  Code for Music
  elseif ( fibaro:getGlobalValue(room) == "PVR" ) then
    --  Code for PVR
  end
    fibaro:sleep(60*1000);
end


End scene, edit Vdevice to put virtual device number:
Code:
--[[
%% properties
%% globals
--]]

local room = "Xbmc_salon";
local Vdevice = 104;
local startSource = fibaro:getSourceTrigger();
if ( startSource["type"] == "other" ) then
  if ( (fibaro:getGlobalValue(room) == "Movies") or (fibaro:getGlobalValue(room) == "TVShows") ) then
    -- Code for Movies and TVShows
  elseif ( fibaro:getGlobalValue(room) == "Music" ) then
    -- Code for Music
  elseif ( fibaro:getGlobalValue(room) == "PVR" ) then
    -- Code for PVR
  end
  fibaro:setGlobal(room, "Empty");
  fibaro:call(Vdevice, "setProperty", "ui.sldPercentage.value",'0');
  fibaro:call(Vdevice, "setProperty", "ui.lblXbmc1.value",'');
  fibaro:call(Vdevice, "setProperty", "ui.lblXbmc2.value",'');
  fibaro:call(Vdevice, "setProperty", "ui.lblXbmc3.value",'');
  fibaro:call(Vdevice, "setProperty", "ui.lblTime.value",'00:00:00/00:00:00');
  fibaro:sleep(60*1000);
end


For me I also use global variable for weather and day/night to more possibility to have different scenario
We finish to configure HC2, now for xbmc.
Install zip file.

- Configuration of Xbmc
For configuration:
If you use virtual device, you must put the number and configure Yes for it.
Edit global variable name and you can write Season in you langage to appear proprely in virtaul device.
You can after put image number from you hc2 to change the picture for each action in Xbmc.
And for the scene just put the id number.
For the camera just use url like that but depend of you camera. For someone you can only use screenshot.
Code:
http://user:password@ip/url...

And new profile for child.



That's all, you only need to restart HC2 and normally all is ok.

Thanks to 2Fhomeawesomation to allow me to use his code and edit it for camera.
Thanks to Krikroff and Andrew to help me.


Edit:

- Version 0.0.2

- Version 0.0.3
Add Music scene

- Version 0.0.4
Add Ip camera

- Version 0.0.5
Debug Camera 3
Custom icon by place (put the icon in the folder of the addon, and write the name in the configuration)

- Version 0.0.7
Add statut with virtual device

- Version 0.1.0
Add Notification in label

- Version 0.1.3
- Add virtual device
- Improvement of Scene
- Improvement of control Music/video
- Add PVR (no system to try)
- Add playlist (display not correct)
- Add panel for camera
- Version 0.1.1
Debug
Add view 4 camera

Xbmc.vfib
Download 298 Time(s) 21.19 KB

fibaro.addon-0.1.1.zip
Download 1326 Time(s) 71.14 KB

repository.passion.xbmc.org.frodo-3.0.1.zip
Download 756 Time(s) 1.28 MB

_________________
How to:
- Your own sms Gateway
- Plugin Xbmc
- Philips HUE
Last edited by Shad on 2014-05-08, 19:26; edited 15 times in total  
 
 
stevenvd 
Electronic Engineer


Age: 26
Joined: 26 Sep 2012
Posts: 708
Location: Netherlands
Posted: 2013-03-18, 08:27   

Oah, it took me a few times reading to understand what exactly you made. But it's an addon for XMBC.

Just installed and tested it, it works great! Was looking for this. or actually wanted to make it myself ;) but you already did :D

great addon. Just a reminder to people. if you change the settings of the plugin (which are in: Enable addon > Services > Fibaro) that you have to restart XBMC before the changes will work.
_________________
Complete solutions by www.controlliving.nl

How to Build:
A Wake up Light
Fibaro Soft Alarm
 
 
Shad

Age: 31
Joined: 28 Jan 2013
Posts: 991
Location: Gabon
Posted: 2013-03-21, 11:04   

Fibaro, I would like to try to make also as home page et meteo the thing like that:

http://www.fibaro.com/images/eng/sys_multi.png

Does it possible to give me all picture (meteo - background....)?
_________________
How to:
- Your own sms Gateway
- Plugin Xbmc
- Philips HUE
 
 
stevenvd 
Electronic Engineer


Age: 26
Joined: 26 Sep 2012
Posts: 708
Location: Netherlands
Posted: 2013-03-21, 12:04   

I was thinking of building that to.
this: http://www.theverge.com/2...y-netv-smart-tv
in combination with a UI could make a great overlay for the HDMI for if your doorbell rings orso.

And for if you want to show the weahter or different information, U can use a rasperrypi running XBMC. and you have a great combination.

Just a lot of work....
but if you want to make it for XBMC, I would love to help. Just don't have a lot of time at the moment ;)
_________________
Complete solutions by www.controlliving.nl

How to Build:
A Wake up Light
Fibaro Soft Alarm
 
 
Shad

Age: 31
Joined: 28 Jan 2013
Posts: 991
Location: Gabon
Posted: 2013-03-21, 12:51   

stevenvd wrote:
I was thinking of building that to.
this: http://www.theverge.com/2...y-netv-smart-tv
in combination with a UI could make a great overlay for the HDMI for if your doorbell rings orso.

And for if you want to show the weahter or different information, U can use a rasperrypi running XBMC. and you have a great combination.

Just a lot of work....
but if you want to make it for XBMC, I would love to help. Just don't have a lot of time at the moment ;)


I have huge multimedia network.

I connect parent's and brother's house and my network with ubiquiti antenna. So actually I have 4 HTPC and 3 raspberry and 2 House using HC2. And all xbmc are connected to my server and I use cardsharing for every body have pvr.

But before to do that I want finish a feature on my plugin.
 
 
stevenvd 
Electronic Engineer


Age: 26
Joined: 26 Sep 2012
Posts: 708
Location: Netherlands
Posted: 2013-03-24, 16:46   

Do you think there is a possibility to know the difference between playing videos (movie or shows) or music...
As I want different scenes to launch. for the movie the lights need to be dimmed. But if I turn on some music I don't want anything else to happen...

By the way I made a nice scene. (simple but effective)

If the doorbel rings. it sends a notification to the XBMC. and if the movie is playing, pause it...
and then, turn on the Chime of the everspring doorbell.
_________________
Complete solutions by www.controlliving.nl

How to Build:
A Wake up Light
Fibaro Soft Alarm
 
 
Adv.Usr.deraaij 

Age: 35
Joined: 19 Jul 2012
Posts: 379
Location: Netherlands
Posted: 2013-03-24, 17:14   

stevenvd wrote:
Do you think there is a possibility to know the difference between playing videos (movie or shows) or music...
As I want different scenes to launch. for the movie the lights need to be dimmed. But if I turn on some music I don't want anything else to happen...

By the way I made a nice scene. (simple but effective)

If the doorbel rings. it sends a notification to the XBMC. and if the movie is playing, pause it...
and then, turn on the Chime of the everspring doorbell.


Yes, using json: http://wiki.xbmc.org/inde...t_is_playing.3F
_________________
Regards,

Mark
 
 
stevenvd 
Electronic Engineer


Age: 26
Joined: 26 Sep 2012
Posts: 708
Location: Netherlands
Posted: 2013-03-24, 17:16   

Ah thanks! Stupid, missed that one!
_________________
Complete solutions by www.controlliving.nl

How to Build:
A Wake up Light
Fibaro Soft Alarm
 
 
Lauri 

Age: 29
Joined: 06 Apr 2012
Posts: 535
Location: Estonia
Posted: 2013-03-24, 17:55   

How do you send notification to XBMC? Does it show up on the screen?
_________________
Get Your preconfigured Fibaro solutions here: http://shop.indome.ee/

Tell us what You need and we ship it to You configured so just "plug & play"

FIBARO Exlcusive Partner Estonia
 
 
Shad

Age: 31
Joined: 28 Jan 2013
Posts: 991
Location: Gabon
Posted: 2013-03-24, 20:42   

I going to include the music also.

For notifications you need to create one by device for the moment until I can found a lua code to do that.

Edit: but I must finish an other code to get the transfer of movie alone. But not so easy to do that. I must also finish to reconfigure my HC2. Too many test on it :-)
 
 
Adv.Usr.deraaij 

Age: 35
Joined: 19 Jul 2012
Posts: 379
Location: Netherlands
Posted: 2013-03-24, 20:51   

Shad wrote:
I going to include the music also.

For notifications you need to create one by device for the moment until I can found a lua code to do that.

Edit: but I must finish an other code to get the transfer of movie alone. But not so easy to do that. I must also finish to reconfigure my HC2. Too many test on it :-)


tcp example:
Code:
{"jsonrpc": "2.0", "params": {"message": "There is someone at the door!", "title": "HC2 Notification"}, "method": "GUI.ShowNotification", "id": "GUI.ShowNotification"}


lua example:
Code:
tcpSocket = Net.FTcpSocket("192.168.1.22", 9090)
bytes, errorCode = tcpSocket:write('{"jsonrpc": "2.0", "params": {"message": "There is someone at the door!", "title": "HC2 Notification"}, "method": "GUI.ShowNotification", "id": "GUI.ShowNotification"}')

if errorCode == 0
then
  -- printing log under virtual device
  fibaro:log("transfer OK")
else
  fibaro:log("transfer failed")
end
_________________
Regards,

Mark
 
 
stevenvd 
Electronic Engineer


Age: 26
Joined: 26 Sep 2012
Posts: 708
Location: Netherlands
Posted: 2013-03-24, 21:14   

@Shad, thanks for the fast respond ;)
You can also use predefined variables for different messages... so you can show a different message if somethings happends....

@Lauri yes, they show up on the screen :)
_________________
Complete solutions by www.controlliving.nl

How to Build:
A Wake up Light
Fibaro Soft Alarm
 
 
Lauri 

Age: 29
Joined: 06 Apr 2012
Posts: 535
Location: Estonia
Posted: 2013-03-24, 21:45   

Hmm, can you explain it more simple for me... I do not understand at the moment - how to send notification to screen of my xbmc
_________________
Get Your preconfigured Fibaro solutions here: http://shop.indome.ee/

Tell us what You need and we ship it to You configured so just "plug & play"

FIBARO Exlcusive Partner Estonia
 
 
Shad

Age: 31
Joined: 28 Jan 2013
Posts: 991
Location: Gabon
Posted: 2013-03-24, 23:16   

With virtual device.
You can find all your answer on previous post for xbmc.

deraaij,

Problems with the HC2 are:
- Virtual device don't have access to data like Variables.
- You can't use Net.FTcpSocket from scene.
- We can't send variables from scene to virtual device like local test = fibaro: getName
to the virtual device. Juste that can be very nice to not have 20 virtual device.

These problemes block good sript.
_________________
How to:
- Your own sms Gateway
- Plugin Xbmc
- Philips HUE
 
 
stevenvd 
Electronic Engineer


Age: 26
Joined: 26 Sep 2012
Posts: 708
Location: Netherlands
Posted: 2013-03-25, 08:37   

@Lauri:
make a virtual device with the Ip of your XBMC Machine.
the port you need is 9090
in the screenshot you can see how I send a notification to XBMC.
The code again here:
command:/jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"TITLE HERE","message":"MESSAGE HERE"},"id":1}

then just put your message where mine says: Message here.
and the title where it says title here.
and your done :D

xbmc message.png
1081 Time(s) 19.87 KB

_________________
Complete solutions by www.controlliving.nl

How to Build:
A Wake up Light
Fibaro Soft Alarm
 
 
Display posts from previous:   
Reply to topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Add this topic to your bookmarks
Printable version

Jump to:  

Powered by phpBB modified by Przemo © 2003 phpBB Group
Theme created by kemustek from Forum PC
Page generated in 0.13 second. SQL queries: 14