Giter Site home page Giter Site logo

udi-polyglotv2's People

Contributors

einstein42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

brettahale

udi-polyglotv2's Issues

Unable to start, fresh install

There is what I see. It looks like it's trying to enumerate node servers on ISY, but it does not know the ISY username/password just yet since it never given me an opportunity to enter!

12/12/2017, 8:32:00 AM - info: Starting Polyglot version 2.0
12/12/2017, 8:32:01 AM - info: MongoDB: Connected
12/12/2017, 8:32:01 AM - info: Settings: Polyglot Version 2.0.26
12/12/2017, 8:32:01 AM - info: Settings: Retrieved config from database
12/12/2017, 8:32:01 AM - info: Settings: Retrieved config overrides from .env and updated database
12/12/2017, 8:32:01 AM - info: SSL: No HTTPS Certificate or Key found. Generating...
12/12/2017, 8:32:40 AM - info: SSL: Certificate Generation completed successfully.
12/12/2017, 8:32:40 AM - debug: ISY: 401 - http://10.0.1.27:80/rest/config/
12/12/2017, 8:32:40 AM - error: ISY: Failed to get version.
12/12/2017, 8:32:40 AM - info: Mosca MQTT Broker Service: Started
12/12/2017, 8:32:41 AM - info: MQTT Client Service: Started
12/12/2017, 8:32:41 AM - info: HTTP Interface Service: Started - Port: 3000
12/12/2017, 8:32:41 AM - debug: MongoDB: 0 NodeServer(s) retrieved from database
12/12/2017, 8:32:41 AM - error: uncaughtException: callback is not defined date=Tue Dec 12 2017 08:32:41 GMT-0600 (CST), pid=14164, uid=998, gid=995, cwd=/home/poly/polyglot, execPath=/home/poly/polyglot/polyglot-v2-linux-armv7, version=v6.10.3, argv=[/home/poly/polyglot/polyglot-v2-linux-armv7, /snapshot/udi-polyglotv2/bin/polyglot-v2.js], rss=109084672, heapTotal=85819392, heapUsed=73404496, external=37732553, loadavg=[1.6904296875, 1.3095703125, 1.17236328125], uptime=90606
ReferenceError: callback is not defined
at Function.verifyNonManagedNodeServers (/snapshot/udi-polyglotv2/lib/models/nodeserver.js:712:47)
at NodeServerSchema.statics.loadNodeServers.NodeServerModel.getAllNodeServers (/snapshot/udi-polyglotv2/lib/models/nodeserver.js:657:20)
at Query.Model.$wrapCallback (/snapshot/udi-polyglotv2/node_modules/mongoose/lib/model.js:3932:16)
at /snapshot/udi-polyglotv2/node_modules/kareem/index.js:273:21
at /snapshot/udi-polyglotv2/node_modules/kareem/index.js:131:16
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
12/12/2017, 8:32:41 AM - info: Polyglot shutdown complete with code: 1

Auto scrolling log window

It would be nice if there was a sub-window inside the log window screen that autoscrolled instead of showing the entire log in the current window. When the log gets very long it is painful to view the entire log inside the main window.

Install node server fails to add controller

Installing new node server it attempts to add the controller node before the ISY is all the way up?

2018-1-14 09:26:17 - info: HarmonyHub(2): Attempting to install HarmonyHub NodeServer into ISY.
2018-1-14 09:26:17 - debug: ISY: 200 - http://192.168.86.64:80/rest/profiles/ns/2/connection/
2018-1-14 09:26:17 - debug: ISY: 200 - http://192.168.86.64:80/rest/profiles/ns/2/connection/set/network/?ip=192.168.86.79&baseurl=%2Fns%2F2&name=HarmonyHub&nsuser=polyglot&nspwd=eDNcfTSATm&isyusernum=0&port=3000&timeout=0&ssl=true&enabled=true
2018-1-14 09:26:17 - info: HarmonyHub(2): Installed into ISY sucessfully. Profile.zip installed.
2018-1-14 09:26:17 - info: Registered new local NodeServer: HarmonyHub(2)
2018-1-14 09:26:17 - info: Waiting 90 seconds for the ISY to reboot before starting HarmonyHub for the first time.
2018-1-14 09:26:17 - debug: NSResponse: Success: true - Installed into ISY sucessfully. Profile.zip installed.
2018-1-14 09:26:17 - info: MQTTC: Subscribe Successful udi/polyglot/ns/2 QoS: 0
2018-1-14 09:26:17 - info: MQTTC: Subscribe Successful udi/polyglot/profile/2 QoS: 0
2018-1-14 09:26:18 - debug: NS: Starting log dump of polyglot log file to frontend client: polyglot_frontend-OVr4S
2018-1-14 09:26:19 - debug: NS: Failed to upload nodedef/nodedefs.xml to ISY. Please upload profile.zip manually.
2018-1-14 09:26:19 - debug: NS: Failed to upload editor/custom.xml to ISY. Please upload profile.zip manually.
2018-1-14 09:26:21 - debug: NS: Sucessfully uploaded nodedef/custom.xml to ISY.
2018-1-14 09:26:21 - debug: NS: Sucessfully uploaded editor/editors.xml to ISY.
2018-1-14 09:26:23 - debug: NS: Sucessfully uploaded nodedef/nodedefs.xml to ISY.
2018-1-14 09:26:23 - debug: NS: Sucessfully uploaded nls/en_us.txt to ISY.
2018-1-14 09:26:23 - debug: NS: Sucessfully uploaded editor/custom.xml to ISY.
2018-1-14 09:26:27 - debug: ISY: Reboot command sent to ISY sucessfully.
2018-1-14 09:27:47 - info: NS: Starting Local NodeServer HarmonyHub profile number 2
2018-1-14 09:27:48 - info: MQTTS: Client Connected: MyNodeServer
2018-1-14 09:27:48 - debug: MQTTC: Message: udi/polyglot/connections/2: {"connected":true,"node":"2"}
2018-1-14 09:27:48 - info: HarmonyHub(2): Processing command: connected
2018-1-14 09:27:48 - info: HarmonyHub(2): NodeServer Connected.
2018-1-14 09:27:48 - debug: MQTTC: Message: udi/polyglot/ns/2: {"addnode":{"nodes":[{"name":"HarmonyHub Controller","primary":"harmonyctrl","node_def_id":"HarmonyController","address":"harmonyctrl","drivers":[{"value":0,"driver":"ST","uom":2},{"value":0,"driver":"GV1","uom":56},{"value":0,"driver":"GV2","uom":56},{"value":0,"driver":"GV3","uom":25},{"value":0,"driver":"GV4","uom":25},{"value":0,"driver":"GV5","uom":25},{"value":0,"driver":"GV6","uom":25},{"value":0,"driver":"GV7","uom":25}]}]},"node":"2"}
2018-1-14 09:27:48 - info: HarmonyHub(2): Processing command: addnode
2018-1-14 09:27:48 - error: ISY: Error: connect ECONNREFUSED 192.168.86.64:80
2018-1-14 09:29:02 - debug: ISY: 200 - http://192.168.86.64:80/rest/profiles/ns/0/connection/

Add call to node/update REST command

Add a call to the /nodes//change/[?nls=] REST command to change the node_def_id for a node. Specific use case: user changes the units on a thermostat from Farenheit to Celcius and we want to switch the nodedef used instead of having the user delete and recreate the node in the ISY.

On the polyglotinterface side, add a method off of the Node such as changeNodeDefId(self, nodeDefID, nlsString=nothing)

MQTT Failed to connect. Result code: 5

My NodeServer log is continually printing Failed to connect. Is this a remanant of my old install?

2017-12-30 07:32:09,374 INFO     Connecting to MQTT... localhost:1883
2017-12-30 07:32:09,421 INFO     Main:init: VERSION=2.0.0
2017-12-30 07:32:09,425 ERROR    MQTT Failed to connect. Result code: 5
2017-12-30 07:32:09,426 INFO     MQTT Unexpected disconnection. Trying reconnect.

and at the same time the polyglot log is continually printing:

2017-12-30 07:32:05 - info: HarmonyHub(2): Processing command: restart
2017-12-30 07:32:08 - info: NS: Starting Local NodeServer HarmonyHub profile number 2
2017-12-30 07:32:09 - error: Client already connected. Disallowing multiple connections from the same client.
2017-12-30 07:32:10 - error: Client already connected. Disallowing multiple connections from the same client.

I rebooted the RPi and that error went away. Any idea what would cause that?

ERROR parseInput: '7651582'

I don't know what happened, my discover was working, then it started saying:

2018-1-1 15:20:39 - debug: REST: DISCOVER Command received from ISY for n002_7651582
2018-1-1 15:20:39 - debug: Sending DISCOVER to n002_7651582

which looks correct, but the nodeserver log says:

2018-01-01 15:19:33,997 ERROR    parseInput: '7651582'

Seemed to be chopping off the 'DISCOVER n001_' part?

I don't know how I got in that state, but the error was not from my code. I tried restarting my node server, and restarting polyglot-v2 but still got the error.

I deleted the nodeserver in the web ui, then rebooted, reinstalled nodeserver, rebooted, and now the discovery works fine?

NodeJS binds to IPv6 by default

https://github.com/brettahale/udi-polyglotv2/blob/ab294da1df78608f6ef38ee07d631fb3b4ce1904/lib/modules/web.js#L103

I can create a pull request to address this but I'm not sure how you would want someone to do that given the binaries are in there. I tried to build locally but didn't have any luck. I was attempting the below:

