UniPi - Homeseer plugin



  • I've written a script to integrate UniPi to HomeSeer (home automation software).

    [attachment=1:opzs3q6l]UniPi - Homeseer.png[/attachment:opzs3q6l]

    Features

    • Read relay status
    • Control relays
    • Read inputs (digital and analog)
    • Modify Analog output
    • Auto detect one-wire sensors

    To install:

    • Extract the attached Unipi-v0.1.zip and follow instructions in install.txt


  • I've written a script to integrate UniPi to HomeSeer (home automation software).

    [attachment=1:opzs3q6l]UniPi - Homeseer.png[/attachment:opzs3q6l]

    Features

    • Read relay status
    • Control relays
    • Read inputs (digital and analog)
    • Modify Analog output
    • Auto detect one-wire sensors

    To install:

    • Extract the attached Unipi-v0.1.zip and follow instructions in install.txt


  • Wow! Nice job. Thanks a lot! I will definitely try it



  • Thanks! Good job!



  • I could not run the script because dv.Ref(hs) was not defined correctly. I did correct that and now it is working. I use HomeSeer 3.0.0.152.
    Changed script attached.



  • Hi Jellee,

    Great to see that there is at least one happy user using my software. Thanks for fixing this issue and sending back your version (that's the spirit of Open Source!). I should compare it with my version. If I remember correctly I did some little improvements on my side. I will combine these with your version. Expect a version 0.2 soon!

    Just curious: Do you have one or more temperature sensors? Were they auto detected?

    Thanks!

    Erwin



  • Hi Erwin,

    No problem and thanks to you too.

    Unfortunately I don't have any temperature sensor, so I could not check.

    I still have a problem. The script (vb function) that need to run when a relais ON/OFF button is pressed at HomeSeer is not executed.
    The code below takes care of linking that function to the button. I can remember I have changed the 'dvref' definition but that should not stop it, because it still gives the same dvref value as before.

    ' For OFF button
    hs.DeviceScriptButton_AddButton(dvref, "Off",0,"unipi.vb","RelayButton","Off",1,1,0)
    

    Maybe you know what is happening? Or how I can check in HomeSeer that the function script is linked to the button?
    For all the rest the script is running perfectly!

    Thanks!



  • My issue is solved now. I made a mistake in the script by myself. New zip attached.



  • Hi Jellee,

    I've checked your changes, but the only change I've found is in the CreateRoot sub. The other changes are all because of search/replace. In the CreateDevice subs, you've replaced it with the same code:

    Dim dvref = dv.Ref(hs)
    

    I've tested the script in my environments by deleting the root device, but was not able to reproduce your issue. My HS version is the same, 3.0.0.152. I've also checked the helpfiles (http://homeseer.com/support/homeseer/HS ... class1.htm), the property Ref should exists and hold the reference to the root device.

    I've also compared my current version with the first version. There is a bug in that version: The LastUpdate value was constantly changing. You should remove the "hs.SetDeviceValue.." line in Sub UpdateDeviceValue to fix this bug.

    Sub UpdateDeviceValue(DeviceAddress as String, DeviceType as String, Value as Double)
            Dim dvRef = hs.GetDeviceRef(DeviceAddress)
    '       hs.SetDeviceValueByRef(dvRef, Value, True)  <== Remove this line
            Select Case DeviceType
    
    

    Hope that helps!

    Regards,
    Erwin



  • @ewillems
    Hi I would like to use this script, have you guys used it with zeeS2 and hs3?
    I would like to add Unipi as i/o extention.
    thx.