Page 1 of 7

How use Room Plan ?

Posted: Friday 06 June 2014 15:58
by pipersw
I don't understand how to use Room Plan. I don't find any notes in the manual.
Someone could explain me ?

Re: How use Room Plan ?

Posted: Friday 06 June 2014 16:03
by SweetPants
pipersw wrote:I don't understand how to use Room Plan. Someone could explain me ?
Create a room plan "livingroom' and put all you devices in the livingroom in there. In the dashboard you can select 'livingroom' and then you have a selected number of devices on your dashboard instead of 'all'

Re: How use Room Plan ?

Posted: Friday 06 June 2014 16:16
by pipersw
ok.
I was thinking that was like in Z-Way:
Image

I'm wrong.
Thx

Re: How use Room Plan ?

Posted: Friday 06 June 2014 16:29
by Dynamic
pipersw wrote:ok.
I was thinking that was like in Z-Way:
Image

I'm wrong.
Thx
A lot of users would like to have it, but nobody had time or was able to build it. I have the time, but not the skills ;-)

Re: How use Room Plan ?

Posted: Monday 07 July 2014 8:09
by Dnpwwo
I'm working on adding floor plans at the moment. I can create plans, define rooms by clicking on the plan, zoom in on rooms by clicking on them, drag and drop devices and the icons change in line with device state (like in the dash board).

I'm working on popping up an extended status when the icon is clicked but I can't use the existing JavaScript because it is HTML based and I had to use SVG so it is taking a while.

Works on Chrome, Firefox, IE, iPad (iOS 7 and above). I could post some screenshots if people are interested to get some feedback.

Re: How use Room Plan ?

Posted: Monday 07 July 2014 8:38
by Dynamic
I'm interested en could help you testing?

Re: How use Room Plan ?

Posted: Monday 07 July 2014 16:18
by Dnpwwo
Basic editing screen to create a floor plan and allocate room plans to it. Images need to be put somewhere under the www folder prior to using. I've used existing room plan functionality to map devices to rooms. Devices have been dragged to required locations.
Floorplan.jpg
Floorplan.jpg (240.37 KiB) Viewed 17779 times
Clicking on a room zooms in which will be required on smaller screen sizes
Floorplan zoom.jpg
Floorplan zoom.jpg (247 KiB) Viewed 17779 times
Obviously final floor plan page will have all the devices for all the rooms on a plan and you will be able to zoom on any room by clicking on it.

Should work okay on both 2D and 3D floor plans.

The blue is negotiable :lol:

Re: How use Room Plan ?

Posted: Monday 07 July 2014 17:20
by Dynamic
Wow, that looks awesome!

Re: How use Room Plan ?

Posted: Monday 07 July 2014 21:57
by mvdl
Looking good, Dnpwwo!!!

You're making me very curious. When can we see a demo? What's the implementation behind it?

Re: How use Room Plan ?

Posted: Tuesday 08 July 2014 8:48
by Dnpwwo
I should be able to create a demo in a few weeks. I only get to work on it for a few hours per week and there are a couple of things I need to complete first.

The implementation is very simple, I re-used all the table code and ajax mechanism from elsewhere in the app. The actual room definition and device positioning is just a few SVG tags with a small amount of JavaScript to manipulate the browsers DOM. There is not much in the way of a shared knowledge base around SVG on the web so I go down a dozen blind alleys before working out how to do things, once they work it all looks easy with hindsight.

Re: How use Room Plan ?

Posted: Wednesday 09 July 2014 16:30
by Eximos
Oh i like this, one of the features i miss the most in Domoticz :)

Could probably make something myself but i never have the energy to make something for the public with settings and all the things around. :)

Re: How use Room Plan ?

Posted: Tuesday 22 July 2014 7:22
by qwerk
Wow
this looks nice, Ican't wait to see a demo, or better I can't wait to use it.
Kepp up the good work Dnpwwo

greetings
Qwerk

Re: How use Room Plan ?

Posted: Tuesday 22 July 2014 14:29
by Dnpwwo
I'm getting close to a Beta version and will need some feedback from the Domoticz community on some of the visual elements of it.

The editing page is mostly unchanged from the previous post (although zoomed view now previews how the main page will work) but I have an initial version of the main page working. Hovering over a device (or clicking on a tablet device) will popup the current details.
Zoomedout.jpg
Zoomedout.jpg (168.73 KiB) Viewed 17526 times
Clicking on a room zooms in like so:
Zoomed.jpg
Zoomed.jpg (152.96 KiB) Viewed 17526 times
I just need to fix this problem :cry:
Dodgy.jpg
Dodgy.jpg (30.31 KiB) Viewed 17526 times
Device support will not be great initially but there is fall back code so all devices should at least appear and adding them should be relatively easy.

Re: How use Room Plan ?

Posted: Tuesday 22 July 2014 17:33
by Dynamic
Did you take a look on the z-index of the elements? I'm not a css-expert, but I think that's your problem.

Re: How use Room Plan ?

Posted: Tuesday 22 July 2014 17:53
by remb0
Looks great. Can't wait tot test it.

Re: How use Room Plan ?

Posted: Wednesday 23 July 2014 22:33
by tommysharp
Have you considered being able to create shortcuts to other room plans? So if you have a multi story home there is a way to link to and open up other levels.... Being able to just mask out a section of the background image would be ideal because then we can photoshop some buttons in and then make them clickable with a link to another plan.

Being able to overlay charts would be awesome! My ultimate end goal is to have a tablet on the wall that shows a dashboard type home page with various important switches and charts. This would just be a nice image I've knocked up in Photoshop with various switches and graphs overlayed and also has buttons to go to each house level and then from there you can zoom into each room.

Do you think it'll be possible to show different icons for devices/switches based on their state? For example if a light is on then show an icon of a glowing bulb, if it's off then a grey bulb... something like that...

What you've got so far is awesome and is very exciting!

Re: How use Room Plan ?

Posted: Thursday 24 July 2014 5:48
by Dnpwwo
@Dynamic - Z order is indeed the issue but the pages use SVG (http://en.wikipedia.org/wiki/Scalable_Vector_Graphics) rather than straight HTML so the resolution was not immediately obvious. In SVG the Z order is only implicit so it took a bit of re-jigging to make it come out right (works now :D ).

@tommysharp - The initial implementation will include state sensitive icons (and details) that will update on screen exactly like the current dashboard does. I consider that a key feature in making the floor plan functionality useful. I have not considered 'in image' links to move between floors, I do have 'Next' and 'Previous' buttons to do that currently but if there is sufficient interest from the user community it could be added fairly easily. Your other ideas around mixing charts, floors plans and devices on a single page sounds a little outside my current scope. Maybe you should start a separate thread for that.

Re: How use Room Plan ?

Posted: Sunday 27 July 2014 14:44
by Dnpwwo
First version of floorplan functionality committed today in build 1.1836. Be careful though some people (including me) have had trouble with Z-Wave devices not working as well in the last few Betas (not related to floorplan stuff).

I haven't put it into the site navigation yet until its been shaken out by some alpha-testers so have a look and let me know. Before you start you will need some 'Room plans' with some devices allocated to them, these are the same things that the dashboard uses so you probably already have some.

Then just follow these steps:
1. Add your floorplan image(s) to your Domoticz server somewhere under the www folder (I created a 'floorplans' folder under 'images')
2. Navigate to http://myserver:8080/#Floorplanedit and hit the 'Add floorplan' button. Enter the relative path to your image, mine was 'images/floorplans/Ground Floor.jpg' and supply a name. Repeat as required. You can tell if you got the filename right because the image will appear at the bottom when you click on the table row. 1920x1080 images work best because that is what I developed against, other sizes will work but the graphics may not be a good size (I'll do some more scaling work in an upcoming release).
3. The drop down above the image will have a list of unallocated Room Plans, click the Add button to add to the current floor, you can 'Delete' them later
4. To define a room, select a Room Plan from the table and click around the image where you want the room to be, the first click doesn't show anything but Don't Panic! because subsequent clicks will allow you to draw a polygon for your room, takes practice but use the 'Clear' button to wipe it out and try again. Click on the room itself to test out how it will zoom in on the main screen.
5. Devices allocated to the room should appear top left the first time, just drag them to where you want them (drag a bit slowly on Chrome otherwise it drops them). Updates are not applied until you hit the 'Update' button.

The main screen is at http://myserver:8080/#Floorplans. If you created more than one floor plan there will be navigation buttons at the top that cycle through plans, the order can be set back in the edit screen.

Like on the other device oriented pages the icons update regularly to reflect status, hovering the mouse over an icon (or clicking on one on a tablet) will popup a more detailed display (which will also update). Clicking on that display will either activate the device or jump to the log display page depending on the device type. Device support will be patchy for you at the start (its 100% for me :lol: ) but I can't tell what won't work because the code tries to use (semi-)intelligent defaults. To fix things I'll need:
1. A screen shot of what it should look like (from a different page)
2. A screen grab of what it does look like
3. If you can, the data that it uses. There a couple of ways to do this but the easiest (if you use Chrome) is to right-click on the popup in question and select 'Inspect Element' which gives you a page like this:
Untitled.jpg
Untitled.jpg (137.37 KiB) Viewed 17390 times
Above the highlighted image tag is a list of devices and the first one up is the one you want (in my case "Lighting262"), make a note of that and then go further up to the 'g' tag called DeviceData, click on the triangle next to it and expand it and find the device with the same ID and copy the HTML (right click-> Edit->Ctrl-C). It will look like this:

Code: Select all

{"AddjMulti":1,"AddjMulti2":1,"AddjValue":0,"AddjValue2":0,"BatteryLevel":255,"CustomImage":1,"Data":"On","Favorite":1,"HardwareID":2,"HardwareName":"OpenZWave","HaveDimmer":true,"HaveGroupCmd":true,"HaveTimeout":false,"ID":"0001801","Image":"WallSocket","IsSubDevice":false,"LastUpdate":"2014-07-22 22:15:56","Level":0,"LevelInt":0,"MaxDimLevel":16,"Name":"Garage Power Switch","Notifications":"false","Protected":true,"SignalLevel":7,"Status":"On","StrParam1":"","StrParam2":"","SubType":"AC","SwitchType":"On/Off","SwitchTypeVal":0,"Timers":"false","Type":"Lighting 2","TypeImg":"lightbulb","Unit":1,"Used":1,"UsedByCamera":false,"XOffset":"601","YOffset":"783","idx":"62"}
and I will add it.

Please also post images of how you use it and what does work well so I can get a better feel what I need to change.

Re: How use Room Plan ?

Posted: Monday 28 July 2014 1:09
by tommysharp
I'm keen to give this a try....

Any pointers on where I can find info on how to upgrade my Raspberry Pi to this version? It's currently running 1.1832....

Re: How use Room Plan ?

Posted: Monday 28 July 2014 11:45
by Dnpwwo