Giter Site home page Giter Site logo

polyglot-v2's People

Contributors

bpaauwe avatar dependabot[bot] avatar einstein42 avatar exking avatar firstone avatar jimboca avatar mkohanim avatar shbatm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

polyglot-v2's Issues

Removing notices not working

The removeNoticesAll sends the info but they don't go away. This is the polyglot log:

2018-4-14 16:44:13 - debug: REST: REMOVE_NOTICES_ALL Command received from ISY for n003_controller
2018-4-14 16:44:13 - debug: Sending REMOVE_NOTICES_ALL to n003_controller
2018-4-14 16:44:13 - debug: MQTTP: nsCommand Message: {"removenotice":0,"node":"3"}
2018-4-14 16:44:13 - info: PythonTemplate(3): Processing command: removenotice
2018-4-14 16:44:13 - debug: MQTTP: nsCommand Message: {"removenotice":1,"node":"3"}
2018-4-14 16:44:13 - info: PythonTemplate(3): Processing command: removenotice
2018-4-14 16:44:13 - debug: MQTTP: nsCommand Message: {"removenotice":2,"node":"3"}
2018-4-14 16:44:13 - info: PythonTemplate(3): Processing command: removenotice
2018-4-14 16:44:13 - debug: MQTTP: nsCommand Message: {"removenotice":3,"node":"3"}
2018-4-14 16:44:13 - info: PythonTemplate(3): Processing command: removenotice
2018-4-14 16:44:13 - debug: MQTTP: nsCommand Message: {"removenotice":4,"node":"3"}
2018-4-14 16:44:13 - info: PythonTemplate(3): Processing command: removenotice
2018-4-14 16:44:13 - debug: MQTTP: nsCommand Message: {"removenotice":5,"node":"3"}
2018-4-14 16:44:13 - info: PythonTemplate(3): Processing command: removenotice
2018-4-14 16:44:13 - debug: MQTTP: nsCommand Message: {"removenotice":6,"node":"3"}
2018-4-14 16:44:13 - info: PythonTemplate(3): Processing command: removenotice
2018-4-14 16:44:13 - info: NS removenotice: PythonTemplate removed notice sucessfully.
2018-4-14 16:44:13 - debug: MQTTP: nsCommand Message: {"removenotice":7,"node":"3"}
2018-4-14 16:44:13 - info: PythonTemplate(3): Processing command: removenotice
2018-4-14 16:44:13 - debug: MQTTP: nsCommand Message: {"removenotice":8,"node":"3"}
2018-4-14 16:44:13 - info: PythonTemplate(3): Processing command: removenotice
2018-4-14 16:44:13 - debug: MQTTP: nsCommand Message: {"removenotice":9,"node":"3"}
2018-4-14 16:44:13 - info: PythonTemplate(3): Processing command: removenotice
2018-4-14 16:44:13 - info: NS removenotice: PythonTemplate removed notice sucessfully.
2018-4-14 16:44:13 - info: NS removenotice: PythonTemplate removed notice sucessfully.
2018-4-14 16:44:13 - info: NS removenotice: PythonTemplate removed notice sucessfully.
2018-4-14 16:44:13 - info: NS removenotice: PythonTemplate removed notice sucessfully.
2018-4-14 16:44:13 - info: NS removenotice: PythonTemplate removed notice sucessfully.
2018-4-14 16:44:13 - info: NS removenotice: PythonTemplate removed notice sucessfully.
2018-4-14 16:44:13 - info: NS removenotice: PythonTemplate removed notice sucessfully.
2018-4-14 16:44:13 - info: NS removenotice: PythonTemplate removed notice sucessfully.
2018-4-14 16:44:13 - info: NS removenotice: PythonTemplate removed notice sucessfully.

But the notices stay on the web page.

When deleting node servers, the nodes stays in the nodes collection

When deleting node servers, the nodes are deleted from ISY, but not from the nodes collection. When we reinstall a node server in the same profile number, those nodes reappear.

Error shown:
2019-01-13, 4:04:29 p.m. - error: removenode: Error: Node not found.
at Object.removenode (/home/benoit/polyglot-v2/lib/modules/nodeserver.js:449:30)
at
at process._tickCallback (internal/process/next_tick.js:188:7)

How do I uninstall polyglot-v2?

I installed polyglot-v2 on a Raspberry Pi I am using for Pi-Hole. Installing polyglot made the Pi-Hole very slow. I need help to uninstall all of polyglot-v2, so I can install it on a separate, new Raspberry Pi.

DockerFIle needs -y to be specified for Apt-Get Dist-Upgrade

polyglot-v2/docker/Dockerfile

Line 9,
Should be changed from
RUN apt-get update && apt-get dist-upgrade
to
RUN apt-get update && apt-get dist-upgrade -y

Without this i'm getting the error:
The following packages will be upgraded:
perl-base
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 1345 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Abort.
The command '/bin/sh -c apt-get update && apt-get dist-upgrade' returned a non-zero code: 1

ST value for controller not reported as 1 on Polyglot start

Had my RPi lock for some reason and had to power cycle it. On restart, Polyglot started back along with the nodeservers, and everything is find except one of my two nodeservers has a controller ST value of 0 and its not updating. Shows "False" in the Admin Console and "disconnected" in the Polyglot website Dashboard. I can see in the log for the nodeserver where it set the ST value of the controller to 1 and an entry in the Polyglot log - it's 4 seconds later where the Polyglot says successfully setting the value on the ISY to 1. However both the ISY Admin Console and the Dashboard showed the value as 0 after Polyglot start. I restart of the nodeserver clears it up.

Need ability to create backups

Need a way to create backups when users need to move polyglot to a different machine, or a machine dies. Would be nice if they could be automatically done periodically.

Order custom parameters by name

Right now when you click save on custom parameter, it, seemingly randomly, reorders custom parameters order. Definitely sub-par user experience.

In the config message, there should be keyed notices

Currently, the config polyglot message has a notices array of string with all current notices.

In order to remove a notice by key, we need to know the key to the message.

There should be a keyed notices object on the config message to facilitate this. The notices array should stay there for backward compatibility.

slot selection for Add NodeServer not working

Changing the slot selection from the next available slot to a larger unused slot has no effect, the node server is installed in the first available slot anyway.

For example, if the first available slot is 5 and slots 5, 6, 8-25 are open, the node server will always install to slot 5 regardless of which slot is selected in the drop down box.

Node restart required after deleting a node

I delete a node in my nodeserver from the Polyglot UI and then rerun discover for my nodeserver but the deleted node doesn't come back. I have to restart the nodeserver to get the deleted node to add.

Nodes left in DB with profileNum:null

No idea how these got there, but this was from a user after deleting the nodeserver in slot 1.

pi@rpi3-2:~/development/tmp/postdump/polyglot $ bsondump nodes.bson | grep n001
{ "__v" : 0, "_id" : ObjectId( "5b5da3b749ce74acb11ca9d4" ), "added" : true, "address" : "n001_a34592746", "controller" : "false", "drivers" : { "ST" : { "uom" : 2, "value" : "0" } }, "enabled" : true, "isprimary" : false, "name" : "Watch Tablo TV", "nodedef" : "HarmonyActivity", "primary" : "n001_h0eff39c215884", "profileNum" : null, "timeAdded" : "1532804000152" }
{ "__v" : 0, "_id" : ObjectId( "5b5da3b749ce74acb11ca9db" ), "added" : true, "address" : "n001_a34592964", "controller" : "false", "drivers" : { "ST" : { "uom" : 2, "value" : "0" } }, "enabled" : true, "isprimary" : false, "name" : "Watch GameRm Tablo TV", "nodedef" : "HarmonyActivity", "primary" : "n001_h3f9c6482cc5e2", "profileNum" : null, "timeAdded" : "1532804000152" }
{ "__v" : 0, "_id" : ObjectId( "5b5da3b749ce74acb11ca9dd" ), "added" : true, "address" : "n001_a34556869", "controller" : "false", "drivers" : { "ST" : { "uom" : 2, "value" : "0" } }, "enabled" : true, "isprimary" : false, "name" : "Watch GameRm Netflix", "nodedef" : "HarmonyActivity", "primary" : "n001_h3f9c6482cc5e2", "profileNum" : null, "timeAdded" : "1532804000152" }
{ "__v" : 0, "_id" : ObjectId( "5b5da3b749ce74acb11ca9df" ), "added" : true, "address" : "n001_a34556837", "controller" : "false", "drivers" : { "ST" : { "uom" : 2, "value" : "0" } }, "enabled" : true, "isprimary" : false, "name" : "Listen to GameRm Amazon Music", "nodedef" : "HarmonyActivity", "primary" : "n001_h3f9c6482cc5e2", "profileNum" : null, "timeAdded" : "1532804000152" }
{ "__v" : 0, "_id" : ObjectId( "5b5da3b749ce74acb11ca9e0" ), "added" : true, "address" : "n001_a34556906", "controller" : "false", "drivers" : { "ST" : { "uom" : 2, "value" : "0" } }, "enabled" : true, "isprimary" : false, "name" : "Listen to GameRm Pandora", "nodedef" : "HarmonyActivity", "primary" : "n001_h3f9c6482cc5e2", "profileNum" : null, "timeAdded" : "1532804000152" }
{ "__v" : 0, "_id" : ObjectId( "5b5da3b749ce74acb11ca9e1" ), "added" : true, "address" : "n001_a34556170", "controller" : "false", "drivers" : { "ST" : { "uom" : 2, "value" : "0" } }, "enabled" : true, "isprimary" : false, "name" : "Watch GameRm Roku", "nodedef" : "HarmonyActivity", "primary" : "n001_h3f9c6482cc5e2", "profileNum" : null, "timeAdded" : "1532804000152" }
{ "__v" : 0, "_id" : ObjectId( "5b5da3b749ce74acb11ca9e2" ), "added" : true, "address" : "n001_d55985121", "controller" : "false", "drivers" : { "ST" : { "uom" : 2, "value" : "0" } }, "enabled" : true, "isprimary" : false, "name" : "GameRm RokuExpress", "nodedef" : "d55985121", "primary" : "n001_h3f9c6482cc5e2", "profileNum" : null, "timeAdded" : "1532804000152" }
{ "__v" : 0, "_id" : ObjectId( "5b5da3b849ce74acb11ca9e4" ), "added" : true, "address" : "n001_a34641850", "controller" : "false", "drivers" : { "ST" : { "uom" : 2, "value" : "0" } }, "enabled" : true, "isprimary" : false, "name" : "Watch KTVI", "nodedef" : "HarmonyActivity", "primary" : "n001_hccdb0ea2cc564", "profileNum" : null, "timeAdded" : "1532804000152" }
{ "__v" : 0, "_id" : ObjectId( "5b5da3b849ce74acb11ca9f2" ), "added" : true, "address" : "n001_d55981590", "controller" : "false", "drivers" : { "ST" : { "uom" : 2, "value" : "1" } }, "enabled" : true, "isprimary" : false, "name" : "LivingRm RokuUltra", "nodedef" : "d55981590", "primary" : "n001_hccdb0ea2cc564", "profileNum" : null, "timeAdded" : "1532804000152" }

Small bug when there are no connections

We can get the following error message in checkExistingNodeServers():
1/17/2019, 7:58:30 PM - error: NS checkExistingNodeServers Error: TypeError: Cannot read property 'profile' of undefined

This error message can happen when /rest/profiles/ns/0/connection
return:

Error when deleting node, but shouldn't be an error

Why does this say error?

2019-1-4 15:13:28 - debug: ISY: 200 - http://192.168.86.66:80/rest/ns/2/nodes/n002_s411956665463/remove
2019-1-4 15:13:28 - error: NSResponse: Success: false - n002_s411956665463 removed successfully

Configuration page "help" screen.

This is different from notice, which is more ephemeral in nature. I want to be able to add a more permanent "help" section when user clicks on "Configuration" button, to describe how to set parameters. This is similar but README.md but is a part of polyglot UI so that user doesn't have to hunt github repos of individual node servers to figure out how to set up node server.

Add option to create package info for developers

Would be nice to have an option for users to create a zip file to send to the developer or report an issue directly to the github.

  • All info in DB
  • Pull down profile files
  • Polyglot Log
  • Nodeserver log (multi days?)
  • Anything else?

feature request - Add a last updated column in node store

With 49 node servers (and more being added all the time) it would be nice to have a way to quickly see which server was added to make it go from say 48 to 49 and then also be able to see which ones are being actively maintained or were recently updated.

Node added to DB when there was a 403 error

This controller node did not exist, but Polyglot still added it to the DB.

6/6/2018, 2:59:01 PM - debug: MQTTP: nsCommand Message: {"addnode":{"nodes":[{"address":"sensibosky","name":"Sensibo Sky Controller","node_def_id":"controller","primary":"controller","drivers":[{"driver":"ST","value":0,"uom":2},{"driver":"GV0","value":0,"uom":56}]}]},"node":"1"}
6/6/2018, 2:59:01 PM - info: Sensibo Sky(1): Processing command: addnode
6/6/2018, 2:59:01 PM - debug: ISY: 403 - http://192.168.1.6:80/rest/ns/1/nodes/n001_sensibosky/add/controller?primary=n001_controller&name=Sensibo%20Sky%20Controller
6/6/2018, 2:59:01 PM - info: Sensibo Sky(1): completed adding node(s).

addNode isn't showing error when node limit is reached

It happened to me again, a user was having issues with the nodeserver install and the actual problem was he didn't have the Pro, so he hit the node limit. Either polyglot is not showing the issue, or ISY is not returning a bad status. Need to debug further to verify.

Error installing Roomba NodeServer

I installed the Roomba NodeServer from the NodeServer Store. I see the following error in the debug log. Please help.

2018-2-6 19:22:33 - info: NS: Successfully cloned Roomba into NodeServer directory.
2018-2-6 19:22:33 - error: NSChild: Roomba /usr/bin/env bash -xe ./install.sh: + pip3 install -r requirements.txt --user

2018-2-6 19:22:42 - error: NSChild: Roomba install error: Non-zero exit code: 1

Add "features" or "capabilities" support

The idea is that, both, polyglot server / UI and interface, and polyglot interface, could enable some enhanced functionality. So, for instance, if we implement enhances custom parameters, both, server and client need to support it. Both can define "feature" called "enhancedParameters". If, and only if, both have it defined, it would be enabled at runtime. If one side is missing it, it would fall back to the existing functionality. Then you could make potentially breaking changes without having to worry about breaking existing clients.

Further, it could be used to temporarily disable new functionality if it causes issues. You just have to disable "feature" on server or a client.

Add "parameters" callback to polyglot and polyglot interface

Right now, when adding a custom parameter is modified, if that, in turn, can create other custom parameters, it won't take effect until next restart or Re-Discover calls. I'd like to have "parameters_changed" client callback that can do this more dynamically. Or, perhaps, re-trigger"onConfig" when user clicks "Save".

Add more advanced custom parameters configuration.

I'd like to be able to describe parameters. similar to how it's done here:

https://github.com/firstone/RESTRemote/blob/master/cfg/server_config.yaml#L126

I've done this in my node server using custom parameters but it's somewhat limited by the lack of type support in the polyglot. I'd like it to be a part of framework.

Further, I'd like to be able to do more advanced cases, like array of several parameters of a map of maps. For instance, if you have several sonos speakers, I want to be able to send a list of songs speaker parameters, each of which would be "description", "ipaddress", "location" or whatever.

Allow HTTP

Allow users to use HTTP.

.env USE_HTTPS=false

Restart looping due to uncaught exception

2018-10-21 16:45:28 - info: Starting Polyglot....
2018-10-21 16:45:29 - info: Settings: Polyglot Version 2.2.1
2018-10-21 16:45:29 - info: Settings: Features {"noticeByKey":"on","customParamsDoc":"on","typedParams":"on"}
2018-10-21 16:45:29 - info: Settings: Retrieved config from database
2018-10-21 16:45:29 - info: Settings: Retrieved config overrides from .env and updated database
2018-10-21 16:45:29 - info: Aedes MQTT Broker Service: Started on port 1883
2018-10-21 16:45:30 - info: MQTT Client Service: Started
2018-10-21 16:45:30 - info: HTTPS Interface Service: Started - Address: 0.0.0.0 Port: 3000
2018-10-21 16:45:31 - info: Hue(3): Completed ReSync with ISY.
2018-10-21 16:45:31 - info: NS: Starting Local NodeServer Hue profile number 3 :: Version 0.1.7
2018-10-21 16:45:31 - info: MQTTS: polyglot authenticated successfully.
2018-10-21 16:45:31 - info: MQTTS: Client Connected: polyglot
2018-10-21 16:45:31 - info: ISY: Got Version 5.0.13
2018-10-21 16:45:31 - error: NS checkExistingNodeServers Error: TypeError: Cannot read property 'profile' of undefined
2018-10-21 16:45:32 - error: NSChild STDERR: Hue: Traceback (most recent call last):
  File "./hue.py", line 9, in <module>
    import polyinterface as polyglot
ImportError: No module named 'polyinterface'

2018-10-21 16:45:32 - error: uncaughtException: read ECONNRESET date=Sun Oct 21 2018 16:45:32 GMT-0500 (CDT), pid=17490, uid=1000, gid=1000, cwd=/home/pi/polyglot, execPath=/home/pi/polyglot/polyglot-v2-linux-armv7, version=v9.2.1, argv=[/home/pi/polyglot/polyglot-v2-linux-armv7, /snapshot/polyglot-v2/bin/polyglot-v2.js], rss=77799424, heapTotal=51986432, heapUsed=36685496, external=19168847, loadavg=[1.10400390625, 0.99755859375, 0.8671875], uptime=1251
Error: read ECONNRESET
    at _errnoException (util.js:1031:13)
    at Pipe.onread (net.js:619:25)
2018-10-21 16:45:40 - info: Starting Polyglot....

Port issues?

Any help with this error?

pi@raspberrypi:~ $ tail -f ~/.polyglot/log/debug.log
    at _exceptionWithHostPort (util.js:1052:20)
    at Server.setupListenHandle [as _listen2] (net.js:1367:14)
    at listenInCluster (net.js:1408:12)
    at Server.listen (net.js:1496:7)
    at /snapshot/polyglot-v2/lib/services/mqtts.js:134:27
    at new Promise (<anonymous>)
    at Object.start (/snapshot/polyglot-v2/lib/services/mqtts.js:131:15)
    at start (/snapshot/polyglot-v2/bin/polyglot-v2.js:76:15)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
2018-9-6 00:47:36 - info: Starting Polyglot....
2018-9-6 00:47:37 - info: Settings: Polyglot Version 2.2.1
2018-9-6 00:47:37 - info: Settings: Features {"noticeByKey":"on","customParamsDoc":"on","typedParams":"on"}
2018-9-6 00:47:37 - info: Settings: Retrieved config from database
2018-9-6 00:47:37 - info: Settings: Retrieved config overrides from .env and updated database
2018-9-6 00:47:37 - error: uncaughtException: listen EADDRINUSE :::1883 date=Thu Sep 06 2018 00:47:37 GMT+0000 (UTC), pid=549, uid=1000, gid=1000, cwd=/home/pi/polyglot, execPath=/home/pi/polyglot/polyglot-v2-linux-armv6, version=v9.2.1, argv=[/home/pi/polyglot/polyglot-v2-linux-armv6, /snapshot/polyglot-v2/bin/polyglot-v2.js], rss=70193152, heapTotal=41418752, heapUsed=28457012, external=19670223, loadavg=[1.49951171875, 0.60888671875, 0.22998046875], uptime=116
Error: listen EADDRINUSE :::1883
    at Object._errnoException (util.js:1031:13)
    at _exceptionWithHostPort (util.js:1052:20)
    at Server.setupListenHandle [as _listen2] (net.js:1367:14)
    at listenInCluster (net.js:1408:12)
    at Server.listen (net.js:1496:7)
    at /snapshot/polyglot-v2/lib/services/mqtts.js:134:27
    at new Promise (<anonymous>)
    at Object.start (/snapshot/polyglot-v2/lib/services/mqtts.js:131:15)
    at start (/snapshot/polyglot-v2/bin/polyglot-v2.js:76:15)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

I did the Install script listed here on a Raspberry Pi Zero:
https://github.com/UniversalDevicesInc/polyglot-v2#installation-instructions

NS Status Error: TypeError: Cannot read property 'toString' of null

The full snippet of the log is below, which shows the error:

2018-5-1 03:01:02 - error: HarmonyHub(2): NS Status Error: TypeError: Cannot read property 'toString' of null

and then for some reason, it set's the controller ST to zero?

2018-5-1 03:01:02 - info: HarmonyHub(2): n002_harmonyctrl ST set sucessfully to 0 : UOM 2

This is during the 3am query all, so it's really busy.

2018-5-1 03:01:01 - info: HarmonyHub(2): Processing command: status
2018-5-1 03:01:01 - debug: MQTTP: nsCommand Message: {"status":{"value":2.1,"driver":"GV1","address":"harmonyctrl","uom":56},"node":"2"}
2018-5-1 03:01:01 - info: HarmonyHub(2): Processing command: status
2018-5-1 03:01:01 - debug: ISY: 200 - http://192.168.86.64:80/rest/ns/2/report/request/4606/success
2018-5-1 03:01:01 - debug: MQTTP: nsCommand Message: {"status":{"value":11,"driver":"GV2","address":"harmonyctrl","uom":56},"node":"2"}
2018-5-1 03:01:01 - info: HarmonyHub(2): Processing command: status
2018-5-1 03:01:01 - debug: MQTTP: nsCommand Message: {"status":{"value":2,"driver":"GV3","address":"harmonyctrl","uom":25},"node":"2"}
2018-5-1 03:01:01 - info: HarmonyHub(2): Processing command: status
2018-5-1 03:01:02 - debug: MQTTP: nsCommand Message: {"status":{"value":null,"driver":"GV4","address":"harmonyctrl","uom":25},"node":"2"}
2018-5-1 03:01:02 - info: HarmonyHub(2): Processing command: status
2018-5-1 03:01:02 - debug: MQTTP: nsCommand Message: {"status":{"value":5,"driver":"GV5","address":"harmonyctrl","uom":25},"node":"2"}
2018-5-1 03:01:02 - info: HarmonyHub(2): Processing command: status
2018-5-1 03:01:02 - debug: MQTTP: nsCommand Message: {"status":{"value":60,"driver":"GV6","address":"harmonyctrl","uom":25},"node":"2"}
2018-5-1 03:01:02 - info: HarmonyHub(2): Processing command: status
2018-5-1 03:01:02 - debug: MQTTP: nsCommand Message: {"status":{"value":1,"driver":"GV7","address":"harmonyctrl","uom":25},"node":"2"}
2018-5-1 03:01:02 - info: HarmonyHub(2): Processing command: status
2018-5-1 03:01:02 - debug: MQTTP: nsCommand Message: {"status":{"value":1,"driver":"GV8","address":"harmonyctrl","uom":25},"node":"2"}
2018-5-1 03:01:02 - info: HarmonyHub(2): Processing command: status
2018-5-1 03:01:02 - debug: MQTTP: nsCommand Message: {"status":{"value":2,"driver":"GV9","address":"harmonyctrl","uom":25},"node":"2"}
2018-5-1 03:01:02 - info: HarmonyHub(2): Processing command: status
2018-5-1 03:01:02 - debug: ISY: 200 - http://192.168.86.64:80/rest/ns/2/nodes/n002_harmonyctrl/report/status/GV1/2.1/56
2018-5-1 03:01:02 - debug: ISY: 200 - http://192.168.86.64:80/rest/ns/2/nodes/n002_harmonyctrl/report/status/GV2/11/56
2018-5-1 03:01:02 - debug: ISY: 200 - http://192.168.86.64:80/rest/ns/2/nodes/n002_harmonyctrl/report/status/ST/0/2
2018-5-1 03:01:02 - info: HarmonyHub(2): n002_harmonyctrl GV1 set sucessfully to 2.1 : UOM 56
2018-5-1 03:01:02 - debug: ISY: 200 - http://192.168.86.64:80/rest/ns/2/nodes/n002_harmonyctrl/report/status/GV3/2/25
2018-5-1 03:01:02 - debug: ISY: 200 - http://192.168.86.64:80/rest/ns/2/nodes/n002_harmonyctrl/report/status/GV4//25
2018-5-1 03:01:02 - error: HarmonyHub(2): NS Status Error: TypeError: Cannot read property 'toString' of null
2018-5-1 03:01:02 - info: HarmonyHub(2): n002_harmonyctrl GV2 set sucessfully to 11 : UOM 56
2018-5-1 03:01:02 - info: HarmonyHub(2): n002_harmonyctrl ST set sucessfully to 0 : UOM 2
2018-5-1 03:01:02 - debug: MQTTP: nsCommand Message: {"status":{"value":1,"driver":"ST","address":"hc7023e62b09c2","uom":2},"node":"2"}
2018-5-1 03:01:02 - info: HarmonyHub(2): Processing command: status
111

MongoError: connection 265 to localhost:27017 timed out

Something caused the RPi to get totally thrashed, so the user could not even log in, so this is just a symptom of that. But, the message says report this, so I'm reporting it.

2018-7-12 08:57:06 - info: MQTTS: Client Connected: HarmonyHub
2018-7-12 08:57:06 - info: HarmonyHub(3): Processing command: connected
2018-7-12 08:57:07 - info: HarmonyHub(3): NodeServer Connected.
2018-7-12 08:57:07 - info: HarmonyHub(3): n003_harmonyctrl ST set sucessfully to 1 : UOM 2
2018-7-12 08:58:16 - error: MQTTS: keepaliveTimeout: HarmonyHub
2018-7-12 09:02:34 - error: MQTTS: clientError: HarmonyHub keep alive timeout
2018-7-12 09:34:37 - info: MQTTS: Client Disconnected: HarmonyHub
2018-7-12 09:34:50 - info: MQTTS: Client Connected: HarmonyHub
2018-7-12 09:34:52 - info: MQTTS: Client Disconnected: HarmonyHub
2018-7-12 09:34:57 - info: MQTTS: Client Connected: HarmonyHub
2018-7-12 09:34:59 - info: HarmonyHub(3): Processing command: connected
2018-7-12 09:35:07 - info: HarmonyHub(3): NodeServer Connected.
2018-7-12 09:35:29 - info: HarmonyHub(3): n003_harmonyctrl ST set sucessfully to 1 : UOM 2
2018-7-12 09:35:45 - error: MQTTS: clientError: HarmonyHub write EPIPE
2018-7-12 10:05:11 - info: MQTTS: Client Disconnected: HarmonyHub
2018-7-12 10:05:20 - error: unhandledRejection REPORT THIS!: MongoError: connection 265 to localhost:27017 timed out
    at Function.MongoError.create (/snapshot/polyglot-v2/node_modules/mongodb-core/lib/error.js:29:11)
    at Socket.timeoutHandler (/snapshot/polyglot-v2/node_modules/mongodb-core/lib/connection/connection.js:200:20)
    at Object.onceWrapper (events.js:254:19)
    at Socket.emit (events.js:159:13)
    at Socket._onTimeout (net.js:411:8)
    at ontimeout (timers.js:478:11)
    at tryOnTimeout (timers.js:302:5)
    at Timer.listOnTimeout (timers.js:262:5)
2018-7-12 10:05:21 - info: MQTTS: Client Connected: HarmonyHub

delNode not working

Calling delNode like this:

fnode = self.controller.poly.getNode(sensorAddressOld)
self.controller.delNode(fnode['address'])

results in this in the polyglot log...

2018-12-9 20:14:51 - debug: MQTTP: nsCommand Message: {"removenode" {"address":"ei0"},"node":"11"}
2018-12-9 20:14:51 - info: Ecobee(11): Processing command: removenode
2018-12-9 20:14:52 - debug: ISY: 400 - http://192.168.86.64:80/rest/ns/undefined/nodes/ei0/remove
2018-12-9 20:14:52 - error: removenode: Error: ISY sent invalid result code.
    at Object.removenode (/snapshot/polyglot-v2/lib/modules/nodeserver.js:445:24)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

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)

Restart looping on old firmware

Polyglot keeps exiting and restarting when ISY firmware is to old.

2018-7-4 18:04:04 - info: Starting Polyglot....
2018-7-4 18:04:04 - info: Settings: Polyglot Version 2.2.0
2018-7-4 18:04:04 - info: Settings: Retrieved config from database
2018-7-4 18:04:04 - info: Settings: Retrieved config overrides from .env and updated database
2018-7-4 18:04:05 - info: Aedes MQTT Broker Service: Started on port 1883
2018-7-4 18:04:05 - info: MQTT Client Service: Started
2018-7-4 18:04:05 - info: HTTPS Interface Service: Started - Address: 192.168.1.236 Port: 3000
2018-7-4 18:04:05 - info: MQTTS: polyglot authenticated successfully.
2018-7-4 18:04:05 - info: MQTTS: Client Connected: polyglot
2018-7-4 18:04:06 - error: Polyglot v2 only works with ISY firmware version > 5.0.0, you are running 4.6.2
2018-7-4 18:04:09 - info: Starting Polyglot....

The "encryption" class does nothing of value

const encoding = ',2YE6=#r(z5?Y4=a';

The variable called "encoding" is actually the password used to derive the cryptographic key, which is both static across all installations and published on GitHub. This means it provides no value; all someone viewing the ciphertext needs to do is lookup this project and extract the key.

Incidentally using AES without an initialization vector appears to have been deprecated by node, but I wouldn't bother fixing that unless some form of localized key generation can be established.

I don't know what the purpose of this encryption was, but it's not fulfilling it.

Change nodeserver install (git clone) and update (git pull) messages to info

These messages for updating a nodeserver go to debug, which means we don't see them unless the user has edited the file to turn on debug mode, they should always be shown to help in debugging issues:

2018-9-11 12:37:06 - debug: {"node":"polyglot_frontend-W2Ek9","updatens":{"version":"0.1.4","url":"https://github.com/bpaauwe/WeatherFlow.git
","name":"WeatherFlowPoly","language":"python3","author":"Bob Paauwe","desc":"Add WeatherFlow weather data to the ISY994","updateProfile":tru
e},"seq":42975}
2018-9-11 12:37:09 - debug: NSChild: WeatherFlowPoly git: From https://github.com/bpaauwe/WeatherFlow
   b701004..1caba84  master     -> origin/master
2018-9-11 12:37:09 - debug: NSChild: WeatherFlowPoly git: error: Your local changes to the following files would be overwritten by merge:
        package-lock.json
Please commit your changes or stash them before you merge.
Aborting
2018-9-11 12:37:09 - debug: NSChild: WeatherFlowPoly git: Updating b701004..1caba84
2018-9-11 12:37:09 - debug: NSChild: WeatherFlowPoly git exited with cause code: 1
2018-9-11 12:37:09 - error: NSChild: WeatherFlowPoly pullRepo: Non-zero exit code: 1
2018-9-11 12:37:09 - error: NS: Error getting server.json required fields. name and executable are required. - Error: ENOENT: no such file or
 directory, open '/home/pi/.polyglot/nodeservers/.AppleDouble/server.json'
2018-9-11 12:37:09 - error: NSResponse: Success: false - pullRepo: undefined

The above is for update, but should also be done for install. Along with install.sh std and err out.

MQTT Server appears to startup and bind to port specified for MQTT client use

I am running ApacheMQ on the same host as Polyglot, as I want to use that broker instead of the builtin.
I read these configuration overrides as parameters for the Polyglot MQTT client: specifying a different IP and port combination to connect to instead of the builtin MQTT broker which will come up on port 1883.
https://github.com/UniversalDevicesInc/polyglot-v2/blame/master/README.md#L178-L182

Unfortunately, when I use the parameters to specify 127.0.0.1:1884 polyglot fails to start with this exception:

1/19/2019, 9:29:27 AM - info: Starting Polyglot....
1/19/2019, 9:29:27 AM - info: Settings: Polyglot Version 2.2.1
1/19/2019, 9:29:27 AM - info: Settings: Features {"noticeByKey":"on","customParamsDoc":"on","typedParams":"on"}
1/19/2019, 9:29:27 AM - info: Settings: Retrieved config from database
1/19/2019, 9:29:27 AM - info: Settings: Retrieved config overrides from .env and updated database
1/19/2019, 9:29:27 AM - error: uncaughtException: listen EADDRINUSE :::1884 date=Sat Jan 19 2019 09:29:27 GMT-0600 (Central Standard Time), pid=8104, uid=0, gid=0, cwd=/root/polyglot, execPath=/root/polyglot/polyglot-v2-linux-x64, version=v10.4.1, argv=[/root/polyglot/polyglot-v2-linux-x64, /snapshot/udi-polyglotv2/bin/polyglot-v2.js], rss=98676736, heapTotal=69513216, heapUsed=32630992, external=18010441, loadavg=[0.36328125, 0.111328125, 0.02978515625], uptime=27774
Error: listen EADDRINUSE :::1884
    at Server.setupListenHandle [as _listen2] (net.js:1327:14)
    at listenInCluster (net.js:1375:12)
    at Server.listen (net.js:1462:7)
    at /snapshot/udi-polyglotv2/lib/services/mqtts.js:134:27
    at new Promise (<anonymous>)
    at Object.start (/snapshot/udi-polyglotv2/lib/services/mqtts.js:131:15)
    at start (/snapshot/udi-polyglotv2/bin/polyglot-v2.js:76:15)
    at process._tickCallback (internal/process/next_tick.js:68:7)

The port conflict is legitimate, I have Apache MQ listening on port 1884 for MQTT. However, it was not my intent to reconfigure the Polyglot MQTT server to listen on port 1884, only have the client connect to that port.

If it were possible to prevent the startup of Polyglot's MQTT server with a separate override, I think this issue would be resolved.

Note: this is my first MQTT foray: if the protocol dictates that clients have their own TCP listener on the same port as the server this is a conflict with that protocol and not a Polyglot issue.

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.