Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Systemvariablen #1

Open
draoZA opened this issue May 6, 2015 · 4 comments
Open

Systemvariablen #1

draoZA opened this issue May 6, 2015 · 4 comments

Comments

@draoZA
Copy link

draoZA commented May 6, 2015

Wäre gut, wenn man auch auf die Systemvariablen über hm2mqtt zugreifen könne. Oder gibt es da einen einfachen workaround von node-red aus?

@MehrCurry
Copy link

Ja, ich vermisse die Variablen auch. Ich habe mir einen kleinen Workaround in node-red gebaut.

[{"id":"2672f5a1.d98d0a","type":"http request","name":"Homematic JSON API","method":"POST","ret":"obj","url":"http://homematic-ccu2/api/homematic.cgi","x":1116.9999656677246,"y":245.71428394317627,"z":"8254fb9f.7dab08","wires":[["b52aca6b.4ad538"]]},{"id":"d4d7dcf9.2b282","type":"function","name":"Add SessionID","func":"context.global.lastMessage=msg.payload;\nmsg.payload.params._session_id_=context.global.currentSessionid;\nreturn msg;","outputs":1,"valid":true,"x":881.8571624755859,"y":245.28571701049805,"z":"8254fb9f.7dab08","wires":[["2672f5a1.d98d0a","b52aca6b.4ad538"]]},{"id":"48f53cb0.b70ac4","type":"json","name":"","x":717,"y":245.57142639160156,"z":"8254fb9f.7dab08","wires":[["d4d7dcf9.2b282"]]},{"id":"91d460d7.6e2ba","type":"inject","name":"Alarm Test","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":115,"y":237.57142639160156,"z":"8254fb9f.7dab08","wires":[["7c2a6c83.83d594","97b31830.684ce8"]]},{"id":"b52aca6b.4ad538","type":"debug","name":"","active":false,"console":"false","complete":"false","x":1322.8571033477783,"y":162.42857265472412,"z":"8254fb9f.7dab08","wires":[]},{"id":"7c2a6c83.83d594","type":"template","name":"Alarmzone 1","field":"payload","format":"handlebars","template":"Alarmzone 1","x":344,"y":217.57142639160156,"z":"8254fb9f.7dab08","wires":[["7e3a3ea.f81c5c"]]},{"id":"7e3a3ea.f81c5c","type":"template","name":"Build JSON Request","field":"payload","format":"handlebars","template":"{ \"method\": \"SysVar.get\",\n  \"params\": {\n      \"id\": \"{{payload}}\"\n  }\n}","x":539,"y":246.57142639160156,"z":"8254fb9f.7dab08","wires":[["48f53cb0.b70ac4"]]},{"id":"97b31830.684ce8","type":"template","name":"Alarmzone 2","field":"payload","format":"handlebars","template":"Alarmzone 2","x":346,"y":266.57142639160156,"z":"8254fb9f.7dab08","wires":[["7e3a3ea.f81c5c"]]}]

Ein weiterer Flow sorgt für das Login und hält sie Session alle 5min mit einem Renew offen.

@MehrCurry
Copy link

Hallo Oliver,

ich habe gerade mal in den Quellcode geschaut, dort gibt es auch Unterstützung für CuxD. Liege ich richtig mit der Annahme, dass mittels

java -jar ... hm.host=homematic-ccu2:2000,homematic-ccu2:2002,homematic-ccu2:8701

Systemvariablen und sogar CuxD Devices übertragen werden?

@owagner
Copy link
Owner

owagner commented Jun 8, 2015

CUXD: Im Prinzip ja, praktisch gab es aber damit noch (nicht näher analysierte) Probleme.

Systemvariablen geht nicht so einfach, die könnte man höchstens per TCL pollen. Grundsätzlich ist es aber der Sinn von hm2mqtt, die Anbindung an eine andere Logikschicht zu ermöglichen (z.B. logic4mqtt) und die ReGa-Logik damit zu ersetzen.

@hobbyquaker
Copy link

https://github.com/hobbyquaker/hm2mqtt.js unterstützt nun auch die Verwendung von Rega-Variablen via MQTT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants