LAN-Anbindung für BSB-Bus (Brötje, Elco Thision etc.)

Begonnen von justme1968, 29 November 2014, 19:50:40

Vorheriges Thema - Nächstes Thema

acfischer42

@freetz,

Bei mir funktioniert es ebenso ohne Änderung für beide Heizkreise. Konnte noch nicht testen ob es mit 3E auch geht.

Gruesse

Jewe

Ja mit 3E konnte ich es aus Zeitgründen noch nicht Testen. Ebenso die aktuelle Version noch nicht



Gesendet von iPhone mit Tapatalk

tetzlav

Zitat von: freetz am 31 Oktober 2019, 12:42:53
Das ist keine Antwort auf meine Frage, die sich auf den Output der seriellen Konsole bezog, also "Serial Monitor" in der Arduino IDE aufrufen und schauen, was da steht.
nacheinander:
$ wget http://192.168.178.8/I10003=-3.1 -qO-
$ curl -H "Content-Type: application/json" -X POST -d '{"Parameter":"10003", "Value":"-3.1", "Type":"0"}' http://192.168.178.8/JS

und die serielle Konsole:

17:13:48.558 -> GET /I10003=-3.1 HTTP/1.1
17:13:48.558 -> /I10003=-3.1
17:13:48.558 -> set ProgNr 10003 = -3.1
17:13:48.558 -> setting line: 10003 val: 00 FF 3A
17:13:48.620 -> LAN->HEIZ INF 10003 Benutzerdefiniert -  Außentemperatur: -3.1 °C
17:13:48.678 -> DC C2 00 0E 02 05 00 02 1F 00 FF 3A A1 5B

17:13:50.180 -> POST /JS HTTP/1.1
17:13:50.180 -> /JS
17:13:50.218 -> Setting parameter 10003 to 3.1 with type 0
17:13:50.218 -> setting line: 10003 val: 00 00 C6
17:13:50.307 -> LAN->HEIZ INF 10003 Benutzerdefiniert -  Außentemperatur: 3.1 °C
17:13:50.362 -> DC C2 00 0E 02 05 00 02 1F 00 00 C6 8C 37

freetz

Ok, danke, dann muss bei der String in Zahl Umwandlung was schief laufen, was mich wie gesagt wundert, weil strtod das eigentlich können sollte. Muss ich mal sehen, wann ich dafür Zeit habe, mir das genauer anzuschauen...
Alle Infos zur Anbindung von Heizungssystemen mit PPS-, LPB- bzw. BSB-Bus ans LAN gibt es hier:
https://github.com/fredlcore/bsb_lan

Alle Infos zum WLAN-Interface "Robotan" für Ambrogio/Stiga/Wolf und baugleiche Rasenmähroboter:
https://github.com/fredlcore/robotan

tetzlav

Was mir in dem Zusammenhang noch aufgefallen ist:

$ wget http://192.168.178.8/710=21.0 -qO-

17:25:15.227 -> GET /710=21.0 HTTP/1.1
17:25:15.227 -> /710=21.0
17:25:15.632 -> Duration until answer received: 78
17:25:15.632 -> LAN->HEIZ QUR  710 Heizkreis 1 -  Komfortsollwert:
17:25:15.678 -> DC C2 00 0B 06 3D 2D 05 8E D2 1E
17:25:15.678 -> HEIZ->LAN ANS  710 Heizkreis 1 -  Komfortsollwert: 21.0 °C
17:25:15.714 -> DC 80 42 0E 07 2D 3D 05 8E 00 05 40 C9 AF


vs.

$ curl -H "Content-Type: application/json" -X POST -d '{"Parameter":"710", "Value":"21.0", "Type":"1"}' http://192.168.178.8/JS

hier schaut das log etwas seltsam aus (dieses "---"), aber gesetzt wird trotzdem richtig der übertragene Wert

17:25:20.585 -> POST /JS HTTP/1.1
17:25:20.585 -> /JS
17:25:20.619 -> Setting parameter 710 to 21.0 with type 1
17:25:20.619 -> setting line: 710 val: 01 05 40
17:25:20.827 -> Duration until answer received: 89
17:25:20.827 -> LAN->HEIZ SET  710 Heizkreis 1 -  Komfortsollwert: --- °C
17:25:20.862 -> DC C2 00 0E 03 3D 2D 05 8E 01 05 40 94 FB
17:25:20.862 -> HEIZ->LAN ACK  710 Heizkreis 1 -  Komfortsollwert:
17:25:20.896 -> DC 80 42 0B 04 2D 3D 05 8E 0A 20

freetz

Ja, das ist die one-size-fits-all Auswertung, bei Abfragen steht eine 01 als erstes Byte für einen deaktivierten, eine 00 für einen aktiven Wert, beim Schreiben ist es genau anders herum, ist im SerMo aber nur Kosmetik...
Alle Infos zur Anbindung von Heizungssystemen mit PPS-, LPB- bzw. BSB-Bus ans LAN gibt es hier:
https://github.com/fredlcore/bsb_lan

Alle Infos zum WLAN-Interface "Robotan" für Ambrogio/Stiga/Wolf und baugleiche Rasenmähroboter:
https://github.com/fredlcore/robotan

freetz

#3966
Ok, probiere mal bitte diese Zeile
while (client.available() && j_char_idx < 10 && (isdigit(c) || c=='.')) {
durch diese
while (client.available() && j_char_idx < 10 && (isdigit(c) || c=='.' || c=='-')) {
zu ersetzen und schau' dann mal, ob's klappt...

EDIT: Die Zeile davor muss auch noch in
if (isdigit(c) || c=='-') {
geändert werden...
Alle Infos zur Anbindung von Heizungssystemen mit PPS-, LPB- bzw. BSB-Bus ans LAN gibt es hier:
https://github.com/fredlcore/bsb_lan

Alle Infos zum WLAN-Interface "Robotan" für Ambrogio/Stiga/Wolf und baugleiche Rasenmähroboter:
https://github.com/fredlcore/robotan

tetzlav

Jupp, sehr gut, funktioniert!
21:09:08.649 -> POST /JS HTTP/1.1
21:09:08.649 -> /JS
21:09:08.683 -> Setting parameter 10003 to -3.1 with type 0
21:09:08.683 -> setting line: 10003 val: 00 FF 3A
21:09:08.751 -> LAN->HEIZ INF 10003 Benutzerdefiniert -  Außentemperatur: -3.1 &deg;C
21:09:08.786 -> DC C2 00 0E 02 05 00 02 1F 00 FF 3A A1 5B


Vielen Dank für den schnellen Support. Da kanns ja heute nacht wieder kalt werden... ;)

michalwu

#3968
Zitat von: Schotty am 26 September 2019, 15:09:59
Also here no need to change anything in the config.h-setting.
Scenario: You connect the adapter correctly to the controller, the controller/heater is powered on and after that also the adapter, then BSB-LAN checks the type of your controller. IF there would be problems with the auto-detection (which normally doesnt happen with the LMS15) and BSB-LAN wouldnt be able to autodetect the controller, you should query parameters /6225 and /6226 with BSB-LAN (you cant get them from the heater-control-panel) and put in the reported values (NOT just 6225&6226, because that are just the numbers of the specific parameters). E.g.: 163 at parameter 6225 and 16 at parameter 6226, which is the LMS15 if I remember correctly. But thats just for your understanding.

Nope, usually no need to configure anything at the heater itself. If you already have your RGT1 correctly installed, it will work parallel to the adapter.
Hmm, right now I dont remeber where the manuals disagree in this point..


Hi
I finally was able to solder and install BSB. Network is working fine with W5100 clone. Arduino is genuine board. PSU with some more amps just to be on safe side.
I had to make slight changes to values since I didn't have 2 of resistors. So I ended with 620k instead of 560k and 330ohm instead of 300.
LED is not installed as well.
Transistor is rotated 180deg because I used 2N4401. I didn't have BC547A.
I added some goldpins for support, but from what I saw this pads are not used (I hope I am not wrong).

Aaaand it is not working. ip/Q gives me "Device query failed!" Any ideas where to look for an issue?
Firmware I am using is 0.42
I tried with:
1. Default settings
2. Fixed device changed:
fixed_device_family = 163
fixed_device_variant = 16

3. Bus changed (7, since I already have one room unit)
BSB bus(68,69,7)

4. Fixed device and bus together.
fixed_device_family = 163
fixed_device_variant = 16
BSB bus(68,69,7)


Serial monitor shows:

Size of cmdtbl1: 17612
Size of cmdtbl2: 31722
free RAM:4790
Starting SD..failed
1x.x.x.xx
Waiting 3 seconds to give Ethernet shield time to get ready...
query failed
query failed
query failed
query failed
query failed
query failed
Device family: 0
Device variant: 0
query failed
query failed
query failed
query failed
query failed
query failed
104209 FF FF



I tried to check 6225 setting on my device, but this seems to be available only in OEM part of interface, to which I do not have access code.

Schotty

#3969
Zitat von: michalwu am 02 November 2019, 13:37:06
I had to make slight changes to values since I didn't have 2 of resistors. So I ended with 620k instead of 560k and 330ohm instead of 300.
LED is not installed as well.
I added some goldpins for support, but from what I saw this pads are not used (I hope I am not wrong).
Aaaand it is not working. ip/Q gives me "Device query failed!" Any ideas where to look for an issue?
Duuuude - when you already ordered the PCB from freetz - why didnt you also order the necessary parts?!? EDIT: Or even bought an already soldered and checked adapter from him..?!?
Sorry, but my crstal ball is off duty right now and its kinda hard to tell where the problem is, when you changed so many things.. Usually we wouldn't even answer anything more to this question than a 'buy the right parts', but I'll try..

Up to me: the adapter is just not working because of wrong connection and/or wrong or missing hardware parts - as you can see in the serial oputput, there's no answer from the controller (even if there's a '104209 FF FF' listed for what I don't know what that is).

1. Looking at the pictures, the first thing I noticed is the wiring: At the adapter you connected a black&white cable, the green one is cut. At the controller of the heater, you connected green(!) & black to one FB-port, and white and a green/yellow-cable to a second FB-port, also a blue&brown cable to the third port (which belongs to your room unit I guess). So, judging by looking at the pictures: just connect the black&white cable in the right way (CL+ <-> CL+ and CL- <-> CL-) to ONE port.
 
2. Did you set all the parts in the right direction and connected them in the right way? E.g. the BC547A-transistor? If the pins (c/b/e) are not in the the right spots, it doesnt work. Just judging by the picture, it seems that it's turned around 180°, but if the pins of your specific transistor are different than the ones freetz is using, than it may be ok. Check the layout in the manual (https://1coderookie.github.io/BSB-LPB-LAN/anhang_a1.html) and the data-sheet of your specific transistor-model.

3. Up to me, the LED is needed in this circuit! If you dont put it in (of course also in the right direction, watch the polarity), the circuit is not closed. Besides that, it works as a control-unit for you to see if the adapter is working and is receiving/sending data from/to the bus properly. Also check the layout for this: https://1coderookie.github.io/BSB-LPB-LAN/anhang_a1.html

4. My suggestion: Order the right parts which are necessary for this! No need to mess around here.. Parts list from the manual (https://1coderookie.github.io/BSB-LPB-LAN/anhang_a2.html#a22-teileliste):

Für den Einsatz des Adapters an einem Arduino:
1x LED (rot) (Betriebsspannung max. 2,8V, Sperrspannung 5V) (→ D1)
1x Diode 1N4148 (→ D2)
1x Transistor BC547A (→ Q1)
je 1x Widerstand 560kΩ (→ R1), 1,5kΩ (→ R2), 300Ω (→ R3), 4,7kΩ (→ R4)
2x Optokoppler 4N25 (→ U1, U2) (plus optional 2x Sockel)


AT LEAST put in the LED and see how it goes from there..

5. If everything works and the LED is lit after connecting the adapter to the controller, autodection should definitely work on your model (if the controller is already powered on after arduino starts), so there is no need to put in the device family&variant in the config.h.

6. Same with the address of the bus - as I told you the other day, usually there's no need to change the address, even if the '7' would be fine (assuming that your room unit is defined as RGT1!).

7. Afaik, 6225 is not accessable from the regular control unit, so don't waste any time on looking for that stuff. After everything works fine, /Q and /6220-6236 will be queried by BSB-LAN and you'll get the output.

Answers no.5,6,7 just for your information, so that you can concentrate on the hardware..

So, that was the long version - the kiss-answer would have been: Just order the right parts and solder everything together in the right way.
If the LED is not lid after connecting and turning on the controller, check wiring again. Then check everything on your PCB again and again - all parts, all connections you made, everything.. If then it's still not working, probably by a new set of parts and do it all again.
As I said already a few times: The LED must be lit when the adapter is connected properly and the controller is powered on. If that's not the case, then there's still a problem on the hardware-side somewhere, which (in most of the cases) we can't figure out from here.. 
Handbuch zur BSB-LAN Hard- & Software (Anbindung v. Heizungsreglern, u.a. von Brötje & Elco):
https://1coderookie.github.io/BSB-LPB-LAN/

freetz

After Schotty's comprehensive answer just a short one from me:
yes, the missing LED is the (main) problem as the circuit is not closed. If you don't have the LED, you could try to just shorten the two pads, but it is a really helpful tool when debugging.
The different resistor values COULD work, but if not, then I'd try first to change them. Well, before that I'd check for "cold" solder pads.

Once you have everything up and running, please post your /Q output here, thanks!

@Schotty: especially uses in non-EU counties often opt for the plain PCB because a simple letter is usually not checked by customs. When I add the parts, I have to use a small box that usually gets examined by customs, so I can understand why people go that way. But that case of course they should build the complete kit ;)...
Alle Infos zur Anbindung von Heizungssystemen mit PPS-, LPB- bzw. BSB-Bus ans LAN gibt es hier:
https://github.com/fredlcore/bsb_lan

Alle Infos zum WLAN-Interface "Robotan" für Ambrogio/Stiga/Wolf und baugleiche Rasenmähroboter:
https://github.com/fredlcore/robotan

Schotty

Zitat von: freetz am 02 November 2019, 14:52:17
@Schotty: especially uses in non-EU counties often opt for the plain PCB because a simple letter is usually not checked by customs.
Yes, you're right, but michalwu didn't answer my question where he's from (the other day), so I assumed but I didn't knew for 100% that he's 'off-country'.. ;)
Handbuch zur BSB-LAN Hard- & Software (Anbindung v. Heizungsreglern, u.a. von Brötje & Elco):
https://1coderookie.github.io/BSB-LPB-LAN/

michalwu

Schotty and freetz,

Thank you both for your precious time. I feel very bad and ashamed since i should inspect circuit BETTER before asking here.
You are right, this has to be LED. I am terribly sorry. Will get back when I move forward.

I am from Poland, sorry for not saying this the other day. It's just to many things going on around...

m.

freetz

Alle Infos zur Anbindung von Heizungssystemen mit PPS-, LPB- bzw. BSB-Bus ans LAN gibt es hier:
https://github.com/fredlcore/bsb_lan

Alle Infos zum WLAN-Interface "Robotan" für Ambrogio/Stiga/Wolf und baugleiche Rasenmähroboter:
https://github.com/fredlcore/robotan

Schotty

Handbuch zur BSB-LAN Hard- & Software (Anbindung v. Heizungsreglern, u.a. von Brötje & Elco):
https://1coderookie.github.io/BSB-LPB-LAN/