Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unknown board revision a22082 #2

Open
albert0m opened this issue Feb 11, 2017 · 3 comments
Open

Error: Unknown board revision a22082 #2

albert0m opened this issue Feb 11, 2017 · 3 comments

Comments

@albert0m
Copy link

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 albert0m changed the title Problems when installing it on Raspbian Jessie and RPI 3 Error: Unknown board revision a22082 Feb 11, 2017
@nebrius
Copy link
Owner

nebrius commented Feb 11, 2017

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.

@albert0m
Copy link
Author

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?

@nebrius
Copy link
Owner

nebrius commented Feb 13, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants