RESOLVED: Can't add a command

Posted on
Sat Dec 15, 2018 1:10 pm
colovin offline
Posts: 135
Joined: Oct 27, 2009

RESOLVED: Can't add a command

Hi, this looks interesting. I'm able to discover my Broadlink Device and it is able to capture the command. When I go to add the command it errors out. Here is what I'm getting on the log.
Traceback (most recent call last):
File "plugin.py", line 120, in _get_saved_IR_commands_list
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode
ValueError: No JSON object could be decoded

I'm sure it's operator error :-) not sure what I'm doing wrong.

Indigo 7.1.1, OS 10.14.6, MacMini .3.2 GHz 6 Intel Core i7, 64 GB ram

Posted on
Sun Dec 16, 2018 6:27 am
Ksullivan offline
Posts: 63
Joined: Feb 22, 2014

Re: Can't add a command

Hi
I had the same issue but when I did the latest Indigo update it righted itself.
Perhaps run the indigo installer again.

Keith


Sent from my iPad using Tapatalk

Posted on
Sun Dec 16, 2018 11:05 am
colovin offline
Posts: 135
Joined: Oct 27, 2009

Re: Can't add a command

I've got the latest Indigo release but it doesn't play nice with the old AirFoil plugin which I use a lot. I've never been able to figure out AirFoil Pro, so until I do I'm stuck on 7.1.1.

Indigo 7.1.1, OS 10.14.6, MacMini .3.2 GHz 6 Intel Core i7, 64 GB ram

Posted on
Mon Dec 17, 2018 9:13 pm
rapamatic offline
Posts: 236
Joined: Aug 03, 2015
Location: Glencoe, IL

Re: Can't add a command

I'm getting the same error message on the latest release of Indigo trying to learn commands with a Mini 3... is there some dependency I need installed or something else to try?

Posted on
Thu Jan 03, 2019 2:00 pm
rapamatic offline
Posts: 236
Joined: Aug 03, 2015
Location: Glencoe, IL

Re: Can't add a command

Ok, got this working. The issue seems to be the plugin returns an error when there are no saved commands for a device. The relevant section of code is below. Without doing too much troubleshooting, my guess is that dev.pluginProps["commands"] is a property of the device, but with a blank string or something like that, so json.loads returns an error.

Code: Select all
   def _get_saved_IR_commands_list(self, dev_filter, values, type_id, did):
         """ Devices.xml Callback Method to return saved commands for this device. """
         dev = indigo.devices[did]
         if "commands" not in dev.pluginProps:
             return [("none", "- none -")]
         return json.loads(dev.pluginProps["commands"])


To get around this issue, the following steps work:

1) delete the old Universal Remote Device
2) Create new device
3) Hit the discover button to find the device
4) enter some nonsense temp IR command - give it whatever name/raw command you want
5) hit add command
6) save

That seems to work fine, and then you can go about learning new real commands after that (and then can delete the temp command)...

Posted on
Thu Jan 03, 2019 5:41 pm
colovin offline
Posts: 135
Joined: Oct 27, 2009

Re: Can't add a command

It took a little fiddling but yes, if is finally working great. I followed the steps that were outlined and was getting the same error codes. I'm not exactly sure what I did, but after doing it a few times it finally took and has been working like a champ since. I think you need to reload the plugin after every attempt. First I just typed gibberish into the raw command line and named it test. I couldn't get it to save to the command window. Then I did a learn command and saved the text of the raw command. Reloaded the plugin, started all over with a new device and put the actual command in the raw command window and it saved to the command window.

It's nice to have Indigo control instead of using the app. Also I've setup some scripts, saved as apps, that I can run from my desktop. Very neat, thanks for discovering the fix.

Indigo 7.1.1, OS 10.14.6, MacMini .3.2 GHz 6 Intel Core i7, 64 GB ram

Posted on
Sat Jan 05, 2019 4:53 pm
TwitchCaptain offline
User avatar
Posts: 90
Joined: Dec 13, 2016
Location: San Francisco

Re: Can't add a command

I'll see if I can find this bug and squash it. Thanks for the reports!

Posted on
Sat Jan 05, 2019 10:27 pm
TwitchCaptain offline
User avatar
Posts: 90
Joined: Dec 13, 2016
Location: San Francisco

Re: Can't add a command

This should fix it. https://github.com/davidnewhall/indigo-broadlink/pull/6 - if anyone can test that would be sweet.

I'll release a new version later this week.

Posted on
Mon Jan 07, 2019 10:36 am
rapamatic offline
Posts: 236
Joined: Aug 03, 2015
Location: Glencoe, IL

Re: Can't add a command

This update seems to have fixed that bug. Working fine for me now. Thanks!


Sent from my iPad using Tapatalk

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests