Cat-Commander; New Software running on top of CatGenius GenieDiag firmware. Interested?

865 views
Skip to first unread message

Knight

unread,
Jun 8, 2016, 11:37:08 PM6/8/16
to CatGenius
Group,

I am trying to determine if there is any interest in my method of using Cat Genius.

I initially flashed Cat Genius onto my box, but quickly found it wasn't for me.  So I set out to write my own software.

I did NOT want to reinvent the wheel, and I didn't want to wait until anyone else did, (namely the group recreating the entire motherboard board based on a Raspberry Pi).

So I wrote my own Frankensteinish setup.  I flashed GenieDiag created by MindBender onto my box, then I am using a raspberry pi to send serial commands to my box.  I had some issues with getting the serial stream to work correctly and reliably, but I finally got that all sorted out.

This gives me a couple advantages:  1)  Wifi, with the Raspberry Pi 3, you can use wifi.  (I currently am using a rPi2 with a USB wifi dongle) 2) Multiple box control with 1 Raspberry Pi.  (I've only got one box at the moment.)  3)  I can write my own programs very easily, it's programmed in PHP Command Line, which is very similiar to BASIC, which, as you would guess is pretty basic.  I stuck with the same type of commands that MindBender used, IE, "ARM_UP", "BOWL_CCW", etc.

My idea is that the community would be able to submit their own wash programs and people can try out other people's wash cycles.  

Current Issues with my program:
1)  I don't watch the water sensor.  My program just fills the box for x seconds and stops filling.  I do not get clogs, so I don't have much of an issue with this approach.  I will fix it properly in due time, if the need/demand is there.  I know how to fix this problem, and can fix it if there is demand for it.
2)  I manually tell my box when to start a wash cycle, there is no automatic "after x seconds run a wash".  I just manually run it twice a day or so.  No cat detection is used, except to make sure before a wash cycle starts that no kitty is currently in the box.  I know how to fix this problem, and can fix it if there is demand for it.
3)  As of right now, I don't use the soap dispenser, I just use plain water, then after a couple days I dump in some bleach and run 5 wash cycles instead of the normal 3 wash cycles.  I know how to fix this problem, and can fix it if there is demand for it.

I have used my method for the last 6 months, with well over 500 wash cycles.  Not a single flood.  (Again, I don't get clogs.)

Here's the reason for my post.

1)  Is anyone else interested?
2)  If I decide to do this, I'm likely to create a set of forums (self hosted, self paid for, no ads, no crap.), would anyone be interested in forums?

My "program" is simply a script, it's not compiled and doesn't require any special or expensive software to run, use, or modify, MindBender has already done that part, and his core part doesn't need to be changed at all for my system to work.

Any additional information I'd be glad to give out.


Knight.

Mark Magness

unread,
Jun 9, 2016, 3:35:40 AM6/9/16
to CatGenius
Great minds think alike. I am doing a similar thing but with the RPi 3's in-built bluetooth and a build of CatGenius with all the serial interface options enabled. I have a user interface on the official RPi touchscreen, but it's a bit basic at the moment. I'll be developing it when I get more free time.

Robert Deliën

unread,
Jun 9, 2016, 5:27:55 AM6/9/16
to catg...@googlegroups.com
Hi Knight (who might, or might not say 'Ni'),

Here's just my two cents.

> I am trying to determine if there is any interest in my method of using Cat Genius.

I'm still in the 'controller replacement board'-camp. I have actually started negotiation with an old EE colleague last week on doing schematic entry an board layout for me. Still I don't recommend anybody who wants/needs a solution now to wait for this.

> So I wrote my own Frankensteinish setup. I flashed GenieDiag created by MindBender onto my box,
> then I am using a raspberry pi to send serial commands to my box. I had some issues with getting
> the serial stream to work correctly and reliably, but I finally got that all sorted out.

GenieDiag started out as a diagnostics tool to help people figuring out what is wrong with their box, and honestly; To make my life easier diagnosing remotely.

Already a couple of years ago, somebody (you?) asked me for low-level control commands on the serial port. I already had code for a command line interpreter so that was fairly easy to add to GenieDiag. To GenieDiag, not to CatGenius, because the latter would require extra code to marshal ownership of hardware control.

In short: You're using it exactly for what it was intended for. Hopefully not alone, but you're the only person I know of who does this.

> This gives me a couple advantages:
> 1) Wifi, with the Raspberry Pi 3, you can use wifi. (I currently am using a rPi2 with a USB wifi dongle)

I'm not a big fan of WiFi in embedded products, because it can be hairy to set up properly. But I'm making an exception for this project, because not everybody - including me - has an Ethernet socket close to their box. And trust me: I have Ethernet sockets _everywhere_ in my house.

> 2) Multiple box control with 1 Raspberry Pi. (I've only got one box at the moment.)

Personally I don't think the cost of one extra RPi outweighs the bundle of wires between boxes.
However, inter-box communication has been on my wish list from the beginning: If one box is washing, you just don't want a second box to start washing before the first one is finished.

> 3) I can write my own programs very easily, it's programmed in PHP Command Line, which is very
> similiar to BASIC, which, as you would guess is pretty basic. I stuck with the same type of
> commands that MindBender used, IE, "ARM_UP", "BOWL_CCW", etc.

You can do that in LitterLanguage too, albeit (much) more cumbersome.
The LitterLanguage interpreter supports multiple sources and the idea was to be able to run washig programs from a cartridge tag, allowing different programs for different cartridges containing different detergents. For debug and development purposes, a washing program could be run from the serial port, attached to a PC feeding it commands in real time. That does however requires a PC program and that I didn't make, mostly because demand was/is NIL.

> My idea is that the community would be able to submit their own wash programs and people can try
> out other people's wash cycles.

That was the whole idea behind LitterLanguage. But the modding/sharing never started. I suppose most people just want to get out of their cartridge jail and don't care much for a better washing program. And my method being too hard/cumbersome/unfinished is probably a big cause here too.

> Current Issues with my program:
> 1) I don't watch the water sensor. My program just fills the box for x seconds and stops filling. I do
> not get clogs, so I don't have much of an issue with this approach. I will fix it properly in due time,
> if the need/demand is there. I know how to fix this problem, and can fix it if there is demand for it.

If your water pressure is more or less constant, it's just a matter of tuning the timing to your local pressure. I guess that's what you did and given the amount of problems caused by the water sensor, it's a pretty good idea. However, I would only recommend it for places where flooding isn't too much of a problem, like for the boxes in my garage.

> 2) I manually tell my box when to start a wash cycle, there is no automatic "after x seconds run a wash".
> I just manually run it twice a day or so.

I don't even know for sure if that works in CatGenius.

> No cat detection is used, except to make sure before a wash
> cycle starts that no kitty is currently in the box. I know how to fix this problem, and can fix it if there is
> demand for it.

Unfortunately, you cannot use the cat sensor to detect if the box is occupied: I have done long-time logging, combined with video recordings and I have found out that there is no one-on-one correlation between the box being occupied and the sensor output. A cat doing his business causes one or more brief sensor triggers. This is good enough to trigger a delayed washing program, but not to conclude the box is not occupied.

One of our cats even manages to use the box without triggering the sensor at all, because he enters and leaves the box from the sides, and sticks close the PU while doing his duty.

> 3) As of right now, I don't use the soap dispenser, I just use plain water, then after a couple days
> I dump in some bleach and run 5 wash cycles instead of the normal 3 wash cycles.

Same here. I do a deep-clean three times a year, with a high-pressure cleaner, outside on the grass. Imagine the mess that makes.

> 1) Is anyone else interested?
> 2) If I decide to do this, I'm likely to create a set of forums (self hosted, self paid for, no ads, no
> crap.), would anyone be interested in forums?

I am delighted to see somebody is actually taking my work and building his own solution on top of it. So please don't take this reply as criticism or in any other negative way.

Cheers,

Robert.

Knight

unread,
Jun 9, 2016, 5:34:11 AM6/9/16
to CatGenius


On Thursday, June 9, 2016 at 1:35:40 AM UTC-6, Mark Magness wrote:
Great minds think alike. I am doing a similar thing but with the RPi 3's in-built bluetooth and a build of CatGenius with all the serial interface options enabled.
 
That's actually an interesting method.  When I bought my first rPi2 for this application I bought it with a touch screen case.  The screen is the same size as the rPi2, but I kinda gave up on that option when I switched my entire house over to a different setup.


