I've had this issue before as well, have a look at the "how-to"i wrote.
its a permission thing
Moderator: leecollings
I've had this issue before as well, have a look at the "how-to"i wrote.
here is the link: https://www.domoticz.com/forum/viewtopi ... start=1020
In the folder /var/www/html I added config.php file and also changed the permissions to chmod 777. I don't know where is the problem....Warning: require(/var/www/config.php): failed to open stream: No such file or directory in /var/www/html/secure/functions.php on line 13
Fatal error: require(): Failed opening required '/var/www/config.php' (include_path='.:/usr/share/php') in /var/www/html/secure/functions.php on line 13
Code: Select all
if (!empty($data['attributesMap']['gps_lat']))
{
if (cget('BMW_GPS_LAT') != $gps_lat) cset('BMW_GPS_LAT',$gps_lat);
}
if (!empty($data['attributesMap']['gps_lng']))
{
if (cget('BMW_GPS_LON') != $gps_lon) cset('BMW_GPS_LON',$gps_lon);
}
Code: Select all
if (!empty($data['attributesMap']['gps_lat']) && !empty($data['attributesMap']['gps_lng']))
{
$coordinates=$gps_lat';'$gps_lon;
if (cget('BMW_GPS') != $gps_lat) cset('BMW_GPS',$coordinates);
}
Code: Select all
('2020-01-04 12:01:26', 'BMW_GPS_LAT_mode', '50.48331'),
('2020-01-04 12:01:26', 'BMW_GPS_LON_mode', '5,3696233'),
('2020-01-04 12:02:17', 'BMW_GPS_LAT_mode', '52.57511'),
('2020-01-04 12:02:17', 'BMW_GPS_LON_mode', '5,3696233'),
('2020-01-04 12:03:13', 'BMW_GPS_LAT_mode', '52.57511'),
('2020-01-04 12:03:13', 'BMW_GPS_LON_mode', '5,3696233'),
('2020-01-04 12:04:17', 'BMW_GPS_LAT_mode', '52.57511'),
('2020-01-04 12:04:17', 'BMW_GPS_LON_mode', '5,3696233'),
('2020-01-04 12:05:15', 'BMW_GPS_LAT_mode', '52.57511'),
('2020-01-04 12:05:15', 'BMW_GPS_LON_mode', '5,369623');
Code: Select all
select timestamp, group_concat(`device` separator ',') as `GPS`
from
(
select timestamp,
group_concat(`status` separator ',') as `device`
from log
WHERE `device` in ('BMW_GPS_LAT_mode','BMW_GPS_LON_mode') and DATE(`timestamp`) = CURDATE()
group by timestamp, `device`
) tbl
group by timestamp;
Code: Select all
('2020-01-04 12:01:26', '52.57511,5,3696233'),
('2020-01-04 12:02:17', '52.57511,5,3696233'),
('2020-01-04 12:03:13', '52.57511,5,3696233'),
('2020-01-04 12:04:17', '52.57511,5,3696233'),
('2020-01-04 12:05:15', '52.57511,5,369623');
Code: Select all
function storegps($timestamp,$lat,$lon)
{
global $geo;
$geo->query("INSERT INTO location (Geotime,Latitude,Longitude) VALUES ('$timestamp','$lat','$lon');");
lg('BMW: storing: Timestamp '.$timestamp.' Latitude:'.$lat.' Longitude: '.$lon);
}
Thanks for your welcome, yes it is addictiveEgregius wrote: ↑Thursday 30 January 2020 11:31 Hi McMelloW,
Welcome to the club![]()
Pass2PHP doesn't change anything on the domoticz.db SQLlite database.
With the LUA script statusses are sent to PHP for further processing.
Yes, you can just create a second (or more) database on the same mariadb server. PHPmyadmin running means that you already have php enabled and you should be good to go. Should be easy to get it up and running.
A small warning nevertheless: it is very addictive![]()
Hi McMellow, good to know there is a how to file in this threat, a few pages back. Also have a look at the info from ergegius which is very thorough. Your issue is probably due to the symlink. Check the how to, it’s definitely stated in thereMcMelloW wrote:Thanks for your welcome, yes it is addictiveEgregius wrote: ↑Thursday 30 January 2020 11:31 Hi McMelloW,
Welcome to the club![]()
Pass2PHP doesn't change anything on the domoticz.db SQLlite database.
With the LUA script statusses are sent to PHP for further processing.
Yes, you can just create a second (or more) database on the same mariadb server. PHPmyadmin running means that you already have php enabled and you should be good to go. Should be easy to get it up and running.
A small warning nevertheless: it is very addictive![]()
![]()
But at this moment, it is more frustrating. It seems nothing happens, don't see any records appearing in the database.![]()
![]()
Rebooted the RPi already.
How do I get my devices in the database?
Users browsing this forum: No registered users and 1 guest