Announcement

Collapse
No announcement yet.

Read Z-wave raw data

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Read Z-wave raw data

    Hi

    I've got this plug in switch Neo Coolcam (NAS-WR01ZE, 0x1027) that has a bug in it. It sometimes reports kWh as -2147425480 instead of the real value. I found online that adding 2147483647 to the negative number gives the correct value. However in HS3 the device is set to zero and not the actual value sent from device (-2147425480). In the HS3 log it says device set to 0 kWh. If it was set to -2147425480 I could use a script to correct it. I checked "Start" and "End" under "Status graphics" (on device modify page in HS3) and it is set from -2147483648 to 2147483647 so that is not the issue.
    Is there any way this can be done? Read the raw data in HS3 somehow? Or is there any other workaround?

    I use Zniffer to see the raw data.

    #2
    I made a simple script that works as a workaround for this issue. You create a virtual device that will show the correct value. Set the script to trigger whenever the faulty kWh-device changes value. If the value is lower than the previous value, it gets ignored. If it's higher it is sent to the virtual device. So in the script below I have 5 faulty devices and 5 virtual devices. So 1202 is the first faulty kWh-device and 1485 is the virtual device that will show the correct value of device 1202.

    Please be aware that this solution is not 100% accurate. When the faulty device sends a incorrect value it will be ignored. Instead the last correct value will be used. This means that the actuall correct value is lost. This leads to a slight "lag". As an example last correct value is 100 kWh, next update is 101 kWh but it is incorrectly sent as -1231561xxx so instead 100 kWh is shown in HS.

    Also this will not work as intended if you reset kWh to zero in your device. You will then need to reset the virtual device to zero as well. Then it may work, I have not tried that.


    Public Sub Main(ByVal Parmsparms As String)

    'put your Homeseer device-ID's of the faulty kWh-devices is this array. You can put as many devices as you wish here.
    Dim fromDevArray As Integer() = {1202,1216,882,1489,855}
    'put your Homeseer device-ID's of the virtual devices here. You will need to create these devices yourself.
    Dim toDevArray As Integer() = {1485,1487,1488,1489,1490}
    Dim index As Integer = 0
    Dim arrayLength As Integer = (fromDevArray.Length)

    While (index < arrayLength)
    If ( hs.DeviceValueEx( fromDevArray( index ) ) > hs.DeviceValueEx( toDevArray( index ) ) )
    hs.SetDeviceValueByRef( toDevArray( index ), hs.DeviceValueEx( fromDevArray( index ) ), True)
    End If
    index = index + 1
    End While
    End Sub

    Comment

    Working...
    X