2.6 days since the emonpi received/recorded any data is probably the issue.
eek! Don’t know how I missed that… Log full of these errors… now to figure out what went wrong during the last update which I think this coincided with!
2021-08-09 12:24:56.613|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0
2021-08-09 12:26:52.432|WARN|emoncms_mqtt.php|Not connected, retrying connection
2021-08-09 12:26:52.468|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0
2021-08-09 12:27:28.581|WARN|index.php|406 Not Acceptable|api/Dxn8SylQWqCz7ZerJMpxuWsEJyI3BqT-Utvx3oqO/lights
2021-08-09 12:32:53.834|WARN|index.php|406 Not Acceptable|api/Dxn8SylQWqCz7ZerJMpxuWsEJyI3BqT-Utvx3oqO/lights
2021-08-09 12:34:16.804|WARN|emoncms_mqtt.php|Not connected, retrying connection
2021-08-09 12:34:16.843|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0
2021-08-09 12:37:22.711|WARN|index.php|406 Not Acceptable|api/Dxn8SylQWqCz7ZerJMpxuWsEJyI3BqT-Utvx3oqO/lights
2021-08-09 12:42:13.970|WARN|index.php|406 Not Acceptable|api/Dxn8SylQWqCz7ZerJMpxuWsEJyI3BqT-Utvx3oqO/lights
2021-08-09 12:44:07.134|WARN|emoncms_mqtt.php|Not connected, retrying connection
2021-08-09 12:44:07.234|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0
2021-08-09 12:46:33.859|WARN|index.php|406 Not Acceptable|api/Dxn8SylQWqCz7ZerJMpxuWsEJyI3BqT-Utvx3oqO/lights
2021-08-09 12:51:28.169|WARN|index.php|406 Not Acceptable|api/Dxn8SylQWqCz7ZerJMpxuWsEJyI3BqT-Utvx3oqO/lights
2021-08-09 12:55:22.760|WARN|emoncms_mqtt.php|Not connected, retrying connection
2021-08-09 12:55:22.793|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0
The index errors are proabaly because the session has expired and you are not logged in.
Not sure what your setup is. Do you use the emonpi MQTT Broker?
Just try and reboot the emonPi as a starting point.
I’ve rebooted and getting the same errors. Interestingly, what I am seeing is that new data is being posted to emoncms.org but not when viewing through emoncms locally…
EDIT: I’m not using MQTT
If it a standard EmonPi, then yes you are, and as you are getting no data, again, yes you are - that is how the standard setup works. Posted data to emoncms will continue as that uses an HTTP interface.
- What does the status of MQTT server show on the admin page?
- How old is the setup/SD Card?
Can you click on the button Copy as Markdown next to Server Information on the Admin page and paste into a reply here please (no further formatting required).
Ah ok, hadn’t appreciated that it uses MQTT internally. Thanks for your help with debugging this… the SD card is probably a couple of years old. The status of MQTT is running
Server Information
Server Information
Services
-
emonhub :- Active Running
-
emoncms_mqtt :- Active Running
-
feedwriter :- Active Running - sleep 300s 0 feed points pending write
-
service-runner :- Active Running
-
emonPiLCD :- Active Running
-
redis-server :- Active Running
-
mosquitto :- Active Running
-
demandshaper :- Active Running
Emoncms
- Version :- low-write 10.7.7
-
Git :-
- URL :- GitHub - emoncms/emoncms: Web-app for processing, logging and visualising energy, temperature and other environmental data
- Branch :- * stable
- Describe :- 10.7.7
- Components :- Emoncms Core v10.7.7 | App v2.3.0 | EmonHub Config v2.1.1 | Dashboard v2.1.4 | Device v2.1.2 | Graph v2.1.1 | Network Setup v1.0.2 | WiFi v2.1.0 | Backup v2.3.2 | DemandShaper v2.2.1 | Postprocess v2.2.2 | Sync v2.1.1 | Usefulscripts v2.3.7 | EmonScripts v1.3.8 | RFM2Pi v1.4.1 | Emonhub v2.3.0 | EmonPi v2.9.4
Server
- OS :- Linux 5.4.51-v7+
- Host :- emonpi | emonpi | (fe80::d96f:9117:3786:9e65)
- Date :- 2021-08-09 18:10:11 BST
- Uptime :- 18:10:11 up 19 min, 0 users, load average: 0.03, 0.06, 0.07
Memory
-
RAM :- Used: 18.16%
- Total :- 925.86 MB
- Used :- 168.17 MB
- Free :- 757.69 MB
-
Swap :- Used: 0.00%
- Total :- 100 MB
- Used :- 0 B
-
Free :- 100 MB
Write Load Period
Disk
-
/ :- Used: 49.67%
- Total :- 4.06 GB
- Used :- 2.02 GB
- Free :- 1.85 GB
- Write Load :- 60.12 B/s (17 mins)
-
/var/opt/emoncms :- Used: 0.25%
- Total :- 9.84 GB
- Used :- 25.05 MB
- Free :- 9.32 GB
- Write Load :- 0 B/s (17 mins)
-
/boot :- Used: 21.16%
- Total :- 252.05 MB
- Used :- 53.32 MB
- Free :- 198.73 MB
- Write Load :- 0 B/s (17 mins)
-
/var/log :- Used: 9.54%
- Total :- 50 MB
- Used :- 4.77 MB
- Free :- 45.23 MB
- Write Load :- n/a
HTTP
- Server :- Apache/2.4.38 (Raspbian) HTTP/1.1 CGI/1.1 80
MySQL
- Version :- 5.5.5-10.3.23-MariaDB-0+deb10u1
- Host :- 127.0.0.1 (127.0.0.1)
- Date :- 2021-08-09 18:10:10 (UTC 01:00‌​)
- Stats :- Uptime: 1132 Threads: 13 Questions: 1686 Slow queries: 0 Opens: 46 Flush tables: 1 Open tables: 40 Queries per second avg: 1.489
Redis
-
Version :-
- Redis Server :- 5.0.3
- PHP Redis :- 5.3.1
- Host :- localhost:6379
- Size :- 70 keys (809.29K)
- Uptime :- 0 days
MQTT Server
- Version :- Mosquitto 1.5.7
- Host :- localhost:1883 (127.0.0.1)
PHP
- Version :- 7.3.19-1~deb10u1 (Zend Version 3.3.19)
- Modules :- apache2handlercalendar Core ctype curl date dom v20031129exif fileinfo filter ftp gd gettext hash iconv json v1.7.0libxml mbstring mosquitto v0.4.0mysqli mysqlnd vmysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $openssl pcre PDO pdo_mysql Phar posix readline redis v5.3.1Reflection session shmop SimpleXML sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter xsl Zend OPcache zlib
Pi
-
Model :- Raspberry Pi 3 Model B Rev 1.2 - 1GB (Sony UK)
-
Serial num. :- BD9F93AF
-
CPU Temperature :- 47.24°C
-
GPU Temperature :- 47.2°C
-
emonpiRelease :- emonSD-24Jul20
-
File-system :- read-write
So, I followed the instructions in the knowledgebase to reset the MQTT credentials and set them to the defaults, rebooted and it’s sprung to life. I’m really not sure what went wrong as I have no reason to have changed the MQTT credentials… but whatever happened this seems to have solved the issue!
Thank you for the pointers to MQTT - I hadn’t appreciated it was used internally