Search found 33 matches

by Droll
Saturday 07 December 2024 20:58
Forum: Z-Wave
Topic: Help/addvice setting up Domoticz/Zwave-JS-UI on linux
Replies: 2
Views: 131

Re: Help/addvice setting up Domoticz/Zwave-JS-UI on linux

Nothing helped..
Started with a new (upgraded) USB stick, resetting every Z-wave device, and including in the new controller.
Was an Aeotec USB Z-Stick 5, could read it, not upgrade it, since I couldn’t upgrade , I couldn’t transfer it to a new stick...
Still some left to include..


Arne Kjetil
by Droll
Sunday 24 November 2024 13:39
Forum: Z-Wave
Topic: Help/addvice setting up Domoticz/Zwave-JS-UI on linux
Replies: 2
Views: 131

Help/addvice setting up Domoticz/Zwave-JS-UI on linux

Have been putting the update on the Z-Wave on hold, but faith stroke.. Hard disk failure, can't be read on seen, got a backup of Domoticz.. Ok, new disk, installed ubuntu, MTTQ broker, Z-Wave JS UI.. I can see my devices in Z-Wave JS UI, but it's on interview state now for some days, only 4/70 ...
by Droll
Saturday 16 November 2024 14:55
Forum: Blockly
Topic: Blockly scripts display distorted
Replies: 12
Views: 1170

Re: Blockly scripts display distorted

Just to inform, got the same on my Domoticz, havent used THIS blocky in years... It's not on all, just some.. Skjermbilde 2024-11-16 144156.png Win 11,Firefox 132.0.2 Older Linux Ubuntu, Ubuntu 20.04.6 LTS (GNU/Linux 5.4.0-200-generic x86_64) Version: 2024.7 (build 16325), not newest because of Z ...
by Droll
Tuesday 29 October 2024 17:55
Forum: LUA
Topic: Need Lua help here, no programer
Replies: 6
Views: 552

Re: Need Lua help here, no programer

Started with some ideas, roughly put together, mostly wrong code... Got some experience with Basic (Bascom), Lua (Domoticz) and basic Excel. But nothing advance...n Will let it run for some time, find some bugs :lol:, and eventually put together some hardware commandArray = {} local MaxUse ...
by Droll
Monday 28 October 2024 23:48
Forum: LUA
Topic: Need Lua help here, no programer
Replies: 6
Views: 552

Re: Need Lua help here, no programer

