Dashticz - General Discussions

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Locked
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by mvveelen »

Followed the steps to add the moon phase to the dashboard and now I'm stuck:

In the log I see:

Code: Select all

LUA: MoonPhase - Update not allowed: Difference is xxx seconds
The Moon.tmp file is NOT created in (/volume1/web/tmp/) whereas the tmp folder has CHMOD 777 (where is this Moon.tmp file mentioned in the script ?)

There is a file called 'phase.tmp' with contents.

The URl does give me the right data from Wunderground, so the API key and such are OK I think:

Code: Select all


{
  "response": {
  "version":"0.1",
  "termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
  "features": {
  "astronomy": 1
  }
		, "results": [
		{
		"name": "Hoorn",
		"city": "Hoorn",
		"state": "FR",
		"country": "NL",
		"country_iso3166":"NL",
		"country_name":"Netherlands",
		"zmw": "00000.5.06251",
		"l": "/q/zmw:00000.5.06251"
		}
		,
		{
		"name": "Hoorn",
		"city": "Hoorn",
		"state": "GE",
		"country": "NL",
		"country_iso3166":"NL",
		"country_name":"Netherlands",
		"zmw": "00000.55.06278",
		"l": "/q/zmw:00000.55.06278"
		}
		,
		{
		"name": "Hoorn",
		"city": "Hoorn",
		"state": "GR",
		"country": "NL",
		"country_iso3166":"NL",
		"country_name":"Netherlands",
		"zmw": "00000.182.06286",
		"l": "/q/zmw:00000.182.06286"
		}
		,
		{
		"name": "Hoorn",
		"city": "Hoorn",
		"state": "NH",
		"country": "NL",
		"country_iso3166":"NL",
		"country_name":"Netherlands",
		"zmw": "00000.1.06244",
		"l": "/q/zmw:00000.1.06244"
		}
		]
	}
}
The LUA script I made is DEVICE-based, not TIME based. Is that OK ? (tried both by the way)

The image in the dashboard isn't displayed, it reads "<img src="img/moon/0?t=1493365024904" style="width:100%;"> so that can't be right.

And also the devices (Utility devices) aren't updated, it reads "Hello world", 0 days, 0 %.

What is the one thing I'm missing here :) ?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by robgeerts »

TapNL wrote:
Would it be possible to add a wiki-file / how-to / readme for the extra's some users have made?

For instance:

- The waste calendar: how-to ad the switch, the contents of the lua script, etc.
- The moon add-on: what switches to add (and how), etc (nice, but not really sure HOW to add which switches etc).
- The calendar add-on (most recent)
- How to adjust the height (and witdh) of the traffic
- etc.

We can read this topic, but if it is in the package, then it would me much easier to maintain and find. Right?
I think this is a good idea, and are more then happy to contribute to this.
The way I imagine it is that we make per function as short description in the wiki and keep updating that.
If we create a trello board of functions that need to be fixed and functions that changed we can set this up quite easy.

@Rob: what do you think?
@Others: who wants to participate?
I just switched from Trello to the issue tracker of Github, for several reasons...
The wiki is already there, maintained by @htilburg. Everybody can participate to this wiki to expand the possibilities.
http://www.domoticz.com/wiki/Dashticz-v2
TapNL
Posts: 30
Joined: Monday 24 April 2017 21:52
Target OS: -
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by TapNL »

I know you switched. But an overview of items that need updating on the wiki I think the issue tracker on GitHub is not that handy.
Anyway - I will add ome things on the wiki later today.
TapNL
Posts: 30
Joined: Monday 24 April 2017 21:52
Target OS: -
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by TapNL »

Is there a way to show in the buienradar a map which is zoomed at a defined POI (your home)
I have been playing with https://www.buienradar.nl/overbuienrada ... s-weerdata - Option 1.4
But I don't seem to get it working.
bimse
Posts: 21
Joined: Sunday 05 February 2017 12:09
Target OS: Raspberry Pi / ODroid
Domoticz version: Model 3
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by bimse »

Help with 'streamplayer'

Is there anyone who can help with a lua program that can start and stop playback, as well as choose which program to play with 'streamplayer'.
Last edited by bimse on Friday 28 April 2017 11:01, edited 1 time in total.
Translated with google
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by EdwinK »

mvveelen wrote:Followed the steps to add the moon phase to the dashboard and now I'm stuck:

In the log I see:

Code: Select all

LUA: MoonPhase - Update not allowed: Difference is xxx seconds
The Moon.tmp file is NOT created in (/volume1/web/tmp/) whereas the tmp folder has CHMOD 777 (where is this Moon.tmp file mentioned in the script ?)

There is a file called 'phase.tmp' with contents.
I had the tmp file Moon.tmp, as I found that a better choice. The tmp. file name doesn't really matter.

As mentioned in the PM, change line 51 to read

Code: Select all

    read = os.execute('curl -s -o '..tempfilename..' "'..url..'"')
The URl does give me the right data from Wunderground, so the API key and such are OK I think:

The LUA script I made is DEVICE-based, not TIME based. Is that OK ? (tried both by the way)

The image in the dashboard isn't displayed, it reads "<img src="img/moon/0?t=1493365024904" style="width:100%;"> so that can't be right.

And also the devices (Utility devices) aren't updated, it reads "Hello world", 0 days, 0 %.

What is the one thing I'm missing here :) ?
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by mvveelen »

Tried that (and changed timeout from 3600 to 60 for testing purposes), and now I get:

Code: Select all

LUA: Moonphase - Collecting data from: http://api.wunderground.com/api/24887c91540551ce/astronomy/q/NL/Hoorn.json
2017-04-28 10:24:01.126 Error: EventSystem: in script_time_moon: [string "-- Variables to customize -------------------..."]:63: attempt to concatenate global 'moonriseMinute' (a nil value)
This is with "your" line, but also with the standard line.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by poudenes »

Is it possible to change the font-size of a frame loaded page?

I have now "rijden de treinen" in a frame, but the font-size is bigger than i use for the whole control panel
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by EdwinK »

mvveelen wrote:Tried that (and changed timeout from 3600 to 60 for testing purposes), and now I get:

Code: Select all

LUA: Moonphase - Collecting data from: http://api.wunderground.com/api/24887c91540551ce/astronomy/q/NL/Hoorn.json
2017-04-28 10:24:01.126 Error: EventSystem: in script_time_moon: [string "-- Variables to customize -------------------..."]:63: attempt to concatenate global 'moonriseMinute' (a nil value)
This is with "your" line, but also with the standard line.
Did you set the permissions to 777 for that .tmp file? chmod 0777 phase.tmp
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by EdwinK »

And all of a sudden (well, sudden for me, looks like the script hasn't been updating since April 22) there is no update anymore in the script.Afval.lua script.


*edit* removed it from the 'scripts' folder and put it in the 'events' box and now it works again.
Last edited by EdwinK on Friday 28 April 2017 11:35, edited 2 times in total.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by mvveelen »

EdKo66 wrote:
mvveelen wrote:Tried that (and changed timeout from 3600 to 60 for testing purposes), and now I get:

Code: Select all

LUA: Moonphase - Collecting data from: http://api.wunderground.com/api/24887c91540551ce/astronomy/q/NL/Hoorn.json
2017-04-28 10:24:01.126 Error: EventSystem: in script_time_moon: [string "-- Variables to customize -------------------..."]:63: attempt to concatenate global 'moonriseMinute' (a nil value)
This is with "your" line, but also with the standard line.
Did you set the permissions to 777 for that .tmp file? chmod 0777 phase.tmp
Yes, the file permissions are set to 777.....
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by EdwinK »

mvveelen wrote:
EdKo66 wrote:
mvveelen wrote:Tried that (and changed timeout from 3600 to 60 for testing purposes), and now I get:

Code: Select all

LUA: Moonphase - Collecting data from: http://api.wunderground.com/api/24887c91540551ce/astronomy/q/NL/Hoorn.json
2017-04-28 10:24:01.126 Error: EventSystem: in script_time_moon: [string "-- Variables to customize -------------------..."]:63: attempt to concatenate global 'moonriseMinute' (a nil value)
This is with "your" line, but also with the standard line.
Did you set the permissions to 777 for that .tmp file? chmod 0777 phase.tmp
Yes, the file permissions are set to 777.....
Then I really don't know. Maybe user Wizjos will respond.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by mvveelen »

I just found out that I also had to change the line with

Code: Select all

var _IDXmoonpicture = 12;
to the right IDX of my setup (i.e. 18), so I changed that.

But the error still remains.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by SwordFish »

madrian wrote:It's live, merge request was sent to Rob.

Until he accepts the request, go and find your iCal URL at Google Calendar:

Gear Icon -> Settings -> Calendars Tab -> click on desidered calendar name -> in Private address row click on ical icon and copy your URL.

The plugin (it shows the next 5 events):

Screen-Shot-2017-04-27-23-21-52.png
;)
Verry nice done
User avatar
htilburgs
Posts: 464
Joined: Tuesday 03 November 2015 11:01
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by htilburgs »

robgeerts wrote:
TapNL wrote:
Would it be possible to add a wiki-file / how-to / readme for the extra's some users have made?

For instance:

- The waste calendar: how-to ad the switch, the contents of the lua script, etc.
- The moon add-on: what switches to add (and how), etc (nice, but not really sure HOW to add which switches etc).
- The calendar add-on (most recent)
- How to adjust the height (and witdh) of the traffic
- etc.

We can read this topic, but if it is in the package, then it would me much easier to maintain and find. Right?
I think this is a good idea, and are more then happy to contribute to this.
The way I imagine it is that we make per function as short description in the wiki and keep updating that.
If we create a trello board of functions that need to be fixed and functions that changed we can set this up quite easy.

@Rob: what do you think?
@Others: who wants to participate?
I just switched from Trello to the issue tracker of Github, for several reasons...
The wiki is already there, maintained by @htilburg. Everybody can participate to this wiki to expand the possibilities.
http://www.domoticz.com/wiki/Dashticz-v2
Currentlly I'm looking at a way to make the Wiki more "clear". Now it's one big page, what does it not easy to read and maintain. If anybody has knowledge of Mediawiki and for example creating "tabs" let me know ;)
Hardware:
RPi3 - Aeon Labs Z-Stick GEN5 - Fibaro Dimmer 2 - Fibaro Roller Shutter 2 - Fibaro Smoke Sensor - Yeelight RGBW Led bulb - Yeelight Smart LED Light Strip - Neo Coolcam PIR Motion Sensor - Neo Coolcam PowerPlug - Nest Thermostat v3
Ierlandfan
Posts: 89
Joined: Friday 09 October 2015 17:40
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by Ierlandfan »

Code: Select all

attempt to concatenate global 'moonriseMinute' (a nil value)
Most of the times it means that the value is empty, you can try a

Code: Select all

put the normal code here
if moonriseMinute  == nil then
   moonriseMinute = "N/A"
   print("moonriseMinute -- Error " .. moonriseMinute .."")
   else
put the normal code here
print("moonriseMinute -- Ok " .. moonriseMinute .."")
end
Not sure where moonriseMinute is used but at least the error will be gone
SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by SwordFish »

Martijn85 wrote:
SwordFish wrote:I have dashticz running on a rpi and a tablet on the wall. Now i have dashticz also running on my NAS webserver. So i did some dirty custom css and now its fits on my iphone with a different layout as on my tablet 8-)
Nice! Can you please share this custom css? :D
Sorry for the the late reaction. I Thought i missed something.
The only thing i put extra in the custom.css is

Code: Select all

.col-xs-5 
{
    width: 100% !important;
}

And changed the config file so that its fits the screen.
Noticed that it is running completely separate. So NOT one place for tablet AND iphone
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by mvveelen »

Ierlandfan wrote:

Code: Select all

attempt to concatenate global 'moonriseMinute' (a nil value)
Most of the times it means that the value is empty, you can try a

Code: Select all

put the normal code here
if moonriseMinute  == nil then
   moonriseMinute = "N/A"
   print("moonriseMinute -- Error " .. moonriseMinute .."")
   else
put the normal code here
print("moonriseMinute -- Ok " .. moonriseMinute .."")
end
Not sure where moonriseMinute is used but at least the error will be gone
Thanks, but when I use this, then the next error appears:

Code: Select all

Error: EventSystem: in script_time_moon: [string "-- Variables to customize -------------------..."]:127: attempt to perform arithmetic on global 'percentIlluminated' (a nil value)
So I don't think this will bring me to a solution. And, if others have it working with the same script, then we shouldn't change the script right? There might be something else I might oversee ?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
madrian
Posts: 231
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by madrian »

SwordFish wrote:
madrian wrote:It's live, merge request was sent to Rob.

Until he accepts the request, go and find your iCal URL at Google Calendar:

Gear Icon -> Settings -> Calendars Tab -> click on desidered calendar name -> in Private address row click on ical icon and copy your URL.

The plugin (it shows the next 5 events):

Screen-Shot-2017-04-27-23-21-52.png
;)
Verry nice done
Thank you, now it's time to work on Apple Calendar support. I found a workaround to access .ics (from URL), but it's not working at the moment. I must check the ical parser, something is wrong here.
SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by SwordFish »

Just for me, iCal isn't live updated when I make a new appointment in Google calendar after I copied the url or am I wrong?
Locked

Who is online

Users browsing this forum: No registered users and 0 guests