News:

VoxCommando supports plugins for a wide variety of programs and devices. Contact us if you want to create your own.

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Foggy

#1
@ nime5ter  Yes it does. I removed the entry from content type as on a second look I could see that it defaulted to default: application/json". Now the error is gone. Thank you for your help.

@jitterjames. Actually it is for HA-Bridge  https://github.com/bwssytems/ha-bridge
It appears to be very powerful.

Best wishes.
#2
Thank you. I was fiddling a little more before your response.

<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.2.9-->
<command id="68" name="Pause  " enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Scrape.Put</cmdType>
    <params>
      <param>http://192.168.0.116:8080/api/username/lights/1602928626/state</param>
      <param>{"on":true}</param>
      <param />
      <param />
      <param>Content-Type: application/json</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType />
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>


This actually worked, but I got another error after this ran

Log Entry:
Scrape.Put:http://192.168.0.116:8080/api/username/lights/1602928625/state&&{"on":true}&&&&&&Content-Type: application/json

08/01/2017 16:18:06 260 Doing scrape put/post with headers:
Content-Type: Content-Type: application/json


08/01/2017 16:18:06 566 Action RESULT:
08/01/2017 16:18:06 566 Action is NOT threadsafe:
08/01/2017 16:18:06 566 action repeat set to: 1
08/01/2017 16:18:06 566 Action: 
08/01/2017 16:18:06 566 addHistoryItem [action] :

08/01/2017 16:18:06 582 Action ERROR: Unknown base action:
#3
I hope some one could help. I just can't get my head around sending Put commands through Voxcommando.

I want to send this command (Works sending through the Terminal)
curl -H 'Content-Type: application/json' -X PUT -d {"on":true} http://192.168.0.116:8080/api/username/lights/1602928626/state

Can you explain what goes where, when using the scrape.put command.

Best wishes.
#4
Thank you both.

Tried the IR learn & send. This works very well.
Tried the RF version and it seems a bit picky and I had to try a few times before it would recognise anything. However once it did. It worked.

First impressions are that this better than my USB-UIRT. It maybe the funky lights though.  :)

Thank you James. I'll spend some time reading it before I ask any questions.

Best wishes.
#5
Hi Kalle & James.

Just thought I would let you know that I got my Beam today.

Connecting it to my network was a breeze using my iPad. Good job. Well done.

Thought that I had better wait till I got more instructions before I do anything else.

Best wishes.

James.
#6
Hello Kalle,

I am in the UK and would like to order 1. Please advise how I should pay.

Best wishes.

James.
#7
Hi Kalle,

Please put my name on the list.

Best wishes.

James.
#8
Thank you both.

Once I understood how to create the Event and used UDPSender it works as expected from the command line and a *.bat file.


Best wishes.
#9
Many thanks.

James.
#10
Many thanks both.

I just realized in my haste I have left my Authorization: Bearer number complete. Can you obscure it?

I'll have a play and let you know how I get on.

Best wishes

James
#11
Many thanks James.

Thank you for the links. I think UDPSender.exe is worth a look at.
Looking through the forum link you gave I am confused if I should use (Send actions or events) or if I can call the action /command directly?

If it can. Can you assist with the syntax? I would move the UDPSender.exe into c:/
Please see corrected command.

<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.8-->
<command id="34" name="http Scene" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="" loopMax="" description="">
  <action>
    <cmdType>Scrape.Put</cmdType>
    <params>
      <param>https://api.lifx.com/v1/scenes/scene_id:12d754....................REMOVED/activate</param>
      <param />
      <param />
      <param />
      <param>application/json</param>
      <param>Authorization: Bearer c6f4a4e1bd1fba4....................REMOVED</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>


Your assistance is appreciated.

Best wishes.
#12
Hello again.

Whilst this now works very well within Voxcommando. There are some times when I am working at my computer and I don't have my Amulet near by. Is it possible to run a Voxcommando command from within a Windows *.bat file ie from the Windows command line.

<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.8-->
<command id="-1" name="Actions copied from LCB">
  <action>
    <cmdType>Scrape.Put</cmdType>
    <params>
      <param>https://api.lifx.com/v1/scenes/scene_id:xxx....................REMOVED/activate</param>
      <param />
      <param />
      <param />
      <param>application/json</param>
      <param>Authorization: Bearer xxxxxxx....................REMOVED</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>


Best wishes for 2016

James.

VC SP 2.1.4.8  Windows 10
#13
Yep. Adding the authorisation as a header worked.

Thank you very much.


Best wishes.


James.
#14
Yes sorry. Mails got crossed. I'll try your header.

Best wishes.

James.
#15
Thank you for your suggestion.

That did not appear to work.

However I did try on my Linux machine the suggested cURL command and I am getting what looks like a valid response. So I am happy that I have the correct token in my LCB

pi@raspberrypi ~ $ curl -u "xxxxxxxxx1fba4f168349edc221477e00153769c4178e79470fc6d4fa02b0cb:" "https://api.lifx.com/v1/lights/all"
[
  {
    "id": "d073d5025942",
    "uuid": "026cb890-5f61-49c2-afba-a88285bbdae1",
    "label": "LIFX bulb 025942",
    "connected": true,
    "power": "off",
    "color": {
      "hue": 286.3520256351568,
      "saturation": 1.0,
      "kelvin": 3500
    },
    "brightness": 0.5112687876707103,
    "group": {
      "id": "c67ba9229b6029e8c12ae0c60bc0c02a",
      "name": "My Room"
    },
    "location": {
      "id": "61be619a9d4f4524a94ea00df35c2691",
      "name": "My Home"
    },
    "product": {
      "name": "Original 1000",
      "identifier": "lifx_original_a21",
      "company": "LIFX",
      "capabilities": {
        "has_color": true,
        "has_variable_color_temp": true
      }
    },
    "last_seen": "2015-10-11T12:38:47.754+00:00",
    "seconds_since_seen": 0.001937142
  }
]pi@raspberrypi ~ $


I have xxxx'd out my token.