Got something I think will work, probably not the prettyest, but it does do the simple task I want it to do... Still some bug in the programming.... local virtualMeterValue = otherdevices_svalues['AMS strom forbruk'] local extractedValue = tonumber(string.match(virtualMeterValue or "", "%d+%.?%d ...
by Droll
Sunday 27 October 2024 19:31
Forum: LUA
Topic: Need Lua help here, no programer
Replies: 6
Views: 552

Re: Need Lua help here, no programer

There is something in the line below. local AMS_strom_forbruk = (string.match(uservariables['AMS strøm forbruk'], "%d+%.?%d*")) -- extract and convert to number 1691 2024-10-27 18:43:37 AMS strom forbruk 3796.0;73721888 0/3796.0;73721888 I want the 3796,0 part, in number. But it's somewhat a ...
by Droll
Sunday 27 October 2024 17:33
Forum: LUA
Topic: Need Lua help here, no programer
Replies: 6
Views: 552

Re: Need Lua help here, no programer

First.. I have never used a MS browser, ecept to install another.. But it gave me a working code, sort of Need to figure out what the output there is on "local AMS_strom_forbruk", it's a textdevice updated from MQTT from a HAN plug on my meter.. https://www.amsleser.no/ -- script_device_text.lua ...
by Droll
Sunday 27 October 2024 13:47
Forum: LUA
Topic: Need Lua help here, no programer
Replies: 6
Views: 552

Need Lua help here, no programer

Got some ideas, but I don't know if it work, or if there is a better way.. Not new to Domoticz, but scrips are not my language :? . Running linux, on a Pc, Ubuntu, SSD harddrive. About Domoticz Version: 2024.7 (build 16297) Build Hash: 85e28226f Compile Date: 2024-10-26 09:19:44 dzVents Version: 3.1 ...
by Droll
Monday 27 December 2021 22:35
Forum: Other questions and discussions
Topic: USB memory stick with WIFI ?
Replies: 2
Views: 379

Re: USB memory stick with WIFI ?

Yes something like this one, but with read accessible on the wifi ALL the time. I got a couple of these, as a plan B, but it's limitation are that they have 2 modes Wifi mode USB memory stick mode In USB mode the wifi is disabled and vice versa... There has been something like this on the marked ...
by Droll
Saturday 25 December 2021 18:28
Forum: Other questions and discussions
Topic: USB memory stick with WIFI ?
Replies: 2
Views: 379

USB memory stick with WIFI ?

Are there any gizmo out there that can do what I want ??

A USB memory stick (fat 32 ), connected to a machine (Siemens pls...)
and at the same time readable from a computer over WIFI ( read only )

Is this possible ??
Finished product or DIY :-)

Arne Kjetil
by Droll
Tuesday 21 December 2021 21:32
Forum: Bash / PowerShell / Batch etc.
Topic: Simple batch script with text editing
Replies: 18
Views: 3400

Re: Simple batch script with text editing

with open('Flahlist0.txt','r', encoding="utf-16") as f: lines = f.readlines() data='' newline='' for line in lines: line=line.replace("." , ",") line=line.replace("\"","").split() if line: if line[0]=='FLASHVALUES_S/N': newline=line[3]+"; "+line[1]+" "+line[2] elif line[0].startswith('FLASHVALUES ...
by Droll
Tuesday 21 December 2021 21:18
Forum: Bash / PowerShell / Batch etc.
Topic: Simple batch script with text editing
Replies: 18
Views: 3400

Re: Simple batch script with text editing

siklosi wrote: Tuesday 21 December 2021 20:46 yes, just add for example line[0].replace("." , ",")
May I ask where :lol:, not very good with scrips


Arne Ketill
by Droll
Tuesday 21 December 2021 20:18
Forum: Bash / PowerShell / Batch etc.
Topic: Simple batch script with text editing
Replies: 18
Views: 3400

Re: Simple batch script with text editing

this is utf-16 text file and that is why it was not possible to parse it. with open('data2.txt','r', encoding="utf-16") as f: lines = f.readlines() data='' newline='' for line in lines: line=line.replace("\"","").split() if line: if line[0]=='FLASHVALUES_S/N': newline=line[1]+" "+line[2]+", "+line ...
by Droll
Tuesday 21 December 2021 18:06
Forum: Bash / PowerShell / Batch etc.
Topic: Simple batch script with text editing
Replies: 18
Views: 3400

Re: Simple batch script with text editing

Still no go, so have attached a sample of the file itself..

As for the missing part I figured out that part :D
newline=line[3]+", "+line[1]+" "+line[2]

data2.txt
(5.23 KiB) Downloaded 85 times

Arne Kjetil
by Droll
Tuesday 21 December 2021 10:07
Forum: Bash / PowerShell / Batch etc.
Topic: Simple batch script with text editing
Replies: 18
Views: 3400

Re: Simple batch script with text editing

"FLASHVALUES_S/N" "2021-10-25 09:57:32" 10500 1 44494414962.465279 "FLASHVALUES_S/N" TAB "2021-10-25 09:57:32" TAB 10500 TAB 1 TAB 44494414962.465279 10500 missing ... The original file uses tabs, not space... could this have something to do with the code ? with open('data.txt','r') as f: lines = f ...
by Droll
Tuesday 21 December 2021 7:35
Forum: Bash / PowerShell / Batch etc.
Topic: Simple batch script with text editing
Replies: 18
Views: 3400

Re: Simple batch script with text editing

Run the script in CMD or PowerShell like this: python.exe "C:\test\script.py" If you want to run in the Python shell window: exec(open('C:/test/script.py').read()) Still the same, somtimes it works, somtime it doesn't ... But when it works, it's almost good :-), just missing the most important ...
by Droll
Monday 20 December 2021 22:40
Forum: Bash / PowerShell / Batch etc.
Topic: Simple batch script with text editing
Replies: 18
Views: 3400

Re: Simple batch script with text editing

why don't you try putting script in same folder C:/test and using it without path... open('indata.txt') as f: backslash is escape character so when you need real backslash you have to use double like c:\\test\\indata.txt Everything are in the same folder... And for some reason it works, and in the ...
by Droll
Sunday 19 December 2021 22:31
Forum: Bash / PowerShell / Batch etc.
Topic: Simple batch script with text editing
Replies: 18
Views: 3400

Re: Simple batch script with text editing

user4563 wrote: Sunday 19 December 2021 22:14 I tried the python script @siklosi posted above and it gives you your comma delimited output you are looking for. In the script with python on windows with the path you have to use forward slashes ie

Code: Select all

C:/Path/Path/sample.txt
Well it doesn't work here, forward or backward \/ :-)
by Droll
Sunday 19 December 2021 21:33
Forum: Bash / PowerShell / Batch etc.
Topic: Simple batch script with text editing
Replies: 18
Views: 3400

Re: Simple batch script with text editing

user4563 wrote: Sunday 19 December 2021 19:22 Since you can only get the raw data in txt and it's not a uniform delimiter (quotes as well as tab here), you are going to have to parse through it. I found a script online so will this work?
**
Maybe, maybe it can be changed to be even more precise ?, what kind of script ?

Arne Kjetil
by Droll
Sunday 19 December 2021 21:30
Forum: Bash / PowerShell / Batch etc.
Topic: Simple batch script with text editing
Replies: 18
Views: 3400

Re: Simple batch script with text editing

siklosi wrote: Sunday 19 December 2021 19:20 Here is python3 script that should do the job.
***

save as script.py, put data in indata.txt and run with python3 script.py... you will get outdata.txt with formatted text
error.jpg
error.jpg (199.93 KiB) Viewed 2828 times
Not familiare with phyton, but gave it a try :-)