@yoshida hi!
Im not sure where you get that #9 should be A5? Looks right to me. The pin is connected to pin 9, and that is D3.
For a rotary encoder, it depends on your input - but don't you want an analog signal in? In that case you use the analog pins.
Edit: offcourse, if you use a module converting it to digital like described in the the build section you use a digital pin.
I've updated the docs at home-assistant.io with sketch examples. Look at the light example.
https://home-assistant.io/components/light.mysensors/#example-sketch
It's what I used for testing during development. It adds an RGB sensor/actuator also besides a dimmer, but you can just remove any references to rgb in the sketch.
The dimmer slider will only be visible after turning on the light and clicking the entity in the gui to bring up the more info card.
@Nca78 Yes, I was actually thinking using DIP switch (or even more easy to read thumbwheel switch) to give a unique ID to each node! As soon as I receive the extra radio modules I ordered, I'll test that.
@Grubstake I'm afraid you're right! But it's ok to have just a few days of battery life. As I wrote, it might be often disassembled and reassembled.
@krisztian
Hi krisztian,
the singleLED board - as its name suggests - features only one LED output. If you want to have a setup with multiple LED strips you need to design a board with multiple outputs. I have already designed a board with 4 outputs, but I haven't built it.
In terms of software you need to register multiple sensors in your program like this:
#define numCh 4 //the number of outputs
const byte ledPins[] = {9,6,5,3};
byte ledLevel[numCh];
boolean ledDimWay[numCh];
//in the setup function request the dim levels from the gateway
for(byte i=0; i<numCh; i++) request(i, V_DIMMER);
//in the presentation function register multiple lights
for(byte i=0; i<numCh; i++) present(i, S_DIMMER);
//if you receive a signal, you need to check for the sensor id
setLED(message.sensor, requestedLevel);
//to set the LED level (function: setLED) you need to use the sensor id to determine brightness and pin
//Fade LED to set level
int delta = (level - ledLevel[child]) < 0 ? -1 : 1;
//Write to LED
analogWrite(ledPins[child], map(ledLevel[child],0,100,0,255));
I will probably publish the whole code once I have built and tested the 4LED controller (i call it "MySensors rainbowLED")
Hope I could help you
ThetaDev
This should work with Domoticz, it's what I intend to use with it. I've received the boards from China and I'm currently working on a version 2 of this board. There are some errors in the design of version 1 that I need to get out. New version will be up shortly.