Probably you know this, but you need to install first Conbee II/Deconz, before you can use it with pimatic.
-
@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!
-
@bertreb said in Release pimatic-raspbee@0.1.6:
getTemplateName: -> “raspbee-switch”
sorry that did not work it messes up my whole user interface because my raspbee.coffe is not the same as from you
I had to delete the pimatic-raspbee directory to start all over -
You can look in my raspbee.coffee and see where the 2 lines need to be added.
Its in the class RaspBeeSwitch. The indentation is also important. Use spaces and make sure that the functions are on the right indentation (see my raspbee.coffee). Coffeescript is compact and sensitive for this.
Btw my raspbee.coffee also supports also the shutter.When somethings wrong in one of the app files, the gui gets messy. But it looks worse than it is. It’s easy to recover when you put back the 2 back upped files (raspbee-template.coffee and raspbee-template.jade). Also in these files you can see how the presence handling is added (icm with the 2 added lines in raspbee.coffee)
There no other solution because the presence dot isn’t handled in the current RaspBeeSwitch.
-
I replaced the 3 files and it’s working OK
I think the dot in front of the switch is not presence but it should be online/offline or reachable as with the lights
not reachable and if you want to change the settting it gives this
if the light has power the dot changes
and now you can change settings for the lights -
Yes, the dot is the ‘reachable’ attribute from the zigbee device.
In the gui it is called Presence for all raspbee light and switch devices and it shows the on/offline or reachable status.
You could add a label with ‘reachable’. Its not possible to add an acronym for a ‘dot’.
The label must be added in raspbee.coffee for RaspBeeDimmer (for all lights) and RaspBeeSwitch@addAttribute 'presence', description: "online status", type: t.boolean, label: 'reachable'
Does this answers the questions you had?
-
sorry I think you missed what I mean the little circle or dot in front of the switch always tells the switch is not present while it is.
When a light is powered off meaning it is not reachable you will get an error if you send a command to it.
with the smart plug witch is a relay or switch this does not, so you will never know if the smart plug is powered or not.
You don’t know if someone pulled the plug from the wallsocket.
it is one off these plugs.
-
I understand, but if you get this error the switch isn’t reachable (not connected in the zigbee network). The deconz software is sending this state
Btw how do you know the switch is reachable/present?
-
if the smart plug is not in the network i got no error but when a light bulb is not in the network i got an error
-
no the behavior is not new it was there before the update
and yes the attribute is there only not reflected in the GUI