Where do you find the idx of your camera?jannl wrote:Basically this did the trick indeed.G3rard wrote:I use a picture of the camera on the frontpage and when I click on the picture it opens the live stream in a popup. For the live stream the stream of Domoticz is used.jannl wrote:I almost never restart Chrome on my Tablet, runs ok for months mostly.
Another question, trying to get live image from my webcam in Frontpage now.
I use a Foscam fi9853ep.
When selecting the little webcam image in the cam setup in Domoticz it works, I just do not seem to be able to find the correct url myself (googled a lot).
For now (a few months), I only take a snapshot when someone rings at the door. This image is displayed in Frontpage and mailed to myself, but motion would be nice as well.
Anyone?
This is the code I am using in frontpage.html for the popup:Idx 2 is the idx of the camera.Code: Select all
<div id="popup_camera"><img src="http://ip:port/camsnapshot.jpg?idx=2&t=" onClick="lightbox_close('camera');" width="640" height="480" onload='setTimeout(function() {src = src.substring(0, (src.lastIndexOf("t=")+2))+(new Date()).getTime()}, 100)' onerror='setTimeout(function() {src = src.substring(0, (src.lastIndexOf("t=")+2))+(new Date()).getTime()}, 1000)' class='bigcamera' /></div>
Maybe this can help you?
NEW frontpage.html - request comments
Moderator: leecollings
- havnegata
- Posts: 114
- Joined: Wednesday 10 September 2014 11:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.10162
- Location: Norway
- Contact:
Re: NEW frontpage.html - request comments
-
- Posts: 625
- Joined: Thursday 02 October 2014 6:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: Geleen
- Contact:
Re: NEW frontpage.html - request comments
[url]http://<your%20domoticz%20ip>:<your%20domoticz%20port>/json.htm?type=cameras[/url]
I didn't know that either, but just guessed it.
I didn't know that either, but just guessed it.
- havnegata
- Posts: 114
- Joined: Wednesday 10 September 2014 11:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.10162
- Location: Norway
- Contact:
Re: NEW frontpage.html - request comments
Thanks, will check it tonight when I get home
- havnegata
- Posts: 114
- Joined: Wednesday 10 September 2014 11:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.10162
- Location: Norway
- Contact:
Re: NEW frontpage.html - request comments
Spot on, thanks!jannl wrote:[url]http://<your%20domoticz%20ip>:<your%20domoticz%20port>/json.htm?type=cameras[/url]
I didn't know that either, but just guessed it.
-
- Posts: 30
- Joined: Saturday 27 December 2014 15:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.20078
- Location: Menterwolde,The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
Hello I am trying to make a LUA script
my door bell but it gives an error can somebody pushes me in the right direction
the error log
2016-01-18 08:32:08.681 EventSystem: reset all events...
2016-01-18 08:32:09.335 Error: EventSystem: Lua script did not return a commandArray
2016-01-18 08:32:16.041 Error: EventSystem: Lua script did not return a commandArray
2016-01-18 08:32:16.145 Error: EventSystem: Lua script did not return a commandArray
2016-01-18 08:32:16.244 Error: EventSystem: Lua script did not return a commandArray
does anyone know the solution
my door bell but it gives an error can somebody pushes me in the right direction
Code: Select all
if (devicechanged['doorbell']) then
if otherdevices['doorbell_switch']=='Off' then
commandArray['doorbell_switch']='On'
end
end
2016-01-18 08:32:08.681 EventSystem: reset all events...
2016-01-18 08:32:09.335 Error: EventSystem: Lua script did not return a commandArray
2016-01-18 08:32:16.041 Error: EventSystem: Lua script did not return a commandArray
2016-01-18 08:32:16.145 Error: EventSystem: Lua script did not return a commandArray
2016-01-18 08:32:16.244 Error: EventSystem: Lua script did not return a commandArray
does anyone know the solution
raspberry pi
nas synology
homey
nas synology
homey
- jvdz
- Posts: 2189
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: NEW frontpage.html - request comments
All event scripts should contain this at the top of the script:
and this at the end of the script, returning the wanted change commands:
Jos
Code: Select all
commandArray = {}
Code: Select all
return commandArray
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 30
- Joined: Saturday 27 December 2014 15:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.20078
- Location: Menterwolde,The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
Oke Josjvdz wrote:All event scripts should contain this at the top of the script:and this at the end of the script, returning the wanted change commands:Code: Select all
commandArray = {}
JosCode: Select all
return commandArray
Code: Select all
commandArray = {}
if (devicechanged['doorbell']) then
if otherdevices['doorbell_switch']=='Off' then
commandArray['doorbell_switch']='On'
end
end
return commandArray
2016-01-18 09:36:59.495 Executing script: /home/pi/domoticz/scripts/domoticz_main
2016-01-18 09:37:00.354 Error: EventSystem: [string "-- ..."]:26: attempt to index global 'devicechanged' (a nil value)
raspberry pi
nas synology
homey
nas synology
homey
- G3rard
- Posts: 669
- Joined: Wednesday 04 March 2015 22:15
- Target OS: -
- Domoticz version: No
- Location: The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
Use
devicechanged['Doorbell']
So with a capital D as you are using looking at the screenprint you enclosed.
The names are case censitive.
devicechanged['Doorbell']
So with a capital D as you are using looking at the screenprint you enclosed.
The names are case censitive.
Not using Domoticz anymore
-
- Posts: 30
- Joined: Saturday 27 December 2014 15:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.20078
- Location: Menterwolde,The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
G3rard wrote:Use
devicechanged['Doorbell']
So with a capital D as you are using looking at the screenprint you enclosed.
The names are case censitive.
oke G3rard
Code: Select all
commandArray = {}
if (devicechanged['Doorbell']) then
if otherdevices['doorbell_switch']=='Off' then
commandArray['doorbell_switch']='On'
end
return commandArray
2016-01-18 09:58:23.880 Error: EventSystem: [string "-- ..."]:30: 'end' expected (to close 'if' at line 26) near
2016-01-18 09:58:25.440 Error: EventSystem: [string "-- ..."]:30: 'end' expected (to close 'if' at line 26) near
....
....
it seems that the doorbell is not local
raspberry pi
nas synology
homey
nas synology
homey
- G3rard
- Posts: 669
- Joined: Wednesday 04 March 2015 22:15
- Target OS: -
- Domoticz version: No
- Location: The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
You have to add an extra end between end and return commandArray.
Not using Domoticz anymore
-
- Posts: 30
- Joined: Saturday 27 December 2014 15:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.20078
- Location: Menterwolde,The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
Yes no errorG3rard wrote:You have to add an extra end between end and return commandArray.
but when pressing the bell
and the switch does not turn on
the log
2016-01-18 10:07:00.260 Error: EventSystem: [string "-- ..."]:26: attempt to index global 'devicechanged' (a nil value)
2016-01-18 10:07:00.517 User: gebruiker initiated a switch command
2016-01-18 10:07:00.534 Kodi Notification (192.0.0.0:9777, TTL 1): Doorbell, Doorbell pressed, Icon /home/pi/domoticz/www/images/doorbell48.png
2016-01-18 10:07:00.537 Notification sent (kodi) => Success
2016-01-18 10:07:00.544 Executing script: /home/pi/domoticz/scripts/domoticz_main
2016-01-18 10:07:00.519 (rfx) Chime (Doorbell)
2016-01-18 10:08:00.581 Error: EventSystem: [string "-- ..."]:26: attempt to index global 'devicechanged' (a nil value)
2016-01-18 10:09:00.282 Error: EventSystem: [string "-- ..."]:26: attempt to index global 'devicechanged' (a nil value)
2016-01-18 10:10:00.486 Error: EventSystem: [string "-- ..."]:26: attempt to index global 'devicechanged' (a nil value)
Code: Select all
26 if (devicechanged['Doorbell']) then
raspberry pi
nas synology
homey
nas synology
homey
- G3rard
- Posts: 669
- Joined: Wednesday 04 March 2015 22:15
- Target OS: -
- Domoticz version: No
- Location: The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
Please share the complete LUA script you are using for the doorbell. Seems to be something strange in it.
Not using Domoticz anymore
-
- Posts: 30
- Joined: Saturday 27 December 2014 15:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.20078
- Location: Menterwolde,The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
G3rard wrote:Please share the complete LUA script you are using for the doorbell. Seems to be something strange in it.
okay here it is
ActTime: 1453110240,
ServerTime: "2016-01-18 10:44:00",
Sunrise: "08:37",
Sunset: "16:48",
result: [
{
AddjMulti: 1,
AddjMulti2: 1,
AddjValue: 0,
AddjValue2: 0,
BatteryLevel: 255,
CameraIdx: "2",
CustomImage: 0,
Data: "On",
Description: "",
Favorite: 1,
HardwareID: 1,
HardwareName: "RFXt433E",
HardwareType: "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver",
HardwareTypeVal: 1,
HaveDimmer: false,
HaveGroupCmd: false,
HaveTimeout: false,
ID: "00F4",
Image: "Light",
IsSubDevice: false,
LastUpdate: "2016-01-18 10:07:00",
Level: 0,
LevelInt: 0,
MaxDimLevel: 0,
Name: "Doorbell",
Notifications: "true",
PlanID: "7",
PlanIDs: [
7,
8
],
Protected: false,
ShowNotifications: true,
SignalLevel: "-",
Status: "",
StrParam1: "",
StrParam2: "",
SubType: "SelectPlus",
SwitchType: "Doorbell",
SwitchTypeVal: 1,
Timers: "false",
Type: "Chime",
TypeImg: "doorbell",
Unit: 90,
Used: 1,
UsedByCamera: true,
XOffset: "0",
YOffset: "0",
idx: "104"
}
],
status: "OK",
title: "Devices"
}
raspberry pi
nas synology
homey
nas synology
homey
- G3rard
- Posts: 669
- Joined: Wednesday 04 March 2015 22:15
- Target OS: -
- Domoticz version: No
- Location: The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
@benotje, did you save the LUA as a Device in the Event page?
The pulldown on the right top now probably says All. Change that to Device and save the LUA script.
The pulldown on the right top now probably says All. Change that to Device and save the LUA script.
Not using Domoticz anymore
-
- Posts: 30
- Joined: Saturday 27 December 2014 15:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.20078
- Location: Menterwolde,The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
No I did not but this does not helpG3rard wrote:@benotje, did you save the LUA as a Device in the Event page?
The pulldown on the right top now probably says All. Change that to Device and save the LUA script.
I can not specify LUA IDX: 104
after I got my raspberry restart it works
Top Thanks for your help
Now again I can continue, I am happy with it
raspberry pi
nas synology
homey
nas synology
homey
-
- Posts: 28
- Joined: Thursday 14 January 2016 20:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: NEW frontpage.html - request comments
Already tried the search, but couldn't find the anwser..
I want to use an old ( Sony Xperia Z) smartphone as an 'controller' instead of an tablet.. Did already somebody have this? I mean, is there already a customised CSS for smaller screens?
I started today to adapt the default CSS, but it is al lot of work.. Maybe some can share his CSS..
I want to use an old ( Sony Xperia Z) smartphone as an 'controller' instead of an tablet.. Did already somebody have this? I mean, is there already a customised CSS for smaller screens?
I started today to adapt the default CSS, but it is al lot of work.. Maybe some can share his CSS..
-
- Posts: 370
- Joined: Monday 05 October 2015 10:16
- Target OS: -
- Domoticz version:
- Contact:
Re: NEW frontpage.html - request comments
Hi, looking into this smallerscreen issue to.axelbaas wrote:Already tried the search, but couldn't find the anwser..
I want to use an old ( Sony Xperia Z) smartphone as an 'controller' instead of an tablet.. Did already somebody have this? I mean, is there already a customised CSS for smaller screens?
I started today to adapt the default CSS, but it is al lot of work.. Maybe some can share his CSS..
Have same wishes. Having a xperia arc and t as spare, and use a z2.
Most anoying is portrait in Chrome.
Im busy with stripping the main css and index.html with all IOS and other stuff and setting screen witdh and height according to device screen. FireFox for Android isnt wonderfull Chrome however is not accepting the directions of screenwidth when screen is onder 7 or 8inch. (less then 800px wide).
Also keep in mind that there are 2 javascript files dashboard.js and probably main.js which contain code to deside on device's useragent how many rowItems will get displayed.
Normal is 3, Custom is 4, Floorplan are none and Mobile 1 big/wide.
My advice make a copy of index.html and call that in your browser on your Z.
Im busy with decoding for now. Hope the above directions can help you build your own...
Question: have you tried the Domoticz App in PlayStore? Perhaps it has some uses instead of custom templates etcetera.
Grtz,
Stephan
-
- Posts: 23
- Joined: Monday 12 October 2015 12:05
- Target OS: NAS (Synology & others)
- Domoticz version:
- Location: Veldhoven, The Netherlands
- Contact:
Re: NEW frontpage.html - request comments
Question, how to add an RGB switch to the portal?
It comes with this set off data
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "Off, Level: 7 %",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 4,
"HardwareName" : "ZWaveStick",
"HardwareType" : "OpenZWave USB",
"HardwareTypeVal" : 21,
"HaveDimmer" : true,
"HaveGroupCmd" : false,
"HaveTimeout" : false,
"ID" : "00001065",
"Image" : "Light",
"IsSubDevice" : false,
"LastUpdate" : "2016-01-24 21:52:32",
"Level" : 7,
"LevelInt" : 7,
"MaxDimLevel" : 100,
"Name" : "RGBControllerRGBW",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "Off",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "RGBW",
"SwitchType" : "Dimmer",
"SwitchTypeVal" : 7,
"Timers" : "false",
"Type" : "Lighting Limitless/Applamp",
"TypeImg" : "dimmer",
"Unit" : 1,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "105"
},
It comes with this set off data
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "Off, Level: 7 %",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 4,
"HardwareName" : "ZWaveStick",
"HardwareType" : "OpenZWave USB",
"HardwareTypeVal" : 21,
"HaveDimmer" : true,
"HaveGroupCmd" : false,
"HaveTimeout" : false,
"ID" : "00001065",
"Image" : "Light",
"IsSubDevice" : false,
"LastUpdate" : "2016-01-24 21:52:32",
"Level" : 7,
"LevelInt" : 7,
"MaxDimLevel" : 100,
"Name" : "RGBControllerRGBW",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "Off",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "RGBW",
"SwitchType" : "Dimmer",
"SwitchTypeVal" : 7,
"Timers" : "false",
"Type" : "Lighting Limitless/Applamp",
"TypeImg" : "dimmer",
"Unit" : 1,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "105"
},
Synology NAS 412+, Aeotec stick V5, Aeotec recessed door sensor, Aeotec micro double smart switch, Fibaro Dimmer, iPad 2 with own 3d printed wall mount.
-
- Posts: 25
- Joined: Wednesday 13 January 2016 21:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2.3530
- Location: Netherlands
- Contact:
Re: NEW frontpage.html - request comments
Problem solved. I installed the frontpage_setting.js and frontpage.html again and everything works very well.
@G3rard, the Sonos files in the frontpage are not updated with the last changes
@G3rard, the Sonos files in the frontpage are not updated with the last changes
Raspberry Pi B+ | Domoticz v3.4834 | RFXtrx433E | Action sockets and remote control (a cheap solution to start with)
Sonos device: control via Action remote control and EasySonos (via Domoticz scripts)
2 x Chresta TX320, Kaku sensoren, D-link camera
Sonos device: control via Action remote control and EasySonos (via Domoticz scripts)
2 x Chresta TX320, Kaku sensoren, D-link camera
-
- Posts: 9
- Joined: Friday 29 January 2016 18:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: NEW frontpage.html - request comments
Hi,
I am having problems with the sonos integration with the plus and minus buttons. I added a selector switch within button, this is working properly. When I add the IDX and change the last digit to "2" I do not get anything in the cell. Am I using the wrong switch or am I doing something wrong in the JS-file?
Kind regards,
Tom
I am having problems with the sonos integration with the plus and minus buttons. I added a selector switch within button, this is working properly. When I add the IDX and change the last digit to "2" I do not get anything in the cell. Am I using the wrong switch or am I doing something wrong in the JS-file?
Kind regards,
Tom
Who is online
Users browsing this forum: No registered users and 1 guest