Page 1 of 1
Solved - Temperature sensors going nuts
Posted: Saturday 22 June 2019 12:27
by Segfault
I upgraded my Domoticz installation to latest and now all temperature sensors are showing nonsense temperature. For instance, temperature from house thermostat is displayed 79°C. Sensor from outside of house is reading 81°C. They were all correct before upgrade. Anyone knows what happened and how to fix it?
Edit: I removed all files installed by Domoticz and re-installed - cleaned up by hand what was left over after unmerge. Apparently there were some files from my previous installation attempts which caused this misbehavior. It is all good now.
Re: Temperature sensors going nuts
Posted: Saturday 22 June 2019 12:51
by waaren
Could it be related to the settings of your system ( Celsius / Fahrenheit ) combined with old GUI stuff left in cache ?
Re: Temperature sensors going nuts
Posted: Saturday 22 June 2019 12:53
by Segfault
Yes it could. Having closer look the readings are probably in Fahrenheit while displayed in Celsius. How can I clear this cache?
Re: Temperature sensors going nuts
Posted: Saturday 22 June 2019 13:03
by waaren
Segfault wrote: ↑Saturday 22 June 2019 12:53
How can I clear this cache?
first
clear browser cache and appcache
Chrome: chrome://appcache-internals/#
Firefox:
https://support.mozilla.org/en-US/kb/storage
or
in www/js look for domoticz.js.gz, if its there remove it, (KEEP domoticz.js !! )
or
use incognito mode using
Chrome [control] [shift] n
Firefox: [control] [shift] p
Re: Temperature sensors going nuts
Posted: Saturday 22 June 2019 13:48
by Segfault
There is domoticz.js.gz, but there is no domoticz.js. Removing domoticz.js.gz didn't change a thing. However, for some reason one of sensors was displaying correct temperature after I started Domoticz. And then, apparently after it was polled, it went wrong again. Setting temperature in Fahrenheit doesn't help either, it just shows close to 200 degrees in F. Going into incognito mode does not change anything, temperatures are still crazy.
Code: Select all
server ~ # ls -l /var/lib/domoticz/
total 1192
-rw-r--r-- 1 root root 136 Jun 22 05:00 domocookie.txt
-rw-r----- 1 root root 774144 Jun 22 06:50 domoticz.db
-rw-r----- 1 root root 32768 Jun 22 06:50 domoticz.db-shm
-rw-r----- 1 root root 160712 Jun 22 06:50 domoticz.db-wal
-rw-r--r-- 1 root root 114869 Jun 22 06:41 ozwcache_0x0184c472.xml
-rw-r--r-- 1 root root 31899 Jun 22 06:52 OZW_Log.txt
drwxr-xr-x 2 root root 4096 Jan 2 10:57 plugins
drwxr-xr-x 6 root root 4096 Jun 21 19:04 scripts
-rw-r--r-- 1 root root 63256 Mar 11 17:29 zwcfg_0x0184c472.xml
-rw-r--r-- 1 root root 108 Jun 22 06:38 zwscene.xml
What is this ozwcache_0x0184c472.xml ? Can I delete it?
Re: Temperature sensors going nuts
Posted: Sunday 23 June 2019 2:54
by Segfault
I removed one of sensors and installed it back and it is still showing me 188°F. What can be done to get back to normal?
Re: Temperature sensors going nuts
Posted: Sunday 23 June 2019 11:47
by waaren
Segfault wrote: ↑Sunday 23 June 2019 2:54
I removed one of sensors and installed it back and it is still showing me 188°F. What can be done to get back to normal?
How did you do the upgrade ? Do you compile locally ?
Which steps did you do to clear cache and appcache ?
What is your setting for temperature in domoticz settings TAB ?
Re: Temperature sensors going nuts
Posted: Sunday 23 June 2019 13:30
by Segfault
1. My trusty RPi which was running Domoticz died. So I compiled/installed Dometicz in my server (version V4.10925). I figured one computer less is good and server has plenty of resources. I took the database from dead Pi and copied it over, then started Domoticz. Took the same USB Zwave controller dongle and plugged it into server of course. Bingo, everything was in place. My hardware (switches, sensors, everything) was all there, scenarios, whatnot. I had temperatures in Celsius in RPi.
2. I did not do anything with cache.
3. Temperature setting was C in RPi, now when I set it to C I get temperatures in F. When I set it to F then I get close to 200 degrees.
See attachments, my RPi died on June 16th, these are from my outdoor temperature sensor.
Me scratching head.
Re: Temperature sensors going nuts
Posted: Sunday 23 June 2019 15:39
by waaren
Segfault wrote: ↑Sunday 23 June 2019 13:30
1. My trusty RPi which was running Domoticz died. So I compiled/installed Dometicz in my server (version V4.10925). I figured one computer less is good and server has plenty of resources. I took the database from dead Pi and copied it over, then started Domoticz.
So the domoticz executable is locally compiled and domoticz database is copied. How did you update the other domoticz subdirectories like Config, dzVents, scripts, plugins, www ?
They should all be aligned with your domoticz version
Re: Temperature sensors going nuts
Posted: Sunday 23 June 2019 16:54
by Segfault
All subdirectories and everything else came with new installation, I copied over the database only.
There probably is some config file I should edit ... but which one ... ?
Below is how variables are set in this new installation, it differs from RPi, but it really shouldn't matter, right?
Code: Select all
server ~ # cat /etc/conf.d/domoticz
# /etc/conf.d/domoticz
WWWROOT="/opt/domoticz/www/"
LOGFILE="/var/log/domoticz.log"
DBASE="/var/lib/domoticz/domoticz.db"
APPROOT="/opt/domoticz/"
EXTRAPARMS="-www 8000 -nowwwpwd -sslwww 443 -loglevel normal,status,error -userdata /var/lib/domoticz/ -wwwcompress static"
Re: Temperature sensors going nuts
Posted: Sunday 23 June 2019 22:19
by waaren
Segfault wrote: ↑Sunday 23 June 2019 13:30
1. My trusty RPi which was running Domoticz died. So I compiled/installed Domoticz in my server (version V4.10925). I figured one computer less is good and server has plenty of resources. I took the database from dead Pi and copied it over, then started Domoticz. Took the same USB Zwave controller dongle and plugged it into server of course. Bingo, everything was in place. My hardware (switches, sensors, everything) was all there, scenarios, whatnot. I had temperatures in Celsius in RPi.
That's quite a number of changes in one pass. Other hardware + other OS + other domoticz version (with also a new Open Z-Wave version)
That will make it quite hard to find the root cause. Would be interesting to see if you could test how the new domoticz version behaves on a PI. Any chance you have a spare one (or borrow one) that you could use to test this ?
Re: Temperature sensors going nuts
Posted: Sunday 23 June 2019 22:54
by Segfault
I have a RPi3 running Kodi in master bedroom. I will try and see if it comes up with my Domoticz backup from March, I created a USB stick image then. My Pi was running off USB, not SD card. Is there a place where I can download the Domoticz-4.x for Pi? I don't feel like compiling it.
Re: Temperature sensors going nuts
Posted: Monday 24 June 2019 0:33
by waaren
Segfault wrote: ↑Sunday 23 June 2019 22:54
I have a RPi3 running Kodi in master bedroom. I will try and see if it comes up with my Domoticz backup from March, I created a USB stick image then. My Pi was running off USB, not SD card. Is there a place where I can download the Domoticz-4.x for Pi? I don't feel like compiling it.
Just do a normal install with
Code: Select all
curl -L https://install.domoticz.com | bash
and when active and update to beta
Code: Select all
cd <domoticzdir>
sudo ./updatebeta
Re: Temperature sensors going nuts
Posted: Monday 24 June 2019 2:38
by Segfault
Bummer, my backup image does not boot. I'm spending too much time on this which I don't have. It is a long shot anyway and may not help at all. There probably is some flag in that database that needs to be flipped, would take 20 seconds to do or so if you know what you are doing, just guessing.
Re: Temperature sensors going nuts
Posted: Monday 24 June 2019 7:34
by waaren
Segfault wrote: ↑Monday 24 June 2019 2:38
There probably is some flag in that database that needs to be flipped.
Sorry to hear it is not working out for you. I am not aware of any such magic flag in the database other then
TempUnit which is holding your preference for Celsius or Fahrenheit. This setting will influence how values are presented but it does not change how temperatures are stored in the database and you tried to change that preference already.
What type of temperature sensors do you use ?
Re: Temperature sensors going nuts
Posted: Sunday 30 June 2019 20:51
by Segfault
Sorry for delay, I'm ready to spend a little more time on this issue. I dumped the database into a text file and found nothing relevant. Then I changed the C to F and dumped the database again, ran diff. Well, I think I've learned the hard way the F/C setting is not stored in the database. So it has to be somewhere else. I'd be real grateful for any pointers. There must be a config file controlling this behavior. I don't think my sensor type has nothing to do with it. One of them is identified as WTGR800 in Devices and the other is LaCrosse TX3. Both were OK before and both are wrong now.
Re: Temperature sensors going nuts
Posted: Sunday 30 June 2019 22:12
by waaren
Segfault wrote: ↑Sunday 30 June 2019 20:51
Sorry for delay, I'm ready to spend a little more time on this issue. I dumped the database into a text file and found nothing relevant. Then I changed the C to F and dumped the database again, ran diff. Well, I think I've learned the hard way the F/C setting is not stored in the database.
On my system the setting F/C is controlled by the value in table preferences in record with key TempUnit.
Code: Select all
select * from preferences where key = 'TempUnit';
Celsius = 0 and Fahrenheit = 1
Please note that it might take a stop / start before a change is visible in the database.
Re: Solved - Temperature sensors going nuts
Posted: Sunday 30 June 2019 22:17
by Segfault
Well, I guess we will never know what setting it was and where. Everything is fine with same database now. I edited my initial post.