Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

simple powershell script


10der
 Share

Question

Hi!

sometimes I'm  lazy :) 

I want to turn on/off some devices without FIBARO UI / Mobile or Lili (particularly during Friday Shabbat :) :) :) ) 

 

I want to share with you, may be, useless script... but...

so. here is simple powershell script for Windows desktop shortcut.

you can run it

powershell -File fibaro.ps1 5  turnOn

powershell -File fibaro.ps1 5 turnOff

where 5 is device id, turnOn / turnOff - command for a switcher 

 

powershell -File fibaro.ps1 544 50

where 544 is device id,  50 (or any) - level for a dimmer

 

also, you can trigger state... simple skip last param... pass only deviceId

powershell -File fibaro.ps1 5

will automatically turn off if on and vice versa.

 

Have a nice day!

 

Please login or register to see this code.

 

notice:

 

please change var

$url = "192.168.1.36" - FB HC IP
$user = "[email protected]" - your login to FB HC
$pass= "fb1234567890" your password to FB HC

 

attached code in a post please save in file fibaro.ps1

 

 

Edited by 10der
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Since I don't see that your script based on time schedule, so I think it will be much easier to create two bookmarks on browser for turn on and off

Please login or register to see this link.

or if your browser already connected you can skip the user:passwd portion

Please login or register to see this link.

 

Actually you can create an entire bookmark folder for all devices.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...