now after restart i got a lot off errors
i did copy paste and deleted the commented lines
Release pimatic-raspbee@0.1.6
now after restart i got a lot off errors
i did copy paste and deleted the commented lines
sorry I made a misstake in the raspbee.coffee file i compared the file with your’s there was one other line missing in the original file and that was
template: "raspbee-switch"
on line 905
after inserting this line everything is working with you’r template files
why this line was missing I don’t know it was the original file downloaded after deleting the whole directory so I think there must be a fault in the original file too
The only thing still is that even if the plug is offline i can switch on and off without error wich if i do that with a light i will get an error
In the file raspbee.coffee in my pimatic-raspbee repos on GitHub this line isn’t missing, so I don’t know what went wrong, but the result counts!
The error message is triggered from deconz, based on the Deconz reachable state of the device. Not much you can do about that.
@bertreb I realy want to thank you for helping me out
I found i think what te reason is that there is no error when pressing the on/off button if the smart-plug is offline
in raspbee.coffee in the raspbee-dimmer section there is a line
else Promise.reject(Error("general error"))
as you can see here
_sendState: (param) ->
if (myRaspBeePlugin.ready)
myRaspBeePlugin.Connector.setLightState(@deviceID,param).then( (res) =>
env.logger.debug ("New value send to device #{@name}")
env.logger.debug (param)
if res[0].success?
return Promise.resolve()
else
if (res[0].error.type is 3 )
@_setPresence(false)
return Promise.reject(Error("device #{@name} not reachable"))
else if (res[0].error.type is 201 )
return Promise.reject(Error("device #{@name} is not modifiable. Device is set to off"))
else Promise.reject(Error("general error"))
).catch( (error) =>
return Promise.reject(error)
)
else
env.logger.error ("gateway not online")
return Promise.reject(Error("gateway not online"))
but this line is not in the switch section
_sendState: (param) ->
if (myRaspBeePlugin.ready)
myRaspBeePlugin.Connector.setLightState(@deviceID,param).then( (res) =>
env.logger.debug ("New value send to device #{@name}")
env.logger.debug (param)
if res[0].success?
return Promise.resolve()
else
if (res[0].error.type is 3 )
@_setPresence(false)
return Promise.reject(Error("device #{@name} not reachable"))
else if (res[0].error.type is 201 )
return Promise.reject(Error("device #{@name} is not modifiable. Device is set to off"))
).catch( (error) =>
return Promise.reject(error)
)
else
env.logger.error("gateway not online")
return Promise.reject(Error("gateway not online"))
if i put the text in on line 973 it works like expected after pressing on or off when not online i get the general error witch tells me your device is not there
@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 all
cheers
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:
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 finished
from 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:
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 …