Jump to content

Initial Feeback


Michel Kohanim

Recommended Posts

Some tests with a collection of USB sticks shows that, in general, the current FreeBSD kernel on the Polisy cannot handle USB 2 storage devices plugged into the front panel USB ports.  It works just fine with USB 3 storage devices.  I've not tested with actual disk drives - just memory sticks.  And I've not yet tested the internal USB 2 ports (need to dig up my motherboard cables for that connector -- why is that when you don't need things like that, you're tripping over them, but when you need them, they're nowhere to be found???).  I also tried the USB 2 sticks with a USB 2 hub connected to the ports (a solution that I've used for flakey USB-2 devices on laptop USB-3 ports in the past) - no difference.  So it suggest the problem is the USB 3 chipset or an OS driver bug...

Here's the kernel messages from one such device, for those interested:

ugen0.2: <USB Flash Disk> at usbus0
umass0 on uhub0
umass0: <USB Flash Disk, class 0/0, rev 2.00/2.00, addr 1> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0xc100
umass0:2:0: Attached to scbus2
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 3 more tries remain
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 2 more tries remain
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 1 more tries remain
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 0 more tries remain
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Error 5, Retries exhausted
ugen0.2: <USB Flash Disk> at usbus0 (disconnected)
umass0: at uhub0, port 4, addr 1 (disconnected)
umass0: detached

For comparison, here's a USB 3 device that works:

ugen0.2: <Kingston DataTraveler 3.0> at usbus0
umass0 on uhub0
umass0: <Kingston DataTraveler 3.0, class 0/0, rev 3.00/0.01, addr 1> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0xc100
umass0:2:0: Attached to scbus2
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 3 more tries remain
da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
da0: <Kingston DataTraveler 3.0 > Removable Direct Access SPC-4 SCSI device
da0: Serial Number 002618887F9BF050584230A0
da0: 400.000MB/s transfers
da0: 7377MB (15109516 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>

 

Link to comment
Share on other sites

2 hours ago, mwester said:

Some tests with a collection of USB sticks shows that, in general, the current FreeBSD kernel on the Polisy cannot handle USB 2 storage devices plugged into the front panel USB ports. <snipped>

 

"front panel"? I only have three LEDs. Are you considering the port plugs as "front"?

That sounds really odd. USB 3 usually is backward compatible. Ouch!

Link to comment
Share on other sites

Hi all, I've been out with work all week and anxious to get started. I'm in through ssh and I've completed the updates,

In the browser though, trying to get to Polyglot, using the default user and password I am getting this error:

image.png.a28aeae68e43172028e0f0d5ad5e369b.png 

Is there a command I can run via ssh to reset the password back to default?

Link to comment
Share on other sites

With the issue of not being able to locate the Polisy's IP or MAC address, I was thinking of how I set up my MorningStar MPPT SOLAR charge controller. MorningStart, created an App for the PC/Apple that looked for the Charge controller, found it, and allow you to enter your own IP address. It utilized the Ethernet connection on the computer. First you needed to go to Network Sharing and change the adapter settings from Wi-Fi to Ethernet, deactivate the Wi-Fi, plug the MorningStar into the PC's Ethernet jack and then the App found the MorningStar and allowed me to assign my own IP address, Subnet mask, gateway, Primary DNS and secondary DNS. It also gave me the MAC address of the charge controller. This process might work for the Polisy. I think on the network I could put it https://Morningstarxxxxxxx and it also found it.

 

Link to comment
Share on other sites

@mwester,

I love your ideas. Please keep them coming. With regard to USB2 storage, that's something that we are not going to support but we might have to. 

@Mustang65 / @mwester, we have to find a better way of locating Polisy. mDNS is probably the best option in the long run. Most OSs support them in a variety of non interoperable ways but they are converging.

@DaveStLou, had you configured anything in Polisy before?

With kind regards,
Michel

 

Link to comment
Share on other sites

3 hours ago, Michel Kohanim said:

 

@DaveStLou, had you configured anything in Polisy before?

No. I had logged in earlier in the week but hadn't configured anything due of lack of time. I remember going to the screen to configure what I thought was the ISY password but didn't change anything as far as I know.

Link to comment
Share on other sites

On 10/31/2019 at 6:35 AM, MWareman said:

A new log should be created each day - and the UI should default to streaming only the days log. Prior days should be viewable - but not by default.

There should also be an option to delete logs older than a certain number of days automatically. Maybe default it to 14.

It's easy enough to install and setup logrotate when we have root. However - without root users are in for a poor experience after the system has been running for more than a few weeks.

FWIW - I have 150M in my Polyglot log after 6½ days. 

Link to comment
Share on other sites

With great thanks to @xKing I can now install Node Servers from the Node Server Store :)