this.Server.listen(port, config.settings.ipAddress, () => {

The error block would also need to be addressed. IMO, that doesn't make much sense to randomly set a port unless it's development so I would just log the error.

Add Update profile to web interface

Currently there is an 'Update' button for nodeservers in the store which updates the git clone, sends the profile.zip to the ISY and reboots the ISY. Some nodeservers dynamically generate the profile.zip so they need an easy way to send the profile to the ISY and reboot it on demand. Also would make it easier to update the profile while developing a nodeserver that is not yet in the store, or changes haven't been released to the store.

Would be nice to have a build profile button as well, which could be enabled with a server.json option?

Feature Request: Download logs link

When users having problems with the Node Servers, developers would need to look at the log files. Very often users do not know how to do collect the logs properly. It would be a great help if Polyglot Front End has a link, something like "download logs" that would provide them with Polyglot + Node Server logs in .tar.gz archive suitable for e-mail or forum attachment.

Crash when adding a node server

Last night I deleted a test server, and tried to add it back and it crashed. I'm running the latest I pulled from github yesterday. Also, would be nice to show a more detailed version number in the log so you know what version we are running?

10/19/2017, 6:16:50 PM - info: MQTT: Subscribe Successful udi/polyglot/connections/# QoS: 0
10/19/2017, 6:16:50 PM - info: MQTT: Subscribe Successful udi/polyglot/ns/10 QoS: 0
10/19/2017, 6:16:50 PM - info: v2a(10): - NodeServer found on ISY with the name v2a. Checking for Nodes...
10/19/2017, 6:16:50 PM - info: v2a(10): Completed ReSync with ISY.
10/19/2017, 6:19:21 PM - info: Successful login by admin
10/19/2017, 6:19:24 PM - info: MQTT: Frontend Websockets interface  Connected.
10/19/2017, 6:19:54 PM - info: v2a(10): attempting to delete NodeServer v2a
10/19/2017, 6:19:54 PM - info: v2a(10): deleting v2a's nodes from ISY.
10/19/2017, 6:19:56 PM - info: v2a(10): Succesfully removed NodeServer. You must reboot the ISY.
10/19/2017, 6:20:17 PM - info: MQTT: Frontend Websockets interface  Disconnected.
10/19/2017, 6:20:18 PM - info: MQTT: Frontend Websockets interface  Connected.
10/19/2017, 6:20:44 PM - info: MQTT: Frontend Websockets interface  Disconnected.
10/19/2017, 6:22:27 PM - info: Successful login by admin
10/19/2017, 6:22:29 PM - info: MQTT: Frontend Websockets interface  Connected.
10/20/2017, 7:28:05 AM - info: MQTT: Frontend Websockets interface  Disconnected.
10/20/2017, 5:58:48 PM - info: MQTT: Frontend Websockets interface  Connected.
10/20/2017, 6:00:33 PM - info: v2a(10): Attempting to install v2a NodeServer into ISY.
10/20/2017, 6:00:33 PM - info: v2a(10): Installed into ISY sucessfully. Reboot the ISY and upload the profile.zip
10/20/2017, 6:00:34 PM - info: Registered new NodeServer: v2a(10)
10/20/2017, 6:00:34 PM - error: uncaughtException: Cannot read property 'topic' of undefined date=Fri Oct 20 2017 18:00:34 GMT-0700 (PDT), pid=20146, uid=1000, gid=1000, cwd=/, execPath=/usr/local/bin/node, version=v6.11.0, argv=[/usr/local/bin/node, /usr/local/bin/polyglot-v2], rss=49582080, heapTotal=29347840, heapUsed=23672072, external=18444402, loadavg=[0.013671875, 0.1103515625, 0.1015625], uptime=173448
TypeError: Cannot read property 'topic' of undefined
    at Client.subscribe (/usr/local/lib/node_modules/polyglot-v2/lib/modules/mqtt.js:106:59)
    at MqttClient.subscribe (/usr/local/lib/node_modules/polyglot-v2/node_modules/mqtt/lib/client.js:484:5)
    at Object.addSubscription (/usr/local/lib/node_modules/polyglot-v2/lib/modules/mqtt.js:101:16)
    at newNodeServer.save (/usr/local/lib/node_modules/polyglot-v2/lib/models/nodeserver.js:191:14)
    at /usr/local/lib/node_modules/polyglot-v2/node_modules/mongoose/lib/model.js:3764:16
    at /usr/local/lib/node_modules/polyglot-v2/node_modules/mongoose/lib/services/model/applyHooks.js:150:20
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)
10/20/2017, 6:00:37 PM - info: Polyglot shutdown complete with code: 1
10/20/2017, 6:00:58 PM - info: Starting Polyglot version 2.0
10/20/2017, 6:01:00 PM - info: MongoDB: Connected
10/20/2017, 6:01:08 PM - info: MQTT Services Started.
10/20/2017, 6:01:09 PM - info: Secure Server started on port 8080
10/20/2017, 6:01:09 PM - info: ISY: Got Version 5.0.10
10/20/2017, 6:01:10 PM - info: MQTT: Subscribe Successful udi/polyglot/connections/# QoS: 0
10/20/2017, 6:01:10 PM - info: MQTT: Subscribe Successful udi/polyglot/ns/10 QoS: 0
10/20/2017, 6:01:10 PM - info: v2a(10): - NodeServer found on ISY with the name v2a. Checking for Nodes...
10/20/2017, 6:01:10 PM - info: v2a(10): Completed ReSync with ISY.
10/20/2017, 6:01:30 PM - info: MQTT: Frontend Websockets interface  Connected.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.