FHEM Forum

FHEM => English Corner => Thema gestartet von: cmillsy am 11 Juni 2014, 18:57:25

Titel: Clock display
Beitrag von: cmillsy am 11 Juni 2014, 18:57:25
I'm very new to programming in perl so was just wanting to ask this before delving into programming a module

I'm trying to display a screen (floorplan) with a clock on it. I have a 02 joggler running ubuntu as a bedside alarm clock (written with a small gambas program) but was thinking it might be neater to run the clock display though the browser pointing to my fhem setup. I've seen the javascript way on the wiki but i seem to be getting errors with it.

Would there be a way to define a dummy i could display as the current time (and date preferably) so that longpoll will keep it updated. (not bothered about seconds, just a 1 min refresh).  Otherwise would a new module be needed. Any pointers as to how a module would look, as said, very new to this.

Titel: Antw:Clock display
Beitrag von: epsrw1 am 11 Juni 2014, 19:27:56
maybe this can help you resolve your task:

http://fhem.de/commandref.html#HTTPMOD (http://fhem.de/commandref.html#HTTPMOD)

yours,florian
Titel: Antw:Clock display
Beitrag von: herrmannj am 11 Juni 2014, 20:29:40
Hi cmillsy,

I have currently under development what you want, including a alarm clock (and much more). I have a xoro android alarm clock and running the webview control with floorplan (as boiler plate), pretty comparable setup

regards
joerg
Titel: Antw:Clock display
Beitrag von: rudolfkoenig am 12 Juni 2014, 07:50:36
Your plan with a dummy and an "at" definition updating it should work, although IMHO is not very pretty.
Titel: Antw:Clock display
Beitrag von: cmillsy am 13 Juni 2014, 12:57:21
Thanks for the replies. It looks like the AT update of a dummy wont work. Well it does, but it doesn't get updated through longpoll, and i read somewhere that longpoll isn't triggered 'internally' so i think it needs to be external like the HTTPMOD way. I didn't think of pointing it to a time server, thanks for that. Seems a bit of an extreme way for such a simple task though.
Titel: Antw:Clock display
Beitrag von: rudolfkoenig am 14 Juni 2014, 10:12:50
ZitatWell it does, but it doesn't get updated through longpoll

Following works for me (just tested), although I still not consider it pretty:

fhem> define Clock dummy
fhem> attr Clock room ClockRoom
fhem> define ClockUpdate at +*00:00:05 { fhem("set Clock $hms") }
fhem> attr ClockUpdate alignTime 00:00
Titel: Antw:Clock display
Beitrag von: cmillsy am 10 Juli 2014, 10:37:06
Ah yes it does. Thanks. This has highlighted another problem for me. Longpoll only seems to work when i access fhem from local LAN. If I try to access it from the internet (either PC or phone, chrome browsers) longpoll doesn't update anything. I tried a fresh install (5.5) after which longpoll worked over the internet but after i did an update it stopped working as before. Everything over LAN is ok. Is this a known issue or should i post the problem elsewhere?
Titel: Antw:Clock display
Beitrag von: rudolfkoenig am 10 Juli 2014, 10:49:19
Not sure if this is a FHEM/Application issue, I think it is rather an infrastructure problem.
longpoll is working me from the internet too.

Titel: Antw:Clock display
Beitrag von: Rince am 12 Juli 2014, 06:54:58
So:
At first, longpoll didn't work over the internet  :(
Afterwards, you installed fhem 5.5  :)
Everything was running fine  8)
Later you did another update, and now some things do not work any more?  :'(

If this is right, maybe a new thread for the not working anymore things would be a good idea
Titel: Antw:Clock display
Beitrag von: alice am 04 September 2014, 13:16:57
Hi,
no not realy. I have fhem on a 7362sl (on USB-Stick) and my installation have about 200 mB inclusive logs and backups. There must be something more on the box. Is there only the folder fhem ? Or are there other folders too ?