Partial Migration Process Solved:

In some cases (e.g. Presence-Poly) node servers will not currently run on the new Polisy hardware. When you use the Backup / Restore method to migrate to Polisy, all of your node servers are copied to Polisy. To keep the unsupported node servers running, you can leave them on your old RPi. The problem is that, after the migration both RPI and Polisy think they are each running all of your node servers as "Connected" devices. I discovered that unfortunately each Polyglot still  has some control over ISY.

I don't know if having both Polisy and RPi running with the same node servers will cause a problem. To be safe, I thought to just try to delete the now-migrated and running node servers from my RPi. This turned out to be a very  BAD MOVE as this deleted the nodes in ISY. ?

Correct Procedure for Partial Migration:

1. Perform Backup of your Polyglot settings from your RPi Polyglot

2. Restore these settings on your new Polisy Polyglot

3. On ISY, in Node Servers / Configure section, check each slot entry to ensure each slot has the correct IP and port number which specifies which Polyglot (Polisy or RPi) should be hosting the particular node server.

3a. If using the HarmonyHub NS, copy config.yaml and hubs.json from your RPi to Polisy

3b. If using LiFX NS, and using "devlist.yml" copy this from your RPi to Polisy

4. Open an ssh session on your RPi and remove any NS that you don't want running on your RPi by using this command:

       mongo polyglot --eval "db.nodeservers.remove({'name': 'NameofNodeServertoDelete'})"    <---Edit to have the actual name of the node server to delete from RPi

5. Restart Polyglot on the RPi

6. Open an ssh session on your Polisy and remove any NS that you don't want running on Polisy by using this command:

       mongo polyglot --eval "db.nodeservers.remove({'name': 'NameofNodeServertoDelete'})"    <---Edit to have the actual name of the node server to delete from Polisy

7. Restart Polyglot on the Polisy

8. Now, when you check your Polisy and RPi Polyglot Dashboard web pages, you should see the correct node servers connected to the appropriate hardware and "Unmanaged" on the other

Link to comment
Share on other sites

2 hours ago, Bumbershoot said:

FWIW - I have 150M in my Polyglot log after 6½ days. 

Here is mine:

[admin@polisy ~]$ ls -la /var/polyglot/log
total 63667
drwxr-xr-x  2 polyglot  polyglot         3 Oct 23 18:13 .
drwxr-xr-x  9 polyglot  polyglot        12 Oct 31 04:51 ..
-rw-r--r--  1 polyglot  polyglot  65053805 Nov  3 10:45 debug.log

Mine is a bit quieter than yours I guess - but it still takes a long time to stream to the browser. This really should be rotated out daily and the log rotation mechanism configured to remove old files after some period of time.

Link to comment
Share on other sites

1 minute ago, MWareman said:

This really should be rotated out daily and the log rotation mechanism configured to remove old files after some period of time.

I set up logrotate on my RPi, and was pleased.  Polyglot, I believe prior to the version 2 series, used to rotate its logs.  Somewhere along the line, it didn't.  I understood that this was to be re-implemented at some point, but I haven't seen it happen yet.

Link to comment
Share on other sites

Sun Poly seems to error on a timezone related issue.

I suspect a difference between Linux and FreeBSD and the Poly auther may need to fix this one...

2019-11-03 10:55:28,672 [NodeServer] [ERROR] Exception in thread NodeServer:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "./sun-poly.py", line 30, in start
    self.tz = get_localzone()
  File "/var/polyglot/.local/lib/python3.7/site-packages/tzlocal/unix.py", line 165, in get_localzone
    _cache_tz = _get_localzone()
  File "/var/polyglot/.local/lib/python3.7/site-packages/tzlocal/unix.py", line 90, in _get_localzone
    utils.assert_tz_offset(tz)
  File "/var/polyglot/.local/lib/python3.7/site-packages/tzlocal/utils.py", line 38, in assert_tz_offset
    raise ValueError(msg)
ValueError: Timezone offset does not match system offset: -28800 != -21600. Please, check your config files.

 

Link to comment
Share on other sites

Hi

After the latest update and restarting Polisy I noticed that the Tesla node server logged every action twice. Before restarting the Tesla node server the horn button would blow the horn twice for example. After restart of the Tesla node server the horn button would then blow the horn once but still logged as doing it twice.

Example

2019-11-03 09:56:04 info: NS: Starting Tesla Node Server
2019-11-03 09:56:04 info: NS: Starting Tesla Node Server
2019-11-03 09:56:04 info: POLY: Interface starting
2019-11-03 09:56:04 info: POLY: Interface starting
2019-11-03 09:56:04 info: POLY: Waiting for stdin
2019-11-03 09:56:04 info: POLY: Waiting for stdin
2019-11-03 09:56:04 debug: POLY: Log file set to: logs/debug-2019-11-03.log
2019-11-03 09:56:04 debug: POLY: Log file set to: logs/debug-2019-11-03.log
2019-11-03 09:56:05 info: POLY: MQTT client connected
2019-11-03 09:56:05 info: POLY: MQTT client connected
2019-11-03 09:56:05 info: NS: MQTT Connection started
2019-11-03 09:56:05 info: NS: MQTT Connection started
2019-11-03 09:56:05 warn: POLY: Message config ignored: Shutting down nodeserver
2019-11-03 09:56:05 warn: POLY: Message config ignored: Shutting down nodeserver
2019-11-03 09:56:06 info: NS: Config received has 2 nodes
2019-11-03 09:56:06 info: NS: Config received has 2 nodes
2019-11-03 09:56:06 info: NS: Running nodeserver on-premises
2019-11-03 09:56:06 info: NS: Running nodeserver on-premises
2019-11-03 09:56:06 warn: POLY: Message config ignored: Shutting down nodeserver
2019-11-03 09:56:06 warn: POLY: Message config ignored: Shutting down nodeserver
2019-11-03 09:56:06 info: NS: Config received has 2 nodes
2019-11-03 09:56:06 info: NS: Config received has 2 nodes
2019-11-03 09:56:27 warn: POLY: Message command ignored: Shutting down nodeserver
2019-11-03 09:56:27 warn: POLY: Message command ignored: Shutting down nodeserver
2019-11-03 09:56:27 info: NS: HORN (226851899)
2019-11-03 09:56:27 info: NS: HORN (226851899)
2019-11-03 09:56:27 info: NS: Tesla API: /api/1/vehicles/7806862550326485/command/honk_horn
2019-11-03 09:56:27 info: NS: Tesla API: /api/1/vehicles/7806862550326485/command/honk_horn
2019-11-03 09:56:27 info: NS: Reusing existing tokens
2019-11-03 09:56:27 info: NS: Reusing existing tokens
2019-11-03 09:56:47 warn: POLY: Message command ignored: Shutting down nodeserver
2019-11-03 09:56:47 warn: POLY: Message command ignored: Shutting down nodeserver
2019-11-03 09:56:47 info: NS: HORN (226851899)
2019-11-03 09:56:47 info: NS: HORN (226851899)
2019-11-03 09:56:47 info: NS: Tesla API: /api/1/vehicles/7806862550326485/command/honk_horn
2019-11-03 09:56:47 info: NS: Tesla API: /api/1/vehicles/7806862550326485/command/honk_horn
 
After power resetting the Polisy all is normal again.
Thanks Gary
Link to comment
Share on other sites

Hello everyone,

Thanks so very very much for your continued feedback.

@gviliunas, thanks so very much for detailed migration instructions. This should be fixed soon.
@MWareman, we'll figure out what the issue is with log rotate. Timezone is going to be fixed soon.
@garybixler , are you certain that this node server is not running on more than Polisy?

With kind regards,
Michel

Link to comment
Share on other sites

polyglot 1077   0.6  3.3 731296 138344  -  S    10:07     8:11.18 /usr/local/bi
polyglot 1076   0.0  0.1  10768   2184  -  Is   10:07     0:00.00 daemon: /usr/
polyglot 1202   0.0  0.7  45716  27396  -  Is   10:07     0:41.73 python3 ./wll
polyglot 1203   0.0  0.7  51520  31084  -  Is   10:07     0:38.69 python3 ./wir
polyglot 1204   0.0  1.8 308412  74484  -  Is   10:07     0:14.75 node ./nodese
admin    1740   0.0  0.1  11248   2696  0  S+   12:47     0:00.01 grep poly
 

Link to comment
Share on other sites

10 hours ago, DaveStLou said:

No. I had logged in earlier in the week but hadn't configured anything due of lack of time. I remember going to the screen to configure what I thought was the ISY password but didn't change anything as far as I know.

@Michel Kohanim Since I have nothing configured on Polisy, is there a way to reset the password (or all Polyglot) back to default? I'm not able to do anything at this point.

Thank you.

Link to comment
Share on other sites

6 hours ago, Michel Kohanim said:

@DaveStLou,

If you have no node servers installed, the best thing would be to drop the DB:

mongo polyglot --eval "db.dropDatabase()"

With kind regards,

Michel

@Michel Kohanim

Thank you. That must have cleared the default user too. I'm now getting "User not found" for admin.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      36.8k
    • Total Posts
      369.9k
×
×
  • Create New...