Announcement

Collapse
No announcement yet.

Error on drhsIR-devices.html

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

    Error on drhsIR-devices.html

    Hello,

    I'm trying to use the IR plug in with my old IrTrans Lan device.
    The device is running well on my old HS2 system.
    Also working with the HS4 IrTrans Plugin.

    When calling IR Devices from the HS4 IR Plugin, I always get this error (no IrTrans Server used) :

    Problem parsing HTML: (63,274) : error : Unexpected exception while accessing `parts[4]` {{includefile '/bootstrap/css/page_common.css'}} {{includefile 'header.html'}} {{includefile 'navbar.html'}}
    Global Cache IR Senders
    {{ list=plugin_function 'drhsIR' 'ext_GetIrSenders' ['gc']}} {{ for item in list }} {{ parts=string.split item ',' }}
    {{parts[1]}}
    {{parts[2]}}:{{parts[3]}}
    {{end}}
    Add GC Sender
    IRTrans IR Devices
    {{ list=plugin_function 'drhsIR' 'ext_GetIrSenders' ['irt']}} {{ for item in list }} {{ parts=string.split item ',' }}
    {{parts[1]}}
    {{parts[2]}}:{{parts[3]}}
    {{end}}
    Add IRTrans Device
    Global Cache IR Receivers
    {{ list=plugin_function 'drhsIR' 'ext_GetIrReceivers' []}} {{ for item in list }} {{ parts=string.split item ',' }}
    {{parts[1]}}
    {{parts[2]}}:{{parts[3]}}
    {{end}}
    Add GC ReceiverEdit IR Device

    × Name
    IP Address
    Port
    Cancel Save
    {{includefile 'bootstrap/js/page_common.js'}}

    Maybe my device is too old and the firmware is not compatible.with your discovering process ?
    I would like your advice and know if there could be some bypass.

    #2
    If you are able to get your old hardware to work with the new software then great. This is the best scenario as software is suppose to be easy to change to accommodate.

    If ou are at a dead-end then you may want to consider Broadlink RM mini that sells for about $20 in USA. It is a WiFi to IR device that is supported in HS by the free mcsMQTT pluigin. The plugin does Pronto for easy import and does learning from existing remotes.

    Comment


      #3
      Thank you Michael for your reply.

      I will wait a little bit to see if drule could answer my problem.
      If not, I will write some code to send IR code directly to the IrTrans server / my Lan devices without using IRTrans or IR plugin (don't need to learn IR code or use Pronto format)

      Comment


        #4
        Originally posted by emmanuel View Post
        Hello,

        I'm trying to use the IR plug in with my old IrTrans Lan device.
        The device is running well on my old HS2 system.
        Also working with the HS4 IrTrans Plugin.

        When calling IR Devices from the HS4 IR Plugin, I always get this error (no IrTrans Server used) :

        Problem parsing HTML: (63,274) : error : Unexpected exception while accessing `parts[4]` {{includefile '/bootstrap/css/page_common.css'}} {{includefile 'header.html'}} {{includefile 'navbar.html'}}
        Global Cache IR Senders
        {{ list=plugin_function 'drhsIR' 'ext_GetIrSenders' ['gc']}} {{ for item in list }} {{ parts=string.split item ',' }}
        {{parts[1]}}
        {{parts[2]}}:{{parts[3]}}
        {{end}}
        Add GC Sender
        IRTrans IR Devices
        {{ list=plugin_function 'drhsIR' 'ext_GetIrSenders' ['irt']}} {{ for item in list }} {{ parts=string.split item ',' }}
        {{parts[1]}}
        {{parts[2]}}:{{parts[3]}}
        {{end}}
        Add IRTrans Device
        Global Cache IR Receivers
        {{ list=plugin_function 'drhsIR' 'ext_GetIrReceivers' []}} {{ for item in list }} {{ parts=string.split item ',' }}
        {{parts[1]}}
        {{parts[2]}}:{{parts[3]}}
        {{end}}
        Add GC ReceiverEdit IR Device

        × Name
        IP Address
        Port
        Cancel Save
        {{includefile 'bootstrap/js/page_common.js'}}

        Maybe my device is too old and the firmware is not compatible.with your discovering process ?
        I would like your advice and know if there could be some bypass.
        That looks like a problem with the device settings page. A few things changed in the more recent releases of HS4 that seem to have had an effect on my html pages. I have a new version almost ready to go to support UsbUirt in Linux and I have some fixes for the webpages in there too.

        Is your IrTrans device detected? Did you/do you get a message in the logs that a device was found? If you try to create an event, does your IrTrans show up in the list of devices?

        I'll get the new release up in the next couple of days. If that doesn't show your device in the devices page, we can dig a little deeper.

        -David

        Comment


          #5
          I just posted 4.0.0.6 to the plugin store. It should be available shortly.

          Comment


            #6
            Hello,
            Sorry for the delay and thank you very much for the reply.
            I've just installed the 4.0.0.6 pluging, enable it, then click on MORE / IR Devices but got the same html page as in my first post

            please find an extract of my log to answer David question :

            9/25/2021 10:27:54 PM

            IR Plugin
            Info
            ConvertIRTransRawToHexCode: WARNING - Packet byte 8 is 0. Expected 16. May cause problems.

            9/25/2021 10:27:41 PM

            HomeSeer
            Warning
            Problem parsing HTML: (63,274) : error : Unexpected exception while accessing `parts[4]`

            9/25/2021 10:27:39 PM

            IR Plugin
            Info
            Updating ip address of Discovered 29810 from 192.168.0.51 to 192.168.0.52

            9/25/2021 10:27:34 PM

            HomeSeer
            Plug-In
            Finished initializing plug-in IR Plugin

            9/25/2021 10:27:34 PM

            HomeSeer
            Starting Plug-In
            IR Plugin loaded in 700 milliseconds

            9/25/2021 10:27:34 PM

            HomeSeer
            Starting Plug-In
            Plugin IR Plugin started successfully in 142 milliseconds

            9/25/2021 10:27:34 PM

            IR Plugin
            Info
            Loaded 1 IR senders.

            9/25/2021 10:27:34 PM

            IR Plugin
            Info
            Reading IR sender from inifile: |Discovered 29810|192.168.0.51|21000|irt

            9/25/2021 10:27:34 PM

            IR Plugin
            Info
            Loaded 0 IR receivers

            9/25/2021 10:27:34 PM

            IR Plugin
            Info
            Loaded 0 IR codes

            9/25/2021 10:27:34 PM

            IR Plugin
            Info
            Starting IR Plugin, version 4.0.0.6

            9/25/2021 10:27:34 PM

            HomeSeer
            Starting Plug-In
            Initializing plugin IR Plugin ...

            9/25/2021 10:27:34 PM

            HomeSeer
            Info
            Plugin drhsIR with instance IR Plugin has connected. IP:127.0.0.1:46196

            9/25/2021 10:26:17 PM

            HomeSeer Updater
            Info
            Copying file: /usr/local/HomeSeer/html/drhsIR/drhsIR-devices.html

            9/25/2021 10:26:17 PM

            HomeSeer Updater
            Info
            Copying file: /usr/local/HomeSeer/html/drhsIR/drhsIR-codes.html

            9/25/2021 10:26:17 PM

            HomeSeer Updater
            Info
            Making dir: /usr/local/HomeSeer/html/drhsIR/

            9/25/2021 10:26:17 PM

            HomeSeer Updater
            Info
            Copying file: /usr/local/HomeSeer/bin/drhsIR/UsbUirtManagedWrapper.dll

            9/25/2021 10:26:17 PM

            HomeSeer Updater
            Info
            Copying file: /usr/local/HomeSeer/HSPI_drhsIR.exe.config

            9/25/2021 10:26:17 PM

            HomeSeer Updater
            Info
            Copying file: /usr/local/HomeSeer/HSPI_drhsIR.exe

            9/25/2021 10:26:16 PM

            HomeSeer Updater
            Info
            Plugin install for IR Plugin starting...



            Comment


              #7
              Originally posted by emmanuel View Post
              Hello,
              Sorry for the delay and thank you very much for the reply.
              I've just installed the 4.0.0.6 pluging, enable it, then click on MORE / IR Devices but got the same html page as in my first post

              please find an extract of my log to answer David question :

              9/25/2021 10:27:54 PM


              HomeSeer
              Warning
              Problem parsing HTML: (63,274) : error : Unexpected exception while accessing `parts[4]`

              9/25/2021 10:27:39 PM

              IR Plugin
              Info
              Updating ip address of Discovered 29810 from 192.168.0.51 to 192.168.0.52
              Thanks for providing me with the log snippet. I think I know what is causing the problem and have a quick workaround for you while I fix it.

              When the plugin discovers an IRTrans device, it adds it to the ini file automatically. The ini file entry should include the MAC address of the IRTrans device but in your case, that appears to be missing. Can you stop the plugin, manually edit the ini file, and then restart the plugin?

              The ini file is C:\Program Files(x86)\Homeseer HS4\Config\drhsIR.ini

              You mostly likely have an entry like:
              Code:
              [senders]
              Discovered 29810,192.168.0.51,21000,irt
              can you add the MAC address of your IRTrans to the end, e.g.
              Code:
              [senders]
              Discovered 29810,192.168.0.51,21000,irt,0050C2112233
              The format for the MAC address should not include any colons or other separators.

              I hope this gets you around the problem.

              -David

              Comment


                #8
                Hello David,

                Thank you for your quick support.

                I did the modification of the drhsIR.ini file but each time I restart the plugin, the discovering process adds a new "bad" line

                [senders]
                Discovered 29810=192.168.0.52,21000,irt,0050c25278f7
                Discovered 29810 (1)=192.168.0.52,21000,irt,

                So I started the plugin after disconnecting the ethernet from the device then reconnecting it after the plugin start ;-)

                And it works with this workaround ;-)
                I will now be able to play with the Ir codes

                For your information, I'm using the Linux HS4 version. Don't know if it usefull for you

                Emmanuel

                Comment


                  #9
                  Hi Emmanuel,

                  I think this may be a difference in firmware versions. The plugin reads the serial number, firmware details and MAC address from a response it gets from the IRTrans when a discovery request is broadcast. It looks we are getting the serial OK, that's the 29810 part of the name, but not the MAC. The plugin attempts to read the MAC address in two different places and I'm hoping only one of them is failing. If my hunch is right, this could be an easy fix.

                  Please can you try something for me? Can you delete the entries from your ini file and with your IRTrans online, launch the plugin .exe from the command line? I typically do this by cd'ing to the Homeseer installation directory and then running sudo mono ./HSPI_drhsIR.exe. You will see a lot of info go by. What I'm interested in seeing looks like this on my setup:
                  Code:
                  26/09/2021 14:41:46:[IR Plugin]->Sending IRTrans UDP Discover...
                  26/09/2021 14:41:46:[IR Plugin]->Discovered IRTrans device: serial# 29339, LAN Version L1.11.02, IR Version E6.08.39, MAC 00:50:C2:11:22:33 at 192.168.1.56
                  26/09/2021 14:41:46:[IR Plugin]->Adding IrSender: Discovered 29339
                  If the correct MAC address show up here, that would be very helpful. You can stop the plugin by entering the command shutdown, or just use CTRL-C.

                  -David

                  Comment


                    #10
                    Hello David,

                    Please find the lines below where the MAC address is available :
                    9/26/2021 8:13:09 PM:[IR Plugin]->Sending IRTrans UDP Discover...
                    9/26/2021 8:13:09 PM:[IR Plugin]->Discovered IRTrans device: serial# 29810, LAN Version L1.06.20, IR Version E5.09.01, MAC 00:50:C2:52:78:F7 at 192.168.0.52
                    9/26/2021 8:13:09 PM:[IR Plugin]->Adding IrSender: Discovered 29810


                    BTW, I have some error message when trying to send an Ir Code.
                    9/26/2021 7:47:18 PM Discovered 29810 (192.168.0.52) - send Samsung Salon PWR
                    9/26/2021 7:47:18 PM Hex code = 0000 006D 0000 0022 00AD 00AD 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0207
                    9/26/2021 7:47:18 PM Sending ASCI to 192.168.0.52:21000 (Length 6)
                    9/26/2021 7:47:20 PM No bytes received
                    9/26/2021 7:47:20 PM Sending Asndccf 0000 006D 0000 0022 00AD 00AD 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0207,l1 to 192.168.0.52:21000 (Length 372)
                    9/26/2021 7:47:20 PM Received 49 response bytes from 192.168.0.52 in 10ms : **00049 RESULT Not supported without IR Database

                    My Device is not IRDB one. I thought that the Asndccf could be use without having such specific device

                    Emmanuel

                    Comment


                      #11
                      Hi Emmanuel,

                      I will send you a PM with an updated .exe file that should take care of the MAC address issue.

                      I wasn't aware that the IRTrans devices without IRDB could not use the Asndccf command. That's a real pity. I found this thread that discusses it and does say that you can upgrade to IRDB with a firmware flash. https://www.irtrans.de/forum/viewtopic.php?f=16&t=3819

                      I'd be interested to know if the plugin is able to receive IR codes from a non-IRDB device.

                      -David

                      Comment


                        #12
                        David,
                        Sorry for all this time lost for you trying to support me with a non compatible device. Maybe you should precice in your documentation the compatible models.
                        I don't know if my IrTrans devices are upgradable because they are old devices (have to ask IrTrans company) and the price for one upgrade (I have two device) is almost the IrTrans Plugin price.
                        So now, it is just a matter of money and not a technical issue.

                        To answer your last question, yes, my device (non-IRDB) is able to send the IR Code received to your plug-in. I had received a lot in learn mode (but in HEX of CCF ?). I can't go further to confirm that they are CCF code and that they are running.

                        Comment


                          #13
                          Now that I know that units without the IRDB option aren't compatible, I will change the documentation to reflect that.

                          I'm glad to hear the receive appears to work though. I'm not using the official API to read codes. It's a pity that IRTrans don't document their version of a hex code. If they did, I could easily add it to the plugin. I figured out receiving codes from an IRTrans by using Wireshark. One day, if I ever get the time, I will see if I can use Wireshark to figure out sending them. That would let the plugin work with non-IRDB options.

                          -David

                          Comment


                            #14
                            Originally posted by drule View Post
                            Now that I know that units without the IRDB option aren't compatible, I will change the documentation to reflect that.

                            I'm glad to hear the receive appears to work though. I'm not using the official API to read codes. It's a pity that IRTrans don't document their version of a hex code. If they did, I could easily add it to the plugin. I figured out receiving codes from an IRTrans by using Wireshark. One day, if I ever get the time, I will see if I can use Wireshark to figure out sending them. That would let the plugin work with non-IRDB options.

                            -David
                            Hi David,

                            Any news on a new version supporting the non-IRDB IRTrans?

                            Comment

                            Working...
                            X