Code Monkey home page Code Monkey logo

serverlessnabaztag's Introduction

ServerlessNabaztag

ServerlessNabaztag is a firmware allowing control of the Nabaztag/tag directly via the web, without an external server (a web server is needed only for downloading the firmware and the mp3s).

With this firmware, you can connect at http://<YOURNABAZTAGIP>/ and completely control your rabbit with a very simple web interface, as show in the following screenshot:

All the commands can be called with a single HTTP requests from an external program/script, example:

$ curl http://nabaztag/wakeup

In examples/check_mail.py, there is a script that turns on the nose when you have unread email and changes the lights color according to the weather forecast.

Configure the rabbit

  • Unplug the rabbit, press the button on its head and hold it while you replug your rabbit. When all the lights are blue, you can release the button
  • On your computer, connect to the wifi network created by your rabbit (the name should be Nabaztag<XX>)
  • Go to the configuration page at the following address: http://192.168.0.1
  • At the bottom of the page, in General Info, change "Violet Platform" to http://nabaztag.joe.dj/vl
  • Click on Update settings and wait for rabbit to reboot.
  • You can now connect to the IP of your rabbit, configure and control it. (note: if your rabbit IP is assigned with DHCP, you have to discover the IP address. Usually you can check the assigned IP from some page on your router)

Server install instruction

  • Create a folder "vl" an a website
  • Download the file vl/bc.jsp
  • Copy the file "bc.jsp" to the web server into the "vl" folder (note: it's not a Java Server Page, it's a binary file)
  • Download the mp3 files from https://github.com/andreax79/ServerlessNabaztag/tree/main/vl
  • Copy the mp3 files in the "vl/config" directory on the web server. The resulting directroy structure is the following:

  • Unplug the rabbit, press the button on its head and hold it while you replug your rabbit. When all the lights are blue, you can release the button
  • On your computer, connect to the wifi network created by your rabbit (the name should be Nabaztag<XX>)
  • Go to the configuration page at the following address: http://192.168.0.1
  • At the bottom of the page, in General Info, change "Violet Platform" to the url of the vl directory (without http://, example: 192.168.0.1/vl)
  • Click on Update settings and wait for rabbit to reboot.
  • You can now connect to the IP of your rabbit, configure and control it. (note: if your rabbit IP is assigned with DHCP, you have to discover the IP address. Usually you can check the assigned IP from some page on your router)

Firmware features

  • Control the rabbit via HTTP API
  • Configure via web interface
  • Fetch the current time from a time server and play the corresponding sound every hour
  • Fetch weather from open-meteo
  • Autonomously wake up at go to sleep
  • Respond to ICMP pings

Development

Please install the following dependencies:

$ sudo apt-get install gcc-multilib g++-multilib

Build the compiler and the simulator:

$ make compilter

Build the firmware

$ make firmware

Start local web server:

$ sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8000
$ python3 -m http.server

Links

serverlessnabaztag's People

Contributors

andreax79 avatar calebcgates avatar mkovatsc avatar rngtng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

serverlessnabaztag's Issues

Not able to change path to /vl directory

Hi, I wanted to refurb the old bunny, and so far I could first sauccessfully flash the WPA2 firmware from https://github.com/RedoXyde/nabgcc/releases and was able to get it into my current home network.

Now I am trying to change the /vl URL to the hosted files on my server, but unfortunately whatever I do in the configuration page, the value stays the same, its simply not saved.

I know this worked before when I changed it from Violet to openjabnab URL, but now it seems stuck. Any ideas?

Text to speech

Hi there,
I'm trying to integrate the Nabaztag in my Home Assistant server ( https://home-assistant.io/ )using your firmware and...well, it woks really fine but...
Was it the TTS feature working when your rabbit was still alive or were you using some other services to make the rabbit talk?
Thank you very much,
Grazie,
Massimo
nabaztag

Error 404

I an using the Homeassistant www/vl for the bytecode and config directory...
and I run the process 'python3 -m http.server' to test without using the redirection of Port80 (I use it for diyhue)

So i put the violet server field equivalent to the following: 192.168.1.7:8000/vl
and in www of home assisatnt I run python3 -m http.server

`ls www ...
total 92

-rw-r--r-- 1 root root 86874 30 avril 23:32 bc.jsp
drwxrwxrwx 9 root root 4096 10 avril 2023 config
`

So I got the 404 error using that method0

do you have some trick to fix the problem ?
The Rabit send the request but no success to use the firmware ...
when i try http://192.168.1.14 I get the Config original Violet page . is it normal ?
Right here the error output from the python3 process....

192.168.1.14 - - [01/May/2024 00:17:52] code 404, message File not found 192.168.1.14 - - [01/May/2024 00:17:52] "GET /vl/bc.jsp?v=0.0.0.13&m=00:19:db:xx:xx&l=00:00:00:00:00:00&p=07:ff:ff:ff:00:00&h=4 HTTP/1.0" 404 -

another point: I did not do the following point.

-At the bottom of the page, in General Info, change "Violet Platform" to http://nabaztag.joe.dj/vl
is it mandatory?

Total conversion as Mycroft physical entry point

Hi,

I still have a working Nabaztag:tag. The Nabaztag was a good project, but it seems that its main idea is revived as the new movement of Home Assistants (Google Home, Amazon Echo...).

All this services are closed, all but one: Mycroft.

Do you think it is possible to continue your project in order to convert the Nabaztag as the physical device of the Mycroft project? I imagine we will need to:

  • record and redirect the recorded stream to the dedicated API
  • offer an API on the bunny to play response
  • offer an API on the bunny to give visual feedback

Reading the status of the project, I think all of this seems possible. Do you see any difficulties?

Some questions...

Hello,

Your project seems very interesting but I have some questions before trying it:

  • If I use you firmware with my Nabaztag, can I go back to a previous firmware to use OpenJabNab/OpenNab ?
  • Is it possible to add a password/token to the API to secure the request ? (We could use a config file with the token set inside for exemple) ?
  • Is it possible to use the built-in microphone with your firmware ? If not, do you plan to add it ?
  • Same question for the built-in RFID reader

Thank you in advance!

Bin files explained

Hey. First thanks so much for this project, good to see others are working on a custom firmware too. I like your approach very much, being serverless removes a lot of hassle, let's see I may continue to build on top of that and add/merge my changes... let's keep the rabbit alive!

One (first) question before I get started: what are all those *.bin files?

  1. web/vl/bc.jsp - you compiled firmware
  2. bootcode.bin - same as web/vl/bc.jsp?
  3. conf.bin - ???
  4. foo.bin - ???

I find it confusing to have multiple, and delete the unused ones..

btw. my custom nabaztag files is here: https://github.com/rngtng/NabaztagHackKit
I tried to bring some light into the firmware language, addded a little test framework and I just pulled in changes so bytecode can be compiled on mac osx too.

Can't configure Bunny.

Hi,

I have set this up on a Raspberry Pi running Raspberry Stretch.

The bunny connects just fine, breathing green , but I cannot access the configuration page.

When I type in the IP address to the Raspberry Pi I get:

Index of/
  | vl/ | 2018-03-19 09:07 | - |  

Do you think this is because in stretch they moved the root folder for the apache2 web server from var/www to var/www/html?

Thanks in advance.

Nick

Can’t connect to Wi-Fi

Hi,

I know this may not be the best place to ask, but this is probably the most active project (or the one with the latest activity) about Nabaztags. I’m having issues connecting my Nabaztags to my Wi-Fi network, even with RedoXyde’s WPA2 firmware.

No matter how I try from my SFR box, all the LEDs stay orange with the left one blinking. I have tried setting the access point to WPA only, TKIP only, even WEP, only enabling 802.11bg, but nothing works.

Do anyone have any idea about what to try? Thanks!

file missing

when using command from the web page I get the error about reco directory. IS it normal ?

192.168.1.ip - - [01/May/2024 19:14:09] code 404, message File not found
192.168.1.ip - - [01/May/2024 19:14:09] "GET /vl/config/reco/fr/Comprend2.mp3 HTTP/1.0" 404 -
192.168.1.ip - - [01/May/2024 19:14:28] code 404, message File not found
192.168.1.ip - - [01/May/2024 19:14:28] "GET /vl/config/reco/fr/Comprend3.mp3 HTTP/1.0" 404 -
192.168.1.ip - - [01/May/2024 19:14:39] code 404, message File not found
192.168.1.ip - - [01/May/2024 19:14:39] "GET /vl/config/reco/fr/Comprend0.mp3 HTTP/1.0" 404 -

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.