Jump to content

Configuration Help not showing in Polyglot


kevbo

Recommended Posts

Hi,

I am wondering if someone could help me understand the configuration part of this node?  As described in the documentation, there should be a configuration help that shows up in polyglot <ELK> configuration tab.  This doesn't show up.  I have looked at the install directory on the Pi, and tried to add what I thought, but I must have done it wrong.

I mapped 

key                                Value          

areas                               1-2

host                                 192.168.x.x:2601

outputs                            1-30

temperature_unit             C

 

 

 

When I start ELK it says this:

2022-01-05 11:07:49,421 MainThread polyinterface      INFO     __init__:<module>: UDI Polyglot v2 Interface 2.1.0 Starting...
2022-01-05 11:07:49,433 MainThread polyinterface      ERROR    polyinterface:write: Traceback (most recent call last):
2022-01-05 11:07:49,433 MainThread polyinterface      ERROR    polyinterface:write: File "./elk-poly.py", line 10, in <module>
2022-01-05 11:07:49,434 MainThread polyinterface      ERROR    polyinterface:write: from nodes import Controller
2022-01-05 11:07:49,434 MainThread polyinterface      ERROR    polyinterface:write: File "/home/pi/.polyglot/nodeservers/ELK/nodes/__init__.py", line 2, in <module>
2022-01-05 11:07:49,435 MainThread polyinterface      ERROR    polyinterface:write: from .BaseNode import BaseNode
2022-01-05 11:07:49,435 MainThread polyinterface      ERROR    polyinterface:write: File "/home/pi/.polyglot/nodeservers/ELK/nodes/BaseNode.py", line 15
2022-01-05 11:07:49,436 MainThread polyinterface      ERROR    polyinterface:write: self.lpfx = f'{self.address}:{self.name}:'
2022-01-05 11:07:49,436 MainThread polyinterface      ERROR    polyinterface:write: ^
2022-01-05 11:07:49,437 MainThread polyinterface      ERROR    polyinterface:write: SyntaxError
2022-01-05 11:07:49,437 MainThread polyinterface      ERROR    polyinterface:write: :
2022-01-05 11:07:49,437 MainThread polyinterface      ERROR    polyinterface:write: invalid syntax

Any help would be appreciated

Thanks

Kevin

Link to comment
Share on other sites

There should be a "Expand Configuration Help" button on the configuration page, but if that's not working then it is here:

https://github.com/jimboca/udi-poly-elk/blob/master/POLYGLOT_CONFIG.md

But looks like you configured it properly.  The error:

2022-01-05 11:07:49,436 MainThread polyinterface      ERROR    polyinterface:write: self.lpfx = f'{self.address}:{self.name}:'

Is happening because your python3 version is to old, it must be 3.6 or greater.  What are you running on?

 

 

Link to comment
Share on other sites

Thanks!

I did a

python --version and got Python 3.6.8

python3 --version and got Python 3.5.3

 

my guess is that its using the bottom version....do you know if I can point to the top?  I am worried that another custom app might break if I update the bottom one.

Link to comment
Share on other sites

Thanks

I went through the upgrade process to get to python 3.6.5  installed in a separate install, and then changed the alias to point to that.

sudo nano ~/.bashrc

alias python3='python3.6'

I do a version on both python and python3 and they both come back with 3.6.5

However, I still get the same error in polyglot.  Polyglot is at the latest version.

2022-01-05 21:39:51,443 MainThread polyinterface      ERROR    polyinterface:write: Traceback (most recent call last):
2022-01-05 21:39:51,444 MainThread polyinterface      ERROR    polyinterface:write: File "./elk-poly.py", line 10, in <module>
2022-01-05 21:39:51,445 MainThread polyinterface      ERROR    polyinterface:write: from nodes import Controller
2022-01-05 21:39:51,446 MainThread polyinterface      ERROR    polyinterface:write: File "/home/pi/.polyglot/nodeservers/ELK/nodes/__init__.py", line 2, in <module>
2022-01-05 21:39:51,448 MainThread polyinterface      ERROR    polyinterface:write: from .BaseNode import BaseNode
2022-01-05 21:39:51,449 MainThread polyinterface      ERROR    polyinterface:write: File "/home/pi/.polyglot/nodeservers/ELK/nodes/BaseNode.py", line 15
2022-01-05 21:39:51,450 MainThread polyinterface      ERROR    polyinterface:write: self.lpfx = f'{self.address}:{self.name}:'
2022-01-05 21:39:51,451 MainThread polyinterface      ERROR    polyinterface:write: ^
2022-01-05 21:39:51,452 MainThread polyinterface      ERROR    polyinterface:write: SyntaxError
2022-01-05 21:39:51,452 MainThread polyinterface      ERROR    polyinterface:write: :
2022-01-05 21:39:51,453 MainThread polyinterface      ERROR    polyinterface:write: invalid syntax

 

I then deleted the node, and uninstalled ELK.  Re did the install and config.  Restarted and same.

I checked my other app running python and its using the new 3 and working... weird.

 

Link to comment
Share on other sites

I've tried to look in the PG2 code to see how it runs python, but couldn't find it, and the author of PG2 is no longer around so I couldn't ask.  But I revived my RPi and can see that it just runs: /usr/bin/env python3

So you can try:  /usr/bin/env python3 -V

To see what version that is?  Mine was 3.7.3

 

 

Link to comment
Share on other sites

PG2 (and PG3) just use whatever python3 is pointed to by the user's path. In this case it's the user 'polyglot'.  So it could be different from what the admin user's path points to.  In general, I would expect it to use whatever shows up when you do a 'which python3' assuming you haven't created aliases to point it at a specific version.

Link to comment
Share on other sites

Thanks everyone for your help, based on your comments, I think even though it appeared to be correct...there was some config somewhere that was pointing somewhere else.

When in doubt...redo from the ground up.  

Reinstalled Buster

Everything worked magically.  The ELK auto did its thing.. and there was even a configuration help section. 

I dunno....Poly was running before fine....but who the heck knows....

Thanks again.

 

Link to comment
Share on other sites

Archived

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


×
×
  • Create New...