Nice, did you try 'set raspbee <device id> to …%'
And in an update of action.coffee i added 'dim raspbee… ’ for the cover device.
You need to download and update this file.
-
Release pimatic-raspbee@0.1.6
-
The “set raspbee small-kitchen-blind to 0%” works.
Very good, don’t know why I didn’t think of that word haha. Thanks yet again.
😀👍 -
Just tested. The old dim raspbee is also working again. Perfect 😀
-
@bertreb
Hi, saw this success here and remembered to our tries to integrate the China shutter,
What do you think, shall I give it a try to test it again with your newly developed files on GitHub?
Cheers Pedder -
OK, will need some days, going on vacation and will then hopefully find the time
-
Hi there,
sadly i can’t install raspbee - can someone help me out?
16:45:37.388 [pimatic] info: Loading plugin: "pimatic-hap" (0.13.0) 16:45:39.220 [pimatic] info: Installing: "pimatic-raspbee@0.1.7" from npm-registry. 16:45:43.130 [pimatic, ppm] info: WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 16:45:43.202 [pimatic, ppm] info: ERR! Linux 5.4.79-v7+ 16:45:43.207 [pimatic, ppm] info: ERR! argv "/usr/local/bin/node" "/home/pi/pimatic-app/node_modules/pimatic/ppm.js" "install" "pimatic-raspbee@0.1.7" "--unsafe-perm" 16:45:43.209 [pimatic, ppm] info: ERR! node v10.16.3 16:45:43.211 [pimatic, ppm] info: ERR! npm v2.15.12 16:45:43.212 [pimatic, ppm] info: ERR! file /home/pi/pimatic-app/.npm/cassert/0.1.2/package/package.json 16:45:43.214 [pimatic, ppm] info: ERR! code EJSONPARSE 16:45:43.226 [pimatic, ppm] info: ERR! Failed to parse json 16:45:43.228 [pimatic, ppm] info: ERR! No data, empty input at 1:1 16:45:43.230 [pimatic, ppm] info: ERR! 16:45:43.232 [pimatic, ppm] info: ERR! ^ 16:45:43.233 [pimatic, ppm] info: ERR! File: /home/pi/pimatic-app/.npm/cassert/0.1.2/package/package.json 16:45:43.235 [pimatic, ppm] info: ERR! Failed to parse package.json data. 16:45:43.237 [pimatic, ppm] info: ERR! package.json must be actual JSON, not just JavaScript. 16:45:43.239 [pimatic, ppm] info: ERR! 16:45:43.241 [pimatic, ppm] info: ERR! This is not a bug in npm. 16:45:43.243 [pimatic, ppm] info: ERR! Tell the package author to fix their package.json file. JSON.parse 16:45:43.311 [pimatic, ppm] info: ERR! Please include the following file with any support request: 16:45:43.317 [pimatic, ppm] info: ERR! /home/pi/pimatic-app/npm-debug.log 16:45:43.338 [pimatic] error: Error running "./node_modules/pimatic/ppm.js install pimatic-raspbee@0.1.7 --unsafe-perm" 16:45:43.340 [pimatic] debug: Error: Error running "./node_modules/pimatic/ppm.js install pimatic-raspbee@0.1.7 --unsafe-perm" 16:45:43.340 [pimatic] debug:> at ChildProcess.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic/lib/plugins.coffee:380:20) 16:45:43.340 [pimatic] debug:> at ChildProcess.emit (events.js:198:13) 16:45:43.340 [pimatic] debug:> at maybeClose (internal/child_process.js:982:16) 16:45:43.340 [pimatic] debug:> at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
And the NPM-LOG
404 verbose unlock done using /home/pi/pimatic-app/.npm/_locks/pimatic-raspbee-f3d0895394c1a513.lock for /home/pi/pimatic-app/node_modules/pimatic-raspbee 405 verbose stack Error: Failed to parse json 405 verbose stack No data, empty input at 1:1 405 verbose stack 405 verbose stack ^ 405 verbose stack at parseError (/home/pi/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/read-package-json/read-json.js:390:11) 405 verbose stack at parseJson (/home/pi/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/read-package-json/read-json.js:79:23) 405 verbose stack at /home/pi/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/read-package-json/read-json.js:48:5 405 verbose stack at /home/pi/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16 405 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3) 406 verbose cwd /home/pi/pimatic-app 407 error Linux 5.4.79-v7+ 408 error argv "/usr/local/bin/node" "/home/pi/pimatic-app/node_modules/pimatic/ppm.js" "install" "pimatic-raspbee@0.1.7" "--unsafe-perm" 409 error node v10.16.3 410 error npm v2.15.12 411 error file /home/pi/pimatic-app/.npm/ws/5.2.2/package/package.json 412 error code EJSONPARSE 413 error Failed to parse json 413 error No data, empty input at 1:1 413 error 413 error ^ 414 error File: /home/pi/pimatic-app/.npm/ws/5.2.2/package/package.json 415 error Failed to parse package.json data. 415 error package.json must be actual JSON, not just JavaScript. 415 error 415 error This is not a bug in npm. 415 error Tell the package author to fix their package.json file. JSON.parse 416 verbose exit [ 1, true ] 417 verbose unbuild node_modules/pimatic-raspbee 418 info preuninstall pimatic-raspbee@0.1.7 419 info uninstall pimatic-raspbee@0.1.7 420 verbose unbuild rmStuff pimatic-raspbee@0.1.7 from /home/pi/pimatic-app/node_modules 421 info postuninstall pimatic-raspbee@0.1.7 422 silly gentlyRm /home/pi/pimatic-app/node_modules/pimatic-raspbee is being purged from base /home/pi/pimatic-app 423 verbose gentlyRm don't care about contents; nuking /home/pi/pimatic-app/node_modules/pimatic-raspbee 424 silly vacuum-fs purging /home/pi/pimatic-app/node_modules/pimatic-raspbee 425 silly vacuum-fs quitting because other entries in /home/pi/pimatic-app/node_modules Thank you!
-
@bertreb said in Release pimatic-raspbee@0.1.6:
.3 pimatic system
Hi betreb,
yes it was a fully working installation - today my conbee2 arrived so i tried to install
the raspbee plugin - first try via the web -> plugins… -
@bertreb said in Release pimatic-raspbee@0.1.6:
ion
Hi betreb,
pimatic was working all the time - even with all the failures.
So i had a closer look at these messages and looked in these folders,
where the messages came from - there were packages - but these had file
sizes of 0kb - so i think it failed to get these packages - i removed all the folders - an reinstalled raspbee - now its working/home/pi/pimatic-app/.npm/callsite/1.0.0/package/package.json <- this was empty for example
So i removed the folders of callsite / ws and cassert - wrote the plugin in the config again
and every package was installed. -
I have found a problem with RaspBeeMultiSensor there is a value for power consumption witch did not work on my MI smart switch.
in device-config-schema-coffee i found consumtion instead of consumptionconsumtionAcronym: description: "consumtion acronym" type: "string" default: "W"
the same in raspbee-coffee allthough there is allso consumption
if (device.state.consumption?) @sensorCollection[uniqueid].supports.push('consumption')
if I look further in the file I see this
if "consumtion" in @config.supports @_consumtion = lastState?.consumtion?.value @attributes.consumtion = { description: "the measured consumtion" type: "number" unit: 'Wh' acronym: @config.consumtionAcronym
the original payload says “consumption” so I think it’s a type error
smart plug precence is also not updated in the GUI it always states not present while it is present and I can use the switch
one other thing is that having a multisensor the temperature is a “string” but the offset is a “integer” because of this it is only possible to correct the temperature in 1 degree intervals while the temperature value is xx,xx C
temperatureAcronym: description: "temperature acronym" type: "string" default: "T" temperatureOffset: description: "temperature offset" type: "integer" default: 0
is it possible to correct this
-
You can change the type from ‘integer’ to ‘number’
The consumtion attribute seems to be intended.
From the zigbee sensor ‘consumption’ is received, but after that ‘consumtion’ is used.
This should work. Can you see in the debug if the smartplug is sending the consumption value? -
in the debug log I have consumption
debug [pimatic-raspbee]: { e: ‘changed’,
id: ‘17’,
r: ‘sensors’,
state:
{ consumption: 16007, lastupdated: ‘2021-01-29T11:17:35.019’ },
t: ‘event’,
uniqueid: ‘048c:df:3c:7b:1b:bb-16-000c’ }but in the GUI I have no consumption
in the config I have this
if I change the last support option to consumtion i got this in the GUI
unknown Whso I think there must be a fault in the config
-
Try changing in raspbee.coffee
line 488@_setConsumtion(data.state.consumtion) if data.state?.consumtion?
to
@_setConsumtion(data.state.consumption) if data.state?.consumption?
and line 370
if "consumtion" in @config.supports
to
if "consumption" in @config.supports
-
Thank you after changing the lines I now have the power consumption
The only thing left now is the tiny cicle in front of the on/off switch witch I think is precence/online of the power smart plug
it’s always an open circle online or offline, offline or not present meaning the smartplug not connected to the power outlet
-
Nice, if you want to get the presence working you need to
- add 2 lines in raspbee.coffee
- replace 2 files in the pimatic-raspbee/app
The steps
- In raspbee.coffee, add after line 919
template: "raspbee-switch"
- and after line 955
getTemplateName: -> "raspbee-switch"
- download and extract zip file https://github.com/bertreb/pimatic-raspbee
- in directory pimatic-raspbee/app replace the files raspbee-template.coffee and raspbee-template.jade with the same files from the downloaded zip
Success!