Author Topic: Self-build Arduino HA sensors controlled with VoxCommando  (Read 32933 times)

0 Members and 2 Guests are viewing this topic.

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: Self-build Arduino HA sensors controlled with VoxCommando
« Reply #30 on: April 10, 2015, 02:33:55 PM »
 
RGB-Controller with motion sensor in 3D-printed case  ;D

that is sweet, I can't wait until I can get my hands on one of the Light sensors great job  :yay

simileinchen

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Self-build Arduino HA sensors controlled with VoxCommando
« Reply #31 on: May 12, 2015, 04:07:56 AM »
Hi,
really loving your work!

Do you guys have a tutorial to your Arduino WLAN RGB Controller? Which parts do I need for this? How does Voxcommando communicate with the wlan rgb controller? Which protocol is it using to accomplish this?

Keep up the great work and thanks!
PS: Are you selling the RGB Controller/Entire setup somewhere?

Simon
« Last Edit: May 12, 2015, 04:57:57 AM by simileinchen »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Self-build Arduino HA sensors controlled with VoxCommando
« Reply #32 on: May 12, 2015, 05:35:42 AM »
Hallo Simon, willkommen im VoxCommando Forum.

Ja es gibt ein "Tutorial" zu dem RGB Controller welches aber nur Sinn macht wenn Du einen Controller hast.

Du benötigst als erstes einen MySensors-Serial-Gateway: http://www.mysensors.org/build/serial_gateway

Bild 6 und 7: http://voxcommando.com/forum/index.php?topic=1921.0

Es kann auch alles für den Anfang auf einem Steckbrett gebaut werden - wird aber schnell unübersichtlich und zudem haben wir SMD-Bauteile auf dem RGB-Controllerboard eingesetzt, welche nicht mit dem Steckbrett genutzt werden können und diese müssten dann erst mit anderen Bauteilen ersetzt werden müssen.

Ja wir haben den Gateway sowie den RGB Controller sebst gebaut und wenn Dave noch ein PCB board übrig hat, könntest Du eventuell einen fertigen RGB-Controller und Gateway von uns erwerben. Hier benötigst Du lediglich noch den LED-Strip mit passendem Netzteil (12V, 3-5A je nach LED-Strip Länge) und unseren python script.
Wenn Du den Controller selber bauen möchtest, kann ich Dir eine Liste mit den benötigten Teilen geben sowie das Layout für das Board.

Bei interesse einfach eine PM an mich oder Dave  ;)


Dieser Gateway wird per USB an dem PC angeschlossen auf dem VC läuft. Dieser Gateway kann Daten von den Sensoren (RGB, Temperatur, Feuchte usw.) empfangen und an den Serial-Port (CommPort) ausgeben. Mit einem von uns erstellten python-script liest VC die Daten an dem Commport und speichert diese in Maptables. Wie man Sensoren baut und was man braucht steht hier:

 http://www.mysensors.org/build/temp

Ein Temperatursensor ist ein guter start für den Anfang. Man muss keine Programmiersprachen können, die Sensorskripts gibt es ebenfalls auf der MySensors Webseite und es ist alles sehr gut beschrieben.

Ales basiert auf Arduino-Hardware und der MySensor library: http://www.mysensors.org/download/sensor_api_14

Ich hoffe ich konnte Dir ein wenig weiter helfen,
Kalle




***********  get excited and make things  **********

simileinchen

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Self-build Arduino HA sensors controlled with VoxCommando
« Reply #33 on: May 12, 2015, 07:06:38 AM »
Wow Kalle, das ist Wahnsinn! Danke für deine Antwort! Ich werde mich heute einlesen und bestimmt mit einem Haufen fragen zurückkommen :).

Danke für die Mühe und bis demnächst!

Dave

  • $upporter
  • Sr. Member
  • *****
  • Posts: 139
  • Karma: 31
    • View Profile
Re: Self-build Arduino HA sensors controlled with VoxCommando
« Reply #34 on: June 30, 2015, 08:09:50 AM »
Kalle just recorded a video with the RF/IR-Blaster we are currently working on  8)






Dave has done a great work with the code and hardware - a prototype PCB is now in production!   ::bow :hugs


Kalle
« Last Edit: June 30, 2015, 08:29:28 AM by Kalle »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Self-build Arduino HA sensors controlled with VoxCommando
« Reply #35 on: June 30, 2015, 09:12:47 AM »
Looks awesome.  :yay

Your office is starting to look almost as messy as mine. Mad scientist!

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: Self-build Arduino HA sensors controlled with VoxCommando
« Reply #36 on: June 30, 2015, 09:50:56 AM »
Great! I'm going to build one myself as soon as I manage to finish my new controller code with support to ack and responses from/to sensors.
Nice job!

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Self-build Arduino HA sensors controlled with VoxCommando
« Reply #37 on: June 30, 2015, 10:15:42 AM »
Looks awesome.  :yay

Your office is starting to look almost as messy as mine. Mad scientist!
Haha, yes I call it "Bermuda Triangle", because everything what you have stored here will never found  ;D
***********  get excited and make things  **********

Foggy

  • $upporter
  • Contributor
  • *****
  • Posts: 86
  • Karma: 4
    • View Profile
Re: Self-build Arduino HA sensors controlled with VoxCommando
« Reply #38 on: June 30, 2015, 04:08:43 PM »
The IR module is exactly what I am looking for.

Any idea when we can buy it and also the gateway?

Best wishes. 

James.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Self-build Arduino HA sensors controlled with VoxCommando
« Reply #39 on: June 30, 2015, 04:47:43 PM »
I think it is no problem after the boards are arrived and some test are done. The IR/RF Blaster board is already in production (3 or 4 weeks ago), so maybe it will arrive next time.
At the moment we have no gateway pcb board in stock and to order only one is a bit expensive - maybe some others are interested in this stuff, but it is possible to build you an gateway on a prototyping board or without a board which looks not so pretty like this one: http://www.mysensors.org/build/serial_gateway
I can say nothing about the price but maybe Dave has a idea  ;)


« Last Edit: June 30, 2015, 06:34:00 PM by Kalle »
***********  get excited and make things  **********

Foggy

  • $upporter
  • Contributor
  • *****
  • Posts: 86
  • Karma: 4
    • View Profile
Re: Self-build Arduino HA sensors controlled with VoxCommando
« Reply #40 on: June 30, 2015, 07:11:05 PM »
Thank you Kalle,

I think I can have a go at the Gateway. I purchased the parts some time ago. However if you have parts, I would certainly consider buying an assembled IR blaster. Please let me know. I may be delayed in replying to any response as I am away for the next week.

Best wishes.

James.

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: Self-build Arduino HA sensors controlled with VoxCommando
« Reply #41 on: July 01, 2015, 02:29:05 PM »
One question: Why did you guys have chosen to store the IR codes on a SD card?

I suppose this DYI IR Blaster can not work standalone, meaning that it depends on something else (VC in this case) to tell it to either learn or send a IR packet. Hence I see no reason for saving the learned IR packets in the device memory instead of the PC memory.

My idea for building my own custom IR Blaster is that saving it on a database table on the PC would be much better than saving on the device itself. Am I missing something?

Dave

  • $upporter
  • Sr. Member
  • *****
  • Posts: 139
  • Karma: 31
    • View Profile
Re: Self-build Arduino HA sensors controlled with VoxCommando
« Reply #42 on: July 01, 2015, 03:24:44 PM »
Hi Marcus, you are absolutely right! This is what we tried first. Basically there are two ways to store IR-Codes. The first way is to find out which type of code is recorded (NEC/RC5/RC6/Panasonic/...) and use typical patterns to generate short codes. The library we are using to receive IR can (in theory) do this. But it doesn't work with all remotes (e.g. my Samsung TV remote didn't work). That is why we use raw codes, which basically just store the time the IR led is on and off for each code. The problem with raw codes is that they are much longer, but the maximum length for a MySensors message is 25 characters. We already had a solution where we splitted the code and added a "connector-character" to each message except the last and put the code back together with the python script. But we had problems with lost messages.

I recently bought some ESP8266 Wifi moduls. If I find some spare time, I will have a look at this and see if we maybe can run a little web server on the arduino. So we could create a IR/RF blaster which can be used as a standalone device and be controlled over a website and tcp/udp/http requests. I'm nearly sure this could be done, but it would be a lot of work and I'm not sure if it makes much sense, since my PC is running 24/7 anyway... :bonk
« Last Edit: July 01, 2015, 03:53:55 PM by Dave »

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: Self-build Arduino HA sensors controlled with VoxCommando
« Reply #43 on: July 01, 2015, 04:33:33 PM »
Dave, do you know what's the size of this RAW data in bytes for each package?
I suppose each byte of such raw data contains the time in micro or mili seconds that the input pin was high or low (1 or 0). This way, the protocol is irrelevant because once you alternate the output IR led again on the same sequence and timing, it is just acting exactly as the original Remote Controller.
If I'm right above, I'm wondering if it's possible to convert the data back to bytes on a shorter message, creating a intermediary data format that would be used only to send data back and forth between the computer and the arduino. The arduino would then translate the data back to original format before emitting such data through the IR led.
For example, if I send 64 bytes of data in an IR packet (lets say, the On button of the remote controller). Then, depending of the protocol I may have a maximum of 64 bytes * 8 bits = 512 bytes, each containing the timing of each bit. In reality, if I'm captuing raw data, there are also the control bits, like the start bit, the stop bit and the parity bit, which could turn the space necessary to store the data for a single IR packet to a total of 704 bytes!. But then, not all bits will be different, for example, one byte being recorded could be FF, meaning the raw data for this byte would be a long 1, stored in one single byte instead of 8 like I was saying. Anyway, I see how this can be a nightmare, but maybe there are alternatives?
Just a thought...



Otherwise, I can imagine many reasons for the data being lost when you divide it in many packets of 25 bytes. Where is the data being lost?

I'm just trying to help. I'll probably face the same problems once I try it myself, so I'm deeply interested.


Dave

  • $upporter
  • Sr. Member
  • *****
  • Posts: 139
  • Karma: 31
    • View Profile
Re: Self-build Arduino HA sensors controlled with VoxCommando
« Reply #44 on: July 01, 2015, 06:14:42 PM »
Code: [Select]
68,4500,4450,550,1700,500,1700,550,1650,550,600,550,550,550,550,550,550,550,600,550,1650,550,1700,500,1700,550,550,550,550,550,600,550,550,550,550,550,1700,550,1650,550,550,550,1700,550,550,550,550,550,550,550,600,550,550,550,550,550,1700,550,550,550,1650,550,1700,550,1650,550,1700,550,
This is how a code for my Samsung TV looks, but there are codes for other devices which are at least 50% longer.

I'm not sure if I understand all of what you wrote. I tried to shorten the code, but the shortest I could come up with were codes with ~75 characters (converting the raw code from dec to base62). Another problem was the low ram of the arduino while converting those codes, but that is probaly because of my poor programming skills.

Otherwise, I can imagine many reasons for the data being lost when you divide it in many packets of 25 bytes. Where is the data being lost?

The data was lost between the sensor and the gateway. Most of the time not all messages could be received.

I'm just trying to help. I'll probably face the same problems once I try it myself, so I'm deeply interested.

Your help is always appreciated! When you are ready to try it and have any questions or want to see our attempts (sketches/py/hardware), just write a mail!