Rocnet -> MQTT -> DCC

http://wiki.rocrail.net/doku.php?id=roc ... netnode-en

Rocnet -> MQTT -> DCC

Postby Liviu M » 19.11.2017, 13:53

Hi all,
as already reported, I'm playing in the (not so much) spare time with a Rocnet -> MQTT -> DCC interface based on the ESP8266 && TivaC boards.
After the first "offline" success reported in the linked post, today I've successfully controlled a Loco (speed - 28 & 128 steps, direction - forward/reverse and lights - on/off) using the TivaC board. :)

I don't have any "sharable" code (yet), I've just posted to say "it can be done".

Best regards,
Liviu
Last edited by Liviu M on 20.11.2017, 08:18, edited 3 times in total.
----------------------------------------------
System: DCC N-Scale
CS: Profiboss (Loconet)
Server: RaspberryPi/OdroidC1/OpenSuse
Client: OpenSuse/Windows(?)
----------------------------------------------
Liviu M
 

Re: Rocnet -> MQTT -> DCC

Postby Liviu M » 19.11.2017, 17:29

Just tested with ESP8266 and my Loco is moving & lighting. :)
----------------------------------------------
System: DCC N-Scale
CS: Profiboss (Loconet)
Server: RaspberryPi/OdroidC1/OpenSuse
Client: OpenSuse/Windows(?)
----------------------------------------------
Liviu M
 

Re: Rocnet -> MQTT -> DCC

Postby vanderborden » 06.01.2018, 22:19

Hi Liviu

Can/will you post the .ino files for the ESP ?

br

jan
gr jan
vanderborden
 

Re: Rocnet -> MQTT -> DCC

Postby Liviu M » 07.01.2018, 12:06

Hi Jan,
yes, sometime in the future I'll publish it, but isn't that time (yet) and I don't have any "forecast".
It isn't just a sketch (.ino), but some libraries & files (modified from internet or my own) and they aren't ready for publishing.

Regards,
Liviu
----------------------------------------------
System: DCC N-Scale
CS: Profiboss (Loconet)
Server: RaspberryPi/OdroidC1/OpenSuse
Client: OpenSuse/Windows(?)
----------------------------------------------
Liviu M
 

Re: Rocnet -> MQTT -> DCC

Postby vanderborden » 07.01.2018, 12:46

Hi Liviu

thanks for your reply

that's a pity it would be nice controling your locs by wifi/MQTT/node-red etc. :cry:

I hope you will get inspiration and be able to publish this development in due course. :)
gr jan
vanderborden
 

Re: Rocnet -> MQTT -> DCC

Postby Dagnall » 16.01.2018, 14:15

Just a quick note:
I have ESP8266 working with Rocnet and MQTT on a NodeMCU board, similar to WEMOS.
I wrote an original version some time ago, and Livu was kind enough to offer some help. :beer:

I am currently rewriting the code and trying to make it easier to understand, but It does work!
There are two versions of the code, selected by compiler directives.
One is as a Mobile node, and controls the locomotive motor via a standard RC brushed DC motor controller. This has front and back lights defined and also now plays sampled (.wav) sound effects, such as chuffs or whistles/ bells etc.
The Static node allows the hardware ports to be either inputs to sense track occupancy etc, or outputs to operate servos (for points) or PWM for lights etc.

The current version of the code is at https://github.com/dagnall53/ESPMQTTRocnetSound

I will be updating the code as I improve it. :coding:
Dagnall
ESP8266 Based RocNet Universal 8 i/o decoder and Mobile Decoder. http://wiki.rocrail.net/doku.php?id=users:dagnall53:description
G Scale 3D printed Locos and wagons : (on Thingyverse)
Dagnall
 


Return to RocNetNode

cron