Low battery on sensor node - no data received in domoticz - but visible in MysController

Moderator: leecollings

Post Reply
dakipro
Posts: 49
Joined: Thursday 17 December 2015 22:24
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: Norway
Contact:

Low battery on sensor node - no data received in domoticz - but visible in MysController

Post by dakipro »

Hi,
I use domoticz and MySensors on LAN gateway, and it is working great (like everything else, most of the time :) ).
Today I noticed one strange thing, I have one Temperature+motion+lux sensor that is battery operated, and I have recently changed the batteries in it, but after a week Domoticz stopped getting the data from the sensor. I checked the data using MYSController, a windows tool that will show raw communication data between sensors and gateway, and data was coming, I measured voltage on the arduino pro mini and it was 3.3v as I have a booster, but there was just no data in domoticz, for like two days. I replaced the pro mini and the radio, but still no data. After two days of headbanging and going trough the usual "fck it I'm going back to cable" I heard a shhhhhus sound from the sensor, and have found that one battery was leaking. After replacing (what I thought was new battery) the sensors appeared again in domoticz.

Now a funny question, how come I did see sensor data in MySController, but not in the domoticz? Domoticz logs were empty all the time?

I do not have raw logs unfortunately, and this as happening in the period when the domoticz recently updated (great update btw) so I did cleanup the domoticz database as well, removed the mysesors module in order to try to fix the "battery" problem.

Did anyone experienced this?
Raspberry Pi 2 B - MySensors (dimmers, switches, motion, temperature, lux, humidity sensors)
zWave (220v switches)
various 433 via RFLink
User avatar
gizmocuz
Posts: 2551
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Low battery on sensor node - no data received in domoticz - but visible in MysController

Post by gizmocuz »

I checked the code (MySensorsBase.cpp), but i can not see anything that would prevent adding/updating values when the battery is low.

What i could think of, you said you deleted the database/sensors, that will probably also mean that when you started domoticz again,
it will receive new mysensors sensors with new sensor ID's, did you had 'accept new hardware' enabled in the settings, and checked if you got new sensors ?
Quality outlives Quantity!
dakipro
Posts: 49
Joined: Thursday 17 December 2015 22:24
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: Norway
Contact:

Re: Low battery on sensor node - no data received in domoticz - but visible in MysController

Post by dakipro »

Thank you for checking, I tried with new database, I tried by deleting existing database entries from MySensor* tables, acceptance of new hardware was on and other sensors were added and were working fine. As a developer myself I cannot think of a reason why some data would reach domoticz while some other won't. Strangest is that MysController was seeing the sensor and data, but maybe that data was corrupted or marked somehow that I didn't notice...
I thought just to raise awareness in case it happened to someone else :)

Btw, I noticed that when I deleted nodes and I deleted MySensors hardware from settings (I wanted to reintroduce nodes back to domoticz) nodes were still in one of the MySensor tables which prevented domoticz to accept them as new mysensor nodes.
But that might be just my installation or previous version issue, or some specific change of versions that I did. Removing nodes from .db file manually allowed for nodes to be added back again, maybe it is fixed in new version which works much better
Raspberry Pi 2 B - MySensors (dimmers, switches, motion, temperature, lux, humidity sensors)
zWave (220v switches)
various 433 via RFLink
User avatar
gizmocuz
Posts: 2551
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Low battery on sensor node - no data received in domoticz - but visible in MysController

Post by gizmocuz »

Is it possible you can debug this more and if needed provide a git pull request with a patch ?

If you delete the mysensors hardware from the hardware table, the mysensors database table should delete all sensors that where used with that hardware (hardware id)

void CSQLHelper::DeleteHardware(const std::string &idx)

safe_query("DELETE FROM WOLNodes WHERE (HardwareID == '%q')",idx.c_str());
Quality outlives Quantity!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest