TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Installation error on Raspberry PI 3

    Raspberry Pi
    2
    7
    470
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Sébastien PineauS
      Sébastien Pineau
      last edited by

      Hi,

      I receive an error when installing triggercmd. Something related to node_modules.
      I tried several hints provided, removed, put back, changed npm, still operation not allowed.

      root@raspberrypi:~# dpkg -i triggercmdagent_1.0.1_all.deb
      (Lecture de la base de données... 146201 fichiers et répertoires déjà installés.)
      Préparation du dépaquetage de triggercmdagent_1.0.1_all.deb ...
      Dépaquetage de triggercmdagent (1.0.1) sur (1.0.1) ...
      Paramétrage de triggercmdagent (1.0.1) ...
      Directory 'node_modules' exists. Running 'npm rebuild'
      /var/lib/dpkg/info/triggercmdagent.postinst : ligne 71 : 4776 Instruction non permise npm rebuild --production
      dpkg: erreur de traitement du paquet triggercmdagent (--install) :
      le sous-processus script post-installation installé a retourné une erreur de sortie d'état 132
      Des erreurs ont été rencontrées pendant l'exécution :
      triggercmdagent

      Sorry for the french installation, hope this is not the problem.
      The system has a lot of running modules used to control home automation, so i cannot go from scratch.

      RussR 1 Reply Last reply Reply Quote 0
      • RussR
        Russ @Sébastien Pineau
        last edited by Russ

        @Sébastien-Pineau said in Installation error on Raspberry PI 3:

        root@raspberrypi:~# dpkg -i triggercmdagent_1.0.1_all.deb
        (Lecture de la base de données... 146201 fichiers et répertoires déjà installés.)
        Préparation du dépaquetage de triggercmdagent_1.0.1_all.deb ...
        Dépaquetage de triggercmdagent (1.0.1) sur (1.0.1) ...
        Paramétrage de triggercmdagent (1.0.1) ...
        Directory 'node_modules' exists. Running 'npm rebuild'
        /var/lib/dpkg/info/triggercmdagent.postinst : ligne 71 : 4776 Instruction non permise npm rebuild --production
        dpkg: erreur de traitement du paquet triggercmdagent (--install) :
        le sous-processus script post-installation installé a retourné une erreur de sortie d'état 132
        Des erreurs ont été rencontrées pendant l'exécution :
        triggercmdagent

        @Sébastien-Pineau , can you show me which version of node js you have installed?

        node -v
        

        I know it's not compatible with some versions of nodejs 15.

        Russell VanderMey

        1 Reply Last reply Reply Quote 0
        • Sébastien PineauS
          Sébastien Pineau
          last edited by

          Hi Russ,
          Thank you for your fast reply.
          Actually, it now work fine, I tried several of your proposals and other about nvm, but I'm unfortunately unable to say which one finally solved the issue. I made further testing with commands from my ok google to control my house appliances and cheap 443Mhz plugs and it look great. Thank you.

          Sébastien PineauS 1 Reply Last reply Reply Quote 0
          • Sébastien PineauS
            Sébastien Pineau @Sébastien Pineau
            last edited by

            And node -v gave me v16.5.0

            RussR 1 Reply Last reply Reply Quote 0
            • RussR
              Russ @Sébastien Pineau
              last edited by

              @Sébastien-Pineau, awesome. I'm glad you got it working. Can you tell me which 443mhz plugs you're using and how you're switching them with the Raspberry Pi? I might want to do the same.

              Russell VanderMey

              Sébastien PineauS 1 Reply Last reply Reply Quote 0
              • Sébastien PineauS
                Sébastien Pineau @Russ
                last edited by

                They are Phoenix 433 Plug, chinese cheap, the one sold with a remote control ABCD. They are quite old now, can't find them online. You can scan the code send by the remote and repeat it with a 433MHz receiver/emitter or use this piece of code I found some time ago:

                import time
                import sys
                import RPi.GPIO as GPIO
                from DHT11_06_DC import read_temp
                a_on =  '1111111111111010101011101'
                a_off = '1111111111111010101010111'
                b_on =  '1111111111101110101011101'
                b_off = '1111111111101110101010111'
                c_on =  '1111111111101011101011101'
                c_off = '1111111111101011101010111'
                d_on =  '1111111111101010111011101'
                d_off = '1111111111101010111010111'
                r_on =  '1010101010111'
                r_off = '1010101011101'
                short_delay =    0.00045
                long_delay =     0.00090
                extended_delay = 0.0096
                NUM_ATTEMPTS = 10
                TRANSMIT_PIN = 16
                def transmit_code(code):
                	'''Transmit a chosen code string using the GPIO transmitter'''
                	GPIO.setmode(GPIO.BCM)
                	GPIO.setup(TRANSMIT_PIN, GPIO.OUT)
                	for t in range(NUM_ATTEMPTS):
                		for i in code:
                			if i == '1':
                				GPIO.output(TRANSMIT_PIN, 1)
                				time.sleep(short_delay)
                				GPIO.output(TRANSMIT_PIN, 0)
                				time.sleep(long_delay)
                			elif i == '0':
                				GPIO.output(TRANSMIT_PIN, 1)
                				time.sleep(long_delay)
                				GPIO.output(TRANSMIT_PIN, 0)
                				time.sleep(short_delay)
                			else:
                				continue
                		GPIO.output(TRANSMIT_PIN, 0)
                		time.sleep(extended_delay)
                	GPIO.cleanup()
                def main():
                	while True:
                		
                		tmp=50#read_temp(50)
                		print(tmp,end='')
                		if tmp>=40:
                			exec('transmit_code(r_on)')
                			print (' on',end='')
                		time.sleep(5)
                		if tmp> 41:   
                			exec('transmit_code(r_off)')
                			print (' off',end='')
                		print (':')
                		time.sleep(5)            
                if __name__=='__main__':
                	main()
                
                RussR 1 Reply Last reply Reply Quote 0
                • RussR
                  Russ @Sébastien Pineau
                  last edited by

                  Very cool. Thanks @Sébastien-Pineau. I'll let you know if I get this working.

                  Russell VanderMey

                  1 Reply Last reply Reply Quote 0
                  • tuicemenT tuicemen moved this topic from Instructions on
                  • First post
                    Last post