Announcement

Collapse
No announcement yet.

Problem with immediate script &hs.setdevicevaluebyref(217,0,False)

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

    Problem with immediate script &hs.setdevicevaluebyref(217,0,False)

    Tried using this command for the first time on this system and it barfs...

    Click image for larger version

Name:	SetDeviceValueByRef.PNG
Views:	495
Size:	30.5 KB
ID:	1391022
    Log error:

    Running script /tmp/K1.vb :Object reference not set to an instance of an object->Does entry point &hs.setdevicevaluebyref(217,0,False) exist in script? at Scheduler.clsRunVBNetScript.ExecuteScript () [0x0039b] in :0

    My system Info:
    Date/time=2020-06-03 6:12:55 PM PDT
    Version=HS4 Pro Edition 4.0.6.0 (Linux - Debian "Buster")
    License=Registered
    Uptime=0 Days 1 Hour 6 Minutes 48 Seconds
    Lan IP=192.168.1.103 (Debian10)
    Device Count=152
    Event Count=53
    Plugins Enabled=Pushover 3P:,SDJ-Health:,Z-Wave:,Insteon:,drhsEventEnabler:,JowiHue:
    Modules/Threads=100 Modules, 72 Threads
    Available Threads=399
    HomeSeer Memory Used=174 Mbytes
    Plugins Installed=Current Cost 3P 0.0.0.42,drhsEventEnabler 1.0.0.0,Insteon 3.0.7.8,JowiHue 4.0.0.20,mcsMQTT 5.2.4.9,NetCAM 3.0.0.14,Pushover 3P 0.0.0.48,SDJ-Health 3.0.8.5,Z-Wave 3.0.2.0

    Mono version:
    root@Debian10:/usr/local/HomeSeer# mono --version
    Mono JIT compiler version 6.8.0.123 (tarball Tue May 12 15:15:28 UTC 2020)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS: __thread
    SIGSEGV: altstack
    Notifications: epoll
    Architecture: amd64
    Disabled: none
    Misc: softdebug
    Interpreter: yes
    LLVM: yes(610)
    Suspend: hybrid
    GC: sgen (concurrent by default)

    On possibly a related note...
    Today I found and tried Manage_Voice_Enabled_Devices.aspx

    Click image for larger version

Name:	Manage_Voice_Enabled_Devices.aspx.png
Views:	397
Size:	230.5 KB
ID:	1391023

    I am not sure what I've broken!
    HS4 Pro Edition 4.2.5.0 running on Lenovo ThinkCenter & Debian Linux
    Plugins: Z-Wave (via Nortek USB stick

    Home Assistant 2021.10.6 running on HA "Blue" ODROID-N2
    Add-ons: Android Debug Bridge, Duck DNS, ESPHome, File Editor, Glances, HA Google Drive Backup, InfluxDB, Log Viewer, MariaDB, Mosquitto broker, NGINX SSL Proxy, Node-RED, Portainer, SSH & Web Terminal, Samba, TasmoAdmin, UniFi Controller, Visual Studio Code, WireGuard, Zigbee2mqtt, Z-Wave JS to MQTT
    Integrations: AccuWeather, Alexa Media Player, Glances, Google Nest, HACS, HomeSeer, Insteon, IPP, Life360, Local IP, Logitech Harmony Hub, Mobile App, MQTT, My Garage, OpenWeather, Spotify, Tuya Local. Ubiquiti UniFi, Z-Wave JS
    Insteon: 2413S Dual Band PLM
    Zigbee: zzh! CC2652R Rev A
    Z-Wave: RaZberry daughtercard on RPi 1B via ser2net

    #2
    try to run this on your pc via ssh :
    Code:
    sudo touch /usr/bin/vbnc
    Code:
    sudo chmod +x /usr/bin/vbnc
    Code:
    sudo cat /usr/bin/vbnc  > /usr/bin/vbc
    Code:
    sudo apt install libmono-cecil-vb0.9-cil libmono-microsoft-visualbasic10.0-cil

    Comment


      #3
      Put &nhs. at the beginning instead of &hs.
      HS 4.2.8.0: 2134 Devices 1252 Events
      Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

      Comment


        #4
        Originally posted by sparkman View Post
        Put &nhs. at the beginning instead of &hs.
        Tried that already earlier but here it is again...

        2020-06-03 8:05:52 PM HomeSeer Event Running script statement immediately: &nhs.setdevicevaluebyref(217, 0, False)("&hs.setdevicevaluebyref(217,0,False)")
        2020-06-03 8:05:53 PM HomeSeer Error 3 Running script /tmp/K4.vb :Object reference not set to an instance of an object->Does entry point &hs.setdevicevaluebyref(217,0,False) exist in script? at Scheduler.clsRunVBNetScript.ExecuteScript () [0x0039b] in :0

        root@Debian10:/usr/local/HomeSeer# cat /tmp/K4.vb
        Function Main(parm as object)
        dim result as object
        result=hs.setdevicevaluebyref(217, 0, False)("&hs.setdevicevaluebyref(217,0,False)")
        return(result)
        End Function
        root@Debian10:/usr/local/HomeSeer#
        HS4 Pro Edition 4.2.5.0 running on Lenovo ThinkCenter & Debian Linux
        Plugins: Z-Wave (via Nortek USB stick

        Home Assistant 2021.10.6 running on HA "Blue" ODROID-N2
        Add-ons: Android Debug Bridge, Duck DNS, ESPHome, File Editor, Glances, HA Google Drive Backup, InfluxDB, Log Viewer, MariaDB, Mosquitto broker, NGINX SSL Proxy, Node-RED, Portainer, SSH & Web Terminal, Samba, TasmoAdmin, UniFi Controller, Visual Studio Code, WireGuard, Zigbee2mqtt, Z-Wave JS to MQTT
        Integrations: AccuWeather, Alexa Media Player, Glances, Google Nest, HACS, HomeSeer, Insteon, IPP, Life360, Local IP, Logitech Harmony Hub, Mobile App, MQTT, My Garage, OpenWeather, Spotify, Tuya Local. Ubiquiti UniFi, Z-Wave JS
        Insteon: 2413S Dual Band PLM
        Zigbee: zzh! CC2652R Rev A
        Z-Wave: RaZberry daughtercard on RPi 1B via ser2net

        Comment


          #5
          Originally posted by MattL0 View Post
          try to run this on your pc via ssh :
          Code:
          sudo touch /usr/bin/vbnc
          Code:
          sudo chmod +x /usr/bin/vbnc
          Code:
          sudo cat /usr/bin/vbc /usr/bin/vbnc
          Code:
          sudo apt intall libmono-cecil-vb0.9-cil libmono-microsoft-visualbasic10.0-cil
          Trying now...stay tuned!
          HS4 Pro Edition 4.2.5.0 running on Lenovo ThinkCenter & Debian Linux
          Plugins: Z-Wave (via Nortek USB stick

          Home Assistant 2021.10.6 running on HA "Blue" ODROID-N2
          Add-ons: Android Debug Bridge, Duck DNS, ESPHome, File Editor, Glances, HA Google Drive Backup, InfluxDB, Log Viewer, MariaDB, Mosquitto broker, NGINX SSL Proxy, Node-RED, Portainer, SSH & Web Terminal, Samba, TasmoAdmin, UniFi Controller, Visual Studio Code, WireGuard, Zigbee2mqtt, Z-Wave JS to MQTT
          Integrations: AccuWeather, Alexa Media Player, Glances, Google Nest, HACS, HomeSeer, Insteon, IPP, Life360, Local IP, Logitech Harmony Hub, Mobile App, MQTT, My Garage, OpenWeather, Spotify, Tuya Local. Ubiquiti UniFi, Z-Wave JS
          Insteon: 2413S Dual Band PLM
          Zigbee: zzh! CC2652R Rev A
          Z-Wave: RaZberry daughtercard on RPi 1B via ser2net

          Comment


            #6
            Originally posted by MattL0 View Post
            try to run this on your pc via ssh :
            Code:
            sudo touch /usr/bin/vbnc
            I already have vbnc
            root@Debian10:/usr/bin# ls -al vb*
            -rwxr-xr-x 1 root root 103 May 12 07:53 vbc
            -rwxr-xr-x 1 root root 103 May 12 07:53 vbc.new
            -rw-r--r-- 1 root root 158 Jun 3 15:20 vbc.old
            -rwxr-xr-x 1 root root 83 Apr 17 06:58 vbnc
            -rwxr-xr-x 1 root root 115 Apr 17 06:58 vbnc2




            Code:
            sudo chmod +x /usr/bin/vbnc
            ...already has u+x
            Code:
            sudo cat /usr/bin/vbc
            root@Debian10:/usr/bin# cat vbc
            #!/bin/sh
            exec /usr/bin/mono --gc-params=nursery-size=64m $MONO_OPTIONS /usr/lib/mono/4.5/vbc.exe "$@"
            root@Debian10:/usr/bin#
            Code:
            sudo cat /usr/bin/vbnc
            root@Debian10:/usr/bin# cat vbc
            #!/bin/sh
            exec /usr/bin/mono --debug $MONO_OPTIONS /usr/lib/mono/4.5/vbnc.exe "$@"
            root@Debian10:/usr/bin#

            I had manipulated those before...
            root@Debian10:/usr/bin# cat vbc.old
            #!/bin/bash
            for x; do
            if [[ $x = '/tmp'* ]]; then
            sed -i '1{/#Externa/d}' $x
            fi
            done
            exec /usr/bin/mono --debug $MONO_OPTIONS /usr/lib/mono/4.5/vbnc.exe "$@"
            root@Debian10:/usr/bin#

            Code:
            sudo apt [COLOR=#c0392b][B]intall [/B][/COLOR]libmono-cecil-vb0.9-cil libmono-microsoft-visualbasic10.0-cil
            root@Debian10:/usr/bin# sudo apt intall libmono-cecil-vb0.9-cil libmono-microsoft-visualbasic10.0-cil
            E: Invalid operation intall

            root@Debian10:/usr/bin# apt install libmono-cecil-vb0.9-cil libmono-microsoft-visualbasic10.0-cil
            Reading package lists... Done
            Building dependency tree
            Reading state information... Done
            libmono-cecil-vb0.9-cil is already the newest version (4.7-0xamarin3+debian10b1).
            libmono-cecil-vb0.9-cil set to manually installed.
            libmono-microsoft-visualbasic10.0-cil is already the newest version (4.7-0xamarin3+debian10b1).
            libmono-microsoft-visualbasic10.0-cil set to manually installed.
            0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
            HS4 Pro Edition 4.2.5.0 running on Lenovo ThinkCenter & Debian Linux
            Plugins: Z-Wave (via Nortek USB stick

            Home Assistant 2021.10.6 running on HA "Blue" ODROID-N2
            Add-ons: Android Debug Bridge, Duck DNS, ESPHome, File Editor, Glances, HA Google Drive Backup, InfluxDB, Log Viewer, MariaDB, Mosquitto broker, NGINX SSL Proxy, Node-RED, Portainer, SSH & Web Terminal, Samba, TasmoAdmin, UniFi Controller, Visual Studio Code, WireGuard, Zigbee2mqtt, Z-Wave JS to MQTT
            Integrations: AccuWeather, Alexa Media Player, Glances, Google Nest, HACS, HomeSeer, Insteon, IPP, Life360, Local IP, Logitech Harmony Hub, Mobile App, MQTT, My Garage, OpenWeather, Spotify, Tuya Local. Ubiquiti UniFi, Z-Wave JS
            Insteon: 2413S Dual Band PLM
            Zigbee: zzh! CC2652R Rev A
            Z-Wave: RaZberry daughtercard on RPi 1B via ser2net

            Comment


              #7
              Originally posted by dbrunt View Post
              Code:
              sudo touch /usr/bin/vbnc
              I already have vbnc
              root@Debian10:/usr/bin# ls -al vb*
              -rwxr-xr-x 1 root root 103 May 12 07:53 vbc
              -rwxr-xr-x 1 root root 103 May 12 07:53 vbc.new
              -rw-r--r-- 1 root root 158 Jun 3 15:20 vbc.old
              -rwxr-xr-x 1 root root 83 Apr 17 06:58 vbnc
              -rwxr-xr-x 1 root root 115 Apr 17 06:58 vbnc2






              Code:
              sudo chmod +x /usr/bin/vbnc
              ...already has u+x
              Code:
              sudo cat /usr/bin/vbc
              root@Debian10:/usr/bin# cat vbc
              #!/bin/sh
              exec /usr/bin/mono --gc-params=nursery-size=64m $MONO_OPTIONS /usr/lib/mono/4.5/vbc.exe "$@"


              root@Debian10:/usr/bin#
              Code:
              sudo cat /usr/bin/vbnc
              root@Debian10:/usr/bin# cat vbc
              #!/bin/sh
              exec /usr/bin/mono --debug $MONO_OPTIONS /usr/lib/mono/4.5/vbnc.exe "$@"


              root@Debian10:/usr/bin#

              I had manipulated those before...
              root@Debian10:/usr/bin# cat vbc.old
              #!/bin/bash
              for x; do
              if [[ $x = '/tmp'* ]]; then
              sed -i '1{/#Externa/d}' $x
              fi
              done
              exec /usr/bin/mono --debug $MONO_OPTIONS /usr/lib/mono/4.5/vbnc.exe "$@"


              root@Debian10:/usr/bin#

              Code:
              sudo apt [COLOR=#c0392b][B]intall [/B][/COLOR]libmono-cecil-vb0.9-cil libmono-microsoft-visualbasic10.0-cil
              root@Debian10:/usr/bin# sudo apt intall libmono-cecil-vb0.9-cil libmono-microsoft-visualbasic10.0-cil
              E: Invalid operation intall

              root@Debian10:/usr/bin# apt install libmono-cecil-vb0.9-cil libmono-microsoft-visualbasic10.0-cil
              Reading package lists... Done
              Building dependency tree
              Reading state information... Done
              libmono-cecil-vb0.9-cil is already the newest version (4.7-0xamarin3+debian10b1).
              libmono-cecil-vb0.9-cil set to manually installed.
              libmono-microsoft-visualbasic10.0-cil is already the newest version (4.7-0xamarin3+debian10b1).
              libmono-microsoft-visualbasic10.0-cil set to manually installed.
              0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

              sorry i missed a > in the third command . on post #2. Please retry them .

              edit : I did messed up the sequence between vbnc and vnc . please try again

              Comment


                #8
                Looks like you replaced vbc with vbnc .. that's the wrong direction - vbc should replace vbnc.

                https://forums.homeseer.com/forum/de...bnc-deprecated

                Code:
                 more /usr/bin/vbnc
                #!/bin/sh
                exec /usr/bin/mono --gc-params=nursery-size=64m $MONO_OPTIONS /usr/lib/mono/4.5/vbc.exe "$@"

                Comment


                  #9
                  Originally posted by zwolfpack View Post
                  Looks like you replaced vbc with vbnc .. that's the wrong direction - vbc should replace vbnc.

                  https://forums.homeseer.com/forum/de...bnc-deprecated

                  Code:
                   more /usr/bin/vbnc
                  #!/bin/sh
                  exec /usr/bin/mono --gc-params=nursery-size=64m $MONO_OPTIONS /usr/lib/mono/4.5/vbc.exe "$@"
                  Thanks ! corrected the post #2

                  Comment


                    #10
                    Originally posted by dbrunt View Post
                    Tried that already earlier but here it is again...

                    2020-06-03 8:05:52 PM HomeSeer Event Running script statement immediately: &nhs.setdevicevaluebyref(217, 0, False)("&hs.setdevicevaluebyref(217,0,False)")
                    2020-06-03 8:05:53 PM HomeSeer Error 3 Running script /tmp/K4.vb :Object reference not set to an instance of an object->Does entry point &hs.setdevicevaluebyref(217,0,False) exist in script? at Scheduler.clsRunVBNetScript.ExecuteScript () [0x0039b] in :0

                    root@Debian10:/usr/local/HomeSeer# cat /tmp/K4.vb
                    Function Main(parm as object)
                    dim result as object
                    result=hs.setdevicevaluebyref(217, 0, False)("&hs.setdevicevaluebyref(217,0,False)")
                    return(result)
                    End Function
                    root@Debian10:/usr/local/HomeSeer#

                    Looking at the output, it seems like the temp .vb file that HS creates is messed up. Can you look at that file and confirm what is inside it? It’s /tmp/K4.vb according to the logs but if you run it again, it may be in a new file.
                    HS 4.2.8.0: 2134 Devices 1252 Events
                    Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                    Comment


                      #11
                      So I replaced vbnc with vbc:
                      Code:
                      # cat vbnc
                      
                      #!/bin/sh
                      exec /usr/bin/mono --gc-params=nursery-size=64m $MONO_OPTIONS /usr/lib/mono/4.5/vbc.exe "$@"
                      Restarted HS4 and re-ran my event. Same error:
                      Code:
                      Running script statement immediately: &nhs.setdevicevaluebyref(217, 0, False)("&hs.setdevicevaluebyref(217,0,False)")
                      Running script /tmp/K1.vb :Object reference not set to an instance of an object->Does entry point &hs.setdevicevaluebyref(217,0,False) exist in script?  at Scheduler.clsRunVBNetScript.ExecuteScript () [0x0039b] in :0
                      Code:
                      # cat /tmp/K1.vb
                      
                      Function Main(parm as object)
                      dim result as object
                      result=hs.setdevicevaluebyref(217, 0, False)("&hs.setdevicevaluebyref(217,0,False)")
                      return(result)
                      HS4 Pro Edition 4.2.5.0 running on Lenovo ThinkCenter & Debian Linux
                      Plugins: Z-Wave (via Nortek USB stick

                      Home Assistant 2021.10.6 running on HA "Blue" ODROID-N2
                      Add-ons: Android Debug Bridge, Duck DNS, ESPHome, File Editor, Glances, HA Google Drive Backup, InfluxDB, Log Viewer, MariaDB, Mosquitto broker, NGINX SSL Proxy, Node-RED, Portainer, SSH & Web Terminal, Samba, TasmoAdmin, UniFi Controller, Visual Studio Code, WireGuard, Zigbee2mqtt, Z-Wave JS to MQTT
                      Integrations: AccuWeather, Alexa Media Player, Glances, Google Nest, HACS, HomeSeer, Insteon, IPP, Life360, Local IP, Logitech Harmony Hub, Mobile App, MQTT, My Garage, OpenWeather, Spotify, Tuya Local. Ubiquiti UniFi, Z-Wave JS
                      Insteon: 2413S Dual Band PLM
                      Zigbee: zzh! CC2652R Rev A
                      Z-Wave: RaZberry daughtercard on RPi 1B via ser2net

                      Comment


                        #12
                        [off topic]... BTW, if you see this in my sig, how do I change it???

                        HS2 v2.5.0.81, Z-Troller Serial v1.17, Insteon 1.7.3.1, AC-RF2 v1.1.3226.27426, BLRadar v1.0.101.0, CurrentCost 1.0.0.57

                        It's gotta be like 15+ years old!
                        HS4 Pro Edition 4.2.5.0 running on Lenovo ThinkCenter & Debian Linux
                        Plugins: Z-Wave (via Nortek USB stick

                        Home Assistant 2021.10.6 running on HA "Blue" ODROID-N2
                        Add-ons: Android Debug Bridge, Duck DNS, ESPHome, File Editor, Glances, HA Google Drive Backup, InfluxDB, Log Viewer, MariaDB, Mosquitto broker, NGINX SSL Proxy, Node-RED, Portainer, SSH & Web Terminal, Samba, TasmoAdmin, UniFi Controller, Visual Studio Code, WireGuard, Zigbee2mqtt, Z-Wave JS to MQTT
                        Integrations: AccuWeather, Alexa Media Player, Glances, Google Nest, HACS, HomeSeer, Insteon, IPP, Life360, Local IP, Logitech Harmony Hub, Mobile App, MQTT, My Garage, OpenWeather, Spotify, Tuya Local. Ubiquiti UniFi, Z-Wave JS
                        Insteon: 2413S Dual Band PLM
                        Zigbee: zzh! CC2652R Rev A
                        Z-Wave: RaZberry daughtercard on RPi 1B via ser2net

                        Comment


                          #13
                          As sparkman indicated, there may be an issue with how the immediate script is being encapsulated into the temporary script. But try the ASPX and see if that works.

                          Comment


                            #14
                            Originally posted by dbrunt View Post
                            [off topic]... BTW, if you see this in my sig, how do I change it???

                            HS2 v2.5.0.81, Z-Troller Serial v1.17, Insteon 1.7.3.1, AC-RF2 v1.1.3226.27426, BLRadar v1.0.101.0, CurrentCost 1.0.0.57

                            It's gotta be like 15+ years old!
                            Do not see any signature here.

                            Comment


                              #15
                              Signature edit - click on your user name in the upper right, select My Profile, then Edit Settings. Go to Account tab, about half way down is 'Edit Post Signature'.

                              I have 'Show signatures' unchecked so don't see those.

                              Edit: it's possible that they changed it so you have to have some number of posts before the signature can be set. So get busy!

                              Comment

                              Working...
                              X