Comments (7)
yes. you can use all types from HomeKitTypes.js directly.
in your case this would be SecuritySystem (no space) for the service type. this has to go to genericDeviceType.
for the setList in fhem you can use whatever you want and makes sense in the fhem ui as you have to provide a mapping from the fhem values to the homekit values anyway. in values you can (and should) use the defined terms from HomeKitTypes.js as the target. for example for the current state would look something like this:
setList state:stay,away,night,...
homebridgeMapping SecuritySystemCurrentState=state,values=stay:STAY_ARM;away:AWAY_ARM;...
for SecuritySystemTargetState you have to provide the values mapping and also the reverse mapping from the homekit values to the fhem values with the cmds mapping.
important: spaces are a source of problems. try to avoid them.
from homebridge-fhem.
Thank you very much!
I tried the solution you provided. But it doesn't work yet.
I've set the state to "DISARMED" manually in fhem. But in the home app it is shown in the stay_armed state. When I change the state in the app, a spinner as shown and nothing happens.
The console outputs this error:
ALRM_SYSTEM-state value DISARMED not handled in values
This is my device:
{
"Arg":"ALRM_SYSTEM",
"Results": [
{
"Name":"ALRM_SYSTEM",
"PossibleSets":"setList state:STAY_ARM,AWAY_ARM,NIGHT_ARM,DISARMED,ALARM_TRIGGERED",
"PossibleAttrs":"alias comment:textField-long eventMap group room suppressReading userReadings:textField-long verbose:0,1,2,3,4,5 readingList setList useSetExtensions event-on-change-reading event-on-update-reading event-aggregator event-min-interval stateFormat:textField-long timestamp-on-change-reading alarmDevice:Actor,Sensor alarmSettings cmdIcon devStateIcon devStateStyle genericDeviceType:ignore,switch,outlet,light,blind,thermometer,thermostat,garage,window,lock homebridgeMapping:textField-long icon sortby webCmd widgetOverride userattr",
"Internals": {
"CFGFN": "",
"NAME": "ALRM_SYSTEM",
"NR": "101",
"STATE": "DISARMED",
"TYPE": "dummy"
},
"Readings": { "state": { "Value":"DISARMED", "Time":"2016-10-04 11:23:11" } },
"Attributes": {
"genericDeviceType": "SecuritySystem",
"homebridgeMapping": "SecuritySystemCurrentState=state,values= STAY_ARM:STAY_ARM; AWAY_ARM:AWAY_ARM;NIGHT_ARM:NIGHT_ARM;DISARMED:DISARMED;ALARM_TRIGGERED:ALARM_TRIGGERED",
"room": "Alarm",
"setList": "setList state:STAY_ARM,AWAY_ARM,NIGHT_ARM,DISARMED,ALARM_TRIGGERED"
}
} ],
"totalResultsReturned":1
}
from homebridge-fhem.
i see lots of spaces in the homebridgeMapping :)
from homebridge-fhem.
@justme-1968 Shoot. You're right.
I fixed it. Now the disarmed state is shown correctly but when I change the state it still shows the spinner and does nothing...
But this time there is no error on the console :(
{
"Arg":"ALRM_SYSTEM",
"Results": [
{
"Name":"ALRM_SYSTEM",
"PossibleSets":"setList state:STAY_ARM,AWAY_ARM,NIGHT_ARM,DISARMED,ALARM_TRIGGERED",
"PossibleAttrs":"alias comment:textField-long eventMap group room suppressReading userReadings:textField-long verbose:0,1,2,3,4,5 readingList setList useSetExtensions event-on-change-reading event-on-update-reading event-aggregator event-min-interval stateFormat:textField-long timestamp-on-change-reading alarmDevice:Actor,Sensor alarmSettings cmdIcon devStateIcon devStateStyle genericDeviceType:ignore,switch,outlet,light,blind,thermometer,thermostat,garage,window,lock homebridgeMapping:textField-long icon sortby webCmd widgetOverride userattr",
"Internals": {
"NAME": "ALRM_SYSTEM",
"NR": "66",
"STATE": "DISARMED",
"TYPE": "dummy"
},
"Readings": { "state": { "Value":"DISARMED", "Time":"2016-10-04 11:23:11" } },
"Attributes": {
"genericDeviceType": "SecuritySystem",
"homebridgeMapping": "SecuritySystemCurrentState=state,values=STAY_ARM:STAY_ARM;AWAY_ARM:AWAY_ARM;NIGHT_ARM:NIGHT_ARM;DISARMED:DISARMED;ALARM_TRIGGERED:ALARM_TRIGGERED",
"room": "Alarm",
"setList": "setList state:STAY_ARM,AWAY_ARM,NIGHT_ARM,DISARMED,ALARM_TRIGGERED"
}
} ],
"totalResultsReturned":1
}
from homebridge-fhem.
as i said: you also have to map the SecuritySystemTargetState with reading, values and cmds.
some service classes use the same characteristic for both directions, others (mainly the multivalued) use two characteristics and you have to configure both.
from homebridge-fhem.
Sorry so much, I over read that!
from homebridge-fhem.
It worked! Thank you very much for being so patient with me!
For any other people struggling with this in the future.
This is my solution:
SecuritySystemCurrentState=state,values=STAY_ARM:STAY_ARM;AWAY_ARM:AWAY_ARM;NIGHT_ARM:NIGHT_ARM;DISARMED:DISARMED;ALARM_TRIGGERED:ALARM_TRIGGERED SecuritySystemTargetState=state,cmds=0:STAY_ARM;1:AWAY_ARM;2:NIGHT_ARM;3:DISARMED;4:ALARM_TRIGGERED,values=STAY_ARM:0;AWAY_ARM:1;NIGHT_ARM:2;DISARMED:3;ALARM_TRIGGERED:4
(attribute homebridgeMapping)
from homebridge-fhem.
Related Issues (20)
- Different names for multiple switches (subtypes)? HOT 3
- warning from the characteristic 'Saturation' HOT 17
- Installation procedure failure (version 0.5.29) HOT 2
- Configuration gets lost after docker container restart HOT 7
- Homebridge-fhem Problem mit fhem Zugriff. HOT 4
- No reconnect after FHEM Server restart HOT 2
- homebridge-fhem with Homebridge 1.3.x does not work (for me) HOT 4
- Thermostat's dont't work anymore HOT 3
- longpoll error HOT 13
- No response with Mac OS Monterey HOT 1
- Status der Geräte updated nach einiger Zeit nicht mehr HOT 2
- This plugin slows down Homebridge. The read handler for the characteristic 'Current Relative Humidity' was slow to respond HOT 1
- Homebridge sometimes does not start with homebridge-fhem plugin active HOT 8
- Plugin settings in Homebridge UI overwrite manually created configuration HOT 3
- Option to reduce log output HOT 1
- Device state update is not working HOT 14
- For ProgrammableSwitchEvent the nocache=1 dosent work HOT 6
- History Type Energy not working HOT 1
- HMCCU-Geräte werden bei best. Konstellationen vergessen und später als neue Geräte wieder hinzugefügt HOT 1
- Thermostat übergeben OHNE Cooling/AUTO Funktion HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-fhem.