home
home copied to clipboard
Some Babysitting
I have found this project most recently and installed the software on my PI3. Everything looks great and I have started to play with the WebAPI. As I'm not an experienced programmer, could anybody please give me some babysitting for my experiments?
I figured out to e.g. close a shutter by: http://myIP:8080/set/shutter/ABB700D307C4/ch0003/down
What I'm unable to find right now are commands like:
- set shutter to 75%
- get actual shutter position
- start a scene e.g. "allShutterWestDown"
I know about openHAB, however, it just makes fun to play a bit with this software.
Thank you.
Wilfried
Shutter are currently not supported. Here are all available shutter commands:
- up
- down
- toggle-up
- toggle-down
- pulse-up
- pulse-down
- stop
You should be able to get the position with http://myIP:8080/info/ABBXXXXXXXXXX/[channel optional]/[datapoint optional]
You can activate a scene with http://myIP:8080/set/scene/SCENEID/ch0000/set (I'm not sure about ch0000, you might also want to try other channels).
You can get the information about all objects with http://myIP:8080/info
Wow - That was quick. Many thanks for your prompt help!
Wilfried
You can relatively easy set the shutter to a specific position manually with a little code.
You need the following datapoints:
- odp0001 (Current Position in percent)
- pm0000 (Time the shutter needs for opening)
- pm0001 (Time the shutter needs for closing)
Then you can calculate the relative percentage based on the current position and move the shutter up or down for a specific amount of time. If you do the calculation correct the position error should be small (about 5%).
I have this implemented in my own project. You can try to implement it in your own if you like to. https://github.com/henry-spanka/homebridge-buschjaeger/blob/ee86494ecdaed943aeee23c60036caebac848664/lib/BuschJaegerJalousieAccessory.js#L51
Hi Henry: Thank you for your thoughts and the link to your project. As a first step, I actually implemented such a process. I created a script, which read the time to get each roller shutter from "open" to "close" position (ch0003/pm0001). As a next step that script executed a loop "for x = 1 to pm0001" as: - open roller shutter - send close command - after "x" seconds, send stopp command - request roller-shutter position (ch0003/odp0001) I used that table to interpolate between the integer numbers and were within a range of 2% accurate.
Then I received a very valuable comment from Lasse Magnussen. In order to position a roller-shutter to a certain percentage, I inserted into Stefan's "sysap-external.js" (about line 67-73; shutter actions block) the line: 'set' : { 'idp0002' : value } (see https://github.com/ruebox/openhab2-addons/issues/21#issuecomment-473594499).
I now can send directly the command "http://myIP:myPort/set/shutter/ABB700C9AB60/ch0003/set/77" to move the roller-shutter to 77%.
My intention is to ask Stefan for permission to using that change for private use only. I hope you might find that information helpful as well.
Wilfried
Cool, seems I missed that. Will try to implement that in my own project as it's way better than an approximation using timeouts.
You can also set a datapoint without modifying the API directly. Try http://myIP:myPort/raw/ABBXXXXX/chXXXX/dpXXXX/77
Hi Stefan - Thanks to your excellent work at GitHub, I today have finished my project to interface my Z-Wave based FIBARO system with my FreeHome devices. As you might have already seen at your GitHub “home —> Issues” blog, I have extended your code by one statement to enable my roller-shutters to be positioned directly to a certain percentage.
Since I’m using that change for my private installation only, I hope you are okay with my modification.
Thanks again for your help!
Wilfried
On 14. Mar 2019, at 15:37, Stefan Stadlberger [email protected] wrote:
Shutter are currently not supported. Here are all available shutter commands:
up down toggle-up toggle-down pulse-up pulse-down stop You should be able to get the position with http://myIP:8080/info/ABBXXXXXXXXXX/[channel http://myip:8080/info/ABBXXXXXXXXXX/%5Bchannel optional]/[datapoint optional]
You can activate a scene with http://myIP:8080/set/scene/SCENEID/ch0000/set http://myip:8080/set/scene/SCENEID/ch0000/set (I'm not sure about ch0000, you might also want to try other channels).
You can get the information about all objects with http://myIP:8080/info http://myip:8080/info — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sstadlberger/home/issues/26#issuecomment-472890390, or mute the thread https://github.com/notifications/unsubscribe-auth/Am4GT_EqwUN6EjOTKyoNNyoxhlnVx-qWks5vWl6ygaJpZM4b0Gnx.
Hi all, having trouble to get the project running:
SyntaxError: Invalid or unexpected token
at Module._compile (internal/modules/cjs/loader.js:703:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
at Module.load (internal/modules/cjs/loader.js:628:32)
at Function.Module._load (internal/modules/cjs/loader.js:555:12)
at Module.require (internal/modules/cjs/loader.js:666:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.
Pasted the JID, SysAP IP and Password to config.js (config.bosh & config.websocket) and tried "node home.js"
Hi,
a couple of questions: Did you make a copy of config.default.js and renamed it to config.js? If so can you please post a redacted (no passwords etc.) copy of your config.js? It looks like it may contain a typo.
Cheers, Stefan