Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Device sends %CO2% instead of the actual value
#31
Great.. so let's see what will happen. it looks like the logging feature is working Smile
Reply
#32
Well, good in a way - it failed at or soon after 06:12:59 this morning.

Here's the last bit of logging my code got for this device out of MQTT (mosquitto). “ow” stuff is some one-wire temperature sensors and “cc” is a CurrentCost mains electricity meter. MQTT logged times may be a second or so late relative to the debug output; my logging code accumulates everything that happens in a particular second to make up a JSON line in the logfile.


Code:
{"_": "2016-12-30T06:01:09Z", "sophie": {"altitude": 28.49, "co2": 756, "pressure": 1009.83}}
{"_": "2016-12-30T06:03:30Z", "ow": {"28.B21AC8010000": 19.75, "28.D517C8010000": 19.875, "28.E3F2C7010000": 20.1875}, "sophie": {"temperature": 18.87}}
{"_": "2016-12-30T06:03:31Z", "sophie": {"altitude": 28.63, "co2": 752, "humidity": 43.04, "pressure": 1009.82}}
{"_": "2016-12-30T06:05:52Z", "cc": {"power": 57, "temperature": 14.2}, "sophie": {"temperature": 18.86}}
{"_": "2016-12-30T06:05:53Z", "sophie": {"altitude": 29.31, "co2": 752, "humidity": 43.04, "pressure": 1009.73}}
{"_": "2016-12-30T06:08:14Z", "sophie": {"temperature": 18.85}}
{"_": "2016-12-30T06:08:15Z", "sophie": {"altitude": 29.81, "co2": 750, "humidity": 43.08, "pressure": 1009.68}}
{"_": "2016-12-30T06:10:36Z", "sophie": {"temperature": 18.84}}
{"_": "2016-12-30T06:10:37Z", "cc": {"power": 86, "temperature": 14.2}, "sophie": {"altitude": 29.19, "co2": 746, "humidity": 43.04, "pressure": 1009.75}}
{"_": "2016-12-30T06:12:59Z", "sophie": {"altitude": 29.01, "co2": 741, "humidity": 43.04, "pressure": 1009.77, "temperature": 18.82}}

Attached is the debug output from just under half an hour before that (tail -n +20000 debug > debug.txt).

PS, device is plugged into a hub attached to me laptop so I could talk to it with the config utility. I'll leave it like that for the time being.


Attached Files
.txt   debug.txt (Size: 68.08 KB / Downloads: 1)
Reply
#33
Hmmm, thanks for the log!.. seems like the i2c communication breaks after some time.
I added now a feature, that if it was working and fails at some point of time- that the device automatically restarts, trying to recover. in addition i discovered that somewhere in the last weeks i have commented out part of the functionality that makes i2c more robust.. maybe this is the reason why with the latest updates it started to fail so much

also the logging now logs right after the device boots.

so you can try to update again to the latest firmware

if you like you can try to connect to the device with the Config Tool w/o unplugging it, it will restart it, and perhaps then again it will work.

I will also run a device with all those sensors here, to monitor it, as up to now i was only running a one with the CM1102 sensor
Reply
#34
Thanks, have loaded the new firmware: vESPrino v1.16 build20161230. If I don't see a failure this year I'll let you know early next year. Wink
Reply
#35
After a while (at 18:53:50 for future debug log reference) it stopped sending completely: MQTT and debug output.

I started the config utility at which point it restarted sending both MQTT and debug and seems to be running normally now.

Something I notice is that the LED seems to be constantly on dim magenta. Previously I think it only did that for a while (45 seconds??) after startup.
Reply
#36
Stopped again. Last MQTT message at 19:52:34, last time in the debug log at 19:53:38. Debug file attached. LED is still on dim magenta. Device responds continuously to pings and router shows it logged on.

Again, starts logging sensibly as soon as I connect to it with the config utility. Magenta LED still on.


Attached Files
.txt   debug2.txt (Size: 83.5 KB / Downloads: 2)
Reply
#37
I'd just like to add, that mine two sensors also stops sending data after about ¾ of a day.
From the other thread I've limited the voltage of the power supply already being below 5,25V without change of behavior.
As far as I can remember somewhen in the past the sensors worked properly without interruption. Unfortunately and for sure I did not note the date or firmware version for which it worked well. 
Therefore currently just following this thread also, hoping for a solution and avoiding to update to the recent firmware.
Reply
#38
Getting weirder: it stopped sending MQTT data at 20:52:21 and debug output soon after. I didn't start the config utility, just left it. It then “spontaniously” restarted debug at 21:13:22 and MQTT data at 21:14:57.

joshi04's post reminds me that you sent me that diode to try, presumably to drop the voltage a bit. It'd be good if you could let me know where to install it (and the capacitor?).

LED is still magenta.


Attached Files
.txt   debug3.txt (Size: 38.55 KB / Downloads: 3)
Reply
#39
i have the suspicion that at some point of time the device can no longer connect to the router. Up to now i had this on two modules, that after some time started to connect again.
strange thing is that even after restarting the module and reflashing it didn't want to connect again
i will add now some better indication via the led - what the device is doing right now to see if this is the cause
Reply
#40
alright, i have prepared a new version, that you can manually update to
what it does different are several things
1. In case I2C Bus is failing - the previous one restarted the device, which could lead to a loop, so that for some time there is no log (the device constantly restarts) - this is one of the potential problems that Ed was facing
2. In case sensors are not discovered - the %CO2%, %TEMP% readings will not be suppressed again - to see if this was the reason for the missing mqtt logs (i had added a check to remove those, if they appear only rarely - apparently the problem is elsewhere
3. In debug mode the LED will now emit different colors
2x Lila (Magenta) blinks - the device starts after reboot
3x lila blinks - the device starts after deep sleep
2x red + lila - NO i2c devices
2x red + yellow - i2c bus failed
Light Blue / Dark Blue - the device searches for Wifi
followed by Green for 1 sec - wifi connected
followed by Red for 1 sec - wifi failed
and after data is sent
2x green - success (green stays)
3x red- failed (red stays)
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)