I just checked the logs in openhab2 and it shows me this
2017-12-16 18:57:06.868 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update ‘OFF’ for item ‘mpcoff’ to handler for channel ‘exec:command:micropcofft:run’, because no thing with the UID ‘exec:command:micropcofft’ could be found.
What does this exactly mean? (Never coded before so I am not sure what to do now)
Tried that, did not change anything. Sadly I am unable to install any transformation bindings. So that means I can not use the exec solution (Wol & exec binding -> power On and Off Pc), correct ?
What other options do I have? Or what else can I try to get it working?
I am nearly new to OpenHab and tried the code SzilagyIR posted above to switch on my PC via WoL and shut it down via exec command. Everything works fine so first I want to say thx for the code!
Today I wanted to control the wake and shutdown with Alexa so I added the following to the items:
Everthing works fine and with the OpenCloud Binding Alexa found the two Items “PC1” and “PC2” and now I can start or shut down my PC with “Alexa switch PC1 on” or "Alexa switch PC2 on"
Don’t be confused because of the naming… It is only one PC
So maybe you see what is not very fine with this::
I need two different devices to switch my PC.
The naming is not so nice
I always say “switch on” but thats simply not the truth when I switch it off with PC2 device.
My question:
Do you have any Idea how to configure it in a way I can use a switch item which will use WoL command for the ON-state and exec shutdown command for the Off-state?
Would be grate if I can say “Alexa turn the PC on” and “Alexa turn the PC off”
That’s what i get by following the “solutions”
==> /var/log/openhab2/openhab.log <==
2020-11-04 12:40:53.321 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/MPCONOFF’ with an invalid status value ‘2’.
2020-11-04 12:40:55.810 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/MPCONOFF’ with an invalid status value ‘1’.
2020-11-04 12:40:57.938 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/MPCONOFF’ with an invalid status value ‘2’.
2020-11-04 12:41:36.446 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/MPCONOFF’ with an invalid status value ‘1’.
2020-11-04 12:41:43.008 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/MPCONOFF’ with an invalid status value ‘2’.
2020-11-04 12:41:43.170 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/MPCONOFF’ with an invalid status value ‘2’.
2020-11-04 12:41:44.020 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/MPCONOFF’ with an invalid status value ‘1’.
I made it work, it was because the solutions provided by some of the users were not properly written:
I had to start from scratch by following the documentation pages. thanks for effort made by some users but posting things poor written or faulty codes is not a solution, otherwise is a waste of time. I have followed many articles and i saw users trying to help by providing a bit of information on post 1, some follow up solutions for post 15 and a last bit of code fixed from post 1 in post 36 … for me , as a user is a waste of time of 1 , 2 hours depending of things complexity… that’s what making me backing off from this openhab . i can see is operated by users, no developers are around for solutions or bindings… in my opinion this project looks abandoned since at least 1 year
Next time when you try to look cool on internet, make sure you have some good arguments and not act like an idiot. '57 is your born year then i feel sorry for you. period.
Now , let me explain you couple things that the “OP” forgot to mention about this:
you need to add a policy update in windows registry and tweak some other settings
you need to install and configure samba on host machine, in case if it’s a linux in order to establish a successful connection with that host machine
this does not work with microsoft accounts
this does not work with multiple accounts assigned to a machine
you know my friend, rossko57 nobody knows these as much as you do . maybe i dont have time to try making things works since i also have a job, a family to take care and can’t afford to spend hours on something poorly written . as for the OP, and other participants, thanks for the bits of information provided.