Jump to content




== cc10 == (Basic X-10-like wireless control for redstone)

lua wireless utility

  • You cannot reply to this topic
37 replies to this topic

#1 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 02 April 2014 - 08:30 PM

cc10 for Computercraft 1.6+ is a two+ piece solution that uses rednet for basic wireless control of redstone output on one or more computers (with wireless modems) or wireless turtles. What can you do with cc10? You can wirelessly 'control' redstone outputs (digital or analog) on other devices like lamps, doors, pistons, or the OpenBlocks radio via an attached computer running cc10 Host. I'm not sure what practical use this actually has, but it's been fun working on it :)

Please note: cc10 is NOT compatible with ComputerCraft 1.74 or ComputerCraftEdu 1.74 or the combined CC/CCEdu 1.74 jar. This includes modpacks that use these versions [e.g. Tekkit Legends]

The first piece is the remote - an advanced wireless pocket computer running cc10 Remote - one remote can manage over 20,000 hosts, displaying 21 hosts per page.

The second piece is the host - a computer (standard or advanced) with a wireless modem, or a wireless turtle (standard or advanced), running cc10 Host

- The host can be run with terminal output or in 'daemon' mode. I shamelessly borrowed/stole/was-inspired-by OReezy's method in the excellent Touch-screen OpenBlocks Radio Controller.
- Hosts will attempt to acquire their GPS location upon startup. If successful, you can export a host's location to Lyqyd's pocketgps .places file from within cc10 Remote.
- Hosts can be password protected and locked or unlocked from cc10 Remote. Locked hosts will only respond to status queries and the unlock command.
- As of version 2.0.00: all passwords are hashed/salted with Anvarins' pbkdf2/SHA256 and all communications are encrypted with SquidDev's AES and Alex Kloss' base64.

Screenshots

Installation & Requirements

Basic Operation

Update History

As always, my sincere thanks to everyone who made this possible; with a special thank you to the following:
- CometWolf who helped sort out some of my messy code
- theoriginalbit who helped me get a grasp on ternary and truth tables
- Anvarins for his pbkdf2/SHA256 hashing function
- SquidDev for his AES encryption/decryption function
- Alex Kloss for his base64 encoding/decoding function

Edited by Dog, 26 August 2018 - 09:02 PM.


#2 sci4me

  • Members
  • 225 posts
  • LocationEarth

Posted 04 April 2014 - 02:50 AM

ooh, looks kinda cool

#3 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 04 April 2014 - 04:33 AM

Glad it interests you, sci4me :) The next alpha will be out soon - it's a major rewrite that moves all the configuration to the hosts. With the new version you won't add or remove devices in the remote; simply walk around with a portable running cc10 and hosts will automatically show up and drop off the list as they come into and go out of range. I'm just doing some final testing before releasing it.

EDIT: Next alpha is out - enjoy :)

Edited by Dog, 04 April 2014 - 05:54 AM.


#4 TheMrIron2

  • Members
  • 45 posts

Posted 06 April 2014 - 08:42 AM

The UI looks quite nicely done. The Power switches in the screenies remind me of turning my iPhone's Bluetooth on and off :P I love the idea of walking around a skyscraper, toggling lights on and off with your PDA. :D

#5 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 06 April 2014 - 10:21 PM

Thanks for the compliment, TheMrIron2 :) It just started out as a 'this might be fun to write' thing and it's turning out to be more useful and fun than I originally thought. cc10 is (I think) feature complete, so beta should be out within a few days (maybe sooner).

#6 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 18 May 2014 - 08:30 PM

Noteworthy update:

cc10 and cc10host both updated to 1.1.00.

Complete re-write of the polling and list management in cc10 - no more flickering screens or 'dead' clicks. See the OP for download info - make sure to grab both cc10 and cc10host for the fixes.

#7 civilwargeeky

  • Members
  • 393 posts

Posted 26 May 2014 - 06:02 AM

Cool program. One thing I was thinking of while using this is an event system. So maybe have some way to trigger a signal based on some parameter, for example the player being a certain distance away from the computer, or a signal turning on so that you could daisy chain signals together if you want (like you turn on light1, and light2 comes on as a result, or you come close to light1, turning on all the lights in your base). I think that would be pretty cool.

Couple bugs I found while playing with it though: The all on and all off buttons don't work. If you edit an analog signal from >=10 to <10, the 1 stays in front. That's about it though :)

#8 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 26 May 2014 - 07:01 AM

Hey civilwargeeky,

Thanks for the kind words. I considered scheduling and triggering, but decided that was outside the scope of what I wanted to accomplish with cc10. That's not to say I won't add it in the future, but it's not something I'm keen on tackling atm. Thanks for the suggestion, though - now that I know someone is interested I'm more likely to revisit the idea in the future.

'All ON' and 'All OFF' only effect 'Universal Digital / UD' and 'Universal Analog / UA' - if your devices are set to 'Digital' or 'Analog' they won't respond to 'All ON' or 'All OFF'. Double check what your devices are set to (you can click to change the device type; by clicking on the device type in the UI).

I'll take a look at the '1' being left onscreen thing and get a fix out for that. I'll also double check that 'All ON' and 'All OFF' are behaving as expected and fix that if it's broken.

Thanks for the headsup, civilwargeeky! Much appreciated :)

UPDATE: Fixed several UI derps that I'm embarrassed I missed (including the 'left over digit' you reported). The version now available for download has the fixes. 'All ON' and 'All OFF' are behaving as expected. The UI is a bit slow to update since the remote waits for a response from each client before updating its status. I'll see if I can make that faster.

UPDATE 2: Fixed the slow response to 'All ON'/'All OFF' and communications in general. Now polling and comms are snappy in both gtRemote and cc10.

Edited by Dog, 27 May 2014 - 04:56 AM.


#9 civilwargeeky

  • Members
  • 393 posts

Posted 27 May 2014 - 05:17 AM

Nice work! It is indeed much faster now. And yeah, as you pointed out, I didn't realize that All On and All Off were only for universal hosts, I was thinking (for some reason) that universals would trigger redstone on all sides, I didn't actually set any of those up. Thanks for the quick updating and reply :)

#10 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 27 May 2014 - 07:15 AM

Thanks! I think it's finally where I've wanted it to be.

I like the idea of being able to trigger redstone on more than one side (or even all sides) - I think I'll play around with the idea and see what I can come up with. If you have other ideas or suggestions, please let me know!

#11 howdanrocks

  • Members
  • 7 posts

Posted 11 June 2014 - 03:09 AM

Wow, this is awesome! Any chance on implementing unique pocket computer registration so only certain pocket computers can access or use the network?

#12 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 11 June 2014 - 06:23 AM

Thanks, howdanrocks :)

I hadn't really considered the idea, but I like it. I'll play around with the idea and see if I can come up with something that works well (and makes me happy) - no promises, though. In the mean time you can use the password feature that's built in. It's not 'secure' but it might give you a little of what you want.

Thanks for the suggestion!

#13 howdanrocks

  • Members
  • 7 posts

Posted 12 June 2014 - 12:39 AM

View PostDog, on 11 June 2014 - 06:23 AM, said:

Thanks, howdanrocks :)

I hadn't really considered the idea, but I like it. I'll play around with the idea and see if I can come up with something that works well (and makes me happy) - no promises, though. In the mean time you can use the password feature that's built in. It's not 'secure' but it might give you a little of what you want.

Thanks for the suggestion!

Thanks for taking my suggestion into consideration! If you do implement it, feel free to message me and I'd be glad to try it out.

Edited by howdanrocks, 12 June 2014 - 01:16 AM.


#14 howdanrocks

  • Members
  • 7 posts

Posted 12 June 2014 - 10:15 PM

Hey, I found a bug. It seems when there are more than 1 users trying to use the system, this error occurs:

cc10:105: attempt to compare __l t on nil and string


#15 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 12 June 2014 - 11:54 PM

I *think* I know why that happened. I've made a change to the communications between remotes and hosts, so the problem *should* be fixed in 1.1.08. Would you please download the latest host and remote, try it again, and let me know if you still have problems?

Also, I looked into the idea of providing 'fingerprints' for each host. Due to how cc10 is written, adding support for fingerprints is going to be a bit of work. I'm still not sure when I'll get around to tackling it, but I'm going to give it a shot (again...no promises).

Edited by Dog, 12 June 2014 - 11:55 PM.


#16 howdanrocks

  • Members
  • 7 posts

Posted 13 June 2014 - 12:24 AM

Seems to be working perfectly, thanks!

I know this program Oversimplifier made features "PDA registration" if you want to see how he did it.

#17 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 13 June 2014 - 02:43 AM

Generating a unique fingerprint is the easy part. Building support into my code is the part I'll have to spend some time working on. FWIW, if I find a way to do it (that also makes me happy), I'll probably use the same formula oeed used and use the same .fingerprint file to maintain compatibility with his app and Lyqyd's pocketgps.

Edited by Dog, 13 June 2014 - 02:45 AM.


#18 zeotom

  • New Members
  • 2 posts

Posted 06 September 2014 - 08:33 AM

Loving how simple and intuitive this is to use. It's perfect for compacting my current project.
Just one small-ish request for an upcoming build point; Would a 'Pulse' option be possible?
While Levers are great, and work, sometimes a pulse is more efficient.

Apart from that, It is perfect! Definitely bookmarking this.

#19 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 07 September 2014 - 05:15 PM

Hey zeotom - thanks for the suggestion! I've added two new pulse options to cc10 (short 0.5 seconds & long 2 seconds). Neither pulse option is 'Universal' so they won't respond to 'All ON' or 'All OFF'; but if you'd prefer Universal/non-Universal versions instead of short/long let me know and I can make that change.

#20 zeotom

  • New Members
  • 2 posts

Posted 07 September 2014 - 08:57 PM

Perfect. Just what I was looking for. :D
I'm Amazed at the quick response time. :P





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users