• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pilight usb nano format conversion
#1
I am trying to send Raw codes captured via pilight from before via OpenMQTTGateway, under the hood it uses pilight.
Reading through the code I tracked down this required format that needs to be passed for raw transmission.

Code:
See file here
https://github.com/pilight/pilight-usb-nano/blob/master/pilight_usb_nano.c

// Code formatting meant for sending
// on  c:102020202020202020220202020020202200202200202020202020220020202203;p:279,2511,1395,9486;r:5@
// off c:102020202020202020220202020020202200202200202020202020202020202203;p:279,2511,1395,9486;r:5@


The raw code that works for me looks like this

Code:
216 744 240 744 240 744 720 264 240 744 720 264 240 768 240 744 720 264 720 288 240 744 240 744 720 264 720 264 720 264 720 264 720 264 240 744 240 768 216 768 720 288 696 264 720 264 720 264 720 288 696 288 216 768 216 768 720 288 696 288 696 288 696 264 216 8328


Is there a way to convert from my captured pilight raw code to the "code formatting" example in the pilight usb nano code?
 
Reply
#2
I found a discussion thread here that describes it.

I wrote some code to convert from my raw to the pulse train format, I tried sending it but still doesnt work.  

Code:
var rawcode = "207 736 253 736 253 736 736 253 253 736 736 253 253 736 253 736 736 253 713 253 253 713 253 759 713 276 713 276 713 276 713 276 736 253 253 736 253 736 253 736 713 276 230 736 736 253 736 276 713 276 713 276 230 759 253 759 736 253 230 736 253 736 253 736 230 8119"
var uniquecodes = [];
var pulsetrain = "c:";
var rawcodearray = rawcode.split(" ");
rawcodearray.forEach((number, index, array) => {

 let isLastItemInArray = (index === (array.length - 1));
 if(isLastItemInArray) {
   pulsetrain += ';p:' + uniquecodes.join(',') + ',' + number + '@';
 }
 else {
   if(!uniquecodes.includes(number)) {
     uniquecodes.push(number);
   }
   pulsetrain += uniquecodes.indexOf(number);  
 }
 
})


//example output c:00000000000100010101010002;p:370,670,11590@
console.log('Pulse train is:');
console.log(pulsetrain);
console.log('choo choo!');


If anyone can validate my conversion that would be great.  
I have an RTL-SDR running too so I am 100% sure something is getting transmitted, its just not working for the device I am targeting at the moment.
 
Reply
#3
Why not just check the source code of pilight itself?
https://github.com/pilight/pilight/blob/...33nano.lua
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  pilight cpu usage possibly associated with noticeable sluggishness? hepcat72 2 10 53 minutes ago
Last Post: hepcat72
  apt.pilight.org stable Release' is not signed. thomasol 2 164 01-23-2020, 11:34 PM
Last Post: thomasol
  pilight and SIGNALduino cc1101 Caleus 0 92 01-19-2020, 09:13 AM
Last Post: Caleus
  filter stopped working after update to pilight 8.1.5 zlin50 19 510 01-03-2020, 02:15 PM
Last Post: curlymo
Question [Solved] Openweathermap with pilight 7.0-40 doesn't work Seebueb 2 131 01-01-2020, 06:45 PM
Last Post: Seebueb
  [Solved] Strange receive problem with 433Mhz Receiver and pilight 8.1.5 vanillaice30 15 656 12-18-2019, 11:09 AM
Last Post: vanillaice30
  pilight error after update to 8.1.5 on Odroid C2 WitchDoctor 3 314 11-29-2019, 09:56 PM
Last Post: curlymo
  pilight crashing randomly PatiB 7 498 11-16-2019, 10:50 PM
Last Post: curlymo
  [Fixed] RaspberryPi4 pilight 8.1.5 - Send isn't working DominikB1993 4 531 10-18-2019, 10:25 PM
Last Post: DominikB1993
  Real 433Mhz Remote is disturbed by pilight service henne111 2 453 10-06-2019, 06:18 PM
Last Post: wo_rasp

Forum Jump:


Browsing: 1 Guest(s)