Announcement

Collapse
No announcement yet.

Dome Siren Script

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

    Thank again jon,
    I started over with deleting the virtual devices, then removing the Wink Siren.
    I then added the Wink Siren which became node 28.
    I set the Domesirenchime.ini as follows:

    [28]
    HomeiD= C123456C
    SirenChimeControl=404

    and triggered the script with only the parameter 28 and no sub indicated.

    404 being the ID shown for the on/off siren switch and 123456 is replaced with my real Home ID

    I get the following in the log when the script was creating devices with ID's of 405, 409 thru 413.

    HSTouch Server Warning Exception on Value Change callback: Object reference not set to an instance of an object

    The following line is the first in Sub Main of the ini file

    Dim Debug as Boolean = True


    Your hint that the script was not writing to the log file helped me figure it out. I placed the same lines of code that write the values to the log file in different locations to find out where script was failing.

    I had edited the ini file to see where the program was failing and found that it was not reading the NodeIDStr and exiting the main sub.

    After commenting out those lines of code, and hard coding ( Dim NodeID as Integer = 28), I retriggered the script but forgot to indicate the Main sub but did have parameter 28. The script created another set of virtual devices (no errors indicated in the log file) with new ID numbers different from the first ones. I then set the to event to indicate the sub Main and paramater 28 and everything started working. I deleted the first set of virtual devices and have no clue why they wouldn't work and second group did.



    I am not a visual basic programmer and am just learning Python. It's hard for 75 yr old to keep up with all the new technology. If you wanted me to write assembly language code for a 6502 that was in an Apple II+ or a 8080 or 6800, I would be much more at home. I never took a programming class and had to teach myself so I'm a little slow at picking up all that you young geniuses take for granted.

    Thanks again for chiming (no pun intended) in to help me get the chime working.

    ocxoman (I used to design low noise ovenized crystal oscillators in my last engineering stint -- OCXO's ) hence the name



    Comment


      Has the script ever been tested on HS 4.2.14.0 and Zwave Plugin 4.0.3.0? I don't think it works at least with the Zwave plugin. I'm getting the following errors in the log:

      Dome Siren Control Unable to change the parameters for Node 9509
      Z-Wave Config Set Error in ZWaveParam: Value was either too large or too small for an unsigned byte

      Also what makes me think it's the plugin is that when I go to just the Zwave interface to change parameters it tells me that no parameters for the device are found. I have a way to test this by running another Zwave controller (not HS) and I can change the parametern no issues.

      Any ideas?

      Comment


        Originally posted by Bigstevep View Post
        Has the script ever been tested on HS 4.2.14.0 and Zwave Plugin 4.0.3.0? I don't think it works at least with the Zwave plugin. I'm getting the following errors in the log:

        Dome Siren Control Unable to change the parameters for Node 9509
        Z-Wave Config Set Error in ZWaveParam: Value was either too large or too small for an unsigned byte

        Also what makes me think it's the plugin is that when I go to just the Zwave interface to change parameters it tells me that no parameters for the device are found. I have a way to test this by running another Zwave controller (not HS) and I can change the parametern no issues.

        Any ideas?
        I've been having the same issue(s).
        Since I only uses the ding-dong-ding-dong, I now just manually trigger the chime device with an event (Door opens when in away mode) and then turn the chime back off after 5 seconds.
        The response time is way faster.
        Dan-O
        HomeSeer contributor since summer 1999, yes 1999!

        Comment


          Originally posted by Dan-O View Post

          I've been having the same issue(s).
          Since I only uses the ding-dong-ding-dong, I now just manually trigger the chime device with an event (Door opens when in away mode) and then turn the chime back off after 5 seconds.
          The response time is way faster.
          So how do you trigger the chime? The only thing I can trigger is the siren.

          Comment


            Looks like I got lucky?
            I'm using the old version where you had to create your own devices and the issue occurred/failed with the last set of commands being the ding-ding-ding-dong. The device that does work to turn the chime on is named Siren Enable.
            Dan-O
            HomeSeer contributor since summer 1999, yes 1999!

            Comment


              Originally posted by Dan-O View Post
              Looks like I got lucky?
              I'm using the old version where you had to create your own devices and the issue occurred/failed with the last set of commands being the ding-ding-ding-dong. The device that does work to turn the chime on is named Siren Enable.
              OK thanks. When I get a minute I'll roll mine back to an older version.

              Comment


                I don't believe reverting is going to do anything as the z-wave control is exactly the same in all versions.

                If you cannot set (or see) the parameters then the issue is with the z-wave plugin.
                Jon

                Comment


                  Originally posted by jon00 View Post
                  I don't believe reverting is going to do anything as the z-wave control is exactly the same in all versions.

                  If you cannot set (or see) the parameters then the issue is with the z-wave plugin.
                  Thanks. I figured that the zwave plugin is the issue. I guess I'll open a ticket on it but I'm sure that it will take forever to get it fixed.

                  Comment


                    I'm missing something that seems like it should be obvious. Earlier in the year, I installed the sirens, but I have now found the script and I'd like to use it. I currently have the following device installed:

                    .Click image for larger version  Name:	Siren_1.jpg Views:	13 Size:	24.9 KB ID:	1561977

                    From this, I think my .ini file would contain:


                    [2465]
                    HomeID=0184DEC5
                    SirenChimeControl=8090
                    SirenChimeToggle=8092
                    SirenDuration=8097
                    SirenLED=8102
                    SirenSound=8103
                    SirenVolume=8096
                    ChimeDuration=8099
                    ChimeLED=8093
                    ChimeSound=8095
                    ChimeVolume=8101

                    But I don't see the schema for the configuration of the device IDs in the example below the HomeID. Would I start at DeviceID 2469 and go every other integer? I'm really kinda lost...


                    sparkman

                    jon00
                    Last edited by ewkearns; August 18, 2022, 01:40 PM. Reason: This isn't shown as a new post, even under my "Recent Posts" screen.
                    HomeSeer Version: HS4 Pro Edition 4.2.19.0 (Windows - Running as a Service)
                    Operating System: Microsoft Windows 11 Pro - Desktop
                    Z-Wave Devices via two Z-Net G3s
                    Zigbee Devices via RaspBee on RPi 3b+
                    WiFi Devices via Internal Router.

                    Enabled Plug-Ins
                    AK SmartDevice 4.0.5.1,AK Weather 4.0.5.134,AmbientWeather 3.0.1.9,Big6 3.44.0.0,BLBackup 2.0.63.0,BLGData 3.0.55.0,BLLock 3.0.39.0,BLUPS 2.0.26.0,Device History 4.5.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,HSBuddy 4.48.707.0,JowiHue 4.1.0.3,LG ThinQ 4.0.24.4,SDJ-Health 3.1.1.4,TPLinkSmartHome4 2022.12.30.0,UltraCID3 3.0.6681.34300,Z-Wave 4.1.0.3

                    Comment


                      This code gives me an error. I am attaching the relevant log data and .ini file. The code was unchanged (i.e. straight copy and paste). Any help would be greatly appreciated.

                      ------- I am wondering if it is the Z-Wave interface I am using --------

                      11/18/2022 7:45:46 PM
                      Script
                      Dome Siren Control
                      Unable to change the parameters for Node 626
                      11/18/2022 7:45:46 PM
                      Script
                      Z-Wave Config Set
                      Error: Value was either too large or too small for an unsigned byte.
                      11/18/2022 7:45:45 PM
                      HomeSeer
                      Event
                      Running script in background (TestChime1): domesiren.vb

                      HS4 (v4.2.16.0) Windows 10 Po (v21H2)
                      AMD Ryzen 5 5500G 3.90 GHz
                      16GB DDR4 RAM

                      Interface Name:
                      Nortek Z-Wave
                      Interface Model:
                      Nortek HUSBZB-1​

                      C:\Program Files (x86)\HomeSeer HS3\Config\domesirenchime.ini

                      [626]

                      HomeID=<id removed>

                      SirenChimeControl=2470

                      SirenChimeToggle=2471

                      SirenDuration=2480

                      SirenLED=2482

                      SirenSound=2484

                      SirenVolume=2486

                      ChimeDuration=2472

                      ChimeLED=2474

                      ChimeSound=2476

                      ChimeVolume=2478

                      Comment


                        cmdrcrank I had an issue once I upgraded from HS3 to HS4 4.2.16.0. The dome scripting did not work for me anymore and I assumed it had something to do with the ZWave 4.0.3.0 plugin.

                        I ditched the scripts and resorted to creating events for each Dome Node variable. Similar to this where I set the parameter values under Zwave actions. It took a little time to create the events but they work every time they are called upon

                        Click image for larger version

Name:	image.png
Views:	83
Size:	57.6 KB
ID:	1576483

                        Comment


                          I'm getting these errors when using the script. The funny thing is that the chime still goes off as instructed.
                          HS4, Ubuntu


                          Error in Main Block 3F: System.MissingMethodException: Method 'Scheduler.hsapplication.CAPIGetSingleControl' not found. at System.RuntimeType.InvokeMember (System.String name, System.Reflection.BindingFlags bindingFlags, System.Reflection.Binder binder, System.Object target, System.Object[] providedArgs, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, System.String[] namedParams) [0x00710] in :0 at Microsoft.VisualBasic.CompilerServices.LateBinding.LateSet (System.Object o, System.Type objType, System.String name, System.Object[] args, System.String[] paramnames) [0x00082] in :0 at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateSe t (System.Object Instance, System.Type Type, System.String MemberName, System.Object[] Arguments, System.String[] ArgumentNames, System.Type[] TypeArguments) [0x00001] in :0 at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateSe tComplex (System.Object Instance, System.Type Type, System.String MemberName, System.Object[] Arguments, System.String[] ArgumentNames, System.Type[] TypeArguments, System.Boolean OptimisticSet, System.Boolean RValueBase) [0x00001] in :0 at scriptcode6.VBWrapper.Main (System.String NodeIDStr) [0x013fe] in :0


                          Date/time=6/11/2023 2:56:30 PM EDT
                          Version=HS4 Standard Edition 4.2.18.20 (Linux)
                          MONO Version=Mono JIT compiler version 6.12.0.182 (tarball Tue Jun 14 22:35:00 UTC 2022)

                          License=Registered
                          Confguration File=/usr/local/HomeSeer/Data/HomeSeerData.json
                          Uptime=1 Day 3 Hours 12 Minutes 47 Seconds
                          Lan IP=192.168.1.78 (homeseer-ThinkCentre-M900)
                          Device Count=1111
                          Event Count=149
                          Plugins Enabled=drhsIpPlugIn:,IR Plugin:,EasyTrigger:,BLBackup:,NetCam Plugin:,Big5HS4:,UltraTivo3:,Z-Wave Parameters:,BLLock:,BLLED:,Shark Robot:,MeiKu:,Ring:,Device History:,SonyTV:,SDJ-Health:,Blue-Iris:,AK Weather:,HS4 Internals:,ScreenLogic:,Z-Wave:,JowiHue:,UPBSpud:
                          Modules/Threads=174 Modules, 135 Threads
                          Available Threads=797
                          HomeSeer Memory Used=233 Mbytes
                          Plugins Installed=AK Bond 4.0.5.4,AK GoogleCalendar 4.0.4.3,AK Remootio 4.0.5.0,AK Weather 4.0.5.82,Arduino 4.0.2.20,Big5HS4 3.7.0.0,BLBackup 2.0.63.0,BLLAN 2.0.45.0,BLLED 2.0.1.0,BLLock 3.0.39.0,BLOccupied 2.0.28.0,BLRussound 4.0.5.0,Blue-Iris 3.1.3.33206,Device History 4.4.2.2,drhsIpPlugIn 0.0.0.31,EasyTrigger 3.0.0.78,HS4 Internals 4.0.4.18,IR Plugin 4.0.0.6,JowiHue 4.0.8.7,Manage Voice Devices 3.0.0.0,mcsMQTT 6.8.2.0,MeiKu 3.2.0.11,NetCam Plugin 1.0.0.6,OMNI 3.0.2.23,RaspberryIO 3.0.0.21,Ring 1.0.0.36,rnbWeather 4.4.2.0,ScreenLogic 2.1.5.0,SDJ-Health 3.1.1.4,Shark Robot 1.0.8068.17222,SonyTV 3.0.0.6,Ultra1Wire3 3.0.7364.22993,UltraTivo3 3.0.7956.26531,UPBSpud 3.0.0.54,Z-Wave 3.0.11.0,Z-Wave Parameters 4.0.55.0​

                          Comment

                          Working...
                          X