aquarium-control icon indicating copy to clipboard operation
aquarium-control copied to clipboard

Error: Unknown board revision a22082

Open albert0m opened this issue 8 years ago • 3 comments

After a lot of troubles that involved downgrading to v0.10, I get this error:

/usr/local/lib/node_modules/aquarium-control/node_modules/raspi-gpio/node_modules/raspi-peripheral/node_modules/raspi-board/lib/index.js:374
    throw new Error("Unknown board revision " + rev);
          ^
Error: Unknown board revision a22082
    at Object.<anonymous> (/usr/local/lib/node_modules/aquarium-control/node_modules/raspi-gpio/node_modules/raspi-peripheral/node_modules/raspi-board/lib/index.js:374:11)

Can I use pins = BPLUS; since the RPI 3 doesn't look to be on there?

albert0m avatar Feb 11 '17 11:02 albert0m

This project uses an outdated version of the raspi and raspi-gpio modules. I've had this software running in my aquarium for over a year without needing to touch it, so it's a bit out of date now 😅.

Try setting the version of raspi to 3.0.5, and raspi-gpio to 3.1.1. Hopefully this software doesn't touch on any of the breaking changes and that's all you need to do.

nebrius avatar Feb 11 '17 17:02 nebrius

yeah, I had to fiddle around a lot to get it running! haven't had a chance to test the GPIO yet, the relay is being shipped right now and I'll get it on Monday. I hope I can still use your package, it looks the best on the github market! I have a couple of questions:

  • I saw the config files and I was wondering how I could adjust them to my setting. I only have one group of lights, how would I need to set the schedule.json to make it turn on and off following sunrise and sunset?
  • This is the first time I put my hands on Node, and being an Android developer I would love to make a native app (to integrate other sensors and a webcam too). I read about connecting to node servers through socket.io, tried a couple of libraries but none of them worked. Any hints on how I could make a client without touching your server?

albert0m avatar Feb 11 '17 17:02 albert0m

I hope I can still use your package, it looks the best on the github market!

Thanks! I hope it works for you too. I kinda just wrote it for me (hence why I'm not very good at keeping it updated, and why there's no documentation), but I hope it works for you too!

I saw the config files and I was wondering how I could adjust them to my setting. I only have one group of lights, how would I need to set the schedule.json to make it turn on and off following sunrise and sunset?

You would want to do something like this:

{
  "mode": "program",
  "overrideState": "day",
  "schedule": [
    {
      "name": "Sunrise",
      "type": "dynamic",
      "event": "sunrise",
      "state": "day"
    },
    {
      "name": "Sunset",
      "type": "dynamic",
      "event": "sunset",
      "state": "off"
    }
  ]
}

This will set the lights to turn off at sunset, instead of switching to night mode. Essentially, you're not using the night setting. You'll still need to specify a "night" pin in the other config file, but it doesn't need to be connected to anything since it won't be used.

This is the first time I put my hands on Node, and being an Android developer I would love to make a native app (to integrate other sensors and a webcam too). I read about connecting to node servers through socket.io, tried a couple of libraries but none of them worked. Any hints on how I could make a client without touching your server?

Yeah, the server exposes a REST API, which you can see at https://github.com/nebrius/aquarium-control/blob/master/server/src/server.js, which defines three endpoints:

GET /api/schedule POST /api/schedule GET /api/status

To be honest, I actually forgot how each endpoint works though 😅. The client web code that consumes this endpoint is at https://github.com/nebrius/aquarium-control/blob/master/client/src/api.js (oh BTW, this project ships with a web client for viewing/configuring the lights, just point it to the IP of the Pi and the port specified at https://github.com/nebrius/aquarium-control/blob/master/conf/config.json#L6). I'd recommend opening the aquarium site in a web browser, do some stuff in the page, and then use the browser's debug tools to see the format of the REST calls.

nebrius avatar Feb 13 '17 21:02 nebrius