Nice, you can more and more bend the plugin to your needs
-
@bertreb
Hi, today found the time to check with your new files, but run into trouble while compiling them.
It always stucks at ‘pimatic-raspbee’ and got the message: 'missing / (unclosed regex)'
This happens with all three files. Copying the old ones back it works again. (but surely as in November, only getting the status from the cover switch to pimatic and not the other way round).
So do you have a tip on the error message as with it, the raspbee plugin doen’t start at allcheers
Pedder -
Hi, which 3 files did you use? because you need to update 7 files (for all the changes of the pull request)
The precise number of files is a bit depending on the changes you want to use
And is there more debug? (line number, etc) -
The ones you mentioned below (sorry, I know this thread meanwhile really is lengthy)
It was in the part about the ikea shutter/curtain control and you may remember, that we made some tests with my Tuya/Heimann (SM-SW101-CZ)action.coffee
device-config-schema.coffee
raspbee.coffee
(from your fork on github)After exchanging them, I used ‘sudo node_modules/pimatic/pimatic.js’, as you also explained.
In this situation, then the message always came up in dark red color. -
Just for the actual total picture, you need to update the following 6 files:
- action.coffee
- raspbee.coffee
- device-config-schema.coffee
- raspbee-connector.coffee
- app/raspbee-template.coffee
- app/raspbee-template.jade
Stop pimatic: sudo service pimatic stop
Start pimatic: sudo node_modules/pimatic/pimatic.js -
OK, that I might have missed somewhere.
Will check in the next minutes … -
Got this now while starting:
pi@raspberrypi:~/pimatic-app $ sudo node_modules/pimatic/pimatic.js 21:01:57.225 2021-02-14 Sunday 21:02:01.104 [pimatic] Starting pimatic version 0.9.54 21:02:01.110 [pimatic] Node.js version 10.22.1 21:02:01.112 [pimatic] OpenSSL version 1.1.1g 21:02:02.918 [pimatic, ppm] 2.15.12 21:02:02.948 [pimatic] Loading plugin: "pimatic-cron" (0.8.8) 21:02:03.470 [pimatic] Loading plugin: "pimatic-mobile-frontend" (0.9.16) 21:02:04.072 [pimatic] Loading plugin: "pimatic-raspbee" (0.1.7) 21:02:04.345 [pimatic] Cannot find module './color' 21:02:04.351 [pimatic-cron] the time is: Sun Feb 14 2021 21:02:04 GMT+0100 (GMT+01:00) 21:02:04.623 [pimatic] New device "Dummi"... 21:02:04.661 [pimatic] New device "Test50"... 21:02:04.672 [pimatic] No plugin found for device "raspbee_l637102a6f48a265fee0a90459e4046533" of class "RaspBeeCover"! 21:02:04.997 [pimatic] Could not parse rule "when Test50 is turned on then set raspbee raspbee_l637102a6f48a265fee0a90459e4046533 to 100": Could not find an provider that provides the next action of "set raspbee raspbee_l637102a6f48a265fee0a90459e4046533 to 100". 21:02:04.999 [pimatic] Could not parse rule "when Test50 is turned off then set raspbee raspbee_l637102a6f48a265fee0a90459e4046533 to 0": Could not find an provider that provides the next action of "set raspbee raspbee_l637102a6f48a265fee0a90459e4046533 to 0". 21:02:05.158 [pimatic-mobile-frontend] packing static assets 21:02:05.529 [pimatic-mobile-frontend] packing static assets finished 21:02:05.535 [pimatic-mobile-frontend] rendering html 21:02:10.670 [pimatic-mobile-frontend] rendering html finished 21:02:10.719 [pimatic] Could not listen on port 80. Error: listen EADDRINUSE: address already in use :::80. Is a server already running? 21:02:10.733 [pimatic] exiting...
In addition:
Did a reboot, Pimatic came up now, but without the raspbee plugin, allthough it is enabled in the config.
The logfile contains the same as above:
21:13:00.788 [pimatic] info: Loading plugin: “pimatic-raspbee” (0.1.7)
21:13:01.042 [pimatic] error: Cannot find module ‘./color’ -
The file color.coffee is missing.
Its not something that has changed, but copy also that file to the directory.
Make sure that also files package.json and raspbee-config-schema.coffee are in the directory.
These files also didn’t change, thats why i didn’t mentioned it. -
you’re right, I wrongly renamed it to …_bak
No starting again by ‘sudo node_modules/pimatic/pimatic.js’again leads to the problem earlier the evening:
21:23:06.812 [pimatic] Loading plugin: “pimatic-raspbee” (0.1.7)
coffee-cache: compiling coffee-script file “raspbee-connector.coffee”…21:23:07.009 [pimatic] missing / (unclosed regex)starting continues then, but after connectiing via browser when requested it seems stcking after:
21:23:24.605 [pimatic-mobile-frontend] rendering theme: graphite/water
21:23:27.323 [pimatic-mobile-frontend] rendering theme finishedfrom here on now ~5 minutes nothing happens …
Stopping it with CTRL-C and then starting the pimatic service again, starts it again without raspbee …
-
@bertreb said in Release pimatic-raspbee@0.1.6:
.js
did it, restarted again by: sudo node_modules/pimatic/pimatic.js
but result stays with:
21:40:15.581 [pimatic] Loading plugin: “pimatic-raspbee” (0.1.7)
coffee-cache: compiling coffee-script file “raspbee.coffee”…21:40:15.703 [pimatic] missing / (unclosed regex) -
Are the files not corrupted, due to the copying?
Some check question:- Is for example raspbee.coffee readable?
- what is your node version
- is there a node_modules directory in pimatic-raspbee directory
-
yes, files/directories are all there and readable.
When using again my three old files (we developed in November), everything works. I tested that earlier die evening.Node vers is: v10.22.1
And I didn’t change anything besides these (6) files since November, as it is a pure test system, for which I didn’t find any time the last months.
Let me check again using the old 6 files to be 100% sure …
-
an additonal observance:
starting renaming the files I recognized, that the size of the new ones is tremendously larger then the old ones:
e. g. action.coffee
old: ~17KiB => the current: 274KiB
that seems similiar with all of them, also those in the ‘app’ directory -
downloaded them by right-click on my Win10 PC and then copied them to the Raspi via Remote Desktop
… I thought I did it the same way last year …??? -
action.coffee ~17k now ~274k
device-config-schema.coffee ~8k now ~208k
raspbee.coffee ~59k now ~121k now ~121k
raspbee-connector.coffee ~10k now ~223k
/app:
raspbee-template.coffee ~9k now ~206k
raspbee-template.jade ~6k now ~145kand looking into them, they look (in mimimum in the top) content wise completely other…
Something must have gone wrong here … -
I think you found the problem.
Do you have samba running on your pimatic system?
If so you can mount a network drive on your windows system, and copy files that way.
Check the files also first on your windows system. -
no, not to my knowledge …
How to check?
‘service samba status’ ? - already did an got: Unit samba.service could not be found.the files on my PC are all about the larges sizes, so the problem must already have occured while downloading fron github