Announcement

Collapse
No announcement yet.

tenScriptAid throws error, but works....

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

    tenScriptAid throws error, but works....

    tenholde This is far above my current knowledge of scripting, so it may just be me, somehow.

    I wrote a fairly long script before I discovered that devices must be controlled with CAPI. So, entering the rewrite, I interrogated tenScriptAid (1.41) for the following code and made a test script of the following:

    Sub Main

    Dim cc as HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(634, True, "(value) F", False, False)
    cc.ControlValue = 55
    Dim cr as HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)

    End Sub

    This actually works, but throws the following error in HS4:


    11/27/2021 9:33:10 AM
    HomeSeer
    Error 1
    Running script ManCaveHvacTestScript.vb :Parameter count mismatch.

    Can anybody see a fix?

    HomeSeer Version: HS4 Pro Edition 4.2.19.0 (Windows - Running as a Service)
    Home Assistant 2024.3
    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 GoogleCalendar 4.0.4.16,AK HomeAssistant 4.0.1.23,AK SmartDevice 4.0.5.1,AK Weather 4.0.5.181,AmbientWeather 3.0.1.9,Big6 3.44.0.0,BLBackup 2.0.64.0,BLGData 3.0.55.0,BLLock 3.0.39.0,BLUPS 2.0.26.0,Device History 4.5.1.1,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,HSBuddy 4.51.303.0,JowiHue 4.1.4.0,LG ThinQ 4.0.26.0,ONVIF Events 1.0.0.5,SDJ-Health 3.1.1.9,TPLinkSmartHome4 2022.12.30.0,UltraCID3 3.0.6681.34300,Z-Wave 4.1.3.0

    #2
    Sub Main needs a parameter

    Sub Main (p as object)
    tenholde

    Comment


      #3
      Originally posted by tenholde View Post
      Sub Main needs a parameter

      Sub Main (p as object)
      Ooooh... magic! That worked like a charm! Thank you! and thank you for all that you do for the community. Without all of your utilities, I would never be as far along as I am...
      HomeSeer Version: HS4 Pro Edition 4.2.19.0 (Windows - Running as a Service)
      Home Assistant 2024.3
      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 GoogleCalendar 4.0.4.16,AK HomeAssistant 4.0.1.23,AK SmartDevice 4.0.5.1,AK Weather 4.0.5.181,AmbientWeather 3.0.1.9,Big6 3.44.0.0,BLBackup 2.0.64.0,BLGData 3.0.55.0,BLLock 3.0.39.0,BLUPS 2.0.26.0,Device History 4.5.1.1,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,HSBuddy 4.51.303.0,JowiHue 4.1.4.0,LG ThinQ 4.0.26.0,ONVIF Events 1.0.0.5,SDJ-Health 3.1.1.9,TPLinkSmartHome4 2022.12.30.0,UltraCID3 3.0.6681.34300,Z-Wave 4.1.3.0

      Comment

      Working...
      X