The second reason for doing this whole rPi-Cat Commander setup, was so that I could integrate my cat boxes into my whole house automation system, which is controlled via a custom made terminal screen, this is where control of the Cat Commander takes place.

Knight.

Knight

unread,
Jun 9, 2016, 5:45:15 AM6/9/16
to CatGenius


On Thursday, June 9, 2016 at 3:27:55 AM UTC-6, MindBender wrote:
Hi Knight (who might, or might not say 'Ni'),

Here's just my two cents.


Always appreciated. ;)
 

> I am trying to determine if there is any interest in my method of using Cat Genius.

I'm still in the 'controller replacement board'-camp. I have actually started negotiation with an old EE colleague last week on doing schematic entry an board layout for me. Still I don't recommend anybody who wants/needs a solution now to wait for this.


I agree, I'd ultimately love to have a truly replaced controller board.  I'm still in on this concept, my brother is an EE, and I can occasionally talk him into helping me with things. ;)
 

Already a couple of years ago, somebody (you?) asked me for low-level control commands on the serial port. I already had code for a command line interpreter so that was fairly easy to add to GenieDiag. To GenieDiag, not to CatGenius, because the latter would require extra code to marshal ownership of hardware control.


I am the one who asked that GenieDiag be modded to be computer readable, not human readable with less bytes per packet.  So, I don't think that was me.
 

In short: You're using it exactly for what it was intended for. Hopefully not alone, but you're the only person I know of who does this.


Good to hear!
 

I'm not a big fan of WiFi in embedded products, because it can be hairy to set up properly. But I'm making an exception for this project, because not everybody - including me - has an Ethernet socket close to their box. And trust me: I have Ethernet sockets _everywhere_ in my house.


Yeah, I've decided a cat5 will have to be installed next to my Cat Genie soon, I'm sick of wifi also.  Not sure if it's my rPi2 or the AP, but something is causing it to lose connection every third day or so.  Power cycle on rPi2 fixes that problem.
 

Personally I don't think the cost of one extra RPi outweighs the bundle of wires between boxes.

However, inter-box communication has been on my wish list from the beginning: If one box is washing, you just don't want a second box to start washing before the first one is finished.


My vision was if the boxes were near each other...  When I had two cats, I was considering placing both boxes within a few feet of each other.  Now that I only have one cat, that's not longer an issue.
 

You can do that in LitterLanguage too, albeit (much) more cumbersome.

The LitterLanguage interpreter supports multiple sources and the idea was to be able to run washig programs from a cartridge tag, allowing different programs for different cartridges containing different detergents. For debug and development purposes, a washing program could be run from the serial port, attached to a PC feeding it commands in real time. That does however requires a PC program and that I didn't make, mostly because demand was/is NIL.


Yeah, I had known that you were talking about programs on the cartridges, but space concerns and bothers, and I just felt, the rPi2 with serial control was easiest and less concerns of space.
 

That was the whole idea behind LitterLanguage. But the modding/sharing never started. I suppose most people just want to get out of their cartridge jail and don't care much for a better washing program. And my method being too hard/cumbersome/unfinished is probably a big cause here too.


I also wonder if the lack of sharing programs is because not many people have made custom programs...  Even if I was interested in custom making a firmware off of your firmware, I really don't want to lose all that work when you come out with a better solution later.  This was one reason I chose not to go with a custom firmware from your CatGenius.
 

If your water pressure is more or less constant, it's just a matter of tuning the timing to your local pressure. I guess that's what you did and given the amount of problems caused by the water sensor, it's a pretty good idea. However, I would only recommend it for places where flooding isn't too much of a problem, like for the boxes in my garage.


Yes, I simply determined timing and set it as a variable, super easy for anyone else to do as well if they use my system.
 

> 2)  I manually tell my box when to start a wash cycle, there is no automatic "after x seconds run a wash".
>  I just manually run it twice a day or so.

I don't even know for sure if that works in CatGenius.


For the brief 3 days I used CatGenius, it did work.


Unfortunately, you cannot use the cat sensor to detect if the box is occupied: I have done long-time logging, combined with video recordings and I have found out that there is no one-on-one correlation between the box being occupied and the sensor output. A cat doing his business causes one or more brief sensor triggers. This is good enough to trigger a delayed washing program, but not to conclude the box is not occupied.


Yeah, to be honest, it was just a kind of quick, meh, hopefully I don't scare my cat kinda thing.  I physically check before running the box anyway.
 

One of our cats even manages to use the box without triggering the sensor at all, because he enters and leaves the box from the sides, and sticks close the PU while doing his duty.


That...  is a damn cat.  And, to be honest, does not surprise me in the slightest.  lol
 

Same here. I do a deep-clean three times a year, with a high-pressure cleaner, outside on the grass. Imagine the mess that makes.


Yeah, I basically do a full power wash as well...  but...  I usually drop the whole unit into my truck and take it to the local car wash late at night.  ;)
 

I am delighted to see somebody is actually taking my work and building his own solution on top of it. So please don't take this reply as criticism or in any other negative way.

Cheers,

       Robert.


Not at all, so long as you are offended that CatGenius didn't work for me. ;)

@Robert, Are you interested in getting some forums setup?

Knight. 

Mark Magness

unread,
Jun 9, 2016, 6:18:47 AM6/9/16
to CatGenius
Current Issues with my program:
1)  I don't watch the water sensor.  My program just fills the box for x seconds and stops filling.  I do not get clogs, so I don't have much of an issue with this approach.  I will fix it properly in due time, if the need/demand is there.  I know how to fix this problem, and can fix it if there is demand for it.

I don't know how it works with GenieDiag, but in CatGenius I believe the serial port outputs the status of the water sensor when there is a change, so you'd just have to wait for the right string to be output.

2)  I manually tell my box when to start a wash cycle, there is no automatic "after x seconds run a wash".  I just manually run it twice a day or so.  No cat detection is used, except to make sure before a wash cycle starts that no kitty is currently in the box.  I know how to fix this problem, and can fix it if there is demand for it.

Again, not a problem with mine as I'm running CatGenius
 
3)  As of right now, I don't use the soap dispenser, I just use plain water, then after a couple days I dump in some bleach and run 5 wash cycles instead of the normal 3 wash cycles.  I know how to fix this problem, and can fix it if there is demand for it.

Yeah I haven't seen the need for using the detergent dispenser anymore either. 

The second reason for doing this whole rPi-Cat Commander setup, was so that I could integrate my cat boxes into my whole house automation system, which is controlled via a custom made terminal screen, this is where control of the Cat Commander takes place.

Great minds think alike yet again. The Rpi3 will eventually be the main controller for all my home automation. 


Mark Magness

unread,
Jun 9, 2016, 6:26:07 AM6/9/16
to CatGenius

However, inter-box communication has been on my wish list from the beginning: If one box is washing, you just don't want a second box to start washing before the first one is finished.


I've been thinking about this too, and I figure that with my setup (and possibly Knight's), you don't need the boxes to speak to eachother as they are both talking to the Raspi. You just need the Raspi to monitor the status of each box and issue a cancel command should one attempt to start a wash while another is already washing. Once the second one has finished washing you could then issue a command to the first to resume its wash. I haven't implemented this yet though as my second box is out of commision at the mo.

One of our cats even manages to use the box without triggering the sensor at all, because he enters and leaves the box from the sides, and sticks close the PU while doing his duty.

Tell me about it! One of mine is extremely adept at not even entering the box at all and just balancing on the edge whilst doing his business. 

Knight

unread,
Jun 9, 2016, 6:38:27 AM6/9/16
to CatGenius
I don't know how it works with GenieDiag, but in CatGenius I believe the serial port outputs the status of the water sensor when there is a change, so you'd just have to wait for the right string to be output.

Yes, GenieDiag will announce to the "user" when the water is full, and when the cat sensor is triggered, just a matter of monitoring for that string.
 
Great minds think alike yet again. The Rpi3 will eventually be the main controller for all my home automation. 


Well, as much as I'd love the concept/idea of running the terminals on the rPi3, I haven't actually done that, I started the terminal project before rPi's were made, and so I've already got tons of time invested in a .net based terminal, using 14" standard vga touchscreens.  Maybe someday I'll play with WINE.  ;)


Knight.

Michael Conner

unread,
Jun 9, 2016, 10:51:36 AM6/9/16
to catg...@googlegroups.com
Mark, Robert, ,,

First,, Congratulations Robert  !!!

CG-120

it's nice to hear that that someone is interested in a new controller for the CG-210.

I've spent a lot or time on my CG-120 project and  the best method for a revamp for the CG-120 electronics. 

He's where my direction went and made a few turns. 

I started with the idea to replace the brain-dead CG circuit board entirely, it's a piece of Junk. Initially I started with the another MPU. I've designed hundreds of controllers over the years and a couple of decades ago our designs changed. We went to a main mother board with a MPU board atop that simply plugged into the mother board.plug. Only power,, I/O and minimal power up circuitry were in the board-to-board connection.  Many of our designs required large mother boards, and large connectors. This was not at all acceptable with a SMD MPU and direct support IC's with fine copper traces. Large traces on the mother board, connectors, power supply, and larger power devices.\

Now there is a large selection of the small SMD MPU boards, some with bare minimal support circuitry and those like the R-Pi with tons of I/O and specialized connections.

My direction  initially  design to com with the CG-120 via Roberts Daig serial link, perfect application. And then after the "War is over", build a new mother board and improve the deficiencies on the existing CG-120 mother board. And link the two boards with some serial I/O.....

However, I'm like many -- always short on time. I'm just finishing my Custom Home build, I have several Collector Cars that I build and drive in the summer, and I have two designs in process, and there's Life in general.

I have all of the parts that I think are required.. R-Pi with Cameras, Honeywell Schmidt Trigger Photo Optics and Opto circuit isolators, IR sensors, DC power supply parts, and so one..

The are several "Things" that I don't like re the electrons design in this product and Robert has shared his too. 

Utilize a camera for pattern recognition to,,, detect the Cat presence. Determine if the Cats visit was  solids or liquid. Solids would require a scoop routine and liquid would not, only some bowl movement to assist in letting the liquid drain, and not be spread to the litter material. 

Leave water, perhaps an inch in the bottom of the CG-120, after the wash cycle.. Dilutes the urine and any small particles on solids - reduce the odors and makes the wash cycle more efficient.

Change the H2O level detect to a high quality commercial Honeywell device with Schmidt trigger output. Use a logic level (return) detect (input into the R-Pi from the Optic output) to read this sensors state, Hi/low,,,, redundancy.

Separate power supply for the R-Pi

Simple commands to change wash cycle and dry times. I'm using larger Almond shaped plastic pieces that require much less drying time.

Monitor machine state cycles etc via Blue Tooth Link.

And eventually design a decent mother board and improve the power supply, scoop position, Temps,,, etc..


Currently on my Mad Science Deck,,   Using R-Pi

Garage door openers -to my Smart Phone,..
 
a Blue Tooth link to the Smart Phone. I'm using two low cost cameras, some opto coupled I/O, a serial I/O, and a link to our router.

We have 5 garages with electric garage door openers, all the same manufacturer. But they continue to change their remotes. Plus pocketing  garage door and car remotes is redundant and ridicules. I live on some acreage and a bit remote...

A R-Pi, two cameras, power supply (only DC to DC, I have 12 VDC though out the house) opto isolators for I/O and etc. 

I'm using the cameras for security feedback, an the I/O to monitor the garage doors position and a couple of other nearby Man entrance doors into the house or detached garages. One I/O for the serial comm to the garage door opener. 

The manufacturers inside garage door wall mounted garage door opener utilizes a serial link..

One R-Pi for each garage door. This will solve the mini remotes bulging in my pocket, and I can place them in my detached garage and shop for door opening and security to my smart phone. Plus simple to use in other ares on my home and view Video via my smart phone.

The various hard ware parts is pretty much the same as the R-Pi. Plus once operational I'd like to take the R-Pi pattern recognition to a higher level than just looking a raw video from my smart phone. 

I can get more involved if a group forms. 

Michael...







 

--
You received this message because you are subscribed to the Google Groups "CatGenius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to catgenius+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Knight

unread,
Jun 9, 2016, 3:45:35 PM6/9/16
to CatGenius
yeah, I've considered doing a Pixy cam.  But, bigger fish to fry at the moment.



Knight.

Michael Conner

unread,
Jun 9, 2016, 4:34:47 PM6/9/16
to catg...@googlegroups.com
I'm thinking a $15 cam, and do this last.  Great Cam though...

Yep, too many fish..

John Morgali

unread,
Jun 9, 2016, 8:00:18 PM6/9/16
to catg...@googlegroups.com
Mike, what are you using for litter?  I saw you said it was almond shaped plastic.  Where are you sourcing it?



John Morgali
Sent from my T-Mobile 4G LTE Device

Michael Conner

unread,
Jun 16, 2016, 3:52:57 PM6/16/16
to catg...@googlegroups.com
 John,

RE: Cg-120 litter pellet substitution that I've been using.

It took,,,  While but I finally found t he shipping bag with the info.

The company is 3D Supply Source Plastic Pellets, ABS, # GP35

3DSupplySource.com

I get 5 pounds at a time. Lasts for at least six months, four Cats and two CG-120 litter
boxes.

Let me know if this helps.

Works well, less tracking and Cats are okay with it. But drys faster so eventually the dry time needs to be reduced several minutes.

Michael...

John Morgali

unread,
Jun 17, 2016, 9:05:02 PM6/17/16
to catg...@googlegroups.com, John Morgali Jr
awesome, thank you so much!  I’m going to give it a shot and order some up today. 


On Jun 16, 2016, at 12:52 PM, Michael Conner <ocea...@gmail.com> wrote:

 GP35

Michael Conner

unread,
Jun 18, 2016, 10:20:33 AM6/18/16
to catg...@googlegroups.com
John, let me know what you think. Ypo'll only need 1/4 to 3/8th inch
of liter in the bowl at a time..

Michael

Kyle Kimsey

unread,
Jul 16, 2016, 2:58:34 PM7/16/16
to CatGenius
I'm interested. I began to do something similar and played with the serial commands, even went as far as pulling the serial interface connector to the outside of the box.

This is exactly how I planned to attack it as well.

Some thoughts:
- Water sensor is a must if it's going to be released. Different areas have different pressure, I have high water pressure so my box fills rapidly.

- Automatic wash seems like it'd be a necessary item.

- A plugin interface might be worthwhile. Even something simple that just includes the plugins code when enabled. This way people can develop other items without messing with any of the main script.


As for the wash cycles, it could be as basic as reading a config file for parameters. Parameters could be broken down to ACTION,time . So users could program ARM_DOWN,3000 (ms).

Actions could also be preset mini-programs. For example, the box does an up,down,up,down,up,down with the arm to shake loose granules. That whole sequence could be a preset, so users programs would just be "SCOOPUPSHAKE".

Kyle Kimsey

unread,
Jul 26, 2016, 7:12:57 PM7/26/16
to CatGenius
Not sure if you're still checking this, but I wouldn't mind checking out what you have so far if you happen to want to throw it up on a GITHUB. My cat seems to like to turn the box on, so it runs a cycle so many times a day.

Knight

unread,
Oct 11, 2016, 9:14:15 PM10/11/16
to CatGenius
Kyle,

Not sure if YOU are still checking this group, but here it is anyway.  ;)

- Water sensor is a must if it's going to be released. Different areas have different pressure, I have high water pressure so my box fills rapidly.


As it stands right now, my system never uses the water sensor.  It gets dirty and stops working.  It was a huge pain in the ass.  Instead, I run my box with slightly less water then the OEM meant, therefor the sensor never touches water, therefor it never gets dirty.  It's only used as a backup in case programming code goes awry, or there's a clog, or power failure.  In any event, on the second wash cycle it'll fill up to the water sensor and stop the water tap, preventing a flood.

When I first developed the scripting, I simply timed with a stop watch how long it took for the box to fill up, and placed that value inside the main script.  I also timed how long it takes for 1 bowl rotation, and for 1 up movement of the scoop, placed those numbers inside the main script, and it was done, easy for anyone else to change to fit their box if needed.
 

- Automatic wash seems like it'd be a necessary item.


I have setup automatic wash, but...  not using the cat sensor.  I simply have my cron tab set to run a wash every x hours.  In my case 4 times a day.  ( I have two cat genies, so I stagger wash times.)
 

- A plugin interface might be worthwhile. Even something simple that just includes the plugins code when enabled. This way people can develop other items without messing with any of the main script.


There is a bit of a "plugin" system already in place.
 


As for the wash cycles, it could be as basic as reading a config file for parameters. Parameters could be broken down to ACTION,time . So users could program ARM_DOWN,3000 (ms).

Actions could also be preset mini-programs. For example, the box does an up,down,up,down,up,down with the arm to shake loose granules. That whole sequence could be a preset, so users programs would just be "SCOOPUPSHAKE".



This is mostly how it's setup right now, for a minimal setup there are three files:

base.php
functions.php
wash.php

base.php has all the low level communications between serial and php, including time it takes to rotate the bowl, and time it takes to lower or raise the scoop, other then the variables at the top, it shouldn't need to be changed, I should probably move these variables to the functions.php file.

functions.php has all the basic functions, similiar to MindBenders "Litter Language", this file might need to be tweaked a little bit based on your preferences, for example, what actually happens when you say, "scoop()".  How many times do you scoop?, etc.    The surface function for my setup looks like this:

function surface() {

global $time_bowl_rotation;
        global $time_arm_max;

        $time_arm_step = "500";

        echo "Surfacing...";

        BOWL_CW();
ARM_DOWN();
WAITTIME($time_arm_max);
ARM_STOP();
WAITTIME($time_bowl_rotation);
ARM_UP();
WAITTIME($time_arm_step);
ARM_STOP();
WAITTIME($time_bowl_rotation);
ARM_UP();
WAITTIME($time_arm_step);
ARM_STOP();
WAITTIME($time_bowl_rotation);
ARM_UP();
WAITTIME($time_arm_step);
ARM_STOP();
WAITTIME($time_bowl_rotation);
ARM_UP();
WAITTIME($time_arm_step);
ARM_STOP();
WAITTIME($time_bowl_rotation);
ARM_UP();
WAITTIME($time_arm_step);
ARM_STOP();
WAITTIME($time_bowl_rotation);
ARM_UP();
WAITTIME(5500);
ARM_DOWN();
WAITTIME(4500);
ARM_UP();
WAITTIME(12000);

ARM_STOP();
DRYER_OFF();

BOWL_STOP();

        echo "done!\r\n";

}



wash.php is the main file, and is very simplistic, basically goes like this:

scoop();
wash();
drain();
wash();
drain();
drain();
dry();
surface();


I have ran over 500 washes on two boxes with this setup, and never had a flood.  That said, I don't get clogs, even though I have a long haired cat, I simply don't get clogs.  I do not run the quarter annual "maintenance cartridge" either.  It's been about a year since I've cleaned my boxes, they are certainly in need of a cleaning though.

There are always tweaks I can and should make, but overall the system has ran really well for me.

If you are still interested, reply, and I'll post up my files onto pastebin for you, and anyone else interested.  Just realize of course, I can't guarantee any support/warranty etc, that said, I will be browsing more often and apologize for the huge delay in response.  I read your initial comments within a few days of you posting, then thought I had replied, but obviously I hadn't.


Knight.

John Morgali

unread,
Oct 12, 2016, 3:13:09 AM10/12/16
to catg...@googlegroups.com, John Morgali Jr
I’m still watching this group.  Please don’t give up and think your alone.  I wish I could code the way ya’ll do, but I am good at tinkering.

John 

Kyle Kimsey

unread,
Mar 6, 2017, 12:26:10 AM3/6/17
to CatGenius
I'm still around. Would appreciate you posting the files if you have them.

A little while ago, I mapped out how I'd write the control/clean script in Python. But if you're willing to post up the PHP, I'd appreciate it and I'll post any tweaks I may make.

Flyboy BC

unread,
Mar 7, 2017, 2:25:24 PM3/7/17
to CatGenius
I would like to follow any such discussion. I am not sure I would implement until I saw your results but I'd like to change a few things about the way the unit operates.

Michael Conner

unread,
Mar 7, 2017, 3:11:26 PM3/7/17
to catg...@googlegroups.com
Flyboy BC.

I'm definitely interested.

Please Contact me at "Captmi...@gmail.com"

--
You received this message because you are subscribed to the Google Groups "CatGenius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to catgenius+unsubscribe@googlegroups.com.

ron klo

unread,
Mar 16, 2017, 1:11:17 AM3/16/17
to catg...@googlegroups.com
I haven't been following this thread, so sorry if these have already been considered, but I would love to see a WiFi connection with notifications of any malfunction and maintenance reminders, and an actual clock/timer feature. 

ron klo

unread,
Mar 16, 2017, 1:57:08 AM3/16/17
to CatGenius
I have a lot of catching up to do with these posts, but it sounds really interesting. I have 2 GC boxes, both of which the solution pump/hose deteriorated and leaked solution through the arm motor. Cleaned up the motor and replaced the pump hose with some aquarium air hose and waiting on some silicon hose from China now. The aquarium hose is vinyl and a thicker wall than i'd like, and I know it will harden with age.  The ebay hose is 4mm ID and 5OD, so should work well.  I've done some work with serial comms, eprom programming, QB45 and playing with Arduino now. 
Thanks for keeping an interest in this project.
Ron

Robert Deliën

unread,
Mar 16, 2017, 3:45:46 AM3/16/17
to catg...@googlegroups.com
> I haven't been following this thread, so sorry if these have already been considered,
> but I would love to see a WiFi connection with notifications of any malfunction and
> maintenance reminders, and an actual clock/timer feature.

I'm still working on the Pi HAT, basically a carrier board with all the relays, a power supply and CG-compatible motor/sensor connectors. It's a slow process, because I will have to find time for it, I'm pretty close to starting board layout.

Robert Deliën

unread,
Mar 16, 2017, 3:48:17 AM3/16/17
to catg...@googlegroups.com
> waiting on some silicon hose from China now.

Any RC model store sells it as fuel tubing.

Knight

unread,
Mar 24, 2017, 2:50:26 AM3/24/17
to CatGenius
Script is separated into three files.  base.php, wash.php, and functions.php.  The intent is that other people can make their own wash.php files and share them.  My wash.php and functions.php are included below.  

I have several wash cycles, scooponly, scoopwash, fullwash, quickwash, etc.  Some have 1 rinse cycle, some have 3, etc.  My wash.php most closely emulates the original OEM firmware, and so that is the one I'm including here.

My functions.php hasn't changed since I originally made/debugged it.  And it's used in all of my wash.php files.  I always just made a new wash cycle and it worked great.  Probably my functions.php will work for everyone else as well, but everyone likes to tweak things to their liking just a little bit sometimes.

All of these files work on the concept that they run on a Raspberry Pi (or any linux box really) and are connected to the Catgenie via a serial connection to the onboard micro processor in the Cat Genie, that is running the GenieDiag firmware made by MindBender.

I am using a USB<=>RS-232 adapter in my setup.  And a TTL<=>RS232 on the CatGenie side, so my script calls for access to /dev/ttyUSB0 for serial port.

There shouldn't be very much of pre-requisites on the Pi, but I'm not totally certain.  

All of these files I will update them on pastebin as I update them myself, especially if people are interested.



Knight.

Catman

unread,
Mar 24, 2017, 9:45:18 AM3/24/17
to CatGenius
I'm curious, why don't you go TTL to TTL?  You can access the Pi's GPIO serial port directly via /dev/serial0
I must be missing something?


On Thursday, March 23, 2017 at 11:50:26 PM UTC-7, Knight wrote:

I am using a USB<=>RS-232 adapter in my setup.  And a TTL<=>RS232 on the CatGenie side, so my script calls for access to /dev/ttyUSB0 for serial port.


Knight.

Robert Deliën

unread,
Mar 24, 2017, 10:44:13 AM3/24/17
to catg...@googlegroups.com
> I'm curious, why don't you go TTL to TTL?  You can access the Pi's GPIO serial port directly via /dev/serial0

The CG controller board uses 5v logic, and hence 5v TTL UART signals. The RPi uses 3v3 logic and is _not_ 5v tolerant. And if it were, I usually don't like to loose my terminal serial port...

Knight

unread,
Mar 24, 2017, 4:40:18 PM3/24/17
to CatGenius
MindBender hit it right on the nail.  There are 3.3v to 5v logic converters, but it was more bother then I wanted to mess with.

Knight.

Kyle Kimsey

unread,
Apr 22, 2017, 1:25:12 PM4/22/17
to CatGenius
As others have said, it's the logic level.

If you have time to wait for China, you can get 3.3v to 5v bi-directional level-shifters in a 10pack for around $2-4.

I have a bunch from other Pi projects since a lot of stuff is designed for Arduino (5v normally) and needs it to work with the Pi.

Kyle Kimsey

unread,
Apr 22, 2017, 1:51:18 PM4/22/17
to CatGenius
Thanks for posting it. Code is very clean and readable.

I have a few plugins in mind so any changes I make I'll likely build as a plugin and post here.

Reply all
Reply to author
Forward
0 new messages