My new PI screen

Post Reply
bluepi
Posts: 33
Joined: Tuesday 27 October 2015 22:37
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

My new PI screen

Post by bluepi » Friday 09 September 2016 13:04

After playing with Domoticz for sometime and expanding on it use around the house I decided I needed another way to interact with it.

Guests, kids, other half etc...

So I bought a raspberry pi touchscreen with the idea of mounting it in the wall in each room. So I played with lots of the web designs on here and I could not find one that did exactly what I wanted. Got loads of inspiration from many of the other projects here, before deciding on the best approach for my mind....

Only gets the devices from the roomplanner (seems easier to organise)
Displays on a small screen without slider bars
Template so room to room changes are easy (organise IDX, Names etc)

So started in the Living Room.

So I bit the bullet and built one (Mainly in PHP)

Beta 1
IMG_20160908_165551.jpg
IMG_20160908_165551.jpg (119.52 KiB) Viewed 5895 times
Still got lots of work and loads of inspiration from many of the other projects...

Still stuck on refreshing each div in a nice way and the best way to check devices states. Dont like a refresh query to check every x seconds kind of leaning towards a lua script to update the php server if there is a change and a full check every 10 mins or so, from the PHP server to compare the JSON. But i dont know if there is a better cleaner way, any help or suggestions?

The only downside seems to be that I need a dedicated PI to run all the PHP :)

I know before anyone points it out I need a better power supply (old phone cable is the fault with the pi complaining about power... Its only temporary).

I would prefer to have this native within Domoticz

Custom roomplan .www where all the devices are nativly treated and then its just about writing HTML/CSS/JS etc per room and adding the device code in. This way all the hard bits have been done and its just about custom design...

User avatar
blackdog65
Posts: 535
Joined: Tuesday 17 June 2014 18:25
Target OS: Raspberry Pi
Domoticz version:
Location: Norfolk, UK
Contact:

Re: My new PI screen

Post by blackdog65 » Friday 09 September 2016 13:37

Very nice!
Any chance you could share the code? I'm sure many of us would like to copy and mod for our own uses ;)

Sean
CubieTruck Master
RasPi slaves
Aeon Labs Z-Stick, multi sensor
Fibaro Dimmers, relays, Universal sensors
EQ3 MAX!
TKB Sockets
RFXCOM
LightwaveRF sockets, switches, relays, doorbell
MySensors
ESPEasy ESP8266-12E

bluepi
Posts: 33
Joined: Tuesday 27 October 2015 22:37
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: My new PI screen

Post by bluepi » Friday 09 September 2016 14:11

More than happy to.

The code is a real mess at the moment (lots of hardcoded sections). Soon as I have cleaned it and made it vaguely legible to anyone else trying to read it then I will stick it on Github...as long as no one laughs at my attempt of JS.

As I have said; still stuck on the best way to refresh the states as I don't like checking every x seconds - seems untidy.
so if anyone has a better idea..

pepijn
Posts: 512
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi
Domoticz version:
Location: The Netherlands
Contact:

Re: My new PI screen

Post by pepijn » Sunday 11 September 2016 10:19

Did you consider using MQTT for your updates? It might only be a good trigger to update the divs but can also be used to grab the values from


Verzonden vanaf mijn iPhone met Tapatalk

User avatar
Egregius
Posts: 2445
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: My new PI screen

Post by Egregius » Sunday 11 September 2016 10:28

Why would you need a dedicated Pi for the PHP?
It would be easier to update code, that's for sure.
My floorplan refreshes every 5 seconds, more than fast enough for most situations. That's even double as fast as the normal web ui wich refreshes every 10 seconds. On smartphones and tablets you don't even notice the refresh, only on computer in Firefox there's a small line at the bottom during the refresj.
Because my page only grabs 3,5KB for each load I don't look for another solution (like ajax call's to refresh divs etc).

Fainted
Posts: 22
Joined: Thursday 08 September 2016 13:47
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: My new PI screen

Post by Fainted » Tuesday 13 September 2016 14:47

Looks very good bluepi keep up the good work and we hope to try it out soon :)

bluepi
Posts: 33
Joined: Tuesday 27 October 2015 22:37
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: My new PI screen

Post by bluepi » Wednesday 14 September 2016 21:21

Egregius wrote:Why would you need a dedicated Pi for the PHP?
It would be easier to update code, that's for sure.
My floorplan refreshes every 5 seconds, more than fast enough for most situations. That's even double as fast as the normal web ui wich refreshes every 10 seconds. On smartphones and tablets you don't even notice the refresh, only on computer in Firefox there's a small line at the bottom during the refresj.
Because my page only grabs 3,5KB for each load I don't look for another solution (like ajax call's to refresh divs etc).
Because I plan to have one per room so about 10 in total it make more sense (to me anyway) to have one point of source.. Code updates/changes, service updates etc..

Spent a huge amount of time on JS updating the DIVs and really improved the performance now.. even doing an update every 5 seconds its very impressive..

@Egregius ... It was seeing how some of your site worked inspired me to try writing this.. Must admit the JS has been a learning curve but once I got my head around the format I have been quite enjoying it..

Just adding all the kodi code (pull album,video art, % played and play/pause/stop function) in so it down to a single load page for everything (prefer to write everything out separately when rough)

Still trying to finish the photo overlay function (when inactive) however the setting function is all finished and about as easy as I can make it :) so it should be easy for anyone else to get up and running (well once they have installed PHP)..

So pages that are now done ish...

Frontpage
Heating Control
Traffic
News
Weather


Hoping to have a release on Github in the next couple of weeks as I can only work on this in the evenings.

@pepijn I did think about MQTT but I wanted to keep this as simple as possible and I still might come back to this as I do think this will be the best method in the long run. MQTT is something I keep coming back to and then abandoning :)

Still trying to get Google Music and photos streaming down

However just ordered an Echo Dot to play with :) .. So I might not go down this route if the voice thing works better for the family ... and just put this in the hallway.

User avatar
blackdog65
Posts: 535
Joined: Tuesday 17 June 2014 18:25
Target OS: Raspberry Pi
Domoticz version:
Location: Norfolk, UK
Contact:

Re: My new PI screen

Post by blackdog65 » Saturday 24 September 2016 17:46

Hi bluipi,
any progress?
Just a quick bump as some of us are gagging to try this :D

Sean
CubieTruck Master
RasPi slaves
Aeon Labs Z-Stick, multi sensor
Fibaro Dimmers, relays, Universal sensors
EQ3 MAX!
TKB Sockets
RFXCOM
LightwaveRF sockets, switches, relays, doorbell
MySensors
ESPEasy ESP8266-12E

codesnipper
Posts: 19
Joined: Tuesday 23 February 2016 15:04
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: My new PI screen

Post by codesnipper » Tuesday 11 October 2016 11:54

Hello, any progress on it? Did you put it on github?

JuanUil
Posts: 243
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi
Domoticz version: 2.xx
Location: Asten NB Nederland
Contact:

Re: My new PI screen

Post by JuanUil » Tuesday 11 October 2016 14:00

really nice!!
Your mind is like a parachute,
It only works when it is opened!

bluepi
Posts: 33
Joined: Tuesday 27 October 2015 22:37
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: My new PI screen

Post by bluepi » Wednesday 12 October 2016 21:19

Sorry...

Sort of got caught up with other things and have not had the time to get back to this...(mainly my Car)

I will see if I can spend some time cleaning out the hardcode and upload ASAP.

Mostly its all done so a few evenings this week... Now that I have canceled the echo and google home is not coming to the UK anytime soon :(

The code is fixed to a pi screen so it is 800x600 but it would not take much effort to change the scale (except the odd place where I hardcoded the CSS)

Slinkos
Posts: 106
Joined: Thursday 10 December 2015 1:21
Target OS: Raspberry Pi
Domoticz version: 3.4834
Location: Netherlands
Contact:

Re: My new PI screen

Post by Slinkos » Sunday 16 October 2016 22:18

I woud very much like to see your code!

Fainted
Posts: 22
Joined: Thursday 08 September 2016 13:47
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: My new PI screen

Post by Fainted » Monday 17 October 2016 9:11

If I may have som suggestions before I even have seen the finished product ;)
I would love to have a tab for the security panel in the same style as you have done everything else, so that you could have your screen next to the dorr for seting the alarm when you go out.
Could it be possible to add a tab so you can have yor google calender in this frontpage?
I will use an 10 inch tablet or maybe an 13" inch tablet so as you said, if 'ts easy to change it would be awesome :)
Once again keep up the good work, looking forward to try it!

jaminben
Posts: 13
Joined: Saturday 10 December 2016 0:57
Target OS: Windows
Domoticz version:
Contact:

Re: My new PI screen

Post by jaminben » Wednesday 14 December 2016 11:32

Is this still in development?... I would very much like to try it (no matter what state it's in).

Looks really nice.

bsmeding
Posts: 39
Joined: Tuesday 28 October 2014 19:29
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: My new PI screen

Post by bsmeding » Thursday 15 December 2016 15:09

Yes me too!

looks very nice, could you post the code on github or similar so we can try it ourself?

jaminben
Posts: 13
Joined: Saturday 10 December 2016 0:57
Target OS: Windows
Domoticz version:
Contact:

Re: My new PI screen

Post by jaminben » Wednesday 21 December 2016 17:05

I'm not a coder but I knocked this (complete rip off of OP idea) up in a couple of days whilst on Christmas holidays.... it's only a single page so far and I'm not sure how much further I want to take it but thought I'd share and get some feed back.
Updated_IMG_20161221_144726.jpg
Updated_IMG_20161221_144726.jpg (241.83 KiB) Viewed 3264 times

denisj
Posts: 62
Joined: Saturday 17 December 2016 14:13
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: My new PI screen

Post by denisj » Monday 26 December 2016 18:45

Hi,
is there any news please ?
Thanks
Denis

SilentSimon
Posts: 1
Joined: Friday 01 April 2016 18:24
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: My new PI screen

Post by SilentSimon » Monday 16 January 2017 23:07

denisj wrote:Hi,
is there any news please ?
Thanks
Denis
Same bump here :P

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests