Announcement

Collapse
No announcement yet.

New OpenSprinkler Plugin

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

    2.1.5.21 Seems to be working very well, and yes Matt, the status update times on the devices look good now.

    I just noticed when I try to add a Action in an Event to Control a Device, then choose the Rain Delay device the options it gives in hours are not quite right, gives you a drop-down to select 1 hour, then 17 hours, then 33 hours and up over 7000 hours. Is there a way to change this so I can choose some lower more reasonable number? like 2, 3, 5 etc?
    HS Install Date: Feb. 16, 2007

    HS3 Pro, Z-Wave, Insteon, BLStat, HS Touch Server, MyQ

    WeatherXML, BLBackup, BLLAN, BLLock, Restart, CaddX, OpenSprinkler

    Comment


      Originally posted by Mattyjee View Post
      Yep, thats the one.
      Here you go. I don't see errors in the build, but the icons don't display when installed on Linux. If I just knew what tools to grab to compile with, I could probably fix it myself.

      I assume you are back?

      Here are the debug logs:

      Aug-06 10:06:25 PM OS-Debug Water% Device (re)built with no errors
      Aug-06 10:06:25 PM OS-Debug DeviceCheck: Creating Device: OS-Water%
      Aug-06 10:06:25 PM OS-Debug History Device (re)built with no errors
      Aug-06 10:06:25 PM OS-Debug DeviceCheck: Creating Device: OS-History
      Aug-06 10:06:25 PM OS-Debug Status Device (re)built with no errors
      Aug-06 10:06:25 PM OS-Debug DeviceCheck: Creating Device: OS-Status
      Aug-06 10:06:25 PM OS-Debug Rain Delay Device (re)built with no errors
      Aug-06 10:06:24 PM OS-Debug DeviceCheck: Creating Device: OS-Delay
      Aug-06 10:06:24 PM OS-Debug Program Devices (re)built with no errors
      Aug-06 10:06:24 PM OS-Debug DeviceCheck: Creating Device: OS-Program8
      Aug-06 10:06:23 PM OS-Debug DeviceCheck: Creating Device: OS-Program7
      Aug-06 10:06:17 PM OS-Debug DeviceCheck: Creating Device: OS-Program6
      Aug-06 10:06:17 PM OS-Debug DeviceCheck: Creating Device: OS-Program5
      Aug-06 10:06:17 PM OS-Debug DeviceCheck: Creating Device: OS-Program4
      Aug-06 10:06:16 PM OS-Debug DeviceCheck: Creating Device: OS-Program3
      Aug-06 10:06:16 PM OS-Debug DeviceCheck: Creating Device: OS-Program2
      Aug-06 10:06:15 PM OS-Debug DeviceCheck: Creating Device: OS-Program1
      Aug-06 10:06:15 PM OS-Debug Zone Devices (re)built with no errors
      Aug-06 10:06:15 PM OS-Debug DeviceCheck: Creating Device: OS-Station24
      Aug-06 10:06:15 PM OS-Debug DeviceCheck: Creating Device: OS-Station23
      Aug-06 10:06:15 PM OS-Debug DeviceCheck: Creating Device: OS-Station22
      Aug-06 10:06:14 PM OS-Debug DeviceCheck: Creating Device: OS-Station21
      Aug-06 10:06:14 PM OS-Debug DeviceCheck: Creating Device: OS-Station20
      Aug-06 10:06:14 PM OS-Debug DeviceCheck: Creating Device: OS-Station19
      Aug-06 10:06:14 PM OS-Debug DeviceCheck: Creating Device: OS-Station18
      Aug-06 10:06:13 PM OS-Debug DeviceCheck: Creating Device: OS-Station17
      Aug-06 10:06:13 PM OS-Debug DeviceCheck: Creating Device: OS-Station16
      Aug-06 10:06:13 PM OS-Debug DeviceCheck: Creating Device: OS-Station15
      Aug-06 10:06:12 PM OS-Debug DeviceCheck: Creating Device: OS-Station14
      Aug-06 10:06:12 PM OS-Debug DeviceCheck: Creating Device: OS-Station13
      Aug-06 10:06:12 PM OS-Debug DeviceCheck: Creating Device: OS-Station12
      Aug-06 10:06:07 PM OS-Debug DeviceCheck: Creating Device: OS-Station11
      Aug-06 10:06:06 PM OS-Debug DeviceCheck: Creating Device: OS-Station10
      Aug-06 10:06:06 PM OS-Debug DeviceCheck: Creating Device: OS-Station9
      Aug-06 10:06:06 PM OS-Debug DeviceCheck: Creating Device: OS-Station8
      Aug-06 10:06:05 PM OS-Debug DeviceCheck: Creating Device: OS-Station7
      Aug-06 10:06:05 PM OS-Debug DeviceCheck: Creating Device: OS-Station6
      Aug-06 10:06:05 PM OS-Debug DeviceCheck: Creating Device: OS-Station5
      Aug-06 10:06:05 PM OS-Debug DeviceCheck: Creating Device: OS-Station4
      Aug-06 10:06:04 PM OS-Debug DeviceCheck: Creating Device: OS-Station3
      Aug-06 10:06:02 PM OS-Debug DeviceCheck: Creating Device: OS-Station2
      Aug-06 10:06:02 PM OS-Debug DeviceCheck: Creating Device: OS-Station1
      Aug-06 10:06:02 PM OS-Debug BuildDevices: Root device created
      Aug-06 10:05:57 PM OS-Debug DeviceCheck: Creating Device: OS-Root
      Aug-06 10:05:57 PM OS-Debug Rebuilding Devices
      Aug-06 10:05:54 PM OS-Debug Password MD5: 93c67227a97b2fd7c31d7628f2562313
      Aug-06 10:05:54 PM OS-Debug Firmware version is 215. Plugin valid for 210 to 215+
      Aug-06 10:05:53 PM OS-Debug Attempting first read from OpenSprinkler
      Aug-06 10:05:53 PM OS-Debug Success! INI File read

      Comment


        Hmmm, no errors and no Linux system to test on. This could be difficult.

        Are you vb.net competent? Would you prefer me to just email you the source code and you can attempt to fix it yourself - it may be quicker...

        Comment


          I think I can figure out the code. I don't have a compile environment setup. Can I just use the vb.net version of the MS express tools?

          Comment


            Before I send you all the code to sift through, see if you can spot any errors here. Perhaps I have the capitalisation wrong....

            Code:
            Public ImageRoot As String = "/images/OpenSprinkler/OS_root.png"
                Public ImageDevice As String = "/images/OpenSprinkler/OS_Device.png"
                'Public ImageOk As String = "/images/OpenSprinkler/OS_ok.png"
                'Public ImageDisabled As String = "/images/OpenSprinkler/OS_disabled.png"
                'Public ImageCommFail As String = "/images/OpenSprinkler/OS_NoIP.png"
                'Public ImageError As String = "/images/OpenSprinkler/OS_Error.png"
                'Public ImageZoneOff As String = "/images/OpenSprinkler/OS_off.png"
                'Public ImageZoneOn As String = "/images/OpenSprinkler/OS_Zoneon.jpg"
                'Public ImageRain As String = "/images/OpenSprinkler/OS_Rain.png"
            
                Public ImageOk As String = "/images/Homeseer/status/ok.png"
                Public ImageDisabled As String = "/images/Homeseer/status/nostatus.gif"
                Public ImageCommFail As String = "/images/Homeseer/status/unknown.png"
                Public ImageError As String = "/images/Homeseer/status/alarmmalfunction.png"
                Public ImageZoneOff As String = "/images/Homeseer/status/valveclosed.png"
                Public ImageZoneOn As String = "/images/Homeseer/status/valveopen.png"
                Public ImageRain As String = "/images/Homeseer/status/water.gif"
                
                'Get OS
                        If hs.GetOSType() = eOSType.linux Then
                            ImageRoot = "\images\OpenSprinkler\OS_root.png"
                            ImageDevice = "\images\OpenSprinkler\OS_Device.png"
                            ImageOk = "\images\Homeseer\status\ok.png"
                            ImageDisabled = "\images\Homeseer\status\nostatus.gif"
                            ImageCommFail = "\images\Homeseer\status\unknown.png"
                            ImageError = "\images\Homeseer\status\alarmmalfunction.png"
                            ImageZoneOff = "\images\Homeseer\status\valveclosed.png"
                            ImageZoneOn = "\images\Homeseer\status\valveopen.png"
                            ImageRain = "\images\Homeseer\status\water.gif"
                    End If
                    
                    If Icons = "Old" And hs.GetOSType() = eOSType.windows Then
            	            ImageOk = "/images/OpenSprinkler/OS_ok.png"
            	            ImageDisabled = "/images/OpenSprinkler/OS_disabled.png"
            	            ImageCommFail = "/images/OpenSprinkler/OS_NoIP.png"
            	            ImageError = "/images/OpenSprinkler/OS_Error.png"
            	            ImageZoneOff = "/images/OpenSprinkler/OS_off.png"
            	            ImageZoneOn = "/images/OpenSprinkler/OS_Zoneon.jpg"
            	            ImageRain = "/images/OpenSprinkler/OS_Rain.png"
                    End If
            I'm actually back away at work now, I unfortunately didn't get around to looking at this while I was home but I have my computer with me so can recompile while away. Unfortunately they have blocked VPNs now so I can't access my home system to test (or check the capitalisation). I also just realised you tried the "Icons=Old" trick which I didn't bother to make work with linux due to sheer laziness. Let me know if you want this added and I'll do it. Sorry for the inconvenience. Also misraels - I'll lower the range of the rain delay - should help solve that issue - I see the same behaviour when using lists in HSTouch. You can get around that in events though by just enetering a custom value can't you?

            Comment


              I liked the old icons but not critical. Actually, your code that check for Linux has all the slashes the windows way. So, the are all needing to be switched to forward slashes (it looks like the default way would work).

              Thanks.

              Comment


                Interesting. I had copied that from some instruction somewhere on how to make your plugin linux compatible.

                Try this then...

                (Icons=Old in the ini file should work if you want too).
                Attached Files

                Comment


                  Originally posted by Mattyjee View Post
                  Interesting. I had copied that from some instruction somewhere on how to make your plugin linux compatible.

                  Try this then...

                  (Icons=Old in the ini file should work if you want too).
                  I'm on Linux (RPi2 with Zee2 image with HS3 Pro) and applied this new one. I was expecting that the status icons would update. They didn't update and there are some interesting errors in the log. They are below. Hope this helps!

                  Aug-10 6:45:57 PM OS-Debug Error: Failed in attempt to set advanced status - Input string was not in the correct format
                  Aug-10 6:45:57 PM OS-Debug Error info: jc={"result":2}
                  Aug-10 6:45:57 PM OS-Debug Error: Failed in attempt to write to history device - Array index is out of range.
                  Aug-10 6:45:57 PM OS-Debug Error info: js={"result":2}
                  Aug-10 6:45:57 PM OS-Debug Error: Failed in attempt to write to Status device - Conversion from string "" to type 'Double' is not valid.
                  Aug-10 6:45:57 PM OS-Debug Error info: rs=0
                  Aug-10 6:45:57 PM OS-Debug Error info: jc={"result":2}
                  Aug-10 6:45:57 PM OS-Debug Error: Failed in attempt to write to Rain Sensor device - Input string was not in the correct format
                  Aug-10 6:45:57 PM OS-Debug Error info: jc={"result":2}
                  Aug-10 6:45:57 PM OS-Debug Error: Failed in attempt to write to Rain delay device - Input string was not in the correct format
                  Aug-10 6:45:57 PM OS-Debug Error info: js={"result":2}
                  Aug-10 6:45:56 PM OS-Debug Error: Failed in attempt to write to station devices - Input string was not in the correct format
                  Aug-10 6:45:56 PM OS-Debug Success! INI File read
                  Aug-10 6:45:56 PM OS-Debug Device Rebuild Requested
                  Aug-10 6:45:36 PM Plug-In Finished initializing plug-in OpenSprinkler
                  Aug-10 6:45:36 PM OS-Plugin Success! OpenSprinkler Plugin Initialised
                  Aug-10 6:45:36 PM OS-Debug Water% Device (re)built with no errors
                  Aug-10 6:45:36 PM OS-Debug DeviceCheck: Creating Device: OS-Water%
                  Aug-10 6:45:36 PM OS-Debug History Device (re)built with no errors
                  Aug-10 6:45:36 PM OS-Debug DeviceCheck: Creating Device: OS-History
                  Aug-10 6:45:36 PM OS-Debug Status Device (re)built with no errors
                  Aug-10 6:45:36 PM OS-Debug DeviceCheck: Creating Device: OS-Status
                  Aug-10 6:45:36 PM OS-Debug Rain Delay Device (re)built with no errors
                  Aug-10 6:45:35 PM OS-Debug DeviceCheck: Creating Device: OS-Delay
                  Aug-10 6:45:35 PM OS-Debug Program Devices (re)built with no errors
                  Aug-10 6:45:35 PM OS-Debug DeviceCheck: Creating Device: OS-Program3
                  Aug-10 6:45:35 PM OS-Debug DeviceCheck: Creating Device: OS-Program2
                  Aug-10 6:45:34 PM OS-Debug DeviceCheck: Creating Device: OS-Program1
                  Aug-10 6:45:34 PM OS-Debug Zone Devices (re)built with no errors
                  Aug-10 6:45:34 PM OS-Debug DeviceCheck: Creating Device: OS-Station8
                  Aug-10 6:45:34 PM OS-Debug DeviceCheck: Creating Device: OS-Station7
                  Aug-10 6:45:33 PM OS-Debug DeviceCheck: Creating Device: OS-Station6
                  Aug-10 6:45:33 PM OS-Debug DeviceCheck: Creating Device: OS-Station5
                  Aug-10 6:45:33 PM OS-Debug DeviceCheck: Creating Device: OS-Station4
                  Aug-10 6:45:32 PM OS-Debug DeviceCheck: Creating Device: OS-Station3
                  Aug-10 6:45:32 PM OS-Debug DeviceCheck: Creating Device: OS-Station2
                  Aug-10 6:45:32 PM OS-Debug DeviceCheck: Creating Device: OS-Station1
                  Aug-10 6:45:32 PM OS-Debug BuildDevices: Root device created
                  Aug-10 6:45:31 PM OS-Debug DeviceCheck: Creating Device: OS-Root
                  Aug-10 6:45:31 PM OS-Debug Rebuilding Devices
                  Aug-10 6:45:27 PM OS-Debug Password MD5: 47a0fe912758d8b9948f5aacd446fb0f
                  Aug-10 6:45:27 PM OS-Debug Firmware version is 215. Plugin valid for 210 to 215+
                  Aug-10 6:45:26 PM OS-Debug Attempting first read from OpenSprinkler
                  Aug-10 6:45:26 PM OS-Debug Success! INI File read

                  Comment


                    result=2 is what you get when your password is incorrect. Check or disable your password.

                    You may need to clear cache and refresh your browser for images to update.

                    Let me know how you go...

                    Comment


                      Originally posted by Mattyjee View Post
                      result=2 is what you get when your password is incorrect. Check or disable your password.

                      You may need to clear cache and refresh your browser for images to update.

                      Let me know how you go...
                      Password is correct and hasn't changed. But just a quick look at the device modification tab for one of the devices (a zone for example) shows the image path as /images/Homeseer/status/nostatus.gif. This is a problem on my system as "Homeseer" in my path is actually "HomeSeer". Not sure if this is standard or just a symptom of my moving over from Windows.

                      I'll clear my cache but I expect the above case issue to at least be my problem.
                      Last edited by benposton; August 10, 2015, 07:14 PM.

                      Comment


                        Try this...
                        Attached Files

                        Comment


                          Originally posted by Mattyjee View Post
                          Try this...
                          Status icons are all fixed. Thanks!

                          Comment


                            Originally posted by Mattyjee View Post
                            Try this...
                            Thanks for the quick response and new file. Status icons are correct with the new style HS3 icons. One minor request, not critical at all..... It'd be nice if Icons=Old would show the original icons on Linux. Right now adding Icons=Old reverts back to the broken links. I actually preferred the older icons. I like the new cleaner HS3 icons, but the valve on/off icons look too much like a server to me and not a sprinkler head or valve.

                            Thanks for all your work on the plugin! Greatly appreciated.

                            Ben

                            Comment


                              Can you please tell me with exact capitalisation what the link needs to be for the old icons and I will ensure it is correct. It is currently this:

                              Code:
                                      If Icons = "Old" Then
                              	            ImageOk = "/images/OpenSprinkler/OS_ok.png"
                              	            ImageDisabled = "/images/OpenSprinkler/OS_disabled.png"
                              	            ImageCommFail = "/images/OpenSprinkler/OS_NoIP.png"
                              	            ImageError = "/images/OpenSprinkler/OS_Error.png"
                              	            ImageZoneOff = "/images/OpenSprinkler/OS_off.png"
                              	            ImageZoneOn = "/images/OpenSprinkler/OS_Zoneon.jpg"
                              	            ImageRain = "/images/OpenSprinkler/OS_Rain.png"
                                      End If
                              Cheers.

                              Comment


                                Originally posted by Mattyjee View Post
                                Can you please tell me with exact capitalisation what the link needs to be for the old icons and I will ensure it is correct. It is currently this:

                                Code:
                                        If Icons = "Old" Then
                                	            ImageOk = "/images/OpenSprinkler/OS_ok.png"
                                	            ImageDisabled = "/images/OpenSprinkler/OS_disabled.png"
                                	            ImageCommFail = "/images/OpenSprinkler/OS_NoIP.png"
                                	            ImageError = "/images/OpenSprinkler/OS_Error.png"
                                	            ImageZoneOff = "/images/OpenSprinkler/OS_off.png"
                                	            ImageZoneOn = "/images/OpenSprinkler/OS_Zoneon.jpg"
                                	            ImageRain = "/images/OpenSprinkler/OS_Rain.png"
                                        End If
                                Cheers.
                                Looks good to me. Below is an ls from the directory to show the path and case.

                                Code:
                                     
                                root@HS3-RPi2:/usr/local/HomeSeer/html/images/OpenSprinkler# ls
                                OS_Device.png	 OS_Error.png  OS_Off.png  OS_Rain.png	OS_Root_small.png
                                OS_disabled.png  OS_NoIP.png   OS_ok.png   OS_Root.png	OS_Zoneon.jpg

                                Comment

                                Working...
                                X