Using Mote and HomeKit with a single Mote stick

Hello,

I have tried the Mote HomeKit tutorial today and it worked well, however I couldn’t control the color/brightness so I tried the “new” code I found in the examples folder, however I need some help with the config and code.

I have two questions:

  1. How do I modify the code if I only want to use one stick? It could do that with the old code, but I wasn’t able to do this with the new code.

  2. What do I need to change in the config.json? I couldn’t figure out how it works with a single stick and with the new code.

Thanks!

Adrian

I’m unsure what you mean by “new code”. Has there been a Mote update from the code you used before? I don’t own any Mote hardware so I haven’t a clue! :)

As for changing the amount of sticks, you can change what is used by the program by changing the amount you define here:

mote = Mote()

mote.configure_channel(1, 16, False)
mote.configure_channel(2, 16, False)
mote.configure_channel(3, 16, False)
mote.configure_channel(4, 16, False)

If you only have one stick, it should look something like this:


mote = Mote()

mote.configure_channel(1, 16, False)

To do with the JSON file, I haven’t a clue! But this should work for using one stick. :D

I used the updated code from the examples folder (which you can find on GitHub) as the tutorial code worked with one stick, but couldn’t handle color/brightness - A PR said that it was fixed with the new code.

I successfully edited the on, off and status endpoints in the JSON, however it says that I need to configure a second stick. Could you look at the code and help me with it? I already deleted the other channels as you wrote.

Thanks!

I’ll surely take a look and see if I can be of any help!
Where is this JSON file? I can’t seem to find it anywhere in the GitHub repo…
Also, are you using Mote on Windows, Linux or Mac?

You can find the JSON file in the tutorial, for now I only changed the endpoints for status, on and off. I’m using Mote on a Raspberry Pi with Jessie.

As far as I can tell, the JSON file is used only with the Cheerlights example and the Siri / Homekit tutorial in order to use online capabilities like the Twitter API and Apple Siri voice control, I didn’t realise it could have anything to do with the Mote sticks overall settings, unless of course you are using it for the one of these two examples.

Overall, looking at Welcome — Mote 0.1.2 documentation, it seems the only function for changin the brightness would be to use a lower RGB value, e.g: bright red as 255, 0, 0 and dim red as 50, 0, 0.

Edit:

Which are quite obviously included in the JSON file, doh.
I’m still unsure as to what this file does; are you just trying to get it to work with a single stick?

It doesn’t have to do with Mote in general, just about the using a single stick and the updated code.
It works fine with the “old” code in the tutorial and a single stick. I just wanted to control the color too so I found the “updated” code, however I had some problems using it with a single stick. I would like to know how I can modify the code so it works with a single stick.

The config.json works fine as I figured it out, but thanks :)