Troubleshooting doc

This commit is contained in:
sam 2020-09-30 12:05:04 +02:00
parent 490dfb1af1
commit e44d1d58c7
8 changed files with 50 additions and 248 deletions

32
LJ.conf
View File

@ -1,5 +1,5 @@
[General]
lasernumber = 2
lasernumber = 4
debug = 0
ljayserverip = 0.0.0.0
wwwip = 192.168.2.43
@ -10,10 +10,10 @@ autostart = artnet
[laser0]
color = -1
type = DS1000
ip = 192.168.2.4
ip = 192.168.2.44
kpps = 25000
centerx = 0
centery = 765
centery = 0
zoomx = 45.0
zoomy = 45.0
sizex = 32000
@ -32,8 +32,8 @@ color = -1
type = LOCAL
ip = 192.168.2.43
kpps = 25000
centerx = -11970
centery = -6510
centerx = 0
centery = 0
zoomx = 30.0
zoomy = 30.0
sizex = 32000
@ -54,23 +54,23 @@ ip = 192.168.2.6
kpps = 25000
centerx = 0
centery = 0
zoomx = 45.0
zoomy = 45.0
sizex = 30600
zoomx = 85.0
zoomy = 85.0
sizex = 32000
sizey = 32000
finangle = -4.0
finangle = 0.0
swapx = -1
swapy = -1
lsteps = [(1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]
warpdest = [[-1500., 1500.],
[ 1500., 1500.],
[ 1500.,-1500.],
[-1500.,-1500.]]
[ 1500., 1500.],
[ 1500.,-1500.],
[-1500.,-1500.]]
[laser3]
color = -1
type = LUKE400
ip = 192.168.2.3
ip = 192.168.2.4
kpps = 25000
centerx = 0
centery = 0
@ -83,9 +83,9 @@ swapx = -1
swapy = -1
lsteps = [(1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]
warpdest = [[-1500., 1500.],
[ 1500., 1500.],
[ 1500.,-1500.],
[-1500.,-1500.]]
[ 1500., 1500.],
[ 1500.,-1500.],
[-1500.,-1500.]]
[plugins]
plugins = {

View File

@ -56,9 +56,9 @@ centerx = 0
centery = 0
zoomx = 45.0
zoomy = 45.0
sizex = 30600
sizex = 32000
sizey = 32000
finangle = -4.0
finangle = 0.0
swapx = -1
swapy = -1
lsteps = [(1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]

View File

@ -377,6 +377,30 @@ Generic :
There is a nice websocket debug tool : websocat.
#
# Troubleshooting
#
Try these steps in this order ;
- Use talk3 in ethertools directory : this ensure your computer can connect to the etherdream. See ethertools chapter in this readme. If talk3 doesn't works, check the hardware, connections,...
python3 talk3.py -i etherdreamIP
- You should see "connected to yourLJserverIP" on webUI. If not : LJ is not started / your network configuration is bad / a wrong IP in the configure parameters : python3 configure.py.
- Switch to simu page. If you don't see anything : check redis server or your points in redis doesn't respect pointlist formatting (see command reference).
- If talk3 works but you don't see your points : click on the Grid icon in Align page. This will override your pointlist and display squares. If Grid works : recomputed points by tracers are bad with given values in LJ.conf.
"Bad points" ?
- too small movement : some lasers (with small angle like 40°) won't display anything if zoomx/zoomy are too small. Increase zoomx / zoomy in LJ.conf. Try 50-100 values.
- off center : check in LJ.conf centerX and centerY. Reset them to 0.
- not enough points.
*Don't kill your scanners : becareful with kpps setting.*
#
# LJ commands reference
#

View File

@ -1,149 +0,0 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# -*- mode: Python -*-
'''
redilysis
v0.1.0
A complex effect that depends on redis keys for audio analysis
see https://git.interhacker.space/teamlase/redilysis for more informations
about the redilysis project
LICENCE : CC
by cocoa
'''
from __future__ import print_function
import argparse
import ast
import os
import math
import random
import redis
import sys
import time
name = "filters::redilysis"
def debug(*args, **kwargs):
if( verbose == False ):
return
print(*args, file=sys.stderr, **kwargs)
def now():
return time.time() * 1000
# The list of available modes and the redis keys they need
oModeList = {
"rms_noise": ["rms"],
"rms_bounce": ["rms"]
}
CHAOS = 1
REDIS_FREQ = 300
# General Args
argsparser = argparse.ArgumentParser(description="Redilysis filter")
argsparser.add_argument("-v","--verbose",action="store_true",help="Verbose")
# Redis Args
argsparser.add_argument("-i","--ip",help="IP address of the Redis server ",default="127.0.0.1",type=str)
argsparser.add_argument("-p","--port",help="Port of the Redis server ",default="6379",type=str)
argsparser.add_argument("-s","--redis-freq",help="Query Redis every x (in milliseconds). Default:{}".format(REDIS_FREQ),default=REDIS_FREQ,type=int)
# General args
argsparser.add_argument("-x","--centerX",help="geometrical center X position",default=300,type=int)
argsparser.add_argument("-y","--centerY",help="geometrical center Y position",default=300,type=int)
argsparser.add_argument("-f","--fps",help="Frame Per Second",default=30,type=int)
# Modes And Common Modes Parameters
argsparser.add_argument("-m","--modelist",required=True,help="Comma separated list of modes to use from: {}".format("i, ".join(oModeList.keys())),type=str)
argsparser.add_argument("--chaos",help="How much disorder to bring. High value = More chaos. Default {}".format(CHAOS), default=CHAOS, type=str)
args = argsparser.parse_args()
ip = args.ip
port = args.port
redisFreq = args.redis_freq
verbose = args.verbose
fps = args.fps
centerX = args.centerX
centerY = args.centerY
chaos = float(args.chaos)
optimal_looptime = 1 / fps
modeList = args.modelist.split(",")
redisKeys = []
for mode in modeList:
if not mode in oModeList:
print("Mode '{}' is invalid. Exiting.".format(mode))
sys.exit(2)
redisKeys += oModeList[mode]
redisKeys = list(set(redisKeys))
debug(name,"Redis Keys:{}".format(redisKeys))
redisData = {}
redisLastHit = now() - redisFreq
r = redis.Redis(
host=ip,
port=port)
def rms_bounce( pl ):
rms = float(redisData["rms"])
for i, point in enumerate(pl):
#debug(name,"rms_noise chaos:{} rms:{}".format(chaos, rms))
angle=math.atan2(point[0],point[1])
l = point[1] / math.cos(angle)
new_l = l + rms * chaos
new_x = math.sin(angle) * new_l
new_y = math.cos(angle) * new_l
debug(name,"x,y:({},{}) x',y':({},{})".format(point[0],point[1],new_x,new_y))
pl[i][0] += new_x
pl[i][1] += new_y
#debug( name,"rms_noise output:{}".format(pl))
return pl
def rms_noise( pl ):
rms = float(redisData["rms"])
for i, point in enumerate(pl):
#debug(name,"rms_noise chaos:{} rms:{}".format(chaos, rms))
xRandom = random.uniform(-1,1) * rms * chaos
yRandom = random.uniform(-1,1) * rms * chaos
#debug(name,"rms_noise xRandom:{} yRandom:{}".format(xRandom, yRandom))
pl[i][0] += xRandom
pl[i][1] += yRandom
#debug( name,"rms_noise output:{}".format(pl))
return pl
def updateRedis():
global redisLastHit
global redisData
for key in redisKeys:
redisData[key] = r.get(key).decode('ascii')
debug("name","updateRedis key:{} value:{}".format(key,redisData[key]))
if key == 'bpm':
redisData['bpm_ttl'] = r.pttl(key)
debug(name,"redisData:{}".format(redisData))
try:
while True:
# it is time to query redis
if now() - redisLastHit > redisFreq:
updateRedis()
start = time.time()
line = sys.stdin.readline()
if line == "":
time.sleep(0.01)
line = line.rstrip('\n')
pointsList = ast.literal_eval(line)
# Do the filter
for mode in modeList:
pointsList = locals()[mode](pointsList)
print( pointsList, flush=True )
looptime = time.time() - start
# debug(name+" looptime:"+str(looptime))
if( looptime < optimal_looptime ):
time.sleep( optimal_looptime - looptime)
# debug(name+" micro sleep:"+str( optimal_looptime - looptime))
except EOFError:
debug(name+" break")# no more information

View File

@ -1,74 +0,0 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# -*- mode: Python -*-
'''
This generator reads a frame from redis
v0.1.0
Use it to create feedback loops by writing to the same frame
or to copy the frame from someone else
LICENCE : CC
by cocoa
'''
from __future__ import print_function
import ast
import argparse
import json
import redis
import sys
import time
name="generator::fromRedis"
def debug(*args, **kwargs):
if( verbose == False ):
return
print(*args, file=sys.stderr, **kwargs)
argsparser = argparse.ArgumentParser(description="Dummy generator")
argsparser.add_argument("-k","--key",required=True,help="Redis key to look after",default=30,type=str)
argsparser.add_argument("-i","--ip",help="IP address of the Redis server ",default="127.0.0.1",type=str)
argsparser.add_argument("-p","--port",help="Port of the Redis server ",default="6379",type=str)
argsparser.add_argument("-f","--fps",help="Frame Per Second",default=30,type=int)
argsparser.add_argument("-v","--verbose",action="store_true",help="Verbose output")
args = argsparser.parse_args()
fps = args.fps
verbose = args.verbose
key = args.key
ip = args.ip
port = args.port
optimal_looptime = 1 / fps
debug(name+" optimal looptime "+str(optimal_looptime))
r = redis.Redis(
host=ip,
port=port)
while True:
start = time.time()
# Read from Redis
line = r.get(key)
# Decode as list of tuples
pointsList = ast.literal_eval(line.decode('ascii'))
# convert to list of lists
pointsList = [list(elem) for elem in pointsList]
# Convert to JSON string
line = json.dumps( pointsList )
debug(name,"Key:{} line:{}".format(key,line))
# Output
print(line, flush=True);
looptime = time.time() - start
if( looptime < optimal_looptime ):
time.sleep( optimal_looptime - looptime)
debug(name+" micro sleep:"+str( optimal_looptime - looptime))

View File

@ -15,7 +15,7 @@ from /team/laser
from libs3 import gstt
import argparse
import subprocess
from libs3 import settings
from libs3 import settings as Settings
def handle():

View File

@ -333,7 +333,7 @@ def handler(oscpath, args):
print()
print("new laser number",args[0])
print()
gstt.LaserNumber = args[0]
gstt.LaserNumber = int(args[0])
settings.Write()
@ -597,16 +597,16 @@ def LJautokill():
log.warn("LJ stopping...")
print(gstt.LaserNumber,"Tracers launched")
lasernumber= gstt.LaserNumber -1
log.warn("Killing tracer0...")
log.warn("Ending tracer0...")
worker0.join()
if lasernumber >0:
log.warn("Killing tracer1...")
log.warn("Ending tracer1...")
worker1.join()
if lasernumber >1:
log.warn("Killing tracer2...")
log.warn("Ending tracer2...")
worker2.join()
if lasernumber >2:
log.warn("Killing tracer3...")
log.warn("Ending tracer3...")
worker3.join()
log.warn("Laser feedbacks resetting...")

View File

@ -526,7 +526,8 @@ class DAC(object):
# print("Writing %d points" % (cap, ))
#t0 = time.time()
#print points
#if self.mylaser == 2:
# print(points)
self.write(points)
#t1 = time.time()
# print("Took %f" % (t1 - t0, )