Voltage missing in latest betas

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
claude2666
Posts: 6
Joined: Wednesday 01 August 2018 14:50
Target OS: Raspberry Pi
Domoticz version:
Contact:

Voltage missing in latest betas

Post by claude2666 » Wednesday 01 August 2018 14:55

Domoticz version : V4.9796
Platform: Raspberry Pi 3b, lastest Raspbian stretch lite.
Hardware : Razberry board, RFXCOM.

In the latest beta's that I have tried (V4.9796 & V4.9788) voltage is not reported anymore from my Neo Coolcam power plugs.

I have tried to exclude and include the device again, and a device with Voltage subtype is created with ID 00000001, while all others devices belonging to that plug are created with ID 0002Exx

When I go back to the stable version V4.700, the newly created voltage device with ID 00000001 stops working and a new device with ID 00002E01, voltage subtype is added. And also all other plugs start reporting voltage again.

So it looks that in the latest betas, somewhere a byte is lost in the z-wave device ID's

claude2666
Posts: 6
Joined: Wednesday 01 August 2018 14:50
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Voltage missing in latest betas

Post by claude2666 » Thursday 23 August 2018 17:02

The Voltage device has zwave id 00, while all other sub devices have zwave id 02. (using the latest beta's)

Capture.PNG
Capture.PNG (202.56 KiB) Viewed 305 times
The problems seems be caused by the cleanup/code refactoring of 13/07 where

Where the child ID was change from an int to an unsigned byte
Old:
void SendVoltageSensor(const int NodeID, const int ChildID, const int BatteryLevel, const float Volt, const std::string &defaultname);
after update
void SendVoltageSensor(const int NodeID, const uint8_t ChildID, const int BatteryLevel, const float Volt, const std::string &defaultname);

Should the ChildID not be uint16_t?

rjblake
Posts: 151
Joined: Friday 21 October 2016 9:25
Target OS: NAS (Synology & others)
Domoticz version:
Location: Netherlands
Contact:

Re: Voltage missing in latest betas

Post by rjblake » Wednesday 05 September 2018 14:45

I guess this is still not fixed in v4.9983. All my Aeotec Dimmer's have stopped reporting Voltages. In addition, the Z-Stick Controller now seems to have added a 'Voltage'device that is reporting/logging voltage. No idea where it is getting this info from; but it started at the same time as the voltage on the individual nano dimmers stopped.

Kender
Posts: 8
Joined: Tuesday 03 January 2017 18:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Voltage missing in latest betas

Post by Kender » Wednesday 05 September 2018 15:43

I have the same problem: Aeotec Z-Stick has a "Voltage" device and the voltage of the CoolCAM plugs is not reported anymore :( :(

User avatar
emme
Posts: 856
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: Voltage missing in latest betas

Post by emme » Wednesday 05 September 2018 16:17

uh I though it was a personal issue :P

(not really) glad to see others has the same issue...

Aeotec DSB with 1 clamp
The most dangerous phrase in any language is:
"We always done this way"

Robert28
Posts: 8
Joined: Friday 05 January 2018 21:09
Target OS: Linux
Domoticz version: 4....dev
Contact:

Re: Voltage missing in latest betas

Post by Robert28 » Wednesday 05 September 2018 21:12

Nope, 2 of the 3 Neo's are not reporting a voltage anymore, 1 still does... :shock:

claude2666
Posts: 6
Joined: Wednesday 01 August 2018 14:50
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Voltage missing in latest betas

Post by claude2666 » Sunday 16 September 2018 11:19

I have setup a test environment on my WIN10 workstation, and indeed, after changing ChildID to uint16_t, my Neo Coolcam plugs started reporting voltage again.

So it is clearly a bug

As I have never used github, I need to figure out how this works to try to commit the correction. Unless somebody here can help to rollback the change that was done on 13/07?

Robert28
Posts: 8
Joined: Friday 05 January 2018 21:09
Target OS: Linux
Domoticz version: 4....dev
Contact:

Re: Voltage missing in latest betas

Post by Robert28 » Sunday 16 September 2018 17:32

In which file did you change that? And were? ;)

claude2666
Posts: 6
Joined: Wednesday 01 August 2018 14:50
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Voltage missing in latest betas

Post by claude2666 » Tuesday 18 September 2018 15:14

Robert28 wrote:
Sunday 16 September 2018 17:32
In which file did you change that? And were? ;)
I made updates in 3 files, replacing the uint8_t for ChildID with uint16_t.

These are the updates I made to restore the reporting of the volatge:

file DomoticzHardware.h

old:
void SendVoltageSensor(const int NodeID, const uint8_t ChildID, const int BatteryLevel, const float Volt, const std::string &defaultname);
updated:
void SendVoltageSensor(const int NodeID, const uint16_t ChildID, const int BatteryLevel, const float Volt, const std::string &defaultname);

file DomoticzHardware.cpp
old:

void CDomoticzHardwareBase::SendVoltageSensor(const int NodeID, const uint8_t ChildID, const int BatteryLevel, const float Volt, const std::string &defaultname)
{
...
updated:

void CDomoticzHardwareBase::SendVoltageSensor(const int NodeID, const uint16_t ChildID, const int BatteryLevel, const float Volt, const std::string &defaultname)
{




file HardwareMonitor.cpp

else if (qType == "Voltage")
{
doffset = 1300;
float volt = static_cast<float>(atof(devValue.c_str()));
SendVoltageSensor(0, (uint8_t)(doffset + dindex), 255, volt, devName);
}
else if (qType == "Current")
...
updated:

else if (qType == "Voltage")
{
doffset = 1300;
float volt = static_cast<float>(atof(devValue.c_str()));
SendVoltageSensor(0, (uint16_t)(doffset + dindex), 255, volt, devName);
}
else if (qType == "Current")
...

Kender
Posts: 8
Joined: Tuesday 03 January 2017 18:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Voltage missing in latest betas

Post by Kender » Wednesday 19 September 2018 14:37

It work for me !! Thank you !! :) :) ;)

Robert28
Posts: 8
Joined: Friday 05 January 2018 21:09
Target OS: Linux
Domoticz version: 4....dev
Contact:

Re: Voltage missing in latest betas

Post by Robert28 » Wednesday 19 September 2018 21:10

Confirmed :!: :D Thanks :!: :!:

I have attached the patch files for Domoticz version 4.9999 (at the time of writing the latest unstable release). The files to patch are located in the ./hardware/ subfolder.
Attachments
Domoticz_v4d9999_Patch.zip
Patch for Domoticz v4.9999 (files to patch are in ./hardware/
(891 Bytes) Downloaded 5 times

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest