Plugin: Lox2MQTT

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • mariokrupik
    Smart Home'r
    • 23.12.2015
    • 46

    #31
    I am having troubles getting the Plugin to work.
    I installed the Plugin months ago, but never really used it.
    Today I wanted to get it set up, but the Plugin always stays with the Message "Lox2MQTT not running", the Log in the Logfiles Tab is mostly empty.

    The only message I can see in the log is this one:
    HTML-Code:
    2023-12-29T10:35:52: TypeError: Cannot read property 'split' of undefined
    2023-12-29T10:35:52: at new DateSpan (/opt/loxberry/bin/plugins/lox2mqtt/node_modules/node-lox-structure-file/lib/Structure/DateSpan.js:3:29)
    2023-12-29T10:35:52: at Factory.create_from_json (/opt/loxberry/bin/plugins/lox2mqtt/node_modules/node-lox-structure-file/lib/Factory.js:33:13)
    2023-12-29T10:35:52: at Object.create_from_json (/opt/loxberry/bin/plugins/lox2mqtt/node_modules/node-lox-structure-file/lib/Factory.js:108:24)
    2023-12-29T10:35:52: at new Adaptor (/opt/loxberry/bin/plugins/lox2mqtt/lib/Adaptor.js:7:30)
    2023-12-29T10:35:52: at API. (/opt/loxberry/bin/plugins/lox2mqtt/lib/MsClient.js:54:24)
    2023-12-29T10:35:52: at API.emit (events.js:326:22)
    2023-12-29T10:35:52: at Object.callback (/opt/loxberry/bin/plugins/lox2mqtt/node_modules/node-lox-ws-api/lib/API.js:281:18)
    2023-12-29T10:35:52: at API._message_file (/opt/loxberry/bin/plugins/lox2mqtt/node_modules/node-lox-ws-api/lib/API.js:227:18)
    2023-12-29T10:35:52: at Connection. (/opt/loxberry/bin/plugins/lox2mqtt/node_modules/node-lox-ws-api/lib/API.js:123:14)
    2023-12-29T10:35:52: at Connection.emit (events.js:314:20)​
    I removed the Plugin and reinstalled it, tried with manual entry of the Miniserver User credentials, but the Plugin keeps staying in this mode.

    Kommentar

    • nufke
      Smart Home'r
      • 10.11.2018
      • 62

      #32
      Looks like an issue in the underlying websocket library. Can you check the values heatPeriodStart and coolPeriodStart in your loxapp3.json file? Perhaps these are empty, which might cause an issue. Even if you do not use these dates (seems deprecated by Loxone), just add a dummy date in your LoxoneConfig.

      Alternatively, share your loxapp3.json in a PM and I will study this further.

      Kommentar

      • nufke
        Smart Home'r
        • 10.11.2018
        • 62

        #33
        Quick update of all users of Lox2MQTT. I released v0.6.3 with the following updates:
        • I removed the dependency to the external library node-lox-structure-file, as it caused multiple issues in the past (as reported in this forum). This external library is not well maintained, and thus not following the changes made in the latest Loxone releases. As we do not need to manage a full structure dataset, we could drop this dependency.
        • This release offers the option to enable/disable a Miniserver from Lox2MQTT communication. Especially in Gateway-Client configurations, the main communication will happen via the Gateway Miniserver, and there is no need to establish a separate communication for each Client.

        Kommentar

        • Meininger
          Smart Home'r
          • 30.11.2015
          • 60

          #34
          Hello,
          I think in version 0.7.0 there is a problem with the topic name, which is no longer taken from the plugin settings and is always "loxone". Or I'm doing something wrong, but I've only had the problem since the update.

          Greetings Sascha

          Kommentar

          • nufke
            Smart Home'r
            • 10.11.2018
            • 62

            #35
            Thanks for reporting the issue. Fixed in v0.7.1

            Kommentar

            • poklutom
              Dumb Home'r
              • 24.11.2020
              • 13

              #36
              Hello,
              I am using LoxBerry V3.0.0.6 and Lox2MQTT v0.7.1. The connection is working just after plugin installation. After Loxberry restart the status plugin is: "Lox2MQTT not running".

              I am running Miniserver V2 (is not running on port 80) and V1 is running as Gateway-Client.

              The value of "heatPeriodStart" = "10-01" and "coolPeriodStart" = "05-01",


              Kommentar

              • nufke
                Smart Home'r
                • 10.11.2018
                • 62

                #37
                I need more info to assess what the issue is. Please enable debug at the plugin install page and share the results. Thanks.

                Kommentar

                • poklutom
                  Dumb Home'r
                  • 24.11.2020
                  • 13

                  #38
                  I set debug level at the plugin install page but when I go to plugin Logfiles tab, it is empty. I tried also restart Loxberry. If you need any specific log file, send me the name and location and I will try to find it.

                  Kommentar

                  • nufke
                    Smart Home'r
                    • 10.11.2018
                    • 62

                    #39
                    If the log page is empty, the might be no log file, which is a bit strange. Please check if a log is located at /opt/loxberry/log/plugins/lox2mqtt

                    You can also check the config file in /opt/loxberry/config/plugins/lox2mqtt and see if both miniservers are listed.

                    Alternatively, login to your loxberry via ssh and start the plugin stand-alone

                    Code:
                    cd /opt/loxberry/bin/plugins/lox2mqtt
                    node lox2mqtt.js
                    Report the error if any.

                    Kommentar

                    • poklutom
                      Dumb Home'r
                      • 24.11.2020
                      • 13

                      #40
                      First of all thank you for all your effort with this really helpfull plugin and all your support.

                      /opt/loxberry/log/plugins/lox2mqtt
                      The folder is empty.
                      I tried in menatime to uninstall the plugin and install again and before restart I set DEBUG level. Before the restart I have seen logfiles at "Logfiles" tab. But the tab and folder are empty after Loxberry restart.

                      /opt/loxberry/config/plugins/lox2mqtt
                      There is only main miniserver. But I din't have configured 2nd miniserver at all in LoxBerry so I expect it sohuld not be any problem.
                      {

                      "miniserver": {
                      "1": {
                      "enabled": true,
                      "mqtt_topic_ms": "loxone",
                      "publish_structure": false,
                      "publish_states": false,
                      "retain_message": false,
                      "subscribe": false,
                      "other_user": false,
                      "user": null,
                      "pass": null
                      }
                      }
                      }


                      Force starting​
                      The plugin is started by node lox2mqqt.js

                      Log started by:
                      INFO: Start logger
                      INFO: Lox2MQTT undefined started
                      INFO: Lox2MQTT - register Miniserver 1
                      INFO: WebSocketAPI 10.0.1.55:1234 - try to connect to Miniserver as user admin...
                      INFO: MQTT Client - connect: {"cmd":"connack","retain":false,"qos":0,"dup":f als e,"length":2,"topic":null,"payload":null,"sessio nP resent":false,"returnCode":0}
                      INFO: WebSocketAPI 10.0.1.55:1234 - connect
                      DEBUG: WebSocketAPI 10.0.1.55:1234 - send message: jdev/sys/keyexchang​....................................



                      Any idea why is not started automatically?

                      Kommentar

                      • nufke
                        Smart Home'r
                        • 10.11.2018
                        • 62

                        #41
                        Code:
                        INFO: Lox2MQTT undefined started
                        This is a bit strange...not sure why the version is not seen. Looks like a nodeJS package installation issue.
                        Can you run the node package manager at the same bin location to see if all nodeJS packages are available and properly installed?

                        Code:
                        npm i
                        npm list
                        you should see something like this:

                        Code:
                        ​lox2mqtt@0.7.1 /opt/loxberry/bin/plugins/lox2mqtt
                        ├── base-64@1.0.0
                        ├── loxberry-logger@0.0.1 (git+ssh://git@github.com/nufke/loxberry-logger.git#9d    ...)
                        ├── mqtt@4.3.8
                        ├── node-lox-ws-api@0.4.5-bugfix (git+ssh://git@github.com/codm/node-lox-ws-api. ...)
                        ├── pm2@5.3.1
                        └── vows@0.8.3

                        You can also try to start the plugin using the process manager PM2 (this is normally done at startup)

                        Code:
                        npm run start
                        you should see something like this

                        Code:
                        > lox2mqtt@0.7.1 start
                        > PM2_HOME=$(pwd)/.pm2 pm2 start ecosystem.custom.config.js --watch
                        
                        [PM2] Applying action restartProcessId on app [Lox2MQTT](ids: [ 0 ])
                        [PM2] [Lox2MQTT](0) ✓
                        ┌────┬────────────────────┬──────────┬──────┬───── ──────┬──────────┬──────────┐
                        │ id │ name │ mode │ ↺ │ status │ cpu │ memory │
                        ├────┼────────────────────┼──────────┼──────┼───── ──────┼──────────┼──────────┤
                        │ 0 │ Lox2MQTT │ fork │ 44 │ online │ 0% │ 14.9mb │
                        └────┴────────────────────┴──────────┴──────┴───── ──────┴──────────┴──────────┘
                        ​

                        Kommentar

                        • poklutom
                          Dumb Home'r
                          • 24.11.2020
                          • 13

                          #42
                          Code:
                          npm i
                          
                          added 3 packages, and audited 232 packages in 4s
                          
                          22 packages are looking for funding
                            run `npm fund` for details
                          
                          found 0 vulnerabilities
                          ​
                          Code:
                          npm list
                          
                          lox2mqtt@0.7.1 /opt/loxberry/bin/plugins/lox2mqtt
                          ├── base-64@1.0.0
                          ├── loxberry-logger@0.0.1 (git+ssh://git@github.com/nufke/loxberry-logger.git#9d1a7f0c29165caf851e4bc6d96673d823523329)
                          ├── mqtt@4.3.8
                          ├── node-lox-ws-api@0.4.5-bugfix (git+ssh://git@github.com/codm/node-lox-ws-api.git#598344a2259fef59a695dfd2494982d5cc52e9b9)
                          ├── pm2@5.3.1
                          └── vows@0.8.3
                          ​
                          Code:
                          npm run start
                          
                          > lox2mqtt@0.7.1 start
                          > PM2_HOME=$(pwd)/.pm2 pm2 start ecosystem.custom.config.js --watch
                          
                          [PM2] Spawning PM2 daemon with pm2_home=/opt/loxberry/bin/plugins/lox2mqtt/.pm2
                          [PM2] PM2 Successfully daemonized
                          [PM2][WARN] Applications Lox2MQTT not running, starting...
                          [PM2] App [Lox2MQTT] launched (1 instances)
                          ┌────┬─────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
                          │ id │ name        │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
                          ├────┼─────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
                          │ 0  │ Lox2MQTT    │ default     │ 0.7.1   │ fork    │ 12328    │ 0s     │ 0    │ online    │ 0%       │ 37.1mb   │ loxberry │ enabled  │
                          └────┴─────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
                          ​
                          Logfile:
                          Code:
                          2024-02-19T22:07:50: INFO: Start logger
                          2024-02-19T22:07:50: INFO: Lox2MQTT 0.7.1 started
                          2024-02-19T22:07:50: INFO: Lox2MQTT - register Miniserver 1​

                          Kommentar

                          • nufke
                            Smart Home'r
                            • 10.11.2018
                            • 62

                            #43
                            this looks good, lox2mqtt keeps running?

                            Kommentar

                            • poklutom
                              Dumb Home'r
                              • 24.11.2020
                              • 13

                              #44
                              YES

                              Any idea about the reason?
                              I have fresh LoxBerry installation.
                              The list of installed plugins: Docker, FOSHKplugin, Lox2MQQT, Miniserver Backup, RPi-Monitor, Weather 4 Loxone

                              Kommentar

                              • nufke
                                Smart Home'r
                                • 10.11.2018
                                • 62

                                #45
                                Not sure what caused this, I suspect a combination of topics. I will try to reproduce the issue using a fresh DietPi + LoxBerry image on a VM.
                                Which platform/OS are you using?

                                Kommentar

                                Lädt...