[closed] 1-Wire DS2450 Quad voltage sensor not properly recognised Topic is solved

Moderators: fantom, leecollings

Post Reply
tparvais
Posts: 10
Joined: Saturday 01 February 2014 14:34
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

[closed] 1-Wire DS2450 Quad voltage sensor not properly recognised

Post by tparvais »

Hello

I've a DS2450 (Quad voltage ADC) used for anomometer in AAG weatherstation. (Serie 0x20)

In domoticz, I see only one unique value:

115 1-Wire 0004 0 Unknown RFXSensor Voltage 4642 mV - - Ajouter un dispositifRenommer le dispositif Log 2017-06-13 13:02:14

intead of 4.

Type is also RFXsensor strangely.

the DS2450 is behind a master hub hobby board, as others elements.

via OWFS, I see correctly all the values:

Code: Select all

pi@domoticz:/mnt/1wire/1F.4E2904000000/main/20.32F406000000 $ ls
total 0
0 drwxrwxrwx 1 root root 4096 jun 13 13:04 .
0 drwxr-xr-x 1 root root 4096 jun 13 09:38 ..
0 drwxrwxrwx 1 root root 4096 jun 13 13:04 8bit
0 -r--r--r-- 1 root root   16 jun 13 09:38 address
0 drwxrwxrwx 1 root root 4096 jun 13 13:04 alarm
0 -rw-rw-rw- 1 root root  256 jun 13 09:38 alias
0 drwxrwxrwx 1 root root 4096 jun 13 13:04 CO2
0 -r--r--r-- 1 root root    2 jun 13 09:38 crc8
0 -r--r--r-- 1 root root    2 jun 13 09:38 family
0 -r--r--r-- 1 root root   12 jun 13 09:38 id
0 -r--r--r-- 1 root root   12 jun 13 13:04 latestvolt2.A
0 -r--r--r-- 1 root root   51 jun 13 13:04 latestvolt2.ALL
0 -r--r--r-- 1 root root   12 jun 13 13:04 latestvolt2.B
0 -r--r--r-- 1 root root   12 jun 13 13:04 latestvolt2.C
0 -r--r--r-- 1 root root   12 jun 13 13:04 latestvolt2.D
0 -r--r--r-- 1 root root   12 jun 13 13:04 latestvolt.A
0 -r--r--r-- 1 root root   51 jun 13 13:04 latestvolt.ALL
0 -r--r--r-- 1 root root   12 jun 13 13:04 latestvolt.B
0 -r--r--r-- 1 root root   12 jun 13 13:04 latestvolt.C
0 -r--r--r-- 1 root root   12 jun 13 13:04 latestvolt.D
0 -r--r--r-- 1 root root   16 jun 13 09:38 locator
0 -rw-rw-rw- 1 root root   32 jun 13 09:38 memory
0 drwxrwxrwx 1 root root 4096 jun 13 13:04 pages
0 -rw-rw-rw- 1 root root    1 jun 13 13:04 PIO.A
0 -rw-rw-rw- 1 root root    7 jun 13 13:04 PIO.ALL
0 -rw-rw-rw- 1 root root    1 jun 13 13:04 PIO.B
0 -rw-rw-rw- 1 root root    1 jun 13 13:04 PIO.C
0 -rw-rw-rw- 1 root root    1 jun 13 13:04 PIO.D
0 -rw-rw-rw- 1 root root    1 jun 13 13:04 power
0 -r--r--r-- 1 root root   16 jun 13 09:38 r_address
0 -r--r--r-- 1 root root   12 jun 13 09:38 r_id
0 -r--r--r-- 1 root root   16 jun 13 09:38 r_locator
0 drwxrwxrwx 1 root root 4096 jun 13 13:04 set_alarm
0 -r--r--r-- 1 root root   32 jun 13 09:38 type
0 -r--r--r-- 1 root root   12 jun 13 13:04 volt2.A
0 -r--r--r-- 1 root root   51 jun 13 13:04 volt2.ALL
0 -r--r--r-- 1 root root   12 jun 13 13:04 volt2.B
0 -r--r--r-- 1 root root   12 jun 13 13:04 volt2.C
0 -r--r--r-- 1 root root   12 jun 13 13:04 volt2.D
0 -r--r--r-- 1 root root   12 jun 13 13:04 volt.A
0 -r--r--r-- 1 root root   51 jun 13 13:04 volt.ALL
0 -r--r--r-- 1 root root   12 jun 13 13:04 volt.B
0 -r--r--r-- 1 root root   12 jun 13 13:04 volt.C
0 -r--r--r-- 1 root root   12 jun 13 13:04 volt.D
I've checked in the domoticz code and it seems there is a mistake: the owfs variables are volt.A, volt.B, volt.C & volt.D

in 1WireByOWFS.cpp, we see there is a call to "/volt." and then append "A" and unit given by the function

Code: Select all

int C1WireByOWFS::	(const _t1WireDevice& device,int unit) const
{
   std::string fileName(device.filename);

   switch(device.family)
   {
   case smart_battery_monitor:
      {
         static const std::string unitNames[] = { "VAD", "VDD", "vis" };
         if (unit >= (sizeof(unitNames)/sizeof(unitNames[0])))
            return 0;
         fileName.append("/").append(unitNames[unit]);
         break;
      }
   default:
      {
         [b]fileName.append("/volt.").append(1,'A'+unit)[/b];
         break;
      }
   }
in 1wire.cpp

Code: Select all

case quad_ad_converter:
				{
					ReportVoltage(device.devid, 0, m_system->GetVoltage(device, [b]0[/b]));
					ReportVoltage(device.devid, 1, m_system->GetVoltage(device, [b]1[/b]));
					ReportVoltage(device.devid, 2, m_system->GetVoltage(device,[b] 2[/b]));
					ReportVoltage(device.devid, 3, m_system->GetVoltage(device, [b]3[/b]));
/volt.A1 volt.A2 etc... does not exist... it cannot work

do you agree ? if yes, I'll issue a bug

Thank you
Last edited by tparvais on Friday 16 June 2017 23:34, edited 1 time in total.
tparvais
Posts: 10
Joined: Saturday 01 February 2014 14:34
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

[closed] 1-Wire DS2450 Quad voltage sensor not properly recognised

Post by tparvais »

Problem has been solved with last beta. Thank you
fantom
Posts: 269
Joined: Thursday 26 March 2015 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

Re: [closed] 1-Wire DS2450 Quad voltage sensor not properly recognised

Post by fantom »

Hi.
Pls close this task

Regards
Fantom